|
|
@ -23,6 +23,7 @@ using System.Threading.Tasks;
|
|
|
|
using System.Windows.Forms;
|
|
|
|
using System.Windows.Forms;
|
|
|
|
using Mesnac.Action.ChemicalWeighing.LjMaterial;
|
|
|
|
using Mesnac.Action.ChemicalWeighing.LjMaterial;
|
|
|
|
using Mesnac.Action.ChemicalWeighing.MinAn;
|
|
|
|
using Mesnac.Action.ChemicalWeighing.MinAn;
|
|
|
|
|
|
|
|
using System.Xml.Serialization;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -139,7 +140,7 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
base.RunIni(runtime); //必须要调用
|
|
|
|
base.RunIni(runtime); //必须要调用
|
|
|
|
|
|
|
|
|
|
|
|
materialGridControl = this.GetDbMCControlByKey(Mesnac.Basic.DataSourceFactory.MCDbType.Local, "ManualLogGridView").FirstOrDefault();
|
|
|
|
materialGridControl = this.GetDbMCControlByKey(Mesnac.Basic.DataSourceFactory.MCDbType.Local, "ManualLogGridView").FirstOrDefault();
|
|
|
|
LogInsertToDatabase("");
|
|
|
|
ManualLogSelect("");
|
|
|
|
|
|
|
|
|
|
|
|
ControlImport();
|
|
|
|
ControlImport();
|
|
|
|
SingleSelect();
|
|
|
|
SingleSelect();
|
|
|
@ -484,27 +485,59 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
switch (GelChooseA)
|
|
|
|
switch (GelChooseA)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case 1:
|
|
|
|
case 1:
|
|
|
|
|
|
|
|
if(SelectAddWaterControl(1) == 2)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (MessageBox.Show("上次糊化锅1已经加过冷水,确认再次添加?", "排水确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
PlcControl("DB2119.26.0", 1);
|
|
|
|
PlcControl("DB2119.26.0", 1);
|
|
|
|
PlcControl("DB2119.28.4", true);
|
|
|
|
PlcControl("DB2119.28.4", true);
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("冷水称A开始向糊化锅1排水");
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("冷水称A开始向糊化锅1排水");
|
|
|
|
|
|
|
|
AdddWaterLogControl(1, 2);
|
|
|
|
ManualLogControl("冷水称A开始向糊化锅1排水");
|
|
|
|
ManualLogControl("冷水称A开始向糊化锅1排水");
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
case 2:
|
|
|
|
|
|
|
|
if (SelectAddWaterControl(2) == 2)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (MessageBox.Show("上次糊化锅2已经加过冷水,确认再次添加?", "排水确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
PlcControl("DB2119.26.0", 2);
|
|
|
|
PlcControl("DB2119.26.0", 2);
|
|
|
|
PlcControl("DB2119.28.4", true);
|
|
|
|
PlcControl("DB2119.28.4", true);
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("冷水称A开始向糊化锅2排水");
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("冷水称A开始向糊化锅2排水");
|
|
|
|
|
|
|
|
AdddWaterLogControl(2, 2);
|
|
|
|
ManualLogControl("冷水称A开始向糊化锅2排水");
|
|
|
|
ManualLogControl("冷水称A开始向糊化锅2排水");
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
case 3:
|
|
|
|
|
|
|
|
if (SelectAddWaterControl(3) == 2)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (MessageBox.Show("上次糊化锅3已经加过冷水,确认再次添加?", "排水确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
PlcControl("DB2119.26.0", 3);
|
|
|
|
PlcControl("DB2119.26.0", 3);
|
|
|
|
PlcControl("DB2119.28.4", true);
|
|
|
|
PlcControl("DB2119.28.4", true);
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("冷水称A开始向糊化锅3排水");
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("冷水称A开始向糊化锅3排水");
|
|
|
|
|
|
|
|
AdddWaterLogControl(3, 2);
|
|
|
|
ManualLogControl("冷水称A开始向糊化锅3排水");
|
|
|
|
ManualLogControl("冷水称A开始向糊化锅3排水");
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 4:
|
|
|
|
case 4:
|
|
|
|
|
|
|
|
if (SelectAddWaterControl(4) == 2)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (MessageBox.Show("上次糊化锅4已经加过冷水,确认再次添加?", "排水确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
PlcControl("DB2119.26.0", 4);
|
|
|
|
PlcControl("DB2119.26.0", 4);
|
|
|
|
PlcControl("DB2119.28.4", true);
|
|
|
|
PlcControl("DB2119.28.4", true);
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("冷水称A开始向糊化锅4排水");
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("冷水称A开始向糊化锅4排水");
|
|
|
|
|
|
|
|
AdddWaterLogControl(4, 2);
|
|
|
|
ManualLogControl("冷水称A开始向糊化锅4排水");
|
|
|
|
ManualLogControl("冷水称A开始向糊化锅4排水");
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
default:
|
|
|
@ -523,27 +556,59 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
switch (GelChooseA)
|
|
|
|
switch (GelChooseA)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case 1:
|
|
|
|
case 1:
|
|
|
|
|
|
|
|
if (SelectAddWaterControl(1) == 0 || SelectAddWaterControl(1) == 1)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (MessageBox.Show("上次糊化锅1已经加过热水,确认再次添加?", "排水确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
PlcControl("DB2119.6.0", 1);
|
|
|
|
PlcControl("DB2119.6.0", 1);
|
|
|
|
PlcControl("DB2119.8.4", true);
|
|
|
|
PlcControl("DB2119.8.4", true);
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("热水称A开始向糊化锅1排水");
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("热水称A开始向糊化锅1排水");
|
|
|
|
|
|
|
|
AdddWaterLogControl(1, 1);
|
|
|
|
ManualLogControl("热水称A开始向糊化锅1排水");
|
|
|
|
ManualLogControl("热水称A开始向糊化锅1排水");
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
case 2:
|
|
|
|
|
|
|
|
if (SelectAddWaterControl(2) == 0 || SelectAddWaterControl(2) == 1)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (MessageBox.Show("上次糊化锅2已经加过热水,确认再次添加?", "排水确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
PlcControl("DB2119.6.0", 2);
|
|
|
|
PlcControl("DB2119.6.0", 2);
|
|
|
|
PlcControl("DB2119.8.4", true);
|
|
|
|
PlcControl("DB2119.8.4", true);
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("热水称A开始向糊化锅2排水");
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("热水称A开始向糊化锅2排水");
|
|
|
|
|
|
|
|
AdddWaterLogControl(2, 1);
|
|
|
|
ManualLogControl("热水称A开始向糊化锅2排水");
|
|
|
|
ManualLogControl("热水称A开始向糊化锅2排水");
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
case 3:
|
|
|
|
|
|
|
|
if (SelectAddWaterControl(3) == 0 || SelectAddWaterControl(3) == 1)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (MessageBox.Show("上次糊化锅3已经加过热水,确认再次添加?", "排水确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
PlcControl("DB2119.6.0", 3);
|
|
|
|
PlcControl("DB2119.6.0", 3);
|
|
|
|
PlcControl("DB2119.8.4", true);
|
|
|
|
PlcControl("DB2119.8.4", true);
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("热水称A开始向糊化锅3排水");
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("热水称A开始向糊化锅3排水");
|
|
|
|
|
|
|
|
AdddWaterLogControl(3, 1);
|
|
|
|
ManualLogControl("热水称A开始向糊化锅3排水");
|
|
|
|
ManualLogControl("热水称A开始向糊化锅3排水");
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 4:
|
|
|
|
case 4:
|
|
|
|
|
|
|
|
if (SelectAddWaterControl(4) == 0 || SelectAddWaterControl(4) == 1)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (MessageBox.Show("上次糊化锅4已经加过热水,确认再次添加?", "排水确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
PlcControl("DB2119.6.0", 4);
|
|
|
|
PlcControl("DB2119.6.0", 4);
|
|
|
|
PlcControl("DB2119.8.4", true);
|
|
|
|
PlcControl("DB2119.8.4", true);
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("热水称A开始向糊化锅4排水");
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("热水称A开始向糊化锅4排水");
|
|
|
|
|
|
|
|
AdddWaterLogControl(4, 1);
|
|
|
|
ManualLogControl("热水称A开始向糊化锅4排水");
|
|
|
|
ManualLogControl("热水称A开始向糊化锅4排水");
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
default:
|
|
|
@ -562,27 +627,59 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
switch (GelChooseB)
|
|
|
|
switch (GelChooseB)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case 5:
|
|
|
|
case 5:
|
|
|
|
|
|
|
|
if (SelectAddWaterControl(5) == 2)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (MessageBox.Show("上次糊化锅5已经加过冷水,确认再次添加?", "排水确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
PlcControl("DB2119.36.0", 1);
|
|
|
|
PlcControl("DB2119.36.0", 1);
|
|
|
|
PlcControl("DB2119.38.4", true);
|
|
|
|
PlcControl("DB2119.38.4", true);
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("冷水称B开始向糊化锅5排水");
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("冷水称B开始向糊化锅5排水");
|
|
|
|
|
|
|
|
AdddWaterLogControl(5, 2);
|
|
|
|
ManualLogControl("冷水称B开始向糊化锅5排水");
|
|
|
|
ManualLogControl("冷水称B开始向糊化锅5排水");
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 6:
|
|
|
|
case 6:
|
|
|
|
|
|
|
|
if (SelectAddWaterControl(6) == 2)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (MessageBox.Show("上次糊化锅6已经加过冷水,确认再次添加?", "排水确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
PlcControl("DB2119.36.0", 2);
|
|
|
|
PlcControl("DB2119.36.0", 2);
|
|
|
|
PlcControl("DB2119.38.4", true);
|
|
|
|
PlcControl("DB2119.38.4", true);
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("冷水称B开始向糊化锅6排水");
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("冷水称B开始向糊化锅6排水");
|
|
|
|
|
|
|
|
AdddWaterLogControl(6, 2);
|
|
|
|
ManualLogControl("冷水称B开始向糊化锅6排水");
|
|
|
|
ManualLogControl("冷水称B开始向糊化锅6排水");
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 7:
|
|
|
|
case 7:
|
|
|
|
|
|
|
|
if (SelectAddWaterControl(7) == 2)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (MessageBox.Show("上次糊化锅7已经加过冷水,确认再次添加?", "排水确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
PlcControl("DB2119.36.0", 3);
|
|
|
|
PlcControl("DB2119.36.0", 3);
|
|
|
|
PlcControl("DB2119.38.4", true);
|
|
|
|
PlcControl("DB2119.38.4", true);
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("冷水称B开始向糊化锅7排水");
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("冷水称B开始向糊化锅7排水");
|
|
|
|
|
|
|
|
AdddWaterLogControl(7, 2);
|
|
|
|
ManualLogControl("冷水称B开始向糊化锅7排水");
|
|
|
|
ManualLogControl("冷水称B开始向糊化锅7排水");
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 8:
|
|
|
|
case 8:
|
|
|
|
|
|
|
|
if (SelectAddWaterControl(8) == 2)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (MessageBox.Show("上次糊化锅8已经加过冷水,确认再次添加?", "排水确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
PlcControl("DB2119.36.0", 4);
|
|
|
|
PlcControl("DB2119.36.0", 4);
|
|
|
|
PlcControl("DB2119.38.4", true);
|
|
|
|
PlcControl("DB2119.38.4", true);
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("冷水称B开始向糊化锅8排水");
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("冷水称B开始向糊化锅8排水");
|
|
|
|
|
|
|
|
AdddWaterLogControl(8, 2);
|
|
|
|
ManualLogControl("冷水称B开始向糊化锅8排水");
|
|
|
|
ManualLogControl("冷水称B开始向糊化锅8排水");
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
default:
|
|
|
@ -601,27 +698,59 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
switch (GelChooseB)
|
|
|
|
switch (GelChooseB)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case 5:
|
|
|
|
case 5:
|
|
|
|
|
|
|
|
if (SelectAddWaterControl(5) == 0 || SelectAddWaterControl(5) == 1)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (MessageBox.Show("上次糊化锅5已经加过热水,确认再次添加?", "排水确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
PlcControl("DB2119.16.0", 1);
|
|
|
|
PlcControl("DB2119.16.0", 1);
|
|
|
|
PlcControl("DB2119.18.4", true);
|
|
|
|
PlcControl("DB2119.18.4", true);
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("热水称B开始向糊化锅5排水");
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("热水称B开始向糊化锅5排水");
|
|
|
|
|
|
|
|
AdddWaterLogControl(5, 1);
|
|
|
|
ManualLogControl("热水称B开始向糊化锅5排水");
|
|
|
|
ManualLogControl("热水称B开始向糊化锅5排水");
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 6:
|
|
|
|
case 6:
|
|
|
|
|
|
|
|
if (SelectAddWaterControl(6) == 0 || SelectAddWaterControl(6) == 1)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (MessageBox.Show("上次糊化锅6已经加过热水,确认再次添加?", "排水确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
PlcControl("DB2119.16.0", 2);
|
|
|
|
PlcControl("DB2119.16.0", 2);
|
|
|
|
PlcControl("DB2119.18.4", true);
|
|
|
|
PlcControl("DB2119.18.4", true);
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("热水称B开始向糊化锅6排水");
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("热水称B开始向糊化锅6排水");
|
|
|
|
|
|
|
|
AdddWaterLogControl(6, 1);
|
|
|
|
ManualLogControl("热水称B开始向糊化锅6排水");
|
|
|
|
ManualLogControl("热水称B开始向糊化锅6排水");
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 7:
|
|
|
|
case 7:
|
|
|
|
|
|
|
|
if (SelectAddWaterControl(7) == 0 || SelectAddWaterControl(7) == 1)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (MessageBox.Show("上次糊化锅7已经加过热水,确认再次添加?", "排水确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
PlcControl("DB2119.16.0", 3);
|
|
|
|
PlcControl("DB2119.16.0", 3);
|
|
|
|
PlcControl("DB2119.18.4", true);
|
|
|
|
PlcControl("DB2119.18.4", true);
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("热水称B开始向糊化锅7排水");
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("热水称B开始向糊化锅7排水");
|
|
|
|
|
|
|
|
AdddWaterLogControl(7, 1);
|
|
|
|
ManualLogControl("热水称B开始向糊化锅7排水");
|
|
|
|
ManualLogControl("热水称B开始向糊化锅7排水");
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 8:
|
|
|
|
case 8:
|
|
|
|
|
|
|
|
if (SelectAddWaterControl(8) == 0 || SelectAddWaterControl(8) == 1)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (MessageBox.Show("上次糊化锅8已经加过热水,确认再次添加?", "排水确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
PlcControl("DB2119.16.0", 4);
|
|
|
|
PlcControl("DB2119.16.0", 4);
|
|
|
|
PlcControl("DB2119.18.4", true);
|
|
|
|
PlcControl("DB2119.18.4", true);
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("热水称B开始向糊化锅8排水");
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("热水称B开始向糊化锅8排水");
|
|
|
|
|
|
|
|
AdddWaterLogControl(8, 1);
|
|
|
|
ManualLogControl("热水称B开始向糊化锅8排水");
|
|
|
|
ManualLogControl("热水称B开始向糊化锅8排水");
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
default:
|
|
|
@ -1063,7 +1192,7 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
if (WetRequest1 == runtime.Sender)
|
|
|
|
if (WetRequest1 == runtime.Sender)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
string key = keywords.MCValue.ToString();
|
|
|
|
string key = keywords.MCValue.ToString();
|
|
|
|
LogInsertToDatabase(key);
|
|
|
|
ManualLogSelect(key);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1154,13 +1283,13 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 日志控制
|
|
|
|
#region 数据库日志控制
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// 日志查询
|
|
|
|
/// 日志查询
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="txt">查询关键字</param>
|
|
|
|
/// <param name="txt">查询关键字</param>
|
|
|
|
private void LogInsertToDatabase(string txt)
|
|
|
|
private void ManualLogSelect(string txt)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
string sql = "select top 500 id, logtext, logtime, value from Manual_Log ";
|
|
|
|
string sql = "select top 500 id, logtext, logtime, value from Manual_Log ";
|
|
|
|
|
|
|
|
|
|
|
@ -1206,8 +1335,8 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
FreeSqlUnit.Instance.Insert(Log).ExecuteIdentity();
|
|
|
|
FreeSqlUnit.Instance.Insert(Log).ExecuteIdentity();
|
|
|
|
|
|
|
|
|
|
|
|
LogInsertToDatabase("");
|
|
|
|
ManualLogSelect("");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void ManualLogControl(string logName, int deviceno, int devicekind)
|
|
|
|
private void ManualLogControl(string logName, int deviceno, int devicekind)
|
|
|
@ -1226,7 +1355,7 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
|
|
|
|
|
|
|
|
FreeSqlUnit.Instance.Insert(Log).ExecuteIdentity();
|
|
|
|
FreeSqlUnit.Instance.Insert(Log).ExecuteIdentity();
|
|
|
|
|
|
|
|
|
|
|
|
LogInsertToDatabase("");
|
|
|
|
ManualLogSelect("");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void ManualLogControl(string logName)
|
|
|
|
private void ManualLogControl(string logName)
|
|
|
@ -1245,9 +1374,38 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
|
|
|
|
|
|
|
|
FreeSqlUnit.Instance.Insert(Log).ExecuteIdentity();
|
|
|
|
FreeSqlUnit.Instance.Insert(Log).ExecuteIdentity();
|
|
|
|
|
|
|
|
|
|
|
|
LogInsertToDatabase("");
|
|
|
|
ManualLogSelect("");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
///
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
/// <param name="deviceNo"></param>
|
|
|
|
|
|
|
|
/// <param name="isHot">1是热水 2是冷水 0为空</param>
|
|
|
|
|
|
|
|
private void AdddWaterLogControl(int deviceNo, int isHot)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var log = new AddWaterLog()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
DeviceId = deviceNo,
|
|
|
|
|
|
|
|
Hot = isHot,
|
|
|
|
|
|
|
|
CreateTime = DateTime.Now,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FreeSqlUnit.Instance.Insert(log).ExecuteIdentity();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private int SelectAddWaterControl(int deviceNo)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var list = FreeSqlUnit.Instance.Select<AddWaterLog>().Where(x => x.DeviceId == deviceNo).ToList();
|
|
|
|
|
|
|
|
if (list.Count == 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return Convert.ToInt32(list.LastOrDefault().Hot);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|