| | |
| | | import com.zy.acs.framework.common.Cools; |
| | | import com.zy.acs.framework.exception.CoolException; |
| | | import com.zy.acs.manager.common.domain.TaskDto; |
| | | import com.zy.acs.manager.manager.controller.param.OpenBusSubmitParam; |
| | | import com.zy.acs.manager.core.integrate.dto.OpenBusSubmitParam; |
| | | import com.zy.acs.manager.manager.entity.Bus; |
| | | import com.zy.acs.manager.manager.entity.Loc; |
| | | import com.zy.acs.manager.manager.entity.Task; |
| | |
| | | if (Cools.isEmpty(param)) { |
| | | return; |
| | | } |
| | | List<TaskDto> taskList = param.getTaskList(); |
| | | List<TaskDto> taskList = param.getTasks(); |
| | | if (Cools.isEmpty(taskList)) { |
| | | return; |
| | | } |
| | |
| | | List<Loc> locList = locService.list(new LambdaQueryWrapper<Loc>() |
| | | .ge(Loc::getRow, 31).eq(Loc::getLocSts, LocStsType.IDLE.val())); |
| | | if (Cools.isEmpty(locList)) { |
| | | log.error("there is no such idle loc"); |
| | | break; |
| | | } |
| | | log.error("there is no such idle loc"); |
| | | Collections.shuffle(locList); |
| | | Loc loc = locList.get(0); |
| | | dto.setDestLoc(loc.getLocNo()); |
| | |
| | | if (null == param) { |
| | | return BaseRes.PARAM; |
| | | } |
| | | if (Cools.isEmpty(param.getBatch())) { |
| | | if (Cools.isEmpty(param.getBatchNo())) { |
| | | return "Batch cannot be empty!"; |
| | | } |
| | | this.test(param); |
| | |
| | | Set<String> oriLocNoSet = new HashSet<>(); |
| | | Set<String> destStaNoSet = new HashSet<>(); |
| | | Set<String> destLocNoSet = new HashSet<>(); |
| | | for (TaskDto dto : param.getTaskList()) { |
| | | for (TaskDto dto : param.getTasks()) { |
| | | if (!Cools.isEmpty(dto.getOriSta()) && !Cools.isEmpty(dto.getOriLoc())) { |
| | | return "OriSta and OriLoc cannot exist at the same time!"; |
| | | } |
| | |
| | | destLocNoSet.add(dto.getDestLoc()); |
| | | } |
| | | } |
| | | if (Cools.isEmpty(dto.getSeqNum())) { |
| | | dto.setSeqNum(taskService.generateSeqNum()); |
| | | if (Cools.isEmpty(dto.getTaskNo())) { |
| | | dto.setTaskNo(taskService.generateSeqNum()); |
| | | } |
| | | |
| | | } |