From 10f431ca71eb55db27351e0fd9b051e6d9ab09d0 Mon Sep 17 00:00:00 2001 From: zhouz <> Date: Wed, 15 May 2024 20:26:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=85=A5=E5=BA=93=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E9=AB=98=E5=BA=A6=E8=A6=81=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/StIvtIostorinvServiceImpl.java | 84 ++++++++++++------- .../util/impl/InBussManageServiceImpl.java | 4 + .../service/iostorInv/util/wql/BST_INRULE.wql | 8 ++ .../mps/service/impl/RawFoilServiceImpl.java | 10 ++- 4 files changed, 73 insertions(+), 33 deletions(-) diff --git a/lms/nladmin-system/src/main/java/org/nl/b_lms/storage_manage/ios/service/iostorInv/impl/StIvtIostorinvServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/b_lms/storage_manage/ios/service/iostorInv/impl/StIvtIostorinvServiceImpl.java index 6a4639c40..2affa9ec9 100644 --- a/lms/nladmin-system/src/main/java/org/nl/b_lms/storage_manage/ios/service/iostorInv/impl/StIvtIostorinvServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/b_lms/storage_manage/ios/service/iostorInv/impl/StIvtIostorinvServiceImpl.java @@ -39,6 +39,7 @@ import org.nl.modules.common.exception.BadRequestException; import org.nl.common.utils.CodeUtil; import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.util.SpringContextHolder; +import org.nl.system.service.param.ISysParamService; import org.nl.wms.basedata.st.service.StorattrService; import org.nl.wms.basedata.st.service.dto.StorattrDto; import org.nl.wms.basedata.st.service.impl.UserStorServiceImpl; @@ -77,7 +78,7 @@ public class StIvtIostorinvServiceImpl extends ServiceImpl page = PageHelper.startPage(pageQuery.getPageNumber() + 1, pageQuery.getPageSize()); @@ -296,6 +301,25 @@ public class StIvtIostorinvServiceImpl extends ServiceImpl().lambda() + .eq(BstIvtBoxinfo::getBox_no, disDao.getBox_no()) + ); + attrParam.put("vehicle_type", boxDao.getVehicle_type()); + //根据木箱高度,判断入库仓位的高度 + String height = ""; + String heightLevel1 = iSysParamService.findByCode("height_level_1").getValue(); + String heightLevel2 = iSysParamService.findByCode("height_level_2").getValue(); + String box_high = boxDao.getBox_high(); + if (Integer.parseInt(box_high) <= Integer.parseInt(heightLevel1)) { + height = "1"; + } else if (Integer.parseInt(box_high) > Integer.parseInt(heightLevel1) && Integer.parseInt(box_high) <= Integer.parseInt(heightLevel2)) { + height = "2"; + } else { + height = "3"; + } + attrParam.put("height", height); JSONObject jsonSect = sectTab.query("sect_id = '" + jsonObject.getString("sect_id") + "'").uniqueResult(0); @@ -340,12 +364,12 @@ public class StIvtIostorinvServiceImpl extends ServiceImpl().lambda() - .set(StIvtIostorinvdis::getStruct_id,jsonAttr.getString("struct_id")) - .set(StIvtIostorinvdis::getStruct_code,jsonAttr.getString("struct_code")) - .set(StIvtIostorinvdis::getStruct_name,jsonAttr.getString("struct_name")) - .set(StIvtIostorinvdis::getSect_id,jsonAttr.getString("sect_id")) - .set(StIvtIostorinvdis::getSect_code,jsonAttr.getString("sect_code")) - .set(StIvtIostorinvdis::getSect_name,jsonAttr.getString("sect_name")) + .set(StIvtIostorinvdis::getStruct_id, jsonAttr.getString("struct_id")) + .set(StIvtIostorinvdis::getStruct_code, jsonAttr.getString("struct_code")) + .set(StIvtIostorinvdis::getStruct_name, jsonAttr.getString("struct_name")) + .set(StIvtIostorinvdis::getSect_id, jsonAttr.getString("sect_id")) + .set(StIvtIostorinvdis::getSect_code, jsonAttr.getString("sect_code")) + .set(StIvtIostorinvdis::getSect_name, jsonAttr.getString("sect_name")) .set(StIvtIostorinvdis::getWork_status, work_status) .set(StIvtIostorinvdis::getTask_id, task_id) .eq(StIvtIostorinvdis::getIostorinv_id, disDao.getIostorinv_id()) @@ -358,7 +382,7 @@ public class StIvtIostorinvServiceImpl extends ServiceImpl disList = iStIvtIostorinvdisService.list( - new QueryWrapper().lambda() - .eq(StIvtIostorinvdis::getIostorinv_id, mst.getIostorinv_id()) - ).stream().map(row -> JSONObject.parseObject(JSON.toJSONString(row), LinkedHashMap.class)) + new QueryWrapper().lambda() + .eq(StIvtIostorinvdis::getIostorinv_id, mst.getIostorinv_id()) + ).stream().map(row -> JSONObject.parseObject(JSON.toJSONString(row), LinkedHashMap.class)) .collect(Collectors.toList()); //查询木箱码 - PdmBiSubpackagerelation pdmBiSubpackagerelation = ipdmBiSubpackagerelationService.getOne(new LambdaQueryWrapper() - .eq(PdmBiSubpackagerelation::getContainer_name,whereJson.get("material_barcode"))); + PdmBiSubpackagerelation pdmBiSubpackagerelation = ipdmBiSubpackagerelationService.getOne(new LambdaQueryWrapper() + .eq(PdmBiSubpackagerelation::getContainer_name, whereJson.get("material_barcode"))); // 查询木箱信息 BstIvtBoxinfo boxDao = iBstIvtBoxinfoService.getOne( new QueryWrapper().lambda() - .eq(BstIvtBoxinfo::getBox_no, pdmBiSubpackagerelation.getPackage_box_sn()) + .eq(BstIvtBoxinfo::getBox_no, pdmBiSubpackagerelation.getPackage_box_sn()) ); - jsonSend.put("dtl_row",JSONObject.parseObject(JSON.toJSONString(dtlDao))); + jsonSend.put("dtl_row", JSONObject.parseObject(JSON.toJSONString(dtlDao))); jsonSend.put("tableMater", disList); jsonSend.put("point_code", jsonObject.getString("point_code")); jsonSend.put("stor_id", mst.getStor_id()); //成品入库托盘类型 - jsonSend.put("vehicle_code",jsonObject.getString("box_no")); - jsonSend.put("vehicle_code2",jsonObject.getString("vehicle_code")); + jsonSend.put("vehicle_code", jsonObject.getString("box_no")); + jsonSend.put("vehicle_code2", jsonObject.getString("vehicle_code")); JSONObject param = new JSONObject(); param.put("containerType", boxDao.getVehicle_type()); jsonSend.put("request_param", param.toString()); @@ -406,7 +430,7 @@ public class StIvtIostorinvServiceImpl extends ServiceImpl().lambda() - .eq(StIvtIostorinvdis::getStruct_code, jsonDis.getString("struct_code")) - .eq(StIvtIostorinvdis::getIostorinv_id, jsonDis.getString("iostorinv_id")) - .eq(StIvtIostorinvdis::getBox_no, jsonDis.getString("box_no")) - .set(StIvtIostorinvdis::getPoint_id, null) + .eq(StIvtIostorinvdis::getStruct_code, jsonDis.getString("struct_code")) + .eq(StIvtIostorinvdis::getIostorinv_id, jsonDis.getString("iostorinv_id")) + .eq(StIvtIostorinvdis::getBox_no, jsonDis.getString("box_no")) + .set(StIvtIostorinvdis::getPoint_id, null) .set(StIvtIostorinvdis::getSect_id, null) .set(StIvtIostorinvdis::getSect_code, "") .set(StIvtIostorinvdis::getSect_name, "") @@ -571,7 +595,7 @@ public class StIvtIostorinvServiceImpl extends ServiceImpl '"+TaskStatusEnum.FINISHED.getCode()+"'"); + taskService.update(jsonTaskParam, "task_id IN ('" + String.join("','", needUpdateTaskList) + "') AND task_status <> '" + TaskStatusEnum.FINISHED.getCode() + "'"); // 更新子卷包装关系 String pcsn_in = disDaoList.stream() @@ -869,7 +895,7 @@ public class StIvtIostorinvServiceImpl extends ServiceImpl "" attr.block_num NOT IN 输入.not_block @@ -203,6 +207,8 @@ AND IFNULL(attr.storagevehicle_code,'') = '' AND attr.stor_id = 输入.stor_id AND attr.sect_id = 输入.sect_id + AND attr.height = 输入.height + AND attr.storagevehicle_type = 输入.vehicle_type OPTION 输入.block_num <> "" attr.block_num = 输入.block_num @@ -229,6 +235,8 @@ AND attr.is_delete = '0' AND attr.stor_id = 输入.stor_id AND attr.sect_id = 输入.sect_id + AND attr.height = 输入.height + AND attr.storagevehicle_type = 输入.vehicle_type OPTION 输入.block_num <> "" attr.block_num = 输入.block_num diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/RawFoilServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/RawFoilServiceImpl.java index 69e4185e7..b0c795f55 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/RawFoilServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/RawFoilServiceImpl.java @@ -330,7 +330,9 @@ public class RawFoilServiceImpl implements RawFoilService { @Override @Transactional(rollbackFor = Exception.class) public JSONObject needEmptyVehicle(JSONObject whereJson) { - String point_code = whereJson.getString("point_code"); + throw new BadRequestException("请点击呼叫按钮进行搬运!"); + + /*String point_code = whereJson.getString("point_code"); if (ObjectUtil.isEmpty(point_code)) { throw new BadRequestException("输入的点位不能为空!"); } @@ -352,10 +354,10 @@ public class RawFoilServiceImpl implements RawFoilService { // 3.如果没找到则继续找下一节点 String start_pint_code = ""; if (ObjectUtil.isEmpty(jsonIvt)) { - /*String point_location = jsonSb.getString("point_location"); + *//*String point_location = jsonSb.getString("point_location"); if (StrUtil.equals(point_location, "0")) map.put("point_location", "1"); if (StrUtil.equals(point_location, "1")) map.put("point_location", "0"); - JSONObject jsonIvt_tow = WQL.getWO("PDA_RAWFOIL_01").addParamMap(map).process().uniqueResult(0);*/ + JSONObject jsonIvt_tow = WQL.getWO("PDA_RAWFOIL_01").addParamMap(map).process().uniqueResult(0);*//* throw new BadRequestException("未查询到有空轴且母卷位置为空的点位!"); } else { start_pint_code = jsonIvt.getString("empty_point_code"); @@ -373,7 +375,7 @@ public class RawFoilServiceImpl implements RawFoilService { JSONObject jo = new JSONObject(); jo.put("message", "操作成功!"); - return jo; + return jo;*/ } @Override