diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjReport/WetWaitTime/ExportToPc.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjReport/WetWaitTime/ExportToPc.cs index ec15a59..0bc0ee5 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjReport/WetWaitTime/ExportToPc.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjReport/WetWaitTime/ExportToPc.cs @@ -149,18 +149,27 @@ namespace Mesnac.Action.ChemicalWeighing.LjReport.WetWaitTime dt.Rows.Add(dr); } - var edr = dt.NewRow(); - edr[0] = "湿混等待时间总和"; - edr[1] = TimeConvert(list.Sum(x => x.MixWaitTime)); - dt.Rows.Add(edr); - var edr1 = dt.NewRow(); - edr1[0] = "RGV等待时间总和"; - edr1[1] = TimeConvert(list.Sum(x => x.RgvWaitTime)); - dt.Rows.Add(edr1); - var edr2 = dt.NewRow(); - edr2[0] = "总等待时间总和"; - edr2[1] = TimeConvert(list.Sum(x => x.MixWaitTime + x.RgvWaitTime)); - dt.Rows.Add(edr2); + + try + { + var edr = dt.NewRow(); + edr[0] = "湿混等待时间总和"; + edr[1] = TimeConvert(list.Sum(x => x.MixWaitTime)); + dt.Rows.Add(edr); + var edr1 = dt.NewRow(); + edr1[0] = "RGV等待时间总和"; + edr1[1] = TimeConvert(list.Sum(x => x.RgvWaitTime)); + dt.Rows.Add(edr1); + var edr2 = dt.NewRow(); + edr2[0] = "总等待时间总和"; + edr2[1] = TimeConvert(list.Sum(x => x.MixWaitTime + x.RgvWaitTime)); + dt.Rows.Add(edr2); + } + catch (OverflowException ex) + { + MessageBox.Show("算术值溢出!请检查数据是否有误"); + } + } /// diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjReport/WetWaitTime/WetTimeCounting.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjReport/WetWaitTime/WetTimeCounting.cs index cc33ec4..21ac4a0 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjReport/WetWaitTime/WetTimeCounting.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjReport/WetWaitTime/WetTimeCounting.cs @@ -10,6 +10,7 @@ using System.Data; using System.Linq; using System.Text; using System.Threading.Tasks; +using System.Windows.Forms; namespace Mesnac.Action.ChemicalWeighing.LjReport.WetWaitTime { @@ -225,18 +226,25 @@ namespace Mesnac.Action.ChemicalWeighing.LjReport.WetWaitTime dt.Rows.Add(dr); } - var edr = dt.NewRow(); - edr[0] = "湿混等待时间总和"; - edr[1] = TimeConvert(list.Sum(x => x.MixWaitTime)); - dt.Rows.Add(edr); - var edr1 = dt.NewRow(); - edr1[0] = "RGV等待时间总和"; - edr1[1] = TimeConvert(list.Sum(x => x.RgvWaitTime)); - dt.Rows.Add(edr1); - var edr2 = dt.NewRow(); - edr2[0] = "总等待时间总和"; - edr2[1] = TimeConvert(list.Sum(x => x.MixWaitTime + x.RgvWaitTime)); - dt.Rows.Add(edr2); + try + { + var edr = dt.NewRow(); + edr[0] = "湿混等待时间总和"; + edr[1] = TimeConvert(list.Sum(x => x.MixWaitTime)); + dt.Rows.Add(edr); + var edr1 = dt.NewRow(); + edr1[0] = "RGV等待时间总和"; + edr1[1] = TimeConvert(list.Sum(x => x.RgvWaitTime)); + dt.Rows.Add(edr1); + var edr2 = dt.NewRow(); + edr2[0] = "总等待时间总和"; + edr2[1] = TimeConvert(list.Sum(x => x.MixWaitTime + x.RgvWaitTime)); + dt.Rows.Add(edr2); + } + catch (OverflowException ex) + { + MessageBox.Show("算术值溢出!请检查数据是否有误"); + } } private string TimeConvert(int t) diff --git a/Main/MCEdit/Data/MCProject/nodeForm/WeterTimeCount.xml b/Main/MCEdit/Data/MCProject/nodeForm/WeterTimeCount.xml index 15eb5e6..402bf55 100644 --- a/Main/MCEdit/Data/MCProject/nodeForm/WeterTimeCount.xml +++ b/Main/MCEdit/Data/MCProject/nodeForm/WeterTimeCount.xml @@ -25,12 +25,11 @@ None True True - False False 348, 12 MoreData 530, 622 - 7 + 9