|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
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;
|
|
|
|
@ -16,7 +17,8 @@ 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
|
|
|
|
|
{
|
|
|
|
@ -129,6 +131,7 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
|
|
|
|
|
MixTime = GelCloseHeat,
|
|
|
|
|
MixTemp = GelDelayTime
|
|
|
|
|
};
|
|
|
|
|
Step step9 = new Step();
|
|
|
|
|
|
|
|
|
|
steps.Add(step1);
|
|
|
|
|
steps.Add(step2);
|
|
|
|
@ -138,6 +141,8 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
|
|
|
|
|
steps.Add(step6);
|
|
|
|
|
steps.Add(step7);
|
|
|
|
|
steps.Add(step8);
|
|
|
|
|
steps.Add(step9);
|
|
|
|
|
steps.Add(step9);
|
|
|
|
|
|
|
|
|
|
float WetDryWei = Convert.ToSingle(TextE.WetDryWeight.MCValue.ToString());
|
|
|
|
|
short WetMix = Convert.ToInt16(TextE.WetMixTime.MCValue.ToString());
|
|
|
|
@ -168,12 +173,19 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
|
|
|
|
|
MixCode = 5,
|
|
|
|
|
MixTime = WetOutDelay
|
|
|
|
|
};
|
|
|
|
|
MixStep mixStep6 = new MixStep();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mixSteps.Add(mixStep1);
|
|
|
|
|
mixSteps.Add(mixStep2);
|
|
|
|
|
mixSteps.Add(mixStep3);
|
|
|
|
|
mixSteps.Add(mixStep4);
|
|
|
|
|
mixSteps.Add(mixStep5);
|
|
|
|
|
mixSteps.Add(mixStep6);
|
|
|
|
|
mixSteps.Add(mixStep6);
|
|
|
|
|
mixSteps.Add(mixStep6);
|
|
|
|
|
mixSteps.Add(mixStep6);
|
|
|
|
|
mixSteps.Add(mixStep6);
|
|
|
|
|
|
|
|
|
|
List<DeviceMaterrial> materials = new List<DeviceMaterrial>();
|
|
|
|
|
|
|
|
|
@ -245,10 +257,10 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
|
|
|
|
|
|
|
|
|
|
GWlog(recipes, steps, mixSteps, RadioE);
|
|
|
|
|
|
|
|
|
|
//if(!GWComparePLC(recipes, steps, mixSteps, RadioE))
|
|
|
|
|
//{
|
|
|
|
|
// MessageBox.Show("下传数据不完整,请重新下传数据!");
|
|
|
|
|
//}
|
|
|
|
|
if (!GWComparePLC(recipes, steps, mixSteps, RadioE))
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("下传数据不完整,请重新下传数据!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -272,24 +284,44 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
|
|
|
|
|
var getGelatG8 = LjPlanningPlcHelp.GetGelatG8;
|
|
|
|
|
var getWeterM8 = LjPlanningPlcHelp.GetWeterM8;
|
|
|
|
|
|
|
|
|
|
string j1 = ControlsHelper.JsonSerialize(recipes);
|
|
|
|
|
string j2 = ControlsHelper.JsonSerialize(steps);
|
|
|
|
|
string j3 = ControlsHelper.JsonSerialize(mixSteps);
|
|
|
|
|
|
|
|
|
|
switch (ControlsHelper.SingleSelect(RadioE))
|
|
|
|
|
{
|
|
|
|
|
case 1:
|
|
|
|
|
return getGelatG1.RecipePlcViews.SequenceEqual(recipes) && getGelatG1.RecipeSteps.SequenceEqual(steps) && getWeterM1.SequenceEqual(mixSteps);
|
|
|
|
|
return j1 == ControlsHelper.JsonSerialize(getGelatG1.RecipePlcViews)
|
|
|
|
|
&& j2 == ControlsHelper.JsonSerialize(getGelatG1.RecipeSteps)
|
|
|
|
|
&& j3 == ControlsHelper.JsonSerialize(getWeterM1);
|
|
|
|
|
case 2:
|
|
|
|
|
return getGelatG2.RecipePlcViews.SequenceEqual(recipes) && getGelatG2.RecipeSteps.SequenceEqual(steps) && getWeterM2.SequenceEqual(mixSteps);
|
|
|
|
|
return j1 == ControlsHelper.JsonSerialize(getGelatG2.RecipePlcViews)
|
|
|
|
|
&& j2 == ControlsHelper.JsonSerialize(getGelatG2.RecipeSteps)
|
|
|
|
|
&& j3 == ControlsHelper.JsonSerialize(getWeterM2);
|
|
|
|
|
case 3:
|
|
|
|
|
return getGelatG3.RecipePlcViews.SequenceEqual(recipes) && getGelatG3.RecipeSteps.SequenceEqual(steps) && getWeterM3.SequenceEqual(mixSteps);
|
|
|
|
|
return j1 == ControlsHelper.JsonSerialize(getGelatG3.RecipePlcViews)
|
|
|
|
|
&& j2 == ControlsHelper.JsonSerialize(getGelatG3.RecipeSteps)
|
|
|
|
|
&& j3 == ControlsHelper.JsonSerialize(getWeterM3);
|
|
|
|
|
case 4:
|
|
|
|
|
return getGelatG4.RecipePlcViews.SequenceEqual(recipes) && getGelatG4.RecipeSteps.SequenceEqual(steps) && getWeterM4.SequenceEqual(mixSteps);
|
|
|
|
|
return j1 == ControlsHelper.JsonSerialize(getGelatG4.RecipePlcViews)
|
|
|
|
|
&& j2 == ControlsHelper.JsonSerialize(getGelatG4.RecipeSteps)
|
|
|
|
|
&& j3 == ControlsHelper.JsonSerialize(getWeterM4);
|
|
|
|
|
case 5:
|
|
|
|
|
return getGelatG5.RecipePlcViews.SequenceEqual(recipes) && getGelatG5.RecipeSteps.SequenceEqual(steps) && getWeterM5.SequenceEqual(mixSteps);
|
|
|
|
|
return j1 == ControlsHelper.JsonSerialize(getGelatG5.RecipePlcViews)
|
|
|
|
|
&& j2 == ControlsHelper.JsonSerialize(getGelatG5.RecipeSteps)
|
|
|
|
|
&& j3 == ControlsHelper.JsonSerialize(getWeterM5);
|
|
|
|
|
case 6:
|
|
|
|
|
return getGelatG6.RecipePlcViews.SequenceEqual(recipes) && getGelatG6.RecipeSteps.SequenceEqual(steps) && getWeterM6.SequenceEqual(mixSteps);
|
|
|
|
|
return j1 == ControlsHelper.JsonSerialize(getGelatG6.RecipePlcViews)
|
|
|
|
|
&& j2 == ControlsHelper.JsonSerialize(getGelatG6.RecipeSteps)
|
|
|
|
|
&& j3 == ControlsHelper.JsonSerialize(getWeterM6);
|
|
|
|
|
case 7:
|
|
|
|
|
return getGelatG7.RecipePlcViews.SequenceEqual(recipes) && getGelatG7.RecipeSteps.SequenceEqual(steps) && getWeterM7.SequenceEqual(mixSteps);
|
|
|
|
|
return j1 == ControlsHelper.JsonSerialize(getGelatG7.RecipePlcViews)
|
|
|
|
|
&& j2 == ControlsHelper.JsonSerialize(getGelatG7.RecipeSteps)
|
|
|
|
|
&& j3 == ControlsHelper.JsonSerialize(getWeterM7);
|
|
|
|
|
case 8:
|
|
|
|
|
return getGelatG8.RecipePlcViews.SequenceEqual(recipes) && getGelatG8.RecipeSteps.SequenceEqual(steps) && getWeterM8.SequenceEqual(mixSteps);
|
|
|
|
|
return j1 == ControlsHelper.JsonSerialize(getGelatG8.RecipePlcViews)
|
|
|
|
|
&& j2 == ControlsHelper.JsonSerialize(getGelatG8.RecipeSteps)
|
|
|
|
|
&& j3 == ControlsHelper.JsonSerialize(getWeterM8);
|
|
|
|
|
default:
|
|
|
|
|
MessageBox.Show("未选择产线!");
|
|
|
|
|
return true;
|
|
|
|
|