| | |
| | | import com.zy.common.utils.NavigateUtils; |
| | | import com.zy.common.utils.RedisUtil; |
| | | import com.zy.core.News; |
| | | import com.zy.core.service.WrkCommandRollbackService; |
| | | import com.zy.core.enums.*; |
| | | import com.zy.core.model.StationObjModel; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | private RedisUtil redisUtil; |
| | | @Autowired |
| | | private BasOutStationAreaService basOutStationAreaService; |
| | | @Autowired |
| | | private WrkCommandRollbackService wrkCommandRollbackService; |
| | | |
| | | /** |
| | | * 生成工作号 |
| | |
| | | return true; |
| | | } |
| | | |
| | | public boolean updateTaskPriorityAndBatchSeq(UpdateTaskPriorityAndBatchSeqParam param) { |
| | | if (param == null) { |
| | | throw new CoolException("参数不能为空"); |
| | | } |
| | | if (Cools.isEmpty(param.getTaskNo())) { |
| | | throw new CoolException("WMS任务号不能为空"); |
| | | } |
| | | if (param.getTaskPri() == null && param.getBatchSeq() == null) { |
| | | throw new CoolException("任务优先级和批次序号不能同时为空"); |
| | | } |
| | | |
| | | WrkMast wrkMast = wrkMastService.getOne(new QueryWrapper<WrkMast>().eq("wms_wrk_no", param.getTaskNo())); |
| | | if (wrkMast == null) { |
| | | throw new CoolException("任务不存在"); |
| | | } |
| | | |
| | | if (param.getTaskPri() != null) { |
| | | wrkMast.setIoPri(param.getTaskPri().doubleValue()); |
| | | } |
| | | if (param.getBatchSeq() != null) { |
| | | wrkMast.setBatchSeq(param.getBatchSeq()); |
| | | } |
| | | wrkMast.setModiTime(new Date()); |
| | | wrkMastService.updateById(wrkMast); |
| | | return true; |
| | | } |
| | | |
| | | public CancelTaskBatchResult cancelTaskBatch(CancelTaskBatchParam param) { |
| | | if (param == null) { |
| | | throw new CoolException("参数不能为空"); |
| | |
| | | return result; |
| | | } |
| | | |
| | | public boolean manualRollbackTask(ManualRollbackTaskParam param) { |
| | | return wrkCommandRollbackService.manualRollbackTask(param); |
| | | } |
| | | |
| | | //移库任务 |
| | | public boolean createLocMoveTask(CreateLocMoveTaskParam param) { |
| | | Date now = new Date(); |