|
|
|
@ -1,7 +1,5 @@
|
|
|
|
|
using DataBlockHelper.DBHelpers;
|
|
|
|
|
using DataBlockHelper.Entity.DB2104Entity;
|
|
|
|
|
using DevExpress.DataAccess.Native.Web;
|
|
|
|
|
using DevExpress.XtraEditors.Filtering.Templates;
|
|
|
|
|
using Mesnac.Action.ChemicalWeighing.AutoControl.DB;
|
|
|
|
|
using Mesnac.Action.ChemicalWeighing.AutoControl.Entity;
|
|
|
|
|
using Mesnac.Action.ChemicalWeighing.LjMixManager;
|
|
|
|
@ -11,14 +9,8 @@ using Mesnac.Controls.Default;
|
|
|
|
|
using Mesnac.Core.Service;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
using System.Xml.Serialization;
|
|
|
|
|
using static Mesnac.Action.ChemicalWeighing.AutoControl.AutoLogHelper;
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
using DevExpress.DataAccess.Native.Json;
|
|
|
|
|
|
|
|
|
|
namespace Mesnac.Action.ChemicalWeighing.AutoControl
|
|
|
|
|
{
|
|
|
|
@ -259,14 +251,13 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
|
|
|
|
|
|
|
|
|
|
if (!GWComparePLC(recipes, steps, mixSteps, RadioE))
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("下传数据不完整,请重新下传数据!");
|
|
|
|
|
MessageBox.Show("湿混糊化产线下传数据不完整,请重新下传数据!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static bool GWComparePLC(List<RecipePlcView> recipes, List<Step> steps, List<MixStep> mixSteps, MCRadioButtonEntity RadioE)
|
|
|
|
|
{
|
|
|
|
|
bool flag = false;
|
|
|
|
|
var getGelatG1 = LjPlanningPlcHelp.GetGelatG1;
|
|
|
|
|
var getWeterM1 = LjPlanningPlcHelp.GetWeterM1;
|
|
|
|
|
var getGelatG2 = LjPlanningPlcHelp.GetGelatG2;
|
|
|
|
@ -380,6 +371,41 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
|
|
|
|
|
DeviceMaterrialService.Save(materials);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!DYComparePLC(recipes, steps, RadioE))
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("干混产线下传数据不完整,请重新下传数据!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static bool DYComparePLC(List<RecipePlcView> recipes, List<Step> steps, MCRadioButtonEntity RadioE)
|
|
|
|
|
{
|
|
|
|
|
var getDryerD1 = LjPlanningPlcHelp.GetDryerD1;
|
|
|
|
|
var getDryerD2 = LjPlanningPlcHelp.GetDryerD2;
|
|
|
|
|
var getDryerD3 = LjPlanningPlcHelp.GetDryerD3;
|
|
|
|
|
var getDryerD4 = LjPlanningPlcHelp.GetDryerD4;
|
|
|
|
|
|
|
|
|
|
string j1 = ControlsHelper.JsonSerialize(recipes);
|
|
|
|
|
string j2 = ControlsHelper.JsonSerialize(steps);
|
|
|
|
|
|
|
|
|
|
switch (ControlsHelper.SingleSelect(RadioE))
|
|
|
|
|
{
|
|
|
|
|
case 1:
|
|
|
|
|
return j1 == ControlsHelper.JsonSerialize(getDryerD1.RecipePlcViews)
|
|
|
|
|
&& j2 == ControlsHelper.JsonSerialize(getDryerD1.RecipeSteps);
|
|
|
|
|
case 2:
|
|
|
|
|
return j1 == ControlsHelper.JsonSerialize(getDryerD2.RecipePlcViews)
|
|
|
|
|
&& j2 == ControlsHelper.JsonSerialize(getDryerD2.RecipeSteps);
|
|
|
|
|
case 3:
|
|
|
|
|
return j1 == ControlsHelper.JsonSerialize(getDryerD3.RecipePlcViews)
|
|
|
|
|
&& j2 == ControlsHelper.JsonSerialize(getDryerD3.RecipeSteps);
|
|
|
|
|
case 4:
|
|
|
|
|
return j1 == ControlsHelper.JsonSerialize(getDryerD4.RecipePlcViews)
|
|
|
|
|
&& j2 == ControlsHelper.JsonSerialize(getDryerD4.RecipeSteps);
|
|
|
|
|
default:
|
|
|
|
|
MessageBox.Show("未选择产线!");
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|