From f53c8d83fc3fbb43bcff5cb8e8d54012332d3548 Mon Sep 17 00:00:00 2001 From: wenjy Date: Sun, 31 Dec 2023 22:31:56 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E9=92=A3=E9=87=91=E7=BA=BF?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E7=BC=96=E5=8F=B7PLC=E5=9C=B0=E5=9D=80?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E6=B5=8B=E8=AF=95=E5=86=996030=EF=BC=8C?= =?UTF-8?q?=E5=AE=9E=E9=99=85=E8=81=94=E8=B0=83=E4=B8=8B=E5=8F=916000?= =?UTF-8?q?=EF=BC=8C=E8=AE=A1=E5=88=92=E7=BC=96=E5=8F=B7=E9=95=BF=E5=BA=A6?= =?UTF-8?q?=E6=9A=82=E5=AE=9A16?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Business/SheetMetalPlanTaskHandle.cs | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Aucma.Core.SheetMetal/Business/SheetMetalPlanTaskHandle.cs b/Aucma.Core.SheetMetal/Business/SheetMetalPlanTaskHandle.cs index 5d76d91a..50c98301 100644 --- a/Aucma.Core.SheetMetal/Business/SheetMetalPlanTaskHandle.cs +++ b/Aucma.Core.SheetMetal/Business/SheetMetalPlanTaskHandle.cs @@ -169,7 +169,7 @@ public class SheetMetalPlanTaskHandle if (obj_sidePanel != null) { //计划编号10个字:D6000-D6009、物料编号10个字:D6010-D6019、计划数量1个字:D6020、应答字1个字D6021 - obj_sidePanel.plc.WriteString("D6000", planInfo.TaskCode); + obj_sidePanel.plc.WriteString("D6030", planInfo.TaskCode); string processNumber = GetProcessNumberBy(planInfo.MaterialCode); obj_sidePanel.plc.WriteString("D6010", "BCD/310NF"); obj_sidePanel.plc.WriteInt32("D6020", planInfo.PlanAmount); @@ -208,7 +208,7 @@ public class SheetMetalPlanTaskHandle if (obj_backPanel != null) { //计划编号10个字:D6000-D6009、物料编号10个字:D6010-D6019、计划数量1个字:D6020、应答字1个字D6021 - obj_backPanel.plc.WriteString("D6000", planInfo.TaskCode); + obj_backPanel.plc.WriteString("D6030", planInfo.TaskCode); string processNumber = GetProcessNumberBy(planInfo.MaterialCode); obj_backPanel.plc.WriteString("D6010", "BCD/310NF"); obj_backPanel.plc.WriteInt32("D6020", planInfo.PlanAmount); @@ -263,7 +263,7 @@ public class SheetMetalPlanTaskHandle if (obj_sidePanel != null) { //计划编号10个字:D6000-D6009、物料编号10个字:D6010-D6019、计划数量1个字:D6020、应答字1个字D6021 - obj_sidePanel.plc.WriteString("D6000", planInfo.TaskCode); + obj_sidePanel.plc.WriteString("D6030", planInfo.TaskCode); string processNumber = GetProcessNumberBy(planInfo.MaterialCode); obj_sidePanel.plc.WriteString("D6010", "BCD/310NF"); obj_sidePanel.plc.WriteInt32("D6020", planInfo.PlanAmount); @@ -345,7 +345,7 @@ public class SheetMetalPlanTaskHandle RecordSidePanelComplate sidePanelComplate = new RecordSidePanelComplate() { ProductlineCode = "1001", - PlanCode = planCode.Substring(0, 13), + PlanCode = planCode.Substring(0, 16), //MaterialCode = string.IsNullOrEmpty(materialCode) ? "" : materialCode, MaterialCode = "BCD/310NF", CompleteAmount = complateAmount, @@ -363,7 +363,7 @@ public class SheetMetalPlanTaskHandle } //先查询该计划编号下的前一条完工记录,如果不存在本条记录产量为0 - List sidePanelComplates = _sidePanelComplateServices.Query(x => x.ProductlineCode == "1001" && x.PlanCode == planCode.Substring(0, 13)); + List sidePanelComplates = _sidePanelComplateServices.Query(x => x.ProductlineCode == "1001" && x.PlanCode == planCode.Substring(0, 16)); int lastComplateAmount = 0; //前一条完成记录的计划完成数量 int sumComplateAmount = 0; //当前计划总产量 if (sidePanelComplates != null) @@ -383,7 +383,7 @@ public class SheetMetalPlanTaskHandle } else { - List planInfos = _executePlanInfoServices.Query(x => x.TaskCode == planCode.Substring(0, 13) && x.ExecuteStatus == 2); + List planInfos = _executePlanInfoServices.Query(x => x.TaskCode.Equals(planCode.Substring(0, 16)) && x.ExecuteStatus == 2); if(planInfos != null) { if(planInfos.Count > 0) @@ -431,7 +431,7 @@ public class SheetMetalPlanTaskHandle if (obj_backPanel != null) { //计划编号10个字:D6000-D6009、物料编号10个字:D6010-D6019、计划数量1个字:D6020、应答字1个字D6021 - obj_backPanel.plc.WriteString("D6000", planInfo.TaskCode); + obj_backPanel.plc.WriteString("D6030", planInfo.TaskCode); string processNumber = GetProcessNumberBy(planInfo.MaterialCode); obj_backPanel.plc.WriteString("D6010", "BCD/310NF"); obj_backPanel.plc.WriteInt32("D6020", planInfo.PlanAmount); @@ -512,7 +512,7 @@ public class SheetMetalPlanTaskHandle RecordBackPanelComplate backPanelComplate = new RecordBackPanelComplate() { ProductlineCode = "1001", - PlanCode = planCode.Substring(0, 13), + PlanCode = planCode.Substring(0, 16), //MaterialCode = string.IsNullOrEmpty(materialCode) ? "" : materialCode, MaterialCode = "BCD/310NF", CompleteAmount = complateAmount, @@ -530,7 +530,7 @@ public class SheetMetalPlanTaskHandle } //先查询该计划编号下的前一条完工记录,如果不存在本条记录产量为0 - List backPanelComplates = _backPanelComplateServices.Query(x => x.ProductlineCode == "1001" && x.PlanCode == planCode.Substring(0, 13)); + List backPanelComplates = _backPanelComplateServices.Query(x => x.ProductlineCode == "1001" && x.PlanCode == planCode.Substring(0, 16)); int lastComplateAmount = 0; //前一条完成记录的计划完成数量 int sumComplateAmount = 0; //当前计划总产量 if (backPanelComplates != null) @@ -549,7 +549,7 @@ public class SheetMetalPlanTaskHandle } else { - List planInfos = _executePlanInfoServices.Query(x => x.TaskCode == planCode.Substring(0, 13) && x.ExecuteStatus == 2); + List planInfos = _executePlanInfoServices.Query(x => x.TaskCode == planCode.Substring(0, 16) && x.ExecuteStatus == 2); if (planInfos != null) { if(planInfos.Count > 0)