diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjReport/DayWhiteEmbryo/GelBlackPowderCount.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjReport/DayWhiteEmbryo/GelBlackPowderCount.cs index bdec540..c0e1ee0 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjReport/DayWhiteEmbryo/GelBlackPowderCount.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjReport/DayWhiteEmbryo/GelBlackPowderCount.cs @@ -45,6 +45,8 @@ namespace Mesnac.Action.ChemicalWeighing.LjReport.DayWhiteEmbryo List list; List listMore; + + List listSet; public void Run(RuntimeParameter runtime) { base.RunIni(runtime); //必须调用 @@ -75,7 +77,8 @@ namespace Mesnac.Action.ChemicalWeighing.LjReport.DayWhiteEmbryo dt.Columns.Add("总量", typeof(string)); MoreDataTable = new DataTable(); - MoreDataTable.Columns.Add("重量", typeof(string)); + MoreDataTable.Columns.Add("设定重量", typeof(string)); + MoreDataTable.Columns.Add("实际重量", typeof(string)); MoreDataTable.Columns.Add("时间", typeof(string)); btnOk.Click += BtnOk_Click; @@ -120,12 +123,17 @@ namespace Mesnac.Action.ChemicalWeighing.LjReport.DayWhiteEmbryo } int num = int.Parse(chr.ToString()); listMore = list.Where(x => x.deviceno == num).ToList(); - + listSet = FreeSqlUnit.Instance.Select().Where(x => x.valuekind == 3 && x.devicekind == 2 && x.deviceno == num).ToList(); for (int i = 0; i < listMore.Count; i++) { var dr = MoreDataTable.NewRow(); - dr[0] = listMore[i].value; - dr[1] = listMore[i].logtime; + var val = listSet.Where(x => x.logtime <= 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); } diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj index 16eeb6d..cdd8605 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj @@ -176,9 +176,6 @@ False ..\..\..\PlugInPlatform\Mesnac.PlugIn.dll - - ..\..\Microsoft.Office.Interop.Excel.dll - diff --git a/Main/MCEdit/Data/MCProject/nodeForm/GelBlackPowderCount.xml b/Main/MCEdit/Data/MCProject/nodeForm/GelBlackPowderCount.xml index 492b7cf..5304f97 100644 --- a/Main/MCEdit/Data/MCProject/nodeForm/GelBlackPowderCount.xml +++ b/Main/MCEdit/Data/MCProject/nodeForm/GelBlackPowderCount.xml @@ -28,8 +28,8 @@ False 348, 12 MoreData - 330, 622 - 9 + 439, 622 + 7 @@ -334,7 +334,7 @@ False False Control - 706, 683 + 815, 683 WindowsDefaultLocation 湿混机黑粉下料统计 Normal