|
|
|
@ -483,14 +483,7 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
|
|
|
|
|
sHzWorks.setMachineCode(mesReportWork.getMachineCode());
|
|
|
|
|
sapRson = this.reportHzToSap(sHzWorks);
|
|
|
|
|
logger.info("==========================一层工单报工结束:"+JSONObject.toJSONString(sapRson));
|
|
|
|
|
//更新产线设备运行时间,故障率
|
|
|
|
|
logger.info("==========================更新产线设备运行时间,故障率开始");
|
|
|
|
|
Map updateDeviceParam=new HashMap();
|
|
|
|
|
updateDeviceParam.put("RunTime",sHzWorks.getWorkTime());
|
|
|
|
|
updateDeviceParam.put("equipmentCode",mesReportWork.getMachineCode());
|
|
|
|
|
updateDeviceParam.put("productDate",sHzWorks.getProductDate());
|
|
|
|
|
R rs = remoteDeviceService.updateDeviceRunTimeORRate(updateDeviceParam);
|
|
|
|
|
logger.info("==========================更新产线设备运行时间,故障率结束:结果"+ rs.getMsg());
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else if(workOrders.size()==2){
|
|
|
|
|
/**(两层报工)子工单先报工,然后母工单报工**/
|
|
|
|
@ -545,14 +538,6 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
|
|
|
|
|
//pHzWork.setSac2("4");//母单报工固定值(上位机插入数据时候默认4)
|
|
|
|
|
R sapR = this.reportHzToSap(pHzWork);
|
|
|
|
|
logger.info("==========================母工单报工结束"+JSONObject.toJSONString(sapR));
|
|
|
|
|
//更新产线设备运行时间,故障率
|
|
|
|
|
logger.info("==========================更新产线设备运行时间,故障率开始");
|
|
|
|
|
Map updateDeviceParam=new HashMap();
|
|
|
|
|
updateDeviceParam.put("RunTime",sHzWorks.getSac1());
|
|
|
|
|
updateDeviceParam.put("equipmentCode",mesReportWork.getMachineCode());
|
|
|
|
|
updateDeviceParam.put("productDate",sHzWorks.getProductDate());
|
|
|
|
|
R rs = remoteDeviceService.updateDeviceRunTimeORRate(updateDeviceParam);
|
|
|
|
|
logger.info("==========================更新产线设备运行时间,故障率结束:结果"+ rs.getMsg());
|
|
|
|
|
return sapR;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -824,18 +809,6 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
|
|
|
|
|
return resultMap;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public AjaxResult updateResouceRunTime(Map map) {
|
|
|
|
|
//更新产线设备运行时间,故障率
|
|
|
|
|
logger.info("==========================更新产线设备运行时间,故障率开始");
|
|
|
|
|
Map updateDeviceParam=new HashMap();
|
|
|
|
|
updateDeviceParam.put("RunTime",map.get("RunTime"));
|
|
|
|
|
updateDeviceParam.put("equipmentCode",map.get("equipmentCode"));
|
|
|
|
|
updateDeviceParam.put("productDate",map.get("productDate"));
|
|
|
|
|
R rs = remoteDeviceService.updateDeviceRunTimeORRate(updateDeviceParam);
|
|
|
|
|
logger.info("==========================更新产线设备运行时间,故障率结束:结果"+ rs.getMsg());
|
|
|
|
|
return AjaxResult.success(rs.getMsg());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected List<String> get7Days(){
|
|
|
|
|
List<String> days = new ArrayList<>();
|
|
|
|
@ -977,15 +950,6 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
|
|
|
|
|
//如果是暂停的工单报工,向sap报工结束后,工单状态->w3
|
|
|
|
|
workOrder.setStatus("w3");
|
|
|
|
|
mesReportWorkMapper.updateOrderWorkStatus(workOrder);
|
|
|
|
|
|
|
|
|
|
//更新产线设备运行时间,故障率
|
|
|
|
|
logger.info("==========================更新产线设备运行时间,故障率开始");
|
|
|
|
|
Map updateDeviceParam=new HashMap();
|
|
|
|
|
updateDeviceParam.put("RunTime",workOrder.getSac1());
|
|
|
|
|
updateDeviceParam.put("equipmentCode",workOrder.getMachineCode());
|
|
|
|
|
updateDeviceParam.put("productDate",workOrder.getProductDate());
|
|
|
|
|
R rs = remoteDeviceService.updateDeviceRunTimeORRate(updateDeviceParam);
|
|
|
|
|
logger.info("==========================更新产线设备运行时间,故障率结束:结果"+ rs.getMsg());
|
|
|
|
|
return r;
|
|
|
|
|
// return R.ok();//测试
|
|
|
|
|
}
|
|
|
|
|