diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AbstractTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AbstractTask.java index 831f9a0..930ce45 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AbstractTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AbstractTask.java @@ -21,6 +21,7 @@ import org.nl.wms.sch.task_manage.enums.TaskDirectionEnum; import org.nl.wms.sch.task_manage.enums.WorkOrderStatusEnum; import org.nl.wms.sch.task_manage.task.AcsUtil; import org.nl.wms.sch.task_manage.task.core.TaskStatus; +import org.nl.wms.sch.workorder.service.IWorkorderService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @@ -44,7 +45,7 @@ public abstract class AbstractTask { @Autowired private ISchBasePointService pointService; @Autowired - private IPdmBdWorkorderService workorderService; + private IWorkorderService workorderService; @Autowired private IMdBaseMaterialService materialService; @@ -189,6 +190,16 @@ public abstract class AbstractTask { .eq(SchBasePoint::getPoint_code, apply_point_code)); // 判断是否校验工单 if (taskConfig.getIs_check_workorder()) { + //如果点位上没货 + if(ObjectUtil.isNotEmpty(pointObj.getVehicle_code2())) { + throw new BadRequestException("点位:" + apply_point_code+ "上无托盘信息!"); + } + //设置载具信息 + param.put("vehicle_code2",pointObj.getVehicle_code2()); + param.put("vehicle_code",pointObj.getVehicle_code()); + //更新对应载具工单状态为已生成任务,不可在工单页面取消 + //pdm_bd_workorder_two任务生成时,status改为2 + workorderService.update(pointObj.getVehicle_code2(),"2"); // 校验工单 // 根据对接位的父点位编码(设备)找到工单设备 /*SchBasePoint one = pointService.getOne(new LambdaQueryWrapper() diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/YCLCKTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/YCLCKTask.java index 375ebc5..f173c93 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/YCLCKTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/YCLCKTask.java @@ -319,7 +319,7 @@ public class YCLCKTask extends AbstractTask { taskObj.setRemark("任务取消"); taskObj.setTask_status(TaskStatus.CANCELED.getCode()); String vehicleCode2 = taskObj.getVehicle_code2(); - //pdm_bd_workorder_two任务完成时,status改为3 + //pdm_bd_workorder_two任务取消时,status改为1 if(ObjectUtil.isNotEmpty(vehicleCode2)){ workorderService.update(vehicleCode2,"1"); }