Browse Source

fix: 与调用mes数据库的问题

master
李永德 1 year ago
parent
commit
0b37e66ac8
  1. 4
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java
  2. 3
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/WmsToMesService.java
  3. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/dao/mapper/MesRequestMapper.java
  4. 7
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/dao/mapper/MesRequestMapper.xml
  5. 4
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/impl/WmsToMesServiceImpl.java
  6. 3
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/service/impl/PdmBdWorkorderServiceImpl.java
  7. 6
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/report/service/ReportService.java
  8. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/report/service/dao/mapper/ReportMapper.xml
  9. 2
      lms/nladmin-ui/src/views/wms/pdm/workerorder/ProductionOrder.vue
  10. 12
      lms/nladmin-ui/src/views/wms/pdm/workerorder/index.vue

4
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java

@ -441,7 +441,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
*/ */
@Override @Override
public ApplyTaskResponse applyLabelling(JSONObject param) { public ApplyTaskResponse applyLabelling(JSONObject param) {
// 木托盘号##物料编码##数量##吨量(单重X数量)##生产日期##订单号 // 木托盘号##物料编码##数量##吨量(单重X数量)##生产日期##客户名称##订单号
String requestNo = param.getString("requestNo"); String requestNo = param.getString("requestNo");
ApplyTaskRequest baseRequest = param.toJavaObject(ApplyTaskRequest.class); ApplyTaskRequest baseRequest = param.toJavaObject(ApplyTaskRequest.class);
if (baseRequest.getVehicle_code() == null) { if (baseRequest.getVehicle_code() == null) {
@ -469,7 +469,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
.append(multiply).append("##") .append(multiply).append("##")
.append(DateUtil.format(DateUtil.parse(DateUtil.today()), "yyyy年MM月dd日")).append("##") .append(DateUtil.format(DateUtil.parse(DateUtil.today()), "yyyy年MM月dd日")).append("##")
.append(custer.getCUSTER_NAME()).append("##") .append(custer.getCUSTER_NAME()).append("##")
.append(object.getString("order_no")); .append(workorder.getProduction_order());
return ApplyTaskResponse.responseOk(requestNo, sb.toString()); return ApplyTaskResponse.responseOk(requestNo, sb.toString());
} }

3
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/WmsToMesService.java

@ -63,6 +63,7 @@ public interface WmsToMesService {
List<MesGdyInfoDto> getAllMesGdyInfos(); List<MesGdyInfoDto> getAllMesGdyInfos();
/** /**
* 统计当前设备的不合格位置的数量作为不合格数
* 上报压机判废信息 * 上报压机判废信息
* @param workorderCode * @param workorderCode
*/ */
@ -111,5 +112,5 @@ public interface WmsToMesService {
* @param currentSize * @param currentSize
* @return * @return
*/ */
List<MesOrderInfo> selectPageMesOrder(int currentPage, int currentSize); List<MesOrderInfo> selectPageMesOrder(String materialId, int currentPage, int currentSize);
} }

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

@ -65,5 +65,5 @@ public interface MesRequestMapper {
@DS("oracle") @DS("oracle")
CusterVo getCusterByNo(String custerNo); CusterVo getCusterByNo(String custerNo);
@DS("oracle") @DS("oracle")
List<MesOrderInfo> selectPageMesOrder(int currentPage, int currentSize); List<MesOrderInfo> selectPageMesOrder(String materialId, int currentPage, int currentSize);
} }

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

@ -282,10 +282,10 @@
WHERE p1.region_code = 'GTPHC' WHERE p1.region_code = 'GTPHC'
</select> </select>
<select id="getCusterInfo" resultType="org.nl.wms.ext.mes.service.dto.CusterVo"> <select id="getCusterInfo" resultType="org.nl.wms.ext.mes.service.dto.CusterVo">
SELECT * FROM "RTMG"."VIEW_CUSTER_LMS" SELECT CUSTER_NO, CUSTER_NAME FROM "RTMG"."VIEW_CUSTER_LMS"
</select> </select>
<select id="getCusterByNo" resultType="org.nl.wms.ext.mes.service.dto.CusterVo"> <select id="getCusterByNo" resultType="org.nl.wms.ext.mes.service.dto.CusterVo">
SELECT * FROM "RTMG"."VIEW_CUSTER_LMS" SELECT CUSTER_NO, CUSTER_NAME FROM "RTMG"."VIEW_CUSTER_LMS"
WHERE CUSTER_NO = #{custerNo} WHERE CUSTER_NO = #{custerNo}
</select> </select>
<select id="selectPageMesOrder" resultType="org.nl.wms.ext.mes.service.dto.MesOrderInfo"> <select id="selectPageMesOrder" resultType="org.nl.wms.ext.mes.service.dto.MesOrderInfo">
@ -295,6 +295,9 @@
"RTMG"."VIEW_POP_ORDER_RESULT_LMS".* "RTMG"."VIEW_POP_ORDER_RESULT_LMS".*
FROM "RTMG"."VIEW_POP_ORDER_RESULT_LMS" FROM "RTMG"."VIEW_POP_ORDER_RESULT_LMS"
WHERE ROWNUM <![CDATA[ <= ]]> #{currentSize} WHERE ROWNUM <![CDATA[ <= ]]> #{currentSize}
<if test="materialId != null">
AND FMATERIAL_ID = #{materialId}
</if>
) )
WHERE rn <![CDATA[ > ]]> #{currentPage} WHERE rn <![CDATA[ > ]]> #{currentPage}
</select> </select>

4
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/impl/WmsToMesServiceImpl.java

@ -419,8 +419,8 @@ public class WmsToMesServiceImpl implements WmsToMesService {
} }
@Override @Override
public List<MesOrderInfo> selectPageMesOrder(int currentPage, int currentSize) { public List<MesOrderInfo> selectPageMesOrder(String materialId, int currentPage, int currentSize) {
return mesRequestMapper.selectPageMesOrder(currentPage, currentSize); return mesRequestMapper.selectPageMesOrder(materialId, currentPage, currentSize);
} }
/** /**

3
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/service/impl/PdmBdWorkorderServiceImpl.java

@ -113,6 +113,7 @@ public class PdmBdWorkorderServiceImpl extends ServiceImpl<PdmBdWorkorderMapper,
res.put("custer_no", entity.getCuster_no()); res.put("custer_no", entity.getCuster_no());
entity.setPlan_qty(ceil > inventoryCeil ? BigDecimal.valueOf(inventoryCeil) : BigDecimal.valueOf(ceil)); entity.setPlan_qty(ceil > inventoryCeil ? BigDecimal.valueOf(inventoryCeil) : BigDecimal.valueOf(ceil));
entity.setExt_data(res.toJSONString()); entity.setExt_data(res.toJSONString());
entity.setProduce_order(entity.getOrder_no());
} }
@Override @Override
@ -224,7 +225,7 @@ public class PdmBdWorkorderServiceImpl extends ServiceImpl<PdmBdWorkorderMapper,
IPage<MesOrderInfo> pages = new Page<>(page, size); IPage<MesOrderInfo> pages = new Page<>(page, size);
int currentPage = page * size; int currentPage = page * size;
int currentSize = pageQuery.getPage() == 0 ? 1 : pageQuery.getPage() * size; int currentSize = pageQuery.getPage() == 0 ? 1 : pageQuery.getPage() * size;
List<MesOrderInfo> mesOrderInfoList = wmsToMesService.selectPageMesOrder(currentPage, currentSize); List<MesOrderInfo> mesOrderInfoList = wmsToMesService.selectPageMesOrder(query.getMaterialId(), currentPage, currentSize);
pages.setRecords(mesOrderInfoList); pages.setRecords(mesOrderInfoList);
return pages; return pages;
} }

6
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/report/service/ReportService.java

@ -19,6 +19,12 @@ public interface ReportService {
IPage<IOKilnReportVo> inKilnReport(Map json, PageQuery page); IPage<IOKilnReportVo> inKilnReport(Map json, PageQuery page);
/**
* 物料警告
* @param json
* @param page
* @return
*/
IPage<MaterialTimeoutVo> inventoryMaterialTimeoutWarning(Map json, PageQuery page); IPage<MaterialTimeoutVo> inventoryMaterialTimeoutWarning(Map json, PageQuery page);
// IPage<> mudTransfer(JSONObject json, PageQuery page); // IPage<> mudTransfer(JSONObject json, PageQuery page);

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/report/service/dao/mapper/ReportMapper.xml

@ -59,6 +59,6 @@
WHERE p.region_code = 'GTPHC' WHERE p.region_code = 'GTPHC'
AND p.point_type = '2' AND p.point_type = '2'
AND p.point_status = '3' AND p.point_status = '3'
AND vg.instorage_time <![CDATA[<=]]> DATE_SUB(NOW(), INTERVAL 7 DAY) AND vg.instorage_time <![CDATA[<=]]> DATE_SUB(NOW(), INTERVAL 30 DAY)
</select> </select>
</mapper> </mapper>

2
lms/nladmin-ui/src/views/wms/pdm/workerorder/ProductionOrder.vue

@ -60,7 +60,7 @@ export default {
url: 'api/pdmBdWorkorder/mesOrder', url: 'api/pdmBdWorkorder/mesOrder',
optShow: {}, optShow: {},
query: { query: {
material_code: null materialId: null
} }
}) })
}, },

12
lms/nladmin-ui/src/views/wms/pdm/workerorder/index.vue

@ -226,15 +226,15 @@
/> />
</el-form-item> </el-form-item>
<el-form-item v-if="form.region_code === 'FJ'" label="客户编码"> <el-form-item v-if="form.region_code === 'FJ'" label="客户编码">
<el-select v-model="form.custer_no" placeholder="请选择" style="width: 240px;"> <el-select v-model="form.custer_no" clearable filterable placeholder="请选择" style="width: 240px;">
<el-option <el-option
v-for="item in custerList" v-for="item in custerList"
:key="item.CUSTER_NO" :key="item.custer_NO"
:label="item.CUSTER_NAME" :label="item.custer_NAME"
:value="item.CUSTER_NO" :value="item.custer_NO"
> >
<span style="float: left">{{ item.CUSTER_NO }}</span> <span style="float: left">{{ item.custer_NO }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.CUSTER_NAME }}</span> <span style="float: right; color: #8492a6; font-size: 13px">{{ item.custer_NAME }}</span>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>

Loading…
Cancel
Save