fix:修复超托盘判断bug;
This commit is contained in:
@@ -64,18 +64,19 @@
|
|||||||
s.*
|
s.*
|
||||||
FROM st_ivt_structattr s
|
FROM st_ivt_structattr s
|
||||||
WHERE s.stor_type = '1'
|
WHERE s.stor_type = '1'
|
||||||
<!-- 注释掉的is_used条件保留,如需启用可取消注释 -->
|
AND
|
||||||
AND s.is_used = 1
|
s.storagevehicle_code IS NULL
|
||||||
|
AND s.is_used = 1
|
||||||
-- 校验remark对应的记录storagevehicle_code为空
|
-- 校验remark对应的记录storagevehicle_code为空
|
||||||
AND EXISTS (
|
AND EXISTS (
|
||||||
SELECT 1 FROM st_ivt_structattr
|
SELECT 1 FROM st_ivt_structattr
|
||||||
WHERE struct_code = s.remark AND storagevehicle_code IS NULL
|
WHERE struct_code = s.remark AND storagevehicle_code IS NULL AND lock_type =0
|
||||||
AND is_used = 1
|
AND is_used = 1
|
||||||
)
|
)
|
||||||
-- 校验remark1对应的记录storagevehicle_code为空
|
-- 校验remark1对应的记录storagevehicle_code为空
|
||||||
AND EXISTS (
|
AND EXISTS (
|
||||||
SELECT 1 FROM st_ivt_structattr
|
SELECT 1 FROM st_ivt_structattr
|
||||||
WHERE struct_code = s.remark1 AND storagevehicle_code IS NULL
|
WHERE struct_code = s.remark1 AND storagevehicle_code IS NULL AND lock_type =0
|
||||||
AND is_used = 1
|
AND is_used = 1
|
||||||
)
|
)
|
||||||
-- 按创建时间排序,保证取第一条符合条件的记录
|
-- 按创建时间排序,保证取第一条符合条件的记录
|
||||||
|
|||||||
@@ -122,9 +122,9 @@ public class StOutTask extends AbstractTask {
|
|||||||
if (ObjectUtil.isEmpty(taskObj)) {
|
if (ObjectUtil.isEmpty(taskObj)) {
|
||||||
throw new BadRequestException("该任务不存在");
|
throw new BadRequestException("该任务不存在");
|
||||||
}
|
}
|
||||||
if (!TaskStatus.CREATE.getCode().equals(taskObj.getTask_status())) {
|
// if (!TaskStatus.CREATE.getCode().equals(taskObj.getTask_status())) {
|
||||||
throw new BadRequestException("任务状态必须为生成才能取消任务");
|
// throw new BadRequestException("任务状态必须为生成才能取消任务");
|
||||||
}
|
// }
|
||||||
this.cancelTask(taskObj);
|
this.cancelTask(taskObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1061,7 +1061,16 @@ public class InBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv> i
|
|||||||
}
|
}
|
||||||
//解锁库位
|
//解锁库位
|
||||||
JSONObject finish_map = new JSONObject();
|
JSONObject finish_map = new JSONObject();
|
||||||
finish_map.put("struct_code", task.getPoint_code2());
|
String lockStructCode = task.getPoint_code2();
|
||||||
|
//超托需要更新多个库位
|
||||||
|
if (task.getPoint_code2().contains("CT")) {
|
||||||
|
Structattr structattr = iStructattrService.getOne(new LambdaQueryWrapper<Structattr>().eq(Structattr::getStruct_code,task.getPoint_code2()));
|
||||||
|
if (structattr == null) {
|
||||||
|
throw new BadRequestException("未找到库位信息");
|
||||||
|
}
|
||||||
|
lockStructCode = String.join(",",task.getPoint_code2(),structattr.getRemark(), structattr.getRemark1());
|
||||||
|
}
|
||||||
|
finish_map.put("struct_code", lockStructCode);
|
||||||
finish_map.put("storagevehicle_code",null);
|
finish_map.put("storagevehicle_code",null);
|
||||||
finish_map.put("lock_type", IOSEnum.LOCK_TYPE.code("未锁定"));
|
finish_map.put("lock_type", IOSEnum.LOCK_TYPE.code("未锁定"));
|
||||||
finish_map.put("inv_type", null);
|
finish_map.put("inv_type", null);
|
||||||
|
|||||||
@@ -1465,7 +1465,16 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
|||||||
public void taskCancel(SchBaseTask task) {
|
public void taskCancel(SchBaseTask task) {
|
||||||
//解锁库位
|
//解锁库位
|
||||||
JSONObject finish_map = new JSONObject();
|
JSONObject finish_map = new JSONObject();
|
||||||
finish_map.put("struct_code", task.getPoint_code1());
|
String lockStructCode = task.getPoint_code1();
|
||||||
|
//超托需要更新多个库位
|
||||||
|
if (task.getPoint_code1().contains("CT")) {
|
||||||
|
Structattr structattr = iStructattrService.getOne(new LambdaQueryWrapper<Structattr>().eq(Structattr::getStruct_code,task.getPoint_code1()));
|
||||||
|
if (structattr == null) {
|
||||||
|
throw new BadRequestException("未找到库位信息");
|
||||||
|
}
|
||||||
|
lockStructCode = String.join(",",task.getPoint_code1(),structattr.getRemark(), structattr.getRemark1());
|
||||||
|
}
|
||||||
|
finish_map.put("struct_code", lockStructCode);
|
||||||
finish_map.put("storagevehicle_code",null);
|
finish_map.put("storagevehicle_code",null);
|
||||||
finish_map.put("lock_type", IOSEnum.LOCK_TYPE.code("未锁定"));
|
finish_map.put("lock_type", IOSEnum.LOCK_TYPE.code("未锁定"));
|
||||||
finish_map.put("inv_type", null);
|
finish_map.put("inv_type", null);
|
||||||
|
|||||||
Reference in New Issue
Block a user