rev:异常任务
This commit is contained in:
@@ -157,6 +157,7 @@ public class OutBoxManageServiceImpl implements OutBoxManageService {
|
||||
jsonParam.put("stor_id", IOSEnum.STOR_ID.code("二期"));
|
||||
jsonParam.put("sect_id", RegionTypeEnum.TWO_BZC01.getId());
|
||||
jsonParam.put("material_code", boxDao.getMaterial_code());
|
||||
jsonParam.put("move_block_num", jsonAttr.getString("block_num"));
|
||||
jsonParam.put("num", boxDao.getNum());
|
||||
|
||||
// 调用找货位方法
|
||||
@@ -235,17 +236,31 @@ public class OutBoxManageServiceImpl implements OutBoxManageService {
|
||||
* 判断是否有相同规格的木箱
|
||||
* 判断条件:库区、仓库、是否启用、是否删除、未锁定、有载具、相同规格的木箱
|
||||
*/
|
||||
whereJson.put("flag", "6");
|
||||
String block_num = whereJson.getString("move_block_num");
|
||||
|
||||
if (ObjectUtil.isEmpty(block_num)) {
|
||||
whereJson.put("flag", "6");
|
||||
} else {
|
||||
whereJson.put("flag", "7");
|
||||
}
|
||||
|
||||
JSONArray structArray = WQL.getWO("BST_OUTBOX").addParamMap(whereJson).process().getResultJSONArray(0);
|
||||
|
||||
if (ObjectUtil.isEmpty(structArray)) {
|
||||
notOutRowList.clear();
|
||||
notOutBlockList.clear();
|
||||
throw new BadRequestException("没有相同规格的木箱!");
|
||||
if (ObjectUtil.isNotEmpty(block_num)) {
|
||||
throw new BadRequestException(block_num+"号巷道没有相同规格的木箱!木箱料号:"+whereJson.getString("material_code"));
|
||||
} else {
|
||||
throw new BadRequestException("没有相同规格的木箱!");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 确定巷道:找相同规格木箱的最多的巷道
|
||||
String block_num = getMaxBlock(whereJson);
|
||||
if (ObjectUtil.isEmpty(block_num)) {
|
||||
block_num = getMaxBlock(whereJson);
|
||||
}
|
||||
|
||||
// 确定排:找某一巷道规格木箱的最多排
|
||||
whereJson.put("block_num", block_num);
|
||||
|
||||
@@ -101,6 +101,7 @@ public class OutVehicleManageServiceImpl implements OutVehicleManageService {
|
||||
jsonTaskParam.put("next_device_code", whereJson.getString("device_code"));
|
||||
jsonTaskParam.put("vehicle_code", jsonAttr.getString("storagevehicle_code"));
|
||||
jsonTaskParam.put("containerType", whereJson.getString("vehicle_type"));
|
||||
jsonTaskParam.put("vehicle_type", whereJson.getString("vehicle_type"));
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("containerType", whereJson.getString("vehicle_type"));
|
||||
jsonTaskParam.put("request_param", param.toString());
|
||||
@@ -139,6 +140,7 @@ public class OutVehicleManageServiceImpl implements OutVehicleManageService {
|
||||
JSONObject jsonParam = new JSONObject();
|
||||
jsonParam.put("stor_id", IOSEnum.STOR_ID.code("二期"));
|
||||
jsonParam.put("sect_id", RegionTypeEnum.TWO_BZC01.getId());
|
||||
jsonParam.put("move_block_num", jsonAttr.getString("block_num"));
|
||||
jsonParam.put("storagevehicle_type", taskDao.getVehicle_type());
|
||||
|
||||
// 调用找货位方法
|
||||
@@ -214,19 +216,35 @@ public class OutVehicleManageServiceImpl implements OutVehicleManageService {
|
||||
* 判断是否有相同类型的托盘
|
||||
* 判断条件:库区、仓库、是否启用、是否删除、未锁定、有载具、相同载具类型
|
||||
*/
|
||||
JSONArray structArray = attrTab.query("IFNULL(storagevehicle_code,'') <> '' " +
|
||||
"AND is_used = '" + IOSEnum.IS_NOTANDYES.code("是") + "' AND is_delete = '" + IOSEnum.IS_NOTANDYES.code("否") + "' " +
|
||||
"AND lock_type = '" + IOSEnum.LOCK_TYPE.code("未锁定") + "' AND stor_id = '"+whereJson.getString("stor_id")+"' " +
|
||||
"AND sect_id = '"+whereJson.getString("sect_id")+"' AND storagevehicle_type = '"+whereJson.getString("storagevehicle_type")+"'").getResultJSONArray(0);
|
||||
String block_num = whereJson.getString("move_block_num");
|
||||
|
||||
JSONArray structArray = new JSONArray();
|
||||
if (ObjectUtil.isEmpty(block_num)) {
|
||||
structArray = attrTab.query("IFNULL(storagevehicle_code,'') <> '' " +
|
||||
"AND is_used = '" + IOSEnum.IS_NOTANDYES.code("是") + "' AND is_delete = '" + IOSEnum.IS_NOTANDYES.code("否") + "' " +
|
||||
"AND lock_type = '" + IOSEnum.LOCK_TYPE.code("未锁定") + "' AND stor_id = '"+whereJson.getString("stor_id")+"' " +
|
||||
"AND sect_id = '"+whereJson.getString("sect_id")+"' AND storagevehicle_type = '"+whereJson.getString("storagevehicle_type")+"' AND is_emptyvehicle = '1'").getResultJSONArray(0);
|
||||
} else {
|
||||
structArray = attrTab.query("IFNULL(storagevehicle_code,'') <> '' " +
|
||||
"AND is_used = '" + IOSEnum.IS_NOTANDYES.code("是") + "' AND is_delete = '" + IOSEnum.IS_NOTANDYES.code("否") + "' " +
|
||||
"AND lock_type = '" + IOSEnum.LOCK_TYPE.code("未锁定") + "' AND stor_id = '"+whereJson.getString("stor_id")+"' " +
|
||||
"AND sect_id = '"+whereJson.getString("sect_id")+"' AND storagevehicle_type = '"+whereJson.getString("storagevehicle_type")+"' AND block_num = '"+block_num+"' AND is_emptyvehicle = '1'").getResultJSONArray(0);
|
||||
}
|
||||
|
||||
if (ObjectUtil.isEmpty(structArray)) {
|
||||
notOutRowList.clear();
|
||||
notOutBlockList.clear();
|
||||
throw new BadRequestException("没有相同托盘类型的库存!");
|
||||
if (ObjectUtil.isNotEmpty(block_num)) {
|
||||
throw new BadRequestException(block_num+"号巷道没有相同托盘类型的库存!托盘类型:"+whereJson.getString("storagevehicle_type"));
|
||||
} else {
|
||||
throw new BadRequestException("没有相同托盘类型的库存!");
|
||||
}
|
||||
}
|
||||
|
||||
// 确定巷道:找相同托盘类型的最多的巷道
|
||||
String block_num = getMaxBlock(whereJson);
|
||||
if (ObjectUtil.isEmpty(block_num)) {
|
||||
block_num = getMaxBlock(whereJson);
|
||||
}
|
||||
|
||||
// 确定排:找某一巷道相同托盘类型的最多排
|
||||
whereJson.put("block_num", block_num);
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
输入.box_high TYPEAS s_string
|
||||
输入.num TYPEAS s_string
|
||||
输入.material_code TYPEAS s_string
|
||||
输入.move_block_num TYPEAS s_string
|
||||
|
||||
[临时表]
|
||||
--这边列出来的临时表就会在运行期动态创建
|
||||
@@ -325,3 +326,47 @@
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "7"
|
||||
QUERY
|
||||
SELECT
|
||||
attr.*
|
||||
FROM
|
||||
st_ivt_structattr attr
|
||||
INNER JOIN bst_ivt_boxinfo box ON attr.storagevehicle_code = box.box_no
|
||||
WHERE
|
||||
attr.is_used = '1'
|
||||
AND attr.is_delete = '0'
|
||||
AND attr.lock_type = '1'
|
||||
AND IFNULL(storagevehicle_code,'') <> ''
|
||||
AND attr.stor_id = 输入.stor_id
|
||||
AND attr.sect_id = 输入.sect_id
|
||||
AND box.is_packing = '0'
|
||||
|
||||
OPTION 输入.box_length <> ""
|
||||
box.box_length = 输入.box_length
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.box_width <> ""
|
||||
box.box_width = 输入.box_width
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.box_high <> ""
|
||||
box.box_high = 输入.box_high
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.material_code <> ""
|
||||
box.material_code = 输入.material_code
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.move_block_num <> ""
|
||||
attr.block_num = 输入.move_block_num
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.num <> ""
|
||||
box.num = 输入.num
|
||||
ENDOPTION
|
||||
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
Reference in New Issue
Block a user