|
|
|
@ -14,6 +14,7 @@ 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;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -243,6 +244,57 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
GWlog(recipes, steps, mixSteps, RadioE);
|
|
|
|
|
|
|
|
|
|
//if(!GWComparePLC(recipes, steps, mixSteps, RadioE))
|
|
|
|
|
//{
|
|
|
|
|
// 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;
|
|
|
|
|
var getWeterM2 = LjPlanningPlcHelp.GetWeterM2;
|
|
|
|
|
var getGelatG3 = LjPlanningPlcHelp.GetGelatG3;
|
|
|
|
|
var getWeterM3 = LjPlanningPlcHelp.GetWeterM3;
|
|
|
|
|
var getGelatG4 = LjPlanningPlcHelp.GetGelatG4;
|
|
|
|
|
var getWeterM4 = LjPlanningPlcHelp.GetWeterM4;
|
|
|
|
|
var getGelatG5 = LjPlanningPlcHelp.GetGelatG5;
|
|
|
|
|
var getWeterM5 = LjPlanningPlcHelp.GetWeterM5;
|
|
|
|
|
var getGelatG6 = LjPlanningPlcHelp.GetGelatG6;
|
|
|
|
|
var getWeterM6 = LjPlanningPlcHelp.GetWeterM6;
|
|
|
|
|
var getGelatG7 = LjPlanningPlcHelp.GetGelatG7;
|
|
|
|
|
var getWeterM7 = LjPlanningPlcHelp.GetWeterM7;
|
|
|
|
|
var getGelatG8 = LjPlanningPlcHelp.GetGelatG8;
|
|
|
|
|
var getWeterM8 = LjPlanningPlcHelp.GetWeterM8;
|
|
|
|
|
|
|
|
|
|
switch (ControlsHelper.SingleSelect(RadioE))
|
|
|
|
|
{
|
|
|
|
|
case 1:
|
|
|
|
|
return getGelatG1.RecipePlcViews.SequenceEqual(recipes) && getGelatG1.RecipeSteps.SequenceEqual(steps) && getWeterM1.SequenceEqual(mixSteps);
|
|
|
|
|
case 2:
|
|
|
|
|
return getGelatG2.RecipePlcViews.SequenceEqual(recipes) && getGelatG2.RecipeSteps.SequenceEqual(steps) && getWeterM2.SequenceEqual(mixSteps);
|
|
|
|
|
case 3:
|
|
|
|
|
return getGelatG3.RecipePlcViews.SequenceEqual(recipes) && getGelatG3.RecipeSteps.SequenceEqual(steps) && getWeterM3.SequenceEqual(mixSteps);
|
|
|
|
|
case 4:
|
|
|
|
|
return getGelatG4.RecipePlcViews.SequenceEqual(recipes) && getGelatG4.RecipeSteps.SequenceEqual(steps) && getWeterM4.SequenceEqual(mixSteps);
|
|
|
|
|
case 5:
|
|
|
|
|
return getGelatG5.RecipePlcViews.SequenceEqual(recipes) && getGelatG5.RecipeSteps.SequenceEqual(steps) && getWeterM5.SequenceEqual(mixSteps);
|
|
|
|
|
case 6:
|
|
|
|
|
return getGelatG6.RecipePlcViews.SequenceEqual(recipes) && getGelatG6.RecipeSteps.SequenceEqual(steps) && getWeterM6.SequenceEqual(mixSteps);
|
|
|
|
|
case 7:
|
|
|
|
|
return getGelatG7.RecipePlcViews.SequenceEqual(recipes) && getGelatG7.RecipeSteps.SequenceEqual(steps) && getWeterM7.SequenceEqual(mixSteps);
|
|
|
|
|
case 8:
|
|
|
|
|
return getGelatG8.RecipePlcViews.SequenceEqual(recipes) && getGelatG8.RecipeSteps.SequenceEqual(steps) && getWeterM8.SequenceEqual(mixSteps);
|
|
|
|
|
default:
|
|
|
|
|
MessageBox.Show("未选择产线!");
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
@ -676,7 +728,6 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 维修模式
|
|
|
|
|
|
|
|
|
|
public static void RepairOnOff(MCLabelEntity LabelE, MCRadioButtonEntity RadioE)
|
|
|
|
@ -752,7 +803,6 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
|
|
|
|
|
|
|
|
|
|
DeviceMaterrial deviceMaterial1 = new DeviceMaterrial()
|
|
|
|
|
{
|
|
|
|
|
DeviceId = ControlsHelper.DrySelect(RadioE),
|
|
|
|
|
MaterrialId = b,
|
|
|
|
|
Type = 1,
|
|
|
|
|
Code = StockMaterrialDbHelp.GetCodeById(b)
|
|
|
|
|