|
|
|
@ -290,7 +290,7 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public R reportWork(MesReportWork mesReportWork) {
|
|
|
|
|
String belongWorkOrder = mesReportWork.getWorkorderCode();
|
|
|
|
|
|
|
|
|
|
if(StringUtils.isNotBlank(mesReportWork.getFactoryCode())){//已经加上ds_
|
|
|
|
|
DynamicDataSourceContextHolder.push(mesReportWork.getFactoryCode());// 这是数据源的key
|
|
|
|
|
}
|
|
|
|
@ -325,8 +325,9 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
|
|
|
|
|
pHzWork.setSac1(sHzWorks.getSac1());
|
|
|
|
|
R sapR = this.reportHzToSap(pHzWork);
|
|
|
|
|
logger.info("==========================母工单报工结束"+JSONObject.toJSONString(sapR));
|
|
|
|
|
return sapR;
|
|
|
|
|
//最终报工标识且sap报工成功:关闭子母工单
|
|
|
|
|
MesReportWork endReport = mesReportWorkMapper.getEndReport(pHzWork);
|
|
|
|
|
// MesReportWork endReport = mesReportWorkMapper.getEndReport(pHzWork);
|
|
|
|
|
//-----改为由上位机触发
|
|
|
|
|
// if("1".equals(endReport.getEndReport())&&sapR.getCode()==200){
|
|
|
|
|
// MesReportWork rworkVo = new MesReportWork();
|
|
|
|
@ -338,7 +339,7 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
|
|
|
|
|
// mesReportWorkMapper.updateOrderWorkStatus(rworkVo);
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
return R.ok();
|
|
|
|
|
return R.fail("子单报工失败");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|