From 87009dfd0b5c531aadc963fc5dcbe7be5a288c5c Mon Sep 17 00:00:00 2001 From: wangsr Date: Wed, 18 Oct 2023 23:23:24 +0800 Subject: [PATCH] =?UTF-8?q?add=20-=20=E9=BB=91=E7=B2=89=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AE=BE=E5=AE=9A=E5=80=BC=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DayWhiteEmbryo/GelBlackPowderCount.cs | 16 ++++++++++++---- .../Mesnac.Action.ChemicalWeighing.csproj | 3 --- .../MCProject/nodeForm/GelBlackPowderCount.xml | 6 +++--- 3 files changed, 15 insertions(+), 10 deletions(-) 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