diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/dao/mapper/MesRequestMapper.xml b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/dao/mapper/MesRequestMapper.xml index 74366f7..96a9189 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/dao/mapper/MesRequestMapper.xml +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/dao/mapper/MesRequestMapper.xml @@ -73,9 +73,11 @@ INSERT INTO "LMSTELCOM"."RECEIVE_QS_PRESS_MONITORDATA"(BRICK_ID, GET_STATION, PUT_STATION, IS_QUALIFIED, LASER_MARKING_CODE , WEIGHT, HEIGHT1, HEIGHT2, HEIGHT3, HEIGHT4, WIDTH1, WIDTH2, LEN, VOLUME, FLATNESS, UNQUALIFIED_QTY, WORKORDER_CODE - , CREATE_TM, OP_FLAG) VALUES (#{BRICK_ID}, #{GET_STATION}, #{PUT_STATION}, #{IS_QUALIFIED}, #{LASER_MARKING_CODE} + , CREATE_TM, OP_FLAG, MATERIAL_ID, MATERIAL_NAME, MATERIAL_SPEC, MATERIAL_MODEL, MACHINE_WET) VALUES + (#{BRICK_ID}, #{GET_STATION}, #{PUT_STATION}, #{IS_QUALIFIED}, #{LASER_MARKING_CODE} , #{WEIGHT}, #{HEIGHT1}, #{HEIGHT2}, #{HEIGHT3}, #{HEIGHT4}, #{WIDTH1}, #{WIDTH2}, #{LEN}, #{VOLUME}, #{FLATNESS} - , #{UNQUALIFIED_QTY}, #{WORKORDER_CODE}, #{CREATE_TM}, #{OP_FLAG}) + , #{UNQUALIFIED_QTY}, #{WORKORDER_CODE}, #{CREATE_TM}, #{OP_FLAG}, #{MATERIAL_ID}, #{MATERIAL_NAME} + , #{MATERIAL_SPEC}, #{MATERIAL_MODEL}, #{MACHINE_WET}) INSERT INTO "LMSTELCOM"."RECEIVE_LMS_BINSTA"(MSGID, SEND_TM, GROUP_ID, VEHICLE_TYPE, VEHICLE_CODE, MATERIAL_ID diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/dto/MesQSPressMonitorData.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/dto/MesQSPressMonitorData.java index bdba2c2..6023b7f 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/dto/MesQSPressMonitorData.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/dto/MesQSPressMonitorData.java @@ -49,5 +49,10 @@ public class MesQSPressMonitorData { private String CREATE_TM; private String OP_FLAG; private String OP_TM; + private String MATERIAL_ID; + private String MATERIAL_NAME; + private String MATERIAL_SPEC; + private String MATERIAL_MODEL; + private String MACHINE_WET; } 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 1566a40..109194b 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 @@ -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工单 */ diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/util/PointUtils.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/util/PointUtils.java index dc34c7c..b722dad 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/util/PointUtils.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/util/PointUtils.java @@ -74,6 +74,7 @@ public class PointUtils { point.setVehicle_qty(point.getVehicle_qty() + 1); if (basePoint.getVehicle_qty() == 5) { // 等到新的点执行第一托的时候,才判断另一个点满足5个托盘的时候就清空 basePoint.setVehicle_qty(0); + basePoint.setUpdate_time(DateUtil.now()); pointService.updateById(basePoint); } point.setUpdate_time(DateUtil.now()); diff --git a/lms/nladmin-system/nlsso-server/src/test/java/org/nl/point/test.java b/lms/nladmin-system/nlsso-server/src/test/java/org/nl/point/test.java index eeaa7d3..e14074c 100644 --- a/lms/nladmin-system/nlsso-server/src/test/java/org/nl/point/test.java +++ b/lms/nladmin-system/nlsso-server/src/test/java/org/nl/point/test.java @@ -117,7 +117,8 @@ public class test { // System.out.println(f.substring(0, 12)); // System.out.println(f.substring(18, f.length())); - System.out.println(5%3); +// System.out.println(5%3); + System.out.println(Double.parseDouble("0.0")); } } diff --git a/lms/nladmin-ui/src/views/wms/sch/group/index.vue b/lms/nladmin-ui/src/views/wms/sch/group/index.vue index 52988ec..a0cce1c 100644 --- a/lms/nladmin-ui/src/views/wms/sch/group/index.vue +++ b/lms/nladmin-ui/src/views/wms/sch/group/index.vue @@ -249,7 +249,7 @@ - +