add - 黑粉统计添加设定值显示

dep_nodyang
wangsr 1 year ago
parent da9eb0b193
commit 87009dfd0b

@ -45,6 +45,8 @@ namespace Mesnac.Action.ChemicalWeighing.LjReport.DayWhiteEmbryo
List<ManualLogEntity> list; List<ManualLogEntity> list;
List<ManualLogEntity> listMore; List<ManualLogEntity> listMore;
List<ManualLogEntity> listSet;
public void Run(RuntimeParameter runtime) public void Run(RuntimeParameter runtime)
{ {
base.RunIni(runtime); //必须调用 base.RunIni(runtime); //必须调用
@ -75,7 +77,8 @@ namespace Mesnac.Action.ChemicalWeighing.LjReport.DayWhiteEmbryo
dt.Columns.Add("总量", typeof(string)); dt.Columns.Add("总量", typeof(string));
MoreDataTable = new DataTable(); MoreDataTable = new DataTable();
MoreDataTable.Columns.Add("重量", typeof(string)); MoreDataTable.Columns.Add("设定重量", typeof(string));
MoreDataTable.Columns.Add("实际重量", typeof(string));
MoreDataTable.Columns.Add("时间", typeof(string)); MoreDataTable.Columns.Add("时间", typeof(string));
btnOk.Click += BtnOk_Click; btnOk.Click += BtnOk_Click;
@ -120,12 +123,17 @@ namespace Mesnac.Action.ChemicalWeighing.LjReport.DayWhiteEmbryo
} }
int num = int.Parse(chr.ToString()); int num = int.Parse(chr.ToString());
listMore = list.Where(x => x.deviceno == num).ToList(); listMore = list.Where(x => x.deviceno == num).ToList();
listSet = FreeSqlUnit.Instance.Select<ManualLogEntity>().Where(x => x.valuekind == 3 && x.devicekind == 2 && x.deviceno == num).ToList();
for (int i = 0; i < listMore.Count; i++) for (int i = 0; i < listMore.Count; i++)
{ {
var dr = MoreDataTable.NewRow(); var dr = MoreDataTable.NewRow();
dr[0] = listMore[i].value; var val = listSet.Where(x => x.logtime <= listMore[i].logtime);
dr[1] = listMore[i].logtime; if (val.Count() != 0)
{
dr[0] = val.LastOrDefault().value;
}
dr[1] = listMore[i].value;
dr[2] = listMore[i].logtime;
MoreDataTable.Rows.Add(dr); MoreDataTable.Rows.Add(dr);
} }

@ -176,9 +176,6 @@
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\PlugInPlatform\Mesnac.PlugIn.dll</HintPath> <HintPath>..\..\..\PlugInPlatform\Mesnac.PlugIn.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.Office.Interop.Excel">
<HintPath>..\..\Microsoft.Office.Interop.Excel.dll</HintPath>
</Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />

@ -28,8 +28,8 @@
<Property name="MultiSelect">False</Property> <Property name="MultiSelect">False</Property>
<Property name="Location">348, 12</Property> <Property name="Location">348, 12</Property>
<Property name="Name">MoreData</Property> <Property name="Name">MoreData</Property>
<Property name="Size">330, 622</Property> <Property name="Size">439, 622</Property>
<Property name="TabIndex">9</Property> <Property name="TabIndex">7</Property>
</Object> </Object>
<Object type="System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="GroupBox1" children="Controls"> <Object type="System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="GroupBox1" children="Controls">
<Object type="Mesnac.Controls.Default.MCButton, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="NightWork" children="Controls"> <Object type="Mesnac.Controls.Default.MCButton, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="NightWork" children="Controls">
@ -334,7 +334,7 @@
<Property name="MCPurview">False</Property> <Property name="MCPurview">False</Property>
<Property name="AllowOriginalSizeShow">False</Property> <Property name="AllowOriginalSizeShow">False</Property>
<Property name="BackColor">Control</Property> <Property name="BackColor">Control</Property>
<Property name="Size">706, 683</Property> <Property name="Size">815, 683</Property>
<Property name="StartPosition">WindowsDefaultLocation</Property> <Property name="StartPosition">WindowsDefaultLocation</Property>
<Property name="Text">湿混机黑粉下料统计</Property> <Property name="Text">湿混机黑粉下料统计</Property>
<Property name="WindowState">Normal</Property> <Property name="WindowState">Normal</Property>

Loading…
Cancel
Save