opt:优化取货完成点位修改

This commit is contained in:
2024-07-08 16:57:14 +08:00
parent 344a20d331
commit ec073ecb03
2 changed files with 24 additions and 13 deletions

View File

@@ -183,7 +183,6 @@ public class VehicleTwoServiceImpl implements VehicleTwoService {
String bill_type = whereJson.getString("bill_type"); String bill_type = whereJson.getString("bill_type");
whereJson.put("material_barcode", whereJson.getString("box_no")); whereJson.put("material_barcode", whereJson.getString("box_no"));
whereJson.put("device_code", whereJson.getString("point_code")); whereJson.put("device_code", whereJson.getString("point_code"));
//todo 检查 1-返检入库2-改切入库
if (bill_type.equals("1")) { if (bill_type.equals("1")) {
whereJson.put("bill_type", IOSEnum.IN_TYPE.code("返检入库")); whereJson.put("bill_type", IOSEnum.IN_TYPE.code("返检入库"));
} else if (bill_type.equals("2")) { } else if (bill_type.equals("2")) {

View File

@@ -351,7 +351,6 @@ public class BstIvtPackageinfoivtServiceImpl extends ServiceImpl<BstIvtPackagein
if (baseTask.getTask_type().equals(PackageInfoIvtEnum.TASK_TYPE.code("满轴缓存位->待检区")) || if (baseTask.getTask_type().equals(PackageInfoIvtEnum.TASK_TYPE.code("满轴缓存位->待检区")) ||
baseTask.getTask_type().equals(PackageInfoIvtEnum.TASK_TYPE.code("输送线四个点任务")) || baseTask.getTask_type().equals(PackageInfoIvtEnum.TASK_TYPE.code("输送线四个点任务")) ||
baseTask.getTask_type().equals(PackageInfoIvtEnum.TASK_TYPE.code("放空(空载具缓存位->输送线)"))) { baseTask.getTask_type().equals(PackageInfoIvtEnum.TASK_TYPE.code("放空(空载具缓存位->输送线)"))) {
UpdateWrapper<BstIvtPackageinfoivt> updateWrapper = new UpdateWrapper<>();
//取满轴 //取满轴
if (baseTask.getTask_type().equals(PackageInfoIvtEnum.TASK_TYPE.code("满轴缓存位->待检区"))) { if (baseTask.getTask_type().equals(PackageInfoIvtEnum.TASK_TYPE.code("满轴缓存位->待检区"))) {
List<BstIvtPackageinfoivt> ivtList = packageinfoivtService.list(new LambdaQueryWrapper<BstIvtPackageinfoivt>() List<BstIvtPackageinfoivt> ivtList = packageinfoivtService.list(new LambdaQueryWrapper<BstIvtPackageinfoivt>()
@@ -362,23 +361,17 @@ public class BstIvtPackageinfoivtServiceImpl extends ServiceImpl<BstIvtPackagein
} }
//只有子卷号相同才能清除库存 //只有子卷号相同才能清除库存
if (baseTask.getVehicle_code().equals(ivtList.get(0).getContainer_name())) { if (baseTask.getVehicle_code().equals(ivtList.get(0).getContainer_name())) {
updateWrapper.eq("point_code", baseTask.getPoint_code1()); upDateIvtOrTask(baseTask, baseTask.getPoint_code1(), false);
} }
} else if (baseTask.getTask_type().equals(PackageInfoIvtEnum.TASK_TYPE.code("输送线四个点任务"))) { } else if (baseTask.getTask_type().equals(PackageInfoIvtEnum.TASK_TYPE.code("输送线四个点任务"))) {
//取空轴 //取空轴
updateWrapper.eq("point_code", baseTask.getPoint_code3()); upDateIvtOrTask(baseTask, baseTask.getPoint_code3(), true);
} else if (baseTask.getTask_type().equals(PackageInfoIvtEnum.TASK_TYPE.code("放空(空载具缓存位->输送线)"))) { } else if (baseTask.getTask_type().equals(PackageInfoIvtEnum.TASK_TYPE.code("放空(空载具缓存位->输送线)"))) {
//取空轴 //取空轴
updateWrapper.eq("point_code", baseTask.getPoint_code1()); upDateIvtOrTask(baseTask, baseTask.getPoint_code1(), true);
} }
updateWrapper.setSql("ivt_status = '0', container_name = null");
//清空起点库存状态
bstIvtPackageinfoivtMapper.update(null, updateWrapper);
//标记桁架任务取空载具完成
UpdateWrapper<SchBaseTask> updateWrapper1 = new UpdateWrapper<>();
updateWrapper1.eq("task_id", baseTask.getTask_id());
updateWrapper1.set("request_param", PackageInfoIvtEnum.TASK_ACTION_TYPE.code("取货完成"));
taskService.update(updateWrapper1);
} }
} else { } else {
//放货任务 //放货任务
@@ -400,6 +393,25 @@ public class BstIvtPackageinfoivtServiceImpl extends ServiceImpl<BstIvtPackagein
} }
} }
/**
* 取货完成更新点位或任务标识
*/
private void upDateIvtOrTask(SchBaseTask baseTask, String pointCode, boolean isUpDateTask) {
UpdateWrapper<BstIvtPackageinfoivt> updateWrapper = new UpdateWrapper<>();
updateWrapper.eq("point_code", pointCode);
updateWrapper.setSql("ivt_status = '0', container_name = null");
if (isUpDateTask) {
//清空起点库存状态
bstIvtPackageinfoivtMapper.update(null, updateWrapper);
//标记桁架任务取空载具完成
UpdateWrapper<SchBaseTask> updateWrapper1 = new UpdateWrapper<>();
updateWrapper1.eq("task_id", baseTask.getTask_id());
updateWrapper1.set("request_param", PackageInfoIvtEnum.TASK_ACTION_TYPE.code("取货完成"));
taskService.update(updateWrapper1);
}
}
private BstIvtPackageinfoivt getBstIvtPackageinfoivt(String actionType, String taskPointType, SchBaseTask baseTask) { private BstIvtPackageinfoivt getBstIvtPackageinfoivt(String actionType, String taskPointType, SchBaseTask baseTask) {
BstIvtPackageinfoivt newPoint; BstIvtPackageinfoivt newPoint;
//1取货任务2放货任务 //1取货任务2放货任务