报工成功后,再关闭订单

orign^2
zhaoxiaolin 1 year ago
parent e1be6cb0a6
commit 91790d8b7b

@ -321,11 +321,11 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
logger.info("==========================母工单报工开始");
pHzWork.setQuantityFeedback(sHzWorks.getQuantityFeedback());
pHzWork.setSac1(sHzWorks.getSac1());
this.reportHzToSap(pHzWork);
R sapR = this.reportHzToSap(pHzWork);
logger.info("==========================母工单报工结束");
//最终报工标识:关闭子母工单
//最终报工标识且sap报工成功:关闭子母工单
MesReportWork endReport = mesReportWorkMapper.getEndReport(pHzWork);
if("1".equals(endReport.getEndReport())){
if("1".equals(endReport.getEndReport())&&sapR.getCode()==200){
logger.info("报工======母sap工单编码"+sapWorkOrders.get(0).getWorkorderCodeSap()+
"子sap工单编码"+sapWorkOrders.get(1).getWorkorderCodeSap()
);
@ -405,6 +405,7 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
} else {
workOrder.setUploadStatus("2");
workOrder.setUploadMsg(r.getMsg());
return r;
}
workOrder.setUploadTime(DateUtils.getNowDate());
mesReportWorkMapper.updateSyncSapStatus(workOrder);

Loading…
Cancel
Save