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)