From 68f1aef4b0a1311895f1f689cbe09847129afe16 Mon Sep 17 00:00:00 2001 From: zhouz <> Date: Thu, 16 May 2024 09:37:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E7=A9=BA=E6=9C=A8=E7=AE=B1=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E5=A2=9E=E5=8A=A0=E9=AB=98=E5=BA=A6=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../util/impl/InBoxManageServiceImpl.java | 22 +++++++++++++++++++ .../service/iostorInv/util/wql/BST_INBOX.wql | 7 ++++++ 2 files changed, 29 insertions(+) diff --git a/lms/nladmin-system/src/main/java/org/nl/b_lms/storage_manage/ios/service/iostorInv/util/impl/InBoxManageServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/b_lms/storage_manage/ios/service/iostorInv/util/impl/InBoxManageServiceImpl.java index 302701352..b69007cdf 100644 --- a/lms/nladmin-system/src/main/java/org/nl/b_lms/storage_manage/ios/service/iostorInv/util/impl/InBoxManageServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/b_lms/storage_manage/ios/service/iostorInv/util/impl/InBoxManageServiceImpl.java @@ -19,6 +19,7 @@ import org.nl.modules.common.exception.BadRequestException; import org.nl.modules.wql.WQL; 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.ext.acs.service.AcsToWmsService; import org.nl.wms.ext.acs.service.WmsToAcsService; import org.nl.wms.pda.mps.eum.RegionTypeEnum; @@ -70,6 +71,9 @@ public class InBoxManageServiceImpl implements InBoxManageService { @Autowired private AcsToWmsService acsToWmsService; + @Autowired + private ISysParamService iSysParamService; + @Override @Transactional(rollbackFor = Exception.class) public void inBox(JSONObject whereJson) { @@ -103,6 +107,20 @@ public class InBoxManageServiceImpl implements InBoxManageService { }*/ // 找一个木箱区空位 + + //根据木箱高度,判断入库仓位的高度 + 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"; + } + JSONObject jsonParam = new JSONObject(); jsonParam.put("stor_id", IOSEnum.STOR_ID.code("二期")); jsonParam.put("sect_id", RegionTypeEnum.TWO_MX01.getId()); @@ -110,6 +128,9 @@ public class InBoxManageServiceImpl implements InBoxManageService { jsonParam.put("box_width", boxDao.getBox_width()); jsonParam.put("box_high", boxDao.getBox_high()); jsonParam.put("vehicle_type", boxDao.getVehicle_type()); + jsonParam.put("height", height); + + JSONObject jsonAttr = getStruct(jsonParam); @@ -318,6 +339,7 @@ public class InBoxManageServiceImpl implements InBoxManageService { JSONArray structArray = attrTab.query("IFNULL(storagevehicle_code,'') = '' " + "AND is_used = '" + IOSEnum.IS_NOTANDYES.code("是") + "' AND is_delete = '" + IOSEnum.IS_NOTANDYES.code("否") + "' " + "AND storagevehicle_type = '" + jsonParam.getString("vehicle_type") + "'" + + "AND height = '" + jsonParam.getString("height") + "'" + "AND lock_type = '" + IOSEnum.LOCK_TYPE.code("未锁定") + "' AND stor_id = '" + jsonParam.getString("stor_id") + "' " + "AND sect_id = '" + jsonParam.getString("sect_id") + "'").getResultJSONArray(0); diff --git a/lms/nladmin-system/src/main/java/org/nl/b_lms/storage_manage/ios/service/iostorInv/util/wql/BST_INBOX.wql b/lms/nladmin-system/src/main/java/org/nl/b_lms/storage_manage/ios/service/iostorInv/util/wql/BST_INBOX.wql index baf7b301c..7ca210864 100644 --- a/lms/nladmin-system/src/main/java/org/nl/b_lms/storage_manage/ios/service/iostorInv/util/wql/BST_INBOX.wql +++ b/lms/nladmin-system/src/main/java/org/nl/b_lms/storage_manage/ios/service/iostorInv/util/wql/BST_INBOX.wql @@ -17,6 +17,7 @@ 输入.stor_id TYPEAS s_string 输入.sect_id TYPEAS s_string 输入.block_num TYPEAS s_string + 输入.height TYPEAS s_string 输入.row_num TYPEAS s_string 输入.vehicle_type TYPEAS s_string 输入.block_in TYPEAS f_string @@ -60,6 +61,7 @@ AND attr.stor_id = 输入.stor_id AND attr.sect_id = 输入.sect_id AND attr.storagevehicle_type = 输入.vehicle_type + AND attr.height = 输入.height OPTION 输入.not_block <> "" attr.block_num NOT IN 输入.not_block ENDOPTION @@ -82,8 +84,10 @@ AND attr.is_delete = '0' AND attr.stor_id = 输入.stor_id AND attr.sect_id = 输入.sect_id + AND attr.height = 输入.height AND IFNULL(attr.storagevehicle_code,'') <> '' AND attr.storagevehicle_type = 输入.vehicle_type + AND attr.height = 输入.height OPTION 输入.block_in <> "" attr.block_num in 输入.block_in ENDOPTION @@ -110,6 +114,7 @@ AND attr.stor_id = 输入.stor_id AND attr.sect_id = 输入.sect_id AND attr.storagevehicle_type = 输入.vehicle_type + AND attr.height = 输入.height OPTION 输入.block_num <> "" attr.block_num = 输入.block_num ENDOPTION @@ -141,6 +146,7 @@ AND attr.block_num = 输入.block_num AND attr.row_num = 输入.row_num AND attr.storagevehicle_type = 输入.vehicle_type + AND attr.height = 输入.height order by attr.col_num DESC,attr.layer_num ASC,attr.zdepth DESC ENDSELECT @@ -162,6 +168,7 @@ AND attr.block_num = 输入.block_num AND attr.row_num = 输入.row_num AND attr.storagevehicle_type = 输入.vehicle_type + AND attr.height = 输入.height ENDSELECT ENDQUERY