fix:修改更新满轴库存

This commit is contained in:
2024-07-13 14:44:59 +08:00
parent 2e67662a87
commit 0ec06b2937

View File

@@ -153,15 +153,16 @@ public class BstIvtPackageinfoivtServiceImpl extends ServiceImpl<BstIvtPackagein
throw new BadRequestException("该任务未执行或不存在!"); throw new BadRequestException("该任务未执行或不存在!");
} }
//已分配过二次分配点位 //已分配过二次分配点位
// if (StringUtils.isNotBlank(baseTask.getResponse_param())) { if (StringUtils.isNotBlank(baseTask.getResponse_param())) {
// if (baseTask.getResponse_param().equals(IOSEnum.IS_SEND.code("是"))) { if (baseTask.getResponse_param().equals(IOSEnum.IS_SEND.code(""))) {
// if (PackageInfoIvtEnum.TASK_ACTION_TYPE.code("取货分配").equals(actionType)) { if (PackageInfoIvtEnum.TASK_ACTION_TYPE.code("取货分配").equals(actionType)) {
// return baseTask.getPoint_code1(); return baseTask.getPoint_code1();
// } else if (PackageInfoIvtEnum.TASK_ACTION_TYPE.code("放货分配").equals(actionType)) { }
// else if (PackageInfoIvtEnum.TASK_ACTION_TYPE.code("放货分配").equals(actionType)) {
//return baseTask.getPoint_code2(); //return baseTask.getPoint_code2();
// } // }
// } }
// } }
BstIvtPackageinfoivt newPoint; BstIvtPackageinfoivt newPoint;
String taskPointType = null; String taskPointType = null;
//空载具缓存位特殊二次分配逻辑:先判断是否有执行中的行架任务或补空载具任务,如未完成,不分配点位 //空载具缓存位特殊二次分配逻辑:先判断是否有执行中的行架任务或补空载具任务,如未完成,不分配点位
@@ -192,11 +193,11 @@ public class BstIvtPackageinfoivtServiceImpl extends ServiceImpl<BstIvtPackagein
//标记二次分配已分配过点位 //标记二次分配已分配过点位
baseTask.setResponse_param(IOSEnum.IS_NOTANDYES.code("")); baseTask.setResponse_param(IOSEnum.IS_NOTANDYES.code(""));
taskService.updateById(baseTask); taskService.updateById(baseTask);
log.info("一楼装箱区二次分配任务编号为:" + taskCode + ",接口返回最新点位:---------------------------------------------" + newPoint.getPoint_code()); log.info("一楼装箱区二次分配" + taskCode + ",接口返回最新点位:---------------------------------------------" + newPoint.getPoint_code());
return newPoint.getPoint_code(); return newPoint.getPoint_code();
} else { } else {
log.info("一楼装箱区二次分配任务编号为:" + taskCode + ",分配失败,暂无点位资源或点位外层有载具阻挡!"); log.info("一楼装箱区二次分配" + taskCode + ",分配失败,暂无点位资源或点位外层有载具阻挡!");
throw new BadRequestException("一楼装箱区二次分配任务编号为:" + taskCode + ",分配失败,暂无点位资源或点位外层有载具阻挡!"); throw new BadRequestException("一楼装箱区二次分配" + taskCode + ",分配失败,暂无点位资源或点位外层有载具阻挡!");
} }
} }
@@ -516,7 +517,8 @@ public class BstIvtPackageinfoivtServiceImpl extends ServiceImpl<BstIvtPackagein
private void upDateIvtOrTask(SchBaseTask baseTask, String pointCode, boolean isUpDateTask) { private void upDateIvtOrTask(SchBaseTask baseTask, String pointCode, boolean isUpDateTask) {
UpdateWrapper<BstIvtPackageinfoivt> updateWrapper = new UpdateWrapper<>(); UpdateWrapper<BstIvtPackageinfoivt> updateWrapper = new UpdateWrapper<>();
updateWrapper.eq("point_code", pointCode); updateWrapper.eq("point_code", pointCode);
updateWrapper.setSql("ivt_status = '0', container_name = null"); updateWrapper.set("ivt_status", "0");
updateWrapper.set("container_name", null);
// 清空起点库存状态 // 清空起点库存状态
bstIvtPackageinfoivtMapper.update(null, updateWrapper); bstIvtPackageinfoivtMapper.update(null, updateWrapper);
if (isUpDateTask) { if (isUpDateTask) {