|
|
@ -155,7 +155,7 @@ public class WmsToMesServiceImpl implements WmsToMesService { |
|
|
|
log.error("反馈压机产出插入mes数据库失败:{}", e.getMessage()); |
|
|
|
// 发送通知
|
|
|
|
noticeService.createNotice("反馈压机产出插入mes数据库失败", "压机产出" |
|
|
|
+ mesProductDataDto.getPRESSUNIT(), NoticeTypeEnum.EXCEPTION.getCode()); |
|
|
|
+ mesProductDataDto.getPRESSUNIT(), NoticeTypeEnum.EXCEPTION.getCode()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -199,7 +199,7 @@ public class WmsToMesServiceImpl implements WmsToMesService { |
|
|
|
log.error("半成品入库插入mes数据库失败:{}", e.getMessage()); |
|
|
|
// todo:发送通知
|
|
|
|
noticeService.createNotice("半成品入库插入mes数据库失败", "半成品入库" |
|
|
|
+ semiProductionInfoInDto.getMSGID(), NoticeTypeEnum.EXCEPTION.getCode()); |
|
|
|
+ semiProductionInfoInDto.getMSGID(), NoticeTypeEnum.EXCEPTION.getCode()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -398,7 +398,7 @@ public class WmsToMesServiceImpl implements WmsToMesService { |
|
|
|
log.error("插入压机检测失败:{}", e.getMessage()); |
|
|
|
// todo:发送通知
|
|
|
|
noticeService.createNotice("压机检测插入mes数据库失败", "压机检测" |
|
|
|
+ mesQSPressMonitorData.getBRICK_ID(), NoticeTypeEnum.EXCEPTION.getCode()); |
|
|
|
+ mesQSPressMonitorData.getBRICK_ID(), NoticeTypeEnum.EXCEPTION.getCode()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -414,12 +414,20 @@ public class WmsToMesServiceImpl implements WmsToMesService { |
|
|
|
|
|
|
|
/** |
|
|
|
* 转换 |
|
|
|
* |
|
|
|
* @param brickInfo:lms的砖块检测信息 |
|
|
|
* @return 上报mes的砖块检测信息 |
|
|
|
*/ |
|
|
|
private MesQSPressMonitorData toPressMonitorMapper(MdBaseBrickInfo brickInfo) { |
|
|
|
// 获取mes的设备
|
|
|
|
SchBasePoint device = pointService.getById(brickInfo.getGet_station()); |
|
|
|
// 获取工单
|
|
|
|
PdmBdWorkorder workorder = pdmBdWorkorderService.getByCode(brickInfo.getWorkorder_code()); |
|
|
|
MdBaseMaterial material = mdBaseMaterialService.getById(workorder.getMaterial_id()); |
|
|
|
String singleWeight = material.getSingle_weight(); |
|
|
|
String volume = brickInfo.getVolume(); |
|
|
|
double w = Double.parseDouble(singleWeight); |
|
|
|
double v = Double.parseDouble(volume); |
|
|
|
MesQSPressMonitorData monitorData = new MesQSPressMonitorData(); |
|
|
|
monitorData.setBRICK_ID(brickInfo.getBrick_id()); |
|
|
|
monitorData.setGET_STATION(device.getExt_point_code()); |
|
|
@ -434,8 +442,13 @@ public class WmsToMesServiceImpl implements WmsToMesService { |
|
|
|
monitorData.setWIDTH1(brickInfo.getWidth1()); |
|
|
|
monitorData.setWIDTH2(brickInfo.getWidth2()); |
|
|
|
monitorData.setLEN(brickInfo.getLen()); |
|
|
|
monitorData.setVOLUME(brickInfo.getVolume()); |
|
|
|
monitorData.setVOLUME(volume); |
|
|
|
monitorData.setFLATNESS(brickInfo.getFlatness()); |
|
|
|
monitorData.setMATERIAL_ID(material.getMaterial_id()); |
|
|
|
monitorData.setMATERIAL_NAME(material.getMaterial_name()); |
|
|
|
monitorData.setMATERIAL_SPEC(material.getMaterial_spec()); |
|
|
|
monitorData.setMATERIAL_MODEL(material.getMaterial_model()); |
|
|
|
monitorData.setMACHINE_WET(String.valueOf(v == 0 ? "0" : (w / v))); |
|
|
|
monitorData.setUNQUALIFIED_QTY(brickInfo.getUnqualified_qty()); |
|
|
|
monitorData.setWORKORDER_CODE(brickInfo.getWorkorder_code()); |
|
|
|
monitorData.setCREATE_TM(DateUtil.now()); |
|
|
@ -445,6 +458,7 @@ public class WmsToMesServiceImpl implements WmsToMesService { |
|
|
|
|
|
|
|
/** |
|
|
|
* 转换 |
|
|
|
* |
|
|
|
* @param mesWorkOrderInfos: mes的工单 |
|
|
|
* @return lms工单 |
|
|
|
*/ |
|
|
|