diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjReport/DayWhiteEmbryo/GelBlackPowderCount.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjReport/DayWhiteEmbryo/GelBlackPowderCount.cs index 2c9b227..d2cf9b9 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjReport/DayWhiteEmbryo/GelBlackPowderCount.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjReport/DayWhiteEmbryo/GelBlackPowderCount.cs @@ -47,6 +47,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjReport.DayWhiteEmbryo List listMore; List listSet; + public void Run(RuntimeParameter runtime) { base.RunIni(runtime); //必须调用 @@ -203,16 +204,14 @@ namespace Mesnac.Action.ChemicalWeighing.LjReport.DayWhiteEmbryo dr[0] = "湿混机" + i; var totalWeight = list.Where(x => x.deviceno == i).Sum(x => x.value); dr[1] = totalWeight.ToString(); - - var totalCount=list.Where(x => x.deviceno==i).Where(x=>x.value>400).Count(); + var totalCount = list.Where(x => x.deviceno == i).Where(x => x.value > 400).Count(); dr[2] = totalCount.ToString(); - - dt.Rows.Add(dr); } var edr = dt.NewRow(); edr[0] = "生产总和"; edr[1] = list.Sum(x => x.value).ToString(); + edr[2] = list.Where(x => x.value > 400).Count(); dt.Rows.Add(edr); dataGridView.DataSource = null; diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/Entity/DeviceDetailEntity.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/Entity/DeviceDetailEntity.cs index d0a9b9a..d613ac8 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/Entity/DeviceDetailEntity.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/Entity/DeviceDetailEntity.cs @@ -63,23 +63,6 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl.Entity public MCLabel ValueWeight3 { get; set; } public MCLabel ValueWeight4 { get; set; } - public MCLabel WetWait1 { get; set; } - public MCLabel WetWait2 { get; set; } - public MCLabel WetWait3 { get; set; } - public MCLabel WetWait4 { get; set; } - public MCLabel WetWait5 { get; set; } - public MCLabel WetWait6 { get; set; } - public MCLabel WetWait7 { get; set; } - public MCLabel WetWait8 { get; set; } - public MCLabel RGVWait1 { get; set; } - public MCLabel RGVWait2 { get; set; } - public MCLabel RGVWait3 { get; set; } - public MCLabel RGVWait4 { get; set; } - public MCLabel RGVWait5 { get; set; } - public MCLabel RGVWait6 { get; set; } - public MCLabel RGVWait7 { get; set; } - public MCLabel RGVWait8 { get; set; } - } public class SwitchLightEntity diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs index cb23142..791911b 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs @@ -181,8 +181,8 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl PropertyInfo property = ledDisplayType.GetProperty(name); HslLedDisplay ledDisplay = (HslLedDisplay)property.GetValue(LedDisplayE); //bottle.Value = n * i++; - ledDisplay.BackColor = Color.FromArgb(46, 46, 46); - ledDisplay.DisplayBackColor = Color.FromArgb(62, 62, 62); + ledDisplay.BackColor = Color.FromArgb(32, 72, 98); + ledDisplay.DisplayBackColor = Color.FromArgb(32, 72, 98); ledDisplay.DisplayNumber = 5; ledDisplay.ForeColor = Color.White; ledDisplay.LedNumberSize = 2; @@ -362,6 +362,9 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl if (!Mixes[i] && !record.RGVIsReach && record.MixIsReady) { MessageBox.Show("湿混机搅拌完毕指示灯无故熄灭\nRGV小车未到达 接料未结束"); + FreeSqlUnit.Instance.Update() + .Set(x => x.MixIsReady, false) + .Where(x => x.DeviceNo == deviceNo && !x.Done).ExecuteAffrows(); } } } @@ -380,49 +383,31 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl switch (deviceNo) { case 1: - LabelE.WetWait1.Text = MixWaitTime(record); - LabelE.WetWait1.ForeColor = MixTimeBackColor(record); - LabelE.RGVWait1.Text = "0"; LedDisplayE.WetWaitDisPlay1.DisplayText = MixWaitTimeLed(record); LedDisplayE.WetWaitDisPlay1.ForeColor = MixTimeBackColor(record); LedDisplayE.RGVWaitDisPlay1.DisplayText = "00:00"; break; case 2: - LabelE.WetWait2.Text = MixWaitTime(record); - LabelE.WetWait2.ForeColor = MixTimeBackColor(record); - LabelE.RGVWait2.Text = "0"; LedDisplayE.WetWaitDisPlay2.DisplayText = MixWaitTimeLed(record); LedDisplayE.WetWaitDisPlay2.ForeColor = MixTimeBackColor(record); LedDisplayE.RGVWaitDisPlay2.DisplayText = "00:00"; break; case 3: - LabelE.WetWait3.Text = MixWaitTime(record); - LabelE.WetWait3.ForeColor = MixTimeBackColor(record); - LabelE.RGVWait3.Text = "0"; LedDisplayE.WetWaitDisPlay3.DisplayText = MixWaitTimeLed(record); LedDisplayE.WetWaitDisPlay3.ForeColor = MixTimeBackColor(record); LedDisplayE.RGVWaitDisPlay3.DisplayText = "00:00"; break; case 4: - LabelE.WetWait4.Text = MixWaitTime(record); - LabelE.WetWait4.ForeColor = MixTimeBackColor(record); - LabelE.RGVWait4.Text = "0"; LedDisplayE.WetWaitDisPlay4.DisplayText = MixWaitTimeLed(record); LedDisplayE.WetWaitDisPlay4.ForeColor = MixTimeBackColor(record); LedDisplayE.RGVWaitDisPlay4.DisplayText = "00:00"; break; case 5: - LabelE.WetWait5.Text = MixWaitTime(record); - LabelE.WetWait5.ForeColor = MixTimeBackColor(record); - LabelE.RGVWait5.Text = "0"; LedDisplayE.WetWaitDisPlay5.DisplayText = MixWaitTimeLed(record); LedDisplayE.WetWaitDisPlay5.ForeColor = MixTimeBackColor(record); LedDisplayE.RGVWaitDisPlay5.DisplayText = "00:00"; break; case 6: - LabelE.WetWait6.Text = MixWaitTime(record); - LabelE.WetWait6.ForeColor = MixTimeBackColor(record); - LabelE.RGVWait6.Text = "0"; LedDisplayE.WetWaitDisPlay6.DisplayText = MixWaitTimeLed(record); LedDisplayE.WetWaitDisPlay6.ForeColor = MixTimeBackColor(record); LedDisplayE.RGVWaitDisPlay6.DisplayText = "00:00"; @@ -436,38 +421,26 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl switch (deviceNo) { case 1: - LabelE.RGVWait1.Text = RGVWaitTime(record); - LabelE.WetWait1.ForeColor = RGVTimeBackColor(record); LedDisplayE.RGVWaitDisPlay1.DisplayText = RGVWaitTimeLed(record); LedDisplayE.RGVWaitDisPlay1.ForeColor = RGVTimeBackColor(record); break; case 2: - LabelE.RGVWait2.Text = RGVWaitTime(record); - LabelE.WetWait2.ForeColor = RGVTimeBackColor(record); LedDisplayE.RGVWaitDisPlay2.DisplayText = RGVWaitTimeLed(record); LedDisplayE.RGVWaitDisPlay2.ForeColor = RGVTimeBackColor(record); break; case 3: - LabelE.RGVWait3.Text = RGVWaitTime(record); - LabelE.WetWait3.ForeColor = RGVTimeBackColor(record); LedDisplayE.RGVWaitDisPlay3.DisplayText = RGVWaitTimeLed(record); LedDisplayE.RGVWaitDisPlay3.ForeColor = RGVTimeBackColor(record); break; case 4: - LabelE.RGVWait4.Text = RGVWaitTime(record); - LabelE.WetWait4.ForeColor = RGVTimeBackColor(record); LedDisplayE.RGVWaitDisPlay4.DisplayText = RGVWaitTimeLed(record); LedDisplayE.RGVWaitDisPlay4.ForeColor = RGVTimeBackColor(record); break; case 5: - LabelE.RGVWait5.Text = RGVWaitTime(record); - LabelE.WetWait5.ForeColor = RGVTimeBackColor(record); LedDisplayE.RGVWaitDisPlay5.DisplayText = RGVWaitTimeLed(record); LedDisplayE.RGVWaitDisPlay5.ForeColor = RGVTimeBackColor(record); break; case 6: - LabelE.RGVWait6.Text = RGVWaitTime(record); - LabelE.WetWait6.ForeColor = RGVTimeBackColor(record); LedDisplayE.RGVWaitDisPlay6.DisplayText = RGVWaitTimeLed(record); LedDisplayE.RGVWaitDisPlay6.ForeColor = RGVTimeBackColor(record); break; @@ -479,17 +452,6 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl } } - private string RGVWaitTime(Lj_RGVTimeRecord record) - { - int t = Convert.ToInt32((DateTime.Now - record.RGVReachTime).TotalSeconds); - return SecondToMinute(t); - } - - private string MixWaitTime(Lj_RGVTimeRecord record) - { - int t = Convert.ToInt32((DateTime.Now - record.MixReadyStartTime).TotalSeconds); - return SecondToMinute(t); - } private string RGVWaitTimeLed(Lj_RGVTimeRecord record) { int t = Convert.ToInt32((DateTime.Now - record.RGVReachTime).TotalSeconds); @@ -502,7 +464,6 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl return SecondToTime(t); } - private Color RGVTimeBackColor(Lj_RGVTimeRecord record) { int t = Convert.ToInt32((DateTime.Now - record.RGVReachTime).TotalSeconds); @@ -532,26 +493,15 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl } } - private string SecondToMinute(int t) - { - int m = t / 60; - int s = t % 60; - if (m == 0) - { - return s + "秒"; - } - return m + " 分 " + s + " 秒 "; - } - private string SecondToTime(int t) { int m = t / 60; int s = t % 60; if (m == 0) { - return "00:" + t; + return "00:" + s.ToString("00"); } - return m + ":" + s; + return m.ToString("00") + ":" + s.ToString("00"); } #endregion diff --git a/Main/MCEdit/Data/MCProject/nodeForm/MainDetail.xml b/Main/MCEdit/Data/MCProject/nodeForm/MainDetail.xml index 9e8cbf3..27cabed 100644 --- a/Main/MCEdit/Data/MCProject/nodeForm/MainDetail.xml +++ b/Main/MCEdit/Data/MCProject/nodeForm/MainDetail.xml @@ -2,421 +2,85 @@ - 1773, 669 + 1774, 592 RGVWaitDisPlay8 75, 32 - 1692, 669 + 1693, 592 RGVWaitDisPlay7 75, 32 - 1773, 631 + 1774, 554 WetWaitDisPlay8 75, 32 - 1692, 631 + 1693, 554 WetWaitDisPlay7 75, 32 - 1459, 669 + 1460, 592 RGVWaitDisPlay6 75, 32 - 1378, 669 + 1379, 592 RGVWaitDisPlay5 75, 32 - 1459, 631 + 1460, 554 WetWaitDisPlay6 75, 32 - 1378, 631 + 1379, 554 WetWaitDisPlay5 75, 32 - 1218, 669 + 1219, 592 RGVWaitDisPlay4 75, 32 - 1137, 669 + 1138, 592 RGVWaitDisPlay3 75, 32 - 1218, 631 + 1219, 554 WetWaitDisPlay4 75, 32 - 1137, 631 + 1138, 554 WetWaitDisPlay3 75, 32 - 912, 669 + 913, 592 RGVWaitDisPlay2 75, 32 - 831, 669 + 832, 592 RGVWaitDisPlay1 75, 32 - 912, 631 + 913, 554 WetWaitDisPlay2 75, 32 - 831, 631 + 832, 554 WetWaitDisPlay1 75, 32 - - - - Red - DarkGray - - - False - - - - None - True - True - 0 - 宋体, 10pt - White - 1778, 599 - RGVWait8 - 14, 14 - - - - - Red - DarkGray - - - False - - - - None - True - True - 0 - 宋体, 10pt - White - 1778, 563 - WetWait8 - 14, 14 - - - - - Red - DarkGray - - - False - - - - None - True - True - 0 - 宋体, 10pt - White - 1698, 599 - RGVWait7 - 14, 14 - - - - - Red - DarkGray - - - False - - - - None - True - True - 0 - 宋体, 10pt - White - 1698, 563 - WetWait7 - 14, 14 - - - - - Red - DarkGray - - - False - - - - None - True - True - 0 - 宋体, 10pt - White - 1466, 600 - RGVWait6 - 14, 14 - - - - - Red - DarkGray - - - False - - - - None - True - True - 0 - 宋体, 10pt - White - 1466, 564 - WetWait6 - 14, 14 - - - - - Red - DarkGray - - - False - - - - None - True - True - 0 - 宋体, 10pt - White - 1386, 600 - RGVWait5 - 14, 14 - - - - - Red - DarkGray - - - False - - - - None - True - True - 0 - 宋体, 10pt - White - 1386, 564 - WetWait5 - 14, 14 - - - - - Red - DarkGray - - - False - - - - None - True - True - 0 - 宋体, 10pt - White - 1226, 598 - RGVWait4 - 14, 14 - - - - - Red - DarkGray - - - False - - - - None - True - True - 0 - 宋体, 10pt - White - 1226, 562 - WetWait4 - 14, 14 - - - - - Red - DarkGray - - - False - - - - None - True - True - 0 - 宋体, 10pt - White - 1146, 598 - RGVWait3 - 14, 14 - - - - - Red - DarkGray - - - False - - - - None - True - True - 0 - 宋体, 10pt - White - 1146, 562 - WetWait3 - 14, 14 - - - - - Red - DarkGray - - - False - - - - None - True - True - 0 - 宋体, 10pt - White - 914, 599 - RGVWait2 - 14, 14 - - - - - Red - DarkGray - - - False - - - - None - True - True - 0 - 宋体, 10pt - White - 914, 563 - WetWait2 - 14, 14 - - - - - Red - DarkGray - - - False - - - - None - True - True - 0 - 宋体, 10pt - White - 834, 599 - RGVWait1 - 14, 14 - - - - - Red - DarkGray - - - False - - - - None - True - True - 0 - 宋体, 10pt - White - 834, 563 - WetWait1 - 14, 14 - @@ -431,11 +95,11 @@ None True True - RGV/t + 响应 White - 777, 601 + 797, 601 MCLabel133 - 35, 12 + 29, 12 @@ -451,11 +115,11 @@ None True True - 混炼完/t + 呼叫 White - 777, 565 + 797, 564 MCLabel132 - 53, 12 + 29, 12