diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/common/mnt/websocket/WebSocketServer.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/common/mnt/websocket/WebSocketServer.java index d2c7920..5604438 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/common/mnt/websocket/WebSocketServer.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/common/mnt/websocket/WebSocketServer.java @@ -106,7 +106,7 @@ public class WebSocketServer { * */ public static void sendInfo(SocketMsg socketMsg, @PathParam("sid") String sid) throws IOException { String message = JSONObject.toJSONString(socketMsg); - log.info("推送消息到"+sid+",推送内容:"+message); + log.debug("推送消息到"+sid+",推送内容:"+message); for (WebSocketServer item : webSocketSet) { try { //这里可以设定只推送给这个sid的,为null则全部推送 diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/config/lucene/LogMessageConstant.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/config/lucene/LogMessageConstant.java index e407f84..e1a03e7 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/config/lucene/LogMessageConstant.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/config/lucene/LogMessageConstant.java @@ -42,5 +42,6 @@ public class LogMessageConstant { public final static String BACKGROUND_YELLOW = "\u001B[43m"; /** 索引路径 */ - public final static String INDEX_DIR = "D:\\lucene\\index"; + public final static String INDEX_DIR = "E:\\lucene\\index"; + } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/impl/WmsToMesServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/impl/WmsToMesServiceImpl.java index 8e7ab1f..1566a40 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/impl/WmsToMesServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/impl/WmsToMesServiceImpl.java @@ -59,11 +59,11 @@ public class WmsToMesServiceImpl implements WmsToMesService { @Override public void reportMudConsumption(MesMudConsumptionDto mudObject) { - log.info("上报mes消耗泥料记录的信息: {}", mudObject); // 请求mes插入mes数据库 try { mesRequestMapper.insertMudConsumptionInfo(mudObject); } catch (Exception e) { + log.error("上报mes消耗泥料记录的数据:{}", mudObject); log.error("上报mes消耗泥料记录失败:{}", e.getMessage()); // todo:发送通知 noticeService.createNotice("上报mes消耗泥料数据失败", "消耗泥料数据" + mudObject.getPWORKSCHE_ID(), @@ -117,7 +117,6 @@ public class WmsToMesServiceImpl implements WmsToMesService { @Override // @DSTransactional public void reportProductData(String groupId) { - log.info("压机产出数据记录"); // 获取组盘信息 SchBaseVehiclematerialgroup vehiclematerialgroup = vehiclematerialgroupService.getById(groupId); String workorderCode = vehiclematerialgroup.getWorkorder_code(); @@ -125,7 +124,7 @@ public class WmsToMesServiceImpl implements WmsToMesService { PdmBdWorkorder workorder = pdmBdWorkorderService.getByCode(workorderCode); String extData = workorder.getExt_data(); MesWorkOrderDto mesWorkOrderDto = JSON.parseObject(extData, MesWorkOrderDto.class); - log.info("获取MES给的工单数据:{}", mesWorkOrderDto); + SchBasePoint basePoint = pointService.getById(workorder.getPoint_code()); MesProductDataDto mesProductDataDto = new MesProductDataDto(); mesProductDataDto.setMSGID(IdUtil.getSnowflake(1, 1).nextIdStr()); @@ -146,11 +145,13 @@ public class WmsToMesServiceImpl implements WmsToMesService { ? workorder.getProduce_date() : DateUtil.now()); mesProductDataDto.setCREATE_TM(DateUtil.now()); mesProductDataDto.setOP_FLAG(GeneralDefinition.NO); - log.info("压机产出返给MES的数据:{}", mesProductDataDto); + // 插入mes数据库 try { mesRequestMapper.insertProductData(mesProductDataDto); } catch (Exception e) { + log.error("压机产出-获取MES给的工单数据:{}", mesWorkOrderDto); + log.error("压机产出返给MES的数据:{}", mesProductDataDto); log.error("反馈压机产出插入mes数据库失败:{}", e.getMessage()); // 发送通知 noticeService.createNotice("反馈压机产出插入mes数据库失败", "压机产出" @@ -168,7 +169,7 @@ public class WmsToMesServiceImpl implements WmsToMesService { PdmBdWorkorder workorder = pdmBdWorkorderService.getByCode(workorderCode); String extData = workorder.getExt_data(); MesWorkOrderDto mesWorkOrderDto = JSON.parseObject(extData, MesWorkOrderDto.class); - log.info("获取MES给的工单数据:{}", mesWorkOrderDto); + MesSemiProductionInfoInDto semiProductionInfoInDto = new MesSemiProductionInfoInDto(); semiProductionInfoInDto.setMSGID(IdUtil.getSnowflake(1, 1).nextIdStr()); semiProductionInfoInDto.setFORDER_NO(mesWorkOrderDto.getFORDER_NO()); @@ -188,11 +189,13 @@ public class WmsToMesServiceImpl implements WmsToMesService { semiProductionInfoInDto.setPRODATE(workorder.getProduce_date()); semiProductionInfoInDto.setCREATE_TM(DateUtil.now()); semiProductionInfoInDto.setOP_FLAG(GeneralDefinition.NO); - log.info("半成品入库返给MES的数据:{}", semiProductionInfoInDto); + // 插入mes数据库 try { mesRequestMapper.insertSemiProductInfo(semiProductionInfoInDto); } catch (Exception e) { + log.error("半成品入库-获取MES给的工单数据:{}", mesWorkOrderDto); + log.error("半成品入库返给MES的数据:{}", semiProductionInfoInDto); log.error("半成品入库插入mes数据库失败:{}", e.getMessage()); // todo:发送通知 noticeService.createNotice("半成品入库插入mes数据库失败", "半成品入库" @@ -202,7 +205,6 @@ public class WmsToMesServiceImpl implements WmsToMesService { @Override public void reportSemiProductionInfoOut(String groupId) { - log.info("半成品出库"); // 获取组盘信息 SchBaseVehiclematerialgroup vehiclematerialgroup = vehiclematerialgroupService.getById(groupId); String workorderCode = vehiclematerialgroup.getWorkorder_code(); @@ -213,7 +215,7 @@ public class WmsToMesServiceImpl implements WmsToMesService { if (ObjectUtil.isNotEmpty(extData)) { mesWorkOrderDto = JSON.parseObject(extData, MesWorkOrderDto.class); } - log.info("获取MES给的工单数据:{}", mesWorkOrderDto); + MesSemiProductionInfoOutDto semiProductionInfoOutDto = new MesSemiProductionInfoOutDto(); semiProductionInfoOutDto.setMSGID(IdUtil.getSnowflake(1, 1).nextIdStr()); semiProductionInfoOutDto.setSEMIPRODUCT_BATCHNO(workorder.getBatch_no()); @@ -230,11 +232,13 @@ public class WmsToMesServiceImpl implements WmsToMesService { semiProductionInfoOutDto.setOUTTYPE("成品出库"); semiProductionInfoOutDto.setCREATE_TM(DateUtil.now()); semiProductionInfoOutDto.setOP_FLAG(GeneralDefinition.NO); - log.info("半成品出库返给MES的数据:{}", semiProductionInfoOutDto); + // 插入mes数据库 try { mesRequestMapper.insertSemiProductOutInfo(semiProductionInfoOutDto); } catch (Exception e) { + log.error("半成品出库-获取MES给的工单数据:{}", mesWorkOrderDto); + log.error("半成品出库返给MES的数据:{}", semiProductionInfoOutDto); log.error("半成品出库插入mes数据库失败:{}", e.getMessage()); // todo:发送通知 noticeService.createNotice("半成品出库插入mes数据库失败", "半成品出库" + semiProductionInfoOutDto.getMSGID(), @@ -244,7 +248,6 @@ public class WmsToMesServiceImpl implements WmsToMesService { @Override public void reportGdyMaterialInfoIn(String groupId) { - log.info("物料入窑"); // 获取组盘信息 SchBaseVehiclematerialgroup vehiclematerialgroup = vehiclematerialgroupService.getById(groupId); String workorderCode = vehiclematerialgroup.getWorkorder_code(); @@ -252,7 +255,7 @@ public class WmsToMesServiceImpl implements WmsToMesService { PdmBdWorkorder workorder = pdmBdWorkorderService.getByCode(workorderCode); String extData = workorder.getExt_data(); MesWorkOrderDto mesWorkOrderDto = JSON.parseObject(extData, MesWorkOrderDto.class); - log.info("获取MES给的工单数据:{}", mesWorkOrderDto); + MesGdyMaterialInDto gdyMaterialInDto = new MesGdyMaterialInDto(); gdyMaterialInDto.setMSGID(IdUtil.getSnowflake(1, 1).nextIdStr()); gdyMaterialInDto.setTRAY_NO(vehiclematerialgroup.getVehicle_code()); @@ -270,11 +273,13 @@ public class WmsToMesServiceImpl implements WmsToMesService { gdyMaterialInDto.setIN_DATE(vehiclematerialgroup.getInto_kiln_time()); gdyMaterialInDto.setCREATE_TM(DateUtil.now()); gdyMaterialInDto.setOP_FLAG(GeneralDefinition.NO); - log.info("入窑返给MES的数据:{}", gdyMaterialInDto); + // 插入mes数据库 try { mesRequestMapper.insertGdyMaterialIn(gdyMaterialInDto); } catch (Exception e) { + log.error("入窑-获取MES给的工单数据:{}", mesWorkOrderDto); + log.error("入窑返给MES的数据:{}", gdyMaterialInDto); log.error("入窑插入mes数据库失败:{}", e.getMessage()); // todo:发送通知 noticeService.createNotice("入窑插入mes数据库失败", "入窑" + gdyMaterialInDto.getMSGID(), @@ -284,7 +289,6 @@ public class WmsToMesServiceImpl implements WmsToMesService { @Override public void reportGdyMaterialInfoOut(String groupId) { - log.info("物料出窑"); // 获取组盘信息 SchBaseVehiclematerialgroup vehiclematerialgroup = vehiclematerialgroupService.getById(groupId); String workorderCode = vehiclematerialgroup.getWorkorder_code(); @@ -292,7 +296,7 @@ public class WmsToMesServiceImpl implements WmsToMesService { PdmBdWorkorder workorder = pdmBdWorkorderService.getByCode(workorderCode); String extData = workorder.getExt_data(); MesWorkOrderDto mesWorkOrderDto = JSON.parseObject(extData, MesWorkOrderDto.class); - log.info("获取MES给的工单数据:{}", mesWorkOrderDto); + MesGdyMaterialOutDto gdyMaterialOutDto = new MesGdyMaterialOutDto(); gdyMaterialOutDto.setMSGID(IdUtil.getSnowflake(1, 1).nextIdStr()); gdyMaterialOutDto.setTRAY_NO(vehiclematerialgroup.getVehicle_code()); @@ -310,11 +314,13 @@ public class WmsToMesServiceImpl implements WmsToMesService { gdyMaterialOutDto.setOUT_DATE(vehiclematerialgroup.getOut_kiln_time()); gdyMaterialOutDto.setCREATE_TM(DateUtil.now()); gdyMaterialOutDto.setOP_FLAG(GeneralDefinition.NO); - log.info("出窑返给MES的数据:{}", gdyMaterialOutDto); + // 插入mes数据库 try { mesRequestMapper.insertGdyMaterialOut(gdyMaterialOutDto); } catch (Exception e) { + log.error("出窑-获取MES给的工单数据:{}", mesWorkOrderDto); + log.error("出窑返给MES的数据:{}", gdyMaterialOutDto); log.error("出窑插入mes数据库失败:{}", e.getMessage()); // todo:发送通知 noticeService.createNotice("出窑插入mes数据库失败", "出窑" + gdyMaterialOutDto.getMSGID(), @@ -343,7 +349,7 @@ public class WmsToMesServiceImpl implements WmsToMesService { int number = mesRequestMapper.countFPNumber(orderObj.getWorkorder_code(), orderObj.getPoint_code()); MdBaseMaterial material = mdBaseMaterialService.getById(orderObj.getMaterial_id()); SchBasePoint basePoint = pointService.getById(orderObj.getPoint_code()); - log.info("统计到设备:{} 不合格砖数:{}", orderObj.getPoint_name(), number); + // 设置字段值 MesUnusedDto mesUnusedDto = new MesUnusedDto(); mesUnusedDto.setMSGID(IdUtil.getSnowflake(1, 1).nextIdStr()); @@ -361,11 +367,13 @@ public class WmsToMesServiceImpl implements WmsToMesService { mesUnusedDto.setPRODATE(orderObj.getProduce_date()); mesUnusedDto.setCREATE_TM(DateUtil.now()); mesUnusedDto.setOP_FLAG(GeneralDefinition.NO); - log.info("插入mes机口判废数据库的数据:{}", mesUnusedDto); + // 存入mes数据库 try { mesRequestMapper.insertMesUnusedInfo(mesUnusedDto); } catch (Exception e) { + log.error("统计到设备:{} 不合格砖数:{}", orderObj.getPoint_name(), number); + log.error("插入mes机口判废数据库的数据:{}", mesUnusedDto); log.error("插入机口判废失败:{}", e.getMessage()); // todo:发送通知 noticeService.createNotice("机口判废插入mes数据库失败", "机口判废" + mesUnusedDto.getMSGID(), @@ -386,6 +394,7 @@ public class WmsToMesServiceImpl implements WmsToMesService { try { mesRequestMapper.insertQSPressMonitorData(mesQSPressMonitorData); } catch (Exception e) { + log.error("插入压机检测数据:{}", mesQSPressMonitorData); log.error("插入压机检测失败:{}", e.getMessage()); // todo:发送通知 noticeService.createNotice("压机检测插入mes数据库失败", "压机检测" diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/FJMKTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/FJMKTask.java index 13bcf79..821fcad 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/FJMKTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/FJMKTask.java @@ -182,7 +182,7 @@ public class FJMKTask extends AbstractTask { throw new BadRequestException("包装线不可用!"); } task.setPoint_code2(packagePoint.getPoint_code()); // 包装线 - // todo: 校验是否够码满一托 + // 校验是否够码满一托 List list = JSONArray.parseArray(jsonObject.getString("list"), ApplyDeviceDto.class); // 1 获取点位相应数量 int sum = 0; diff --git a/lms/nladmin-system/nlsso-server/src/main/resources/config/application.yml b/lms/nladmin-system/nlsso-server/src/main/resources/config/application.yml index 7e2aa7b..a37104c 100644 --- a/lms/nladmin-system/nlsso-server/src/main/resources/config/application.yml +++ b/lms/nladmin-system/nlsso-server/src/main/resources/config/application.yml @@ -42,7 +42,7 @@ spring: freemarker: check-template-location: false profiles: - active: dev + active: prod jackson: time-zone: GMT+8 data: diff --git a/lms/nladmin-system/nlsso-server/src/main/resources/stopword.dic b/lms/nladmin-system/nlsso-server/src/main/resources/stopword.dic index b7d19b8..2c94dd1 100644 --- a/lms/nladmin-system/nlsso-server/src/main/resources/stopword.dic +++ b/lms/nladmin-system/nlsso-server/src/main/resources/stopword.dic @@ -1240,3 +1240,17 @@ $ 上来 上去 获取MES给的工单数据 +上报mes消耗泥料记录的数据 +上报mes消耗泥料记录失败 +压机产出-获取MES给的工单数据 +压机产出返给MES的数据 +反馈压机产出插入mes数据库失败 +半成品入库-获取MES给的工单数据 +半成品入库返给MES的数据 +半成品入库插入mes数据库失败 +半成品出库-获取MES给的工单数据 +半成品出库返给MES的数据 +半成品出库插入mes数据库失败 +压机产出-获取MES给的工单数据 +压机产出返给MES的数据 +反馈压机产出插入mes数据库失败