psh 11 months ago
parent
commit
4059504425
  1. 9
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/ghs/GHSQHTask.java

9
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/ghs/GHSQHTask.java

@ -230,6 +230,9 @@ public class GHSQHTask extends AbstractTask {
throw new BadRequestException("该任务已取消!");
}
String startPoint = taskObj.getPoint_code1(); // 获取起点
if(startPoint.endsWith("0101")||startPoint.endsWith("0601")){
startPoint=startPoint.substring(0,startPoint.length()-2);
}
String endPoint = taskObj.getPoint_code2(); // 获取终点
SchBasePoint startPointObj = pointService.getById(startPoint);
SchBasePoint endPointObj = pointService.getById(endPoint);
@ -260,9 +263,7 @@ public class GHSQHTask extends AbstractTask {
.eq(SchBaseVehiclematerialgroup::getVehicle_code, vehicleCode)
.eq(SchBaseVehiclematerialgroup::getGroup_bind_material_status,
GroupBindMaterialStatusEnum.BOUND.getValue()));
if (ObjectUtil.isEmpty(one)) {
throw new BadRequestException(vehicleCode + " => " + startPointObj.getVehicle_type() + "的组盘信息未找到");
}
if (ObjectUtil.isNotEmpty(one)) {
one.setTask_code(taskObj.getTask_code());
one.setPoint_code(endPointObj.getPoint_code().substring(0, endPointObj.getPoint_code().length() - 1) + (i + 1)); // 当前位置
one.setPoint_name(endPointObj.getPoint_name().substring(0, endPointObj.getPoint_name().length() - 1) + (i + 1));
@ -273,6 +274,8 @@ public class GHSQHTask extends AbstractTask {
vehiclematerialgroupService.updateById(one);
group_id.append(one.getGroup_id()).append(',');
}
}
// 起点清空
if (ObjectUtil.isNotEmpty(startPointObj)) {
PointUtils.clearPoint(startPointObj);

Loading…
Cancel
Save