rev:异常任务

This commit is contained in:
2024-07-25 17:54:42 +08:00
parent d4cf8d09d6
commit 099cf07656
3 changed files with 29 additions and 10 deletions

View File

@@ -398,6 +398,9 @@ public class InBoxManageServiceImpl implements InBoxManageService {
jsonParam.put("box_length", boxDao.getBox_length()); jsonParam.put("box_length", boxDao.getBox_length());
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("height", jsonAttr.getString("height"));
jsonParam.put("vehicle_type", jsonAttr.getString("storagevehicle_type"));
jsonParam.put("move_block_num", jsonAttr.getString("block_num"));
// 调用找货位方法 // 调用找货位方法
JSONObject jsonAttrNow = getStruct(jsonParam); JSONObject jsonAttrNow = getStruct(jsonParam);
@@ -516,12 +519,25 @@ public class InBoxManageServiceImpl implements InBoxManageService {
* 判断是否有仓位 * 判断是否有仓位
* 判断条件:库区、仓库、是否启用、是否删除、未锁定、没有载具 * 判断条件:库区、仓库、是否启用、是否删除、未锁定、没有载具
*/ */
JSONArray structArray = attrTab.query("IFNULL(storagevehicle_code,'') = '' " + String block_num = jsonParam.getString("move_block_num");
"AND is_used = '" + IOSEnum.IS_NOTANDYES.code("") + "' AND is_delete = '" + IOSEnum.IS_NOTANDYES.code("") + "' " +
"AND storagevehicle_type = '" + jsonParam.getString("vehicle_type") + "'" + JSONArray structArray = new JSONArray();
"AND height = '" + jsonParam.getString("height") + "'" +
"AND lock_type = '" + IOSEnum.LOCK_TYPE.code("未锁定") + "' AND stor_id = '" + jsonParam.getString("stor_id") + "' " + if (ObjectUtil.isEmpty(block_num)) {
"AND sect_id = '" + jsonParam.getString("sect_id") + "'").getResultJSONArray(0); 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);
} else {
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") + "' AND block_num = '"+block_num+"'").getResultJSONArray(0);
}
if (ObjectUtil.isEmpty(structArray)) { if (ObjectUtil.isEmpty(structArray)) {
notInRowList.clear(); notInRowList.clear();
@@ -530,7 +546,10 @@ public class InBoxManageServiceImpl implements InBoxManageService {
} }
// 确定巷道:查看每个巷道最小木箱数的巷道,获取最小木箱数的巷道 // 确定巷道:查看每个巷道最小木箱数的巷道,获取最小木箱数的巷道
String block_num = getMinBlock(jsonParam); // 不是移库则需要找新巷道
if (ObjectUtil.isEmpty(block_num)) {
block_num = getMinBlock(jsonParam);
}
// 确定排:查看每排的木箱数量,找到数量最小的那排 // 确定排:查看每排的木箱数量,找到数量最小的那排
jsonParam.put("block_num", block_num); jsonParam.put("block_num", block_num);

View File

@@ -151,9 +151,7 @@ public class OutBoxManageServiceImpl implements OutBoxManageService {
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_BZC01.getId()); jsonParam.put("sect_id", RegionTypeEnum.TWO_BZC01.getId());
jsonParam.put("box_length", boxDao.getBox_length()); jsonParam.put("material_code", boxDao.getMaterial_code());
jsonParam.put("box_width", boxDao.getBox_width());
jsonParam.put("box_high", boxDao.getBox_high());
jsonParam.put("num", boxDao.getNum()); jsonParam.put("num", boxDao.getNum());
// 调用找货位方法 // 调用找货位方法
@@ -557,6 +555,7 @@ public class OutBoxManageServiceImpl implements OutBoxManageService {
paramIn.put("sect_id", RegionTypeEnum.TWO_BZC01.getId()); paramIn.put("sect_id", RegionTypeEnum.TWO_BZC01.getId());
paramIn.put("vehicle_type", jsonObject.getString("storagevehicle_type")); paramIn.put("vehicle_type", jsonObject.getString("storagevehicle_type"));
paramIn.put("height", jsonObject.getString("height")); paramIn.put("height", jsonObject.getString("height"));
paramIn.put("move_block_num", jsonObject.getString("block_num"));
InBoxManageServiceImpl bean = SpringContextHolder.getBean(InBoxManageServiceImpl.class); InBoxManageServiceImpl bean = SpringContextHolder.getBean(InBoxManageServiceImpl.class);
JSONObject jsonAttr = bean.getStruct(paramIn); JSONObject jsonAttr = bean.getStruct(paramIn);

View File

@@ -2209,6 +2209,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
if (type.equals("2")) { if (type.equals("2")) {
point_code = outBoxManageService.taskExceptional(whereJson); point_code = outBoxManageService.taskExceptional(whereJson);
} }
// TODO 重写
if (type.equals("3")) { if (type.equals("3")) {
String task_id = outBoxManageService.taskExceptionalOut(whereJson); String task_id = outBoxManageService.taskExceptionalOut(whereJson);
result.put("task_id", task_id); result.put("task_id", task_id);