fix:空木箱入库增加高度限制
This commit is contained in:
@@ -19,6 +19,7 @@ import org.nl.modules.common.exception.BadRequestException;
|
|||||||
import org.nl.modules.wql.WQL;
|
import org.nl.modules.wql.WQL;
|
||||||
import org.nl.modules.wql.core.bean.WQLObject;
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
import org.nl.modules.wql.util.SpringContextHolder;
|
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.AcsToWmsService;
|
||||||
import org.nl.wms.ext.acs.service.WmsToAcsService;
|
import org.nl.wms.ext.acs.service.WmsToAcsService;
|
||||||
import org.nl.wms.pda.mps.eum.RegionTypeEnum;
|
import org.nl.wms.pda.mps.eum.RegionTypeEnum;
|
||||||
@@ -70,6 +71,9 @@ public class InBoxManageServiceImpl implements InBoxManageService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private AcsToWmsService acsToWmsService;
|
private AcsToWmsService acsToWmsService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISysParamService iSysParamService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void inBox(JSONObject whereJson) {
|
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();
|
JSONObject jsonParam = new JSONObject();
|
||||||
jsonParam.put("stor_id", IOSEnum.STOR_ID.code("二期"));
|
jsonParam.put("stor_id", IOSEnum.STOR_ID.code("二期"));
|
||||||
jsonParam.put("sect_id", RegionTypeEnum.TWO_MX01.getId());
|
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_width", boxDao.getBox_width());
|
||||||
jsonParam.put("box_high", boxDao.getBox_high());
|
jsonParam.put("box_high", boxDao.getBox_high());
|
||||||
jsonParam.put("vehicle_type", boxDao.getVehicle_type());
|
jsonParam.put("vehicle_type", boxDao.getVehicle_type());
|
||||||
|
jsonParam.put("height", height);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
JSONObject jsonAttr = getStruct(jsonParam);
|
JSONObject jsonAttr = getStruct(jsonParam);
|
||||||
|
|
||||||
@@ -318,6 +339,7 @@ public class InBoxManageServiceImpl implements InBoxManageService {
|
|||||||
JSONArray structArray = attrTab.query("IFNULL(storagevehicle_code,'') = '' " +
|
JSONArray structArray = attrTab.query("IFNULL(storagevehicle_code,'') = '' " +
|
||||||
"AND is_used = '" + IOSEnum.IS_NOTANDYES.code("是") + "' AND is_delete = '" + IOSEnum.IS_NOTANDYES.code("否") + "' " +
|
"AND is_used = '" + IOSEnum.IS_NOTANDYES.code("是") + "' AND is_delete = '" + IOSEnum.IS_NOTANDYES.code("否") + "' " +
|
||||||
"AND storagevehicle_type = '" + jsonParam.getString("vehicle_type") + "'" +
|
"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 lock_type = '" + IOSEnum.LOCK_TYPE.code("未锁定") + "' AND stor_id = '" + jsonParam.getString("stor_id") + "' " +
|
||||||
"AND sect_id = '" + jsonParam.getString("sect_id") + "'").getResultJSONArray(0);
|
"AND sect_id = '" + jsonParam.getString("sect_id") + "'").getResultJSONArray(0);
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
输入.stor_id TYPEAS s_string
|
输入.stor_id TYPEAS s_string
|
||||||
输入.sect_id TYPEAS s_string
|
输入.sect_id TYPEAS s_string
|
||||||
输入.block_num TYPEAS s_string
|
输入.block_num TYPEAS s_string
|
||||||
|
输入.height TYPEAS s_string
|
||||||
输入.row_num TYPEAS s_string
|
输入.row_num TYPEAS s_string
|
||||||
输入.vehicle_type TYPEAS s_string
|
输入.vehicle_type TYPEAS s_string
|
||||||
输入.block_in TYPEAS f_string
|
输入.block_in TYPEAS f_string
|
||||||
@@ -60,6 +61,7 @@
|
|||||||
AND attr.stor_id = 输入.stor_id
|
AND attr.stor_id = 输入.stor_id
|
||||||
AND attr.sect_id = 输入.sect_id
|
AND attr.sect_id = 输入.sect_id
|
||||||
AND attr.storagevehicle_type = 输入.vehicle_type
|
AND attr.storagevehicle_type = 输入.vehicle_type
|
||||||
|
AND attr.height = 输入.height
|
||||||
OPTION 输入.not_block <> ""
|
OPTION 输入.not_block <> ""
|
||||||
attr.block_num NOT IN 输入.not_block
|
attr.block_num NOT IN 输入.not_block
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
@@ -82,8 +84,10 @@
|
|||||||
AND attr.is_delete = '0'
|
AND attr.is_delete = '0'
|
||||||
AND attr.stor_id = 输入.stor_id
|
AND attr.stor_id = 输入.stor_id
|
||||||
AND attr.sect_id = 输入.sect_id
|
AND attr.sect_id = 输入.sect_id
|
||||||
|
AND attr.height = 输入.height
|
||||||
AND IFNULL(attr.storagevehicle_code,'') <> ''
|
AND IFNULL(attr.storagevehicle_code,'') <> ''
|
||||||
AND attr.storagevehicle_type = 输入.vehicle_type
|
AND attr.storagevehicle_type = 输入.vehicle_type
|
||||||
|
AND attr.height = 输入.height
|
||||||
OPTION 输入.block_in <> ""
|
OPTION 输入.block_in <> ""
|
||||||
attr.block_num in 输入.block_in
|
attr.block_num in 输入.block_in
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
@@ -110,6 +114,7 @@
|
|||||||
AND attr.stor_id = 输入.stor_id
|
AND attr.stor_id = 输入.stor_id
|
||||||
AND attr.sect_id = 输入.sect_id
|
AND attr.sect_id = 输入.sect_id
|
||||||
AND attr.storagevehicle_type = 输入.vehicle_type
|
AND attr.storagevehicle_type = 输入.vehicle_type
|
||||||
|
AND attr.height = 输入.height
|
||||||
OPTION 输入.block_num <> ""
|
OPTION 输入.block_num <> ""
|
||||||
attr.block_num = 输入.block_num
|
attr.block_num = 输入.block_num
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
@@ -141,6 +146,7 @@
|
|||||||
AND attr.block_num = 输入.block_num
|
AND attr.block_num = 输入.block_num
|
||||||
AND attr.row_num = 输入.row_num
|
AND attr.row_num = 输入.row_num
|
||||||
AND attr.storagevehicle_type = 输入.vehicle_type
|
AND attr.storagevehicle_type = 输入.vehicle_type
|
||||||
|
AND attr.height = 输入.height
|
||||||
order by attr.col_num DESC,attr.layer_num ASC,attr.zdepth DESC
|
order by attr.col_num DESC,attr.layer_num ASC,attr.zdepth DESC
|
||||||
|
|
||||||
ENDSELECT
|
ENDSELECT
|
||||||
@@ -162,6 +168,7 @@
|
|||||||
AND attr.block_num = 输入.block_num
|
AND attr.block_num = 输入.block_num
|
||||||
AND attr.row_num = 输入.row_num
|
AND attr.row_num = 输入.row_num
|
||||||
AND attr.storagevehicle_type = 输入.vehicle_type
|
AND attr.storagevehicle_type = 输入.vehicle_type
|
||||||
|
AND attr.height = 输入.height
|
||||||
|
|
||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDQUERY
|
ENDQUERY
|
||||||
|
|||||||
Reference in New Issue
Block a user