rev:异常任务处理

This commit is contained in:
2024-07-16 15:26:03 +08:00
parent 5773ed3b17
commit 8081da6c11
2 changed files with 12 additions and 4 deletions

View File

@@ -187,11 +187,15 @@ public class OutBoxManageServiceImpl implements OutBoxManageService {
// 找出对应的浅货位
JSONObject jsonAttrOrder = attrTab.query("struct_code = '" + jsonTask.getString("point_code1") + "'").uniqueResult(0);
JSONObject jsonAttrNow = attrTab.query("row_num = '" + jsonAttrOrder.getString("row_num") + "' AND layer_num = '" + jsonAttrOrder.getString("layer_num") + "' AND col_num = '" + jsonAttrOrder.getString("col_num") + "' and zdepth = '" + IOSEnum.ZDEPTH_STRUCT.code("") + "' and stor_id = '" + jsonAttrOrder.getString("stor_id") + "'")
JSONObject jsonAttrNow = attrTab.query("row_num = '" + jsonAttrOrder.getString("row_num") + "' AND layer_num = '" + jsonAttrOrder.getString("layer_num") + "' AND col_num = '" + jsonAttrOrder.getString("col_num") + "' and zdepth = '" + IOSEnum.ZDEPTH_STRUCT.code("") + "' and stor_id = '" + jsonAttrOrder.getString("stor_id") + "' and is_delete = '0' and is_used = '1'")
.uniqueResult(0);
if (ObjectUtil.isEmpty(jsonAttrNow)) {
throw new BadRequestException("对应浅货位不存在或未启用!" + jsonTask.getString("point_code1"));
}
// 查询移入货位
JSONObject jsonAttrMove = attrTab.query("sect_id = '" + jsonAttrOrder.getString("sect_id") + "' and struct_id <> '" + jsonAttrNow.getString("struct_id") + "' and lock_type = '" + IOSEnum.LOCK_TYPE.code("未锁定") + "' and IFNULL(storagevehicle_code,'') = '' AND is_used = '1' AND is_delete = '0' order by zdepth DESC")
JSONObject jsonAttrMove = attrTab.query("sect_id = '" + jsonAttrOrder.getString("sect_id") + "' and struct_id <> '" + jsonAttrNow.getString("struct_id") + "' and lock_type = '" + IOSEnum.LOCK_TYPE.code("未锁定") + "' and IFNULL(storagevehicle_code,'') = '' AND is_used = '1' AND is_delete = '0' AND block_num = '"+jsonAttrOrder.getString("block_num")+"' order by zdepth DESC")
.uniqueResult(0);
if (ObjectUtil.isEmpty(jsonAttrMove)) {

View File

@@ -173,11 +173,15 @@ public class OutVehicleManageServiceImpl implements OutVehicleManageService {
// 找出对应的浅货位
JSONObject jsonAttrOrder = attrTab.query("struct_code = '" + jsonTask.getString("point_code1") + "'").uniqueResult(0);
JSONObject jsonAttrNow = attrTab.query("row_num = '" + jsonAttrOrder.getString("row_num") + "' AND layer_num = '" + jsonAttrOrder.getString("layer_num") + "' AND col_num = '" + jsonAttrOrder.getString("col_num") + "' and zdepth = '" + IOSEnum.ZDEPTH_STRUCT.code("") + "' and stor_id = '"+jsonAttrOrder.getString("stor_id")+"'")
JSONObject jsonAttrNow = attrTab.query("row_num = '" + jsonAttrOrder.getString("row_num") + "' AND layer_num = '" + jsonAttrOrder.getString("layer_num") + "' AND col_num = '" + jsonAttrOrder.getString("col_num") + "' and zdepth = '" + IOSEnum.ZDEPTH_STRUCT.code("") + "' and stor_id = '"+jsonAttrOrder.getString("stor_id")+"' AND is_delete = '0' and is_used = '1'")
.uniqueResult(0);
if (ObjectUtil.isEmpty(jsonAttrNow)) {
throw new BadRequestException("对应浅货位不存在或未启用!" + jsonTask.getString("point_code1"));
}
// 查询移入货位
JSONObject jsonAttrMove = attrTab.query("sect_id = '" + jsonAttrOrder.getString("sect_id") + "' and struct_id <> '" + jsonAttrNow.getString("struct_id") + "' and lock_type = '" + IOSEnum.LOCK_TYPE.code("未锁定") + "' and IFNULL(storagevehicle_code,'') = '' AND is_used = '1' AND is_delete = '0' order by zdepth DESC")
JSONObject jsonAttrMove = attrTab.query("sect_id = '" + jsonAttrOrder.getString("sect_id") + "' and struct_id <> '" + jsonAttrNow.getString("struct_id") + "' and lock_type = '" + IOSEnum.LOCK_TYPE.code("未锁定") + "' and IFNULL(storagevehicle_code,'') = '' AND is_used = '1' AND is_delete = '0' AND block_num = '"+jsonAttrOrder.getString("block_num")+"' order by zdepth DESC")
.uniqueResult(0);
if (ObjectUtil.isEmpty(jsonAttrMove)) {