|
|
@ -369,6 +369,7 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
|
|
|
|
//人工 = sum(每批的工时数*每批用人数) Sac2
|
|
|
|
//人工 = sum(每批的工时数*每批用人数) Sac2
|
|
|
|
//子工单报工
|
|
|
|
//子工单报工
|
|
|
|
logger.info("==========================一层工单报工开始");
|
|
|
|
logger.info("==========================一层工单报工开始");
|
|
|
|
|
|
|
|
sHzWorks.setMachineCode(mesReportWork.getMachineCode());
|
|
|
|
sapRson = this.reportHzToSap(sHzWorks);
|
|
|
|
sapRson = this.reportHzToSap(sHzWorks);
|
|
|
|
logger.info("==========================一层工单报工结束:"+JSONObject.toJSONString(sapRson));
|
|
|
|
logger.info("==========================一层工单报工结束:"+JSONObject.toJSONString(sapRson));
|
|
|
|
}else if(workOrders.size()==2){
|
|
|
|
}else if(workOrders.size()==2){
|
|
|
@ -385,6 +386,7 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
|
|
|
|
BigDecimal reportRate = mesReportWorkMapper.getReportRate(workOrders.get(0).getProductCode());
|
|
|
|
BigDecimal reportRate = mesReportWorkMapper.getReportRate(workOrders.get(0).getProductCode());
|
|
|
|
//子工单报工
|
|
|
|
//子工单报工
|
|
|
|
logger.info("==========================子工单报工开始");
|
|
|
|
logger.info("==========================子工单报工开始");
|
|
|
|
|
|
|
|
sHzWorks.setMachineCode(mesReportWork.getMachineCode());
|
|
|
|
sapRson = this.reportHzToSap(sHzWorks);
|
|
|
|
sapRson = this.reportHzToSap(sHzWorks);
|
|
|
|
logger.info("==========================子工单报工结束:"+JSONObject.toJSONString(sapRson));
|
|
|
|
logger.info("==========================子工单报工结束:"+JSONObject.toJSONString(sapRson));
|
|
|
|
if(sapRson.getCode()== 200){
|
|
|
|
if(sapRson.getCode()== 200){
|
|
|
@ -408,7 +410,7 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
pHzWork.setQuantityFeedback(sHzWorks.getQuantityFeedback());
|
|
|
|
pHzWork.setQuantityFeedback(sHzWorks.getQuantityFeedback());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
pHzWork.setMachineCode(mesReportWork.getMachineCode());
|
|
|
|
//pHzWork.setSac2("4");//母单报工固定值(上位机插入数据时候默认4)
|
|
|
|
//pHzWork.setSac2("4");//母单报工固定值(上位机插入数据时候默认4)
|
|
|
|
R sapR = this.reportHzToSap(pHzWork);
|
|
|
|
R sapR = this.reportHzToSap(pHzWork);
|
|
|
|
logger.info("==========================母工单报工结束"+JSONObject.toJSONString(sapR));
|
|
|
|
logger.info("==========================母工单报工结束"+JSONObject.toJSONString(sapR));
|
|
|
@ -435,7 +437,7 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//三层以上工单报工
|
|
|
|
//三层以上工单报工
|
|
|
|
logger.info("==========================三层(第"+n+"层)以上工单("+sHzWorks.getWorkorderCodeSap()+")报工开始");
|
|
|
|
logger.info("==========================三层(第"+n+"层)以上工单("+sHzWorks.getWorkorderCodeSap()+")报工开始");
|
|
|
|
|
|
|
|
sHzWorks.setMachineCode(mesReportWork.getMachineCode());
|
|
|
|
sapRson = this.reportHzToSap(sHzWorks);
|
|
|
|
sapRson = this.reportHzToSap(sHzWorks);
|
|
|
|
logger.info("==========================三层(第"+n+"层)以上工单("+sHzWorks.getWorkorderCodeSap()+")报工结束:"
|
|
|
|
logger.info("==========================三层(第"+n+"层)以上工单("+sHzWorks.getWorkorderCodeSap()+")报工结束:"
|
|
|
|
+ JSONObject.toJSONString(sapRson));
|
|
|
|
+ JSONObject.toJSONString(sapRson));
|
|
|
@ -476,7 +478,8 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
|
|
|
|
MesReportWorkConsume consumeqo = new MesReportWorkConsume();
|
|
|
|
MesReportWorkConsume consumeqo = new MesReportWorkConsume();
|
|
|
|
consumeqo.setWorkorderCode(workOrder.getWorkorderCode());
|
|
|
|
consumeqo.setWorkorderCode(workOrder.getWorkorderCode());
|
|
|
|
consumeqo.setRecoil("X");
|
|
|
|
consumeqo.setRecoil("X");
|
|
|
|
List<MesReportWorkConsume> consumes = mesReportWorkConsumeMapper.selectMesReportWorkConsumeList(consumeqo);
|
|
|
|
consumeqo.setMachineCode(workOrder.getMachineCode());
|
|
|
|
|
|
|
|
List<MesReportWorkConsume> consumes = mesReportWorkConsumeMapper.getSumConsumeList(consumeqo);
|
|
|
|
if (!CollectionUtils.isEmpty(consumes)) {
|
|
|
|
if (!CollectionUtils.isEmpty(consumes)) {
|
|
|
|
for (MesReportWorkConsume consume : consumes) {
|
|
|
|
for (MesReportWorkConsume consume : consumes) {
|
|
|
|
SapRFW.lt_hw lthw = new SapRFW.lt_hw();//MES生产订单报工货物移动修改
|
|
|
|
SapRFW.lt_hw lthw = new SapRFW.lt_hw();//MES生产订单报工货物移动修改
|
|
|
|