Browse Source

优化任务更新时母托盘的查询和校验

master
zds 5 months ago
parent
commit
afa31e5be7
  1. 4
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/POINTTask.java
  2. 5
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/YCLCKTask.java
  3. 1
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/YCLRKTask.java

4
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/POINTTask.java

@ -144,12 +144,11 @@ public class POINTTask extends AbstractTask {
if(StringUtils.isNotEmpty(vehicleCode)) { if(StringUtils.isNotEmpty(vehicleCode)) {
one = vehiclematerialgroupService.getOne(new LambdaQueryWrapper<SchBaseVehiclematerialgroup>() one = vehiclematerialgroupService.getOne(new LambdaQueryWrapper<SchBaseVehiclematerialgroup>()
.eq(SchBaseVehiclematerialgroup::getVehicle_code, vehicleCode) .eq(SchBaseVehiclematerialgroup::getVehicle_code, vehicleCode)
.eq(SchBaseVehiclematerialgroup::getPoint_code, startPoint)
.eq(SchBaseVehiclematerialgroup::getGroup_bind_material_status, .eq(SchBaseVehiclematerialgroup::getGroup_bind_material_status,
GroupBindMaterialStatusEnum.BOUND.getValue())); GroupBindMaterialStatusEnum.BOUND.getValue()));
} }
if (ObjectUtil.isNotEmpty(one)) { if (ObjectUtil.isNotEmpty(one)) {
// throw new BadRequestException(vehicleCode + " => " + startPointObj.getVehicle_type() + "的组盘信息未找到");
// }
one.setTask_code(taskObj.getTask_code()); one.setTask_code(taskObj.getTask_code());
one.setPoint_code(endPointObj.getPoint_code()); // 当前位置 one.setPoint_code(endPointObj.getPoint_code()); // 当前位置
one.setPoint_name(endPointObj.getPoint_name()); one.setPoint_name(endPointObj.getPoint_name());
@ -160,6 +159,7 @@ public class POINTTask extends AbstractTask {
one.setUpdate_time(DateUtil.now()); one.setUpdate_time(DateUtil.now());
vehiclematerialgroupService.updateById(one); vehiclematerialgroupService.updateById(one);
} }
if(StringUtils.isNotEmpty(vehicleCode2)) { if(StringUtils.isNotEmpty(vehicleCode2)) {
one = vehiclematerialgroupService.getOne(new LambdaQueryWrapper<SchBaseVehiclematerialgroup>() one = vehiclematerialgroupService.getOne(new LambdaQueryWrapper<SchBaseVehiclematerialgroup>()
.eq(SchBaseVehiclematerialgroup::getVehicle_code, vehicleCode2) .eq(SchBaseVehiclematerialgroup::getVehicle_code, vehicleCode2)

5
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/YCLCKTask.java

@ -173,11 +173,10 @@ public class YCLCKTask extends AbstractTask {
String vehicleCode2 = taskObj.getVehicle_code2(); String vehicleCode2 = taskObj.getVehicle_code2();
SchBaseVehiclematerialgroup one = vehiclematerialgroupService.getOne(new LambdaQueryWrapper<SchBaseVehiclematerialgroup>() SchBaseVehiclematerialgroup one = vehiclematerialgroupService.getOne(new LambdaQueryWrapper<SchBaseVehiclematerialgroup>()
.eq(SchBaseVehiclematerialgroup::getVehicle_code, vehicleCode) .eq(SchBaseVehiclematerialgroup::getVehicle_code, vehicleCode)
.eq(SchBaseVehiclematerialgroup::getPoint_code, startPoint)
.eq(SchBaseVehiclematerialgroup::getGroup_bind_material_status, .eq(SchBaseVehiclematerialgroup::getGroup_bind_material_status,
GroupBindMaterialStatusEnum.BOUND.getValue())); GroupBindMaterialStatusEnum.BOUND.getValue()));
if (ObjectUtil.isNotEmpty(one)) { if (ObjectUtil.isNotEmpty(one)) {
// throw new BadRequestException(vehicleCode + " => " + startPointObj.getVehicle_type() + "的组盘信息未找到");
// }
one.setTask_code(taskObj.getTask_code()); one.setTask_code(taskObj.getTask_code());
one.setPoint_code(endPointObj.getPoint_code()); // 当前位置 one.setPoint_code(endPointObj.getPoint_code()); // 当前位置
one.setPoint_name(endPointObj.getPoint_name()); one.setPoint_name(endPointObj.getPoint_name());
@ -194,8 +193,6 @@ public class YCLCKTask extends AbstractTask {
.eq(SchBaseVehiclematerialgroup::getGroup_bind_material_status, .eq(SchBaseVehiclematerialgroup::getGroup_bind_material_status,
GroupBindMaterialStatusEnum.BOUND.getValue())); GroupBindMaterialStatusEnum.BOUND.getValue()));
if (ObjectUtil.isNotEmpty(one)) { if (ObjectUtil.isNotEmpty(one)) {
// throw new BadRequestException(vehicleCode + " => " + startPointObj.getVehicle_type() + "的组盘信息未找到");
// }
one.setTask_code(taskObj.getTask_code()); one.setTask_code(taskObj.getTask_code());
one.setPoint_code(endPointObj.getPoint_code()); // 当前位置 one.setPoint_code(endPointObj.getPoint_code()); // 当前位置
one.setPoint_name(endPointObj.getPoint_name()); one.setPoint_name(endPointObj.getPoint_name());

1
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/YCLRKTask.java

@ -219,6 +219,7 @@ public class YCLRKTask extends AbstractTask {
groupEntity.setMaterial_id(materialList.get(0).getProductName()); groupEntity.setMaterial_id(materialList.get(0).getProductName());
} }
vehiclematerialgroupService.save(groupEntity); vehiclematerialgroupService.save(groupEntity);
groupEntity.setGroup_id(IdUtil.getSnowflake(1, 1).nextIdStr()); groupEntity.setGroup_id(IdUtil.getSnowflake(1, 1).nextIdStr());
groupEntity.setVehicle_code(taskObj.getVehicle_code2()); groupEntity.setVehicle_code(taskObj.getVehicle_code2());
groupEntity.setVehicle_type("1"); groupEntity.setVehicle_type("1");

Loading…
Cancel
Save