Browse Source

fix: mes压机检测新增物料等信息

private String MATERIAL_ID;
    private String MATERIAL_NAME;
    private String MATERIAL_SPEC;
    private String MATERIAL_MODEL;
    private String MACHINE_WET;
master
李永德 1 year ago
parent
commit
043962f14b
  1. 6
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/dao/mapper/MesRequestMapper.xml
  2. 5
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/dto/MesQSPressMonitorData.java
  3. 22
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/impl/WmsToMesServiceImpl.java
  4. 1
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/util/PointUtils.java
  5. 3
      lms/nladmin-system/nlsso-server/src/test/java/org/nl/point/test.java
  6. 2
      lms/nladmin-ui/src/views/wms/sch/group/index.vue

6
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/dao/mapper/MesRequestMapper.xml

@ -73,9 +73,11 @@
<insert id="insertQSPressMonitorData" parameterType="org.nl.wms.ext.mes.service.dto.MesQSPressMonitorData">
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>
<insert id="saveShelfInfoBatchToMes" parameterType="org.nl.wms.ext.mes.service.dto.MesShelfInfo">
INSERT INTO "LMSTELCOM"."RECEIVE_LMS_BINSTA"(MSGID, SEND_TM, GROUP_ID, VEHICLE_TYPE, VEHICLE_CODE, MATERIAL_ID

5
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;
}

22
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 brickInfolms的砖块检测信息
* @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工单
*/

1
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());

3
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"));
}
}

2
lms/nladmin-ui/src/views/wms/sch/group/index.vue

@ -249,7 +249,7 @@
<!--表格渲染-->
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
<el-table-column type="selection" width="55" />
<el-table-column prop="vehicle_code" label="载具编码" :min-width="flexWidth('vehicle_code',crud.data,'载具编码')" />
<el-table-column sortable prop="vehicle_code" label="载具编码" :min-width="flexWidth('vehicle_code',crud.data,'载具编码', 30)" />
<!-- <el-table-column prop="child_vehicle_code" label="子载具编码" :min-width="flexWidth('child_vehicle_code',crud.data,'子载具编码')"/>-->
<el-table-column prop="source_vehicle_code" label="来源载具" :min-width="flexWidth('source_vehicle_code',crud.data,'来源载具')" />
<el-table-column prop="region_name" label="所属区域" :min-width="flexWidth('region_name',crud.data,'所属区域')" />

Loading…
Cancel
Save