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

15
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,19 +263,19 @@ 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));
one.setMove_way(one.getMove_way() == null ? "" : (one.getMove_way() + " -> ") + endPointObj.getPoint_code().substring(0,endPointObj.getPoint_code().length()-1)+(i+1));
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));
one.setMove_way(one.getMove_way() == null ? "" : (one.getMove_way() + " -> ") + endPointObj.getPoint_code().substring(0, endPointObj.getPoint_code().length() - 1) + (i + 1));
one.setUpdate_id(GeneralDefinition.ACS_ID);
one.setUpdate_name(GeneralDefinition.ACS_NAME);
one.setUpdate_time(DateUtil.now());
vehiclematerialgroupService.updateById(one);
group_id.append(one.getGroup_id()).append(',');
}
}
// 起点清空
if (ObjectUtil.isNotEmpty(startPointObj)) {
PointUtils.clearPoint(startPointObj);

Loading…
Cancel
Save