diff --git a/ProductionSystem/Untils/Tool/StepTool.cs b/ProductionSystem/Untils/Tool/StepTool.cs index 5b64ad4..25a9f61 100644 --- a/ProductionSystem/Untils/Tool/StepTool.cs +++ b/ProductionSystem/Untils/Tool/StepTool.cs @@ -140,7 +140,10 @@ namespace ProductionSystem.Untils.Tool { var ba = ModeTypeEnum.BZ2_DB; - + if (string.IsNullOrEmpty(GetCode())) + { + return; + } if (D1004) { @@ -221,6 +224,10 @@ namespace ProductionSystem.Untils.Tool public void Step3() { var ba = ModeTypeEnum.BZ3_DB; + if (string.IsNullOrEmpty(GetCode())) + { + return; + } if (D1004) { @@ -278,6 +285,10 @@ namespace ProductionSystem.Untils.Tool /// public void Step4() { + if (string.IsNullOrEmpty(GetCode())) + { + return; + } if (D1004) { //停止水泵3 @@ -306,7 +317,10 @@ namespace ProductionSystem.Untils.Tool public void Step5() { - + if (string.IsNullOrEmpty(GetCode())) + { + return; + } TmTool.CleanSt(); Thread.Sleep(300); @@ -341,7 +355,10 @@ namespace ProductionSystem.Untils.Tool public void Step6() { - + if (string.IsNullOrEmpty(GetCode())) + { + return; + } TmTool.CleanSt(); Thread.Sleep(300); //上位机将四通阀1运行到模式6,四通阀2运行到模式6,;反馈模式与设定模式相同时,反馈PLC=1或2(可以/不可以测试) @@ -375,6 +392,10 @@ namespace ProductionSystem.Untils.Tool public void Step7() { + if (string.IsNullOrEmpty(GetCode())) + { + return; + } TmTool.CleanSt(); Thread.Sleep(300); var ba = ModeTypeEnum.BZ7_DB; @@ -411,6 +432,10 @@ namespace ProductionSystem.Untils.Tool public void Step8() { + if (string.IsNullOrEmpty(GetCode())) + { + return; + } //采集数据 for (int i = 1; i < 8; i++) { diff --git a/ProductionSystem_Service/ProductStepService.cs b/ProductionSystem_Service/ProductStepService.cs index 3a17f0f..08bded8 100644 --- a/ProductionSystem_Service/ProductStepService.cs +++ b/ProductionSystem_Service/ProductStepService.cs @@ -58,7 +58,7 @@ namespace ProductionSystem_Service /// public void InsertOther(string producctType,string equipment, string productCode,string toStepName) { - var other = QueryLatestStep(ModeTypeEnum.BZ1_DB.ToString(), productCode, producctType,equipment); + var other = QueryLatestStep(ModeTypeEnum.BZ1_DB.ToString(), equipment, producctType,productCode); if(other != null) { other.Id = Guid.NewGuid().ToString("N");