change - 钣金线计划编号PLC地址本地测试写6030,实际联调下发6000,计划编号长度暂定16

dev
wenjy 1 year ago
parent 33e5e169f1
commit f53c8d83fc

@ -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<RecordSidePanelComplate> sidePanelComplates = _sidePanelComplateServices.Query(x => x.ProductlineCode == "1001" && x.PlanCode == planCode.Substring(0, 13));
List<RecordSidePanelComplate> 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<ExecutePlanInfo> planInfos = _executePlanInfoServices.Query(x => x.TaskCode == planCode.Substring(0, 13) && x.ExecuteStatus == 2);
List<ExecutePlanInfo> 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<RecordBackPanelComplate> backPanelComplates = _backPanelComplateServices.Query(x => x.ProductlineCode == "1001" && x.PlanCode == planCode.Substring(0, 13));
List<RecordBackPanelComplate> 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<ExecutePlanInfo> planInfos = _executePlanInfoServices.Query(x => x.TaskCode == planCode.Substring(0, 13) && x.ExecuteStatus == 2);
List<ExecutePlanInfo> planInfos = _executePlanInfoServices.Query(x => x.TaskCode == planCode.Substring(0, 16) && x.ExecuteStatus == 2);
if (planInfos != null)
{
if(planInfos.Count > 0)

Loading…
Cancel
Save