| | |
| | | import com.zy.acs.manager.common.domain.param.HandlerPublishParam; |
| | | import com.zy.acs.manager.common.exception.BusinessException; |
| | | import com.zy.acs.manager.core.domain.AgvBackpackDto; |
| | | import com.zy.acs.manager.core.domain.Lane; |
| | | import com.zy.acs.manager.core.domain.LaneDto; |
| | | import com.zy.acs.manager.core.domain.TaskPosDto; |
| | | import com.zy.acs.manager.core.integrate.conveyor.ConveyorStationService; |
| | | import com.zy.acs.manager.core.service.astart.MapDataDispatcher; |
| | | import com.zy.acs.manager.manager.controller.param.OpenBusSubmitParam; |
| | | import com.zy.acs.manager.manager.entity.*; |
| | |
| | | @Autowired |
| | | private AgvModelService agvModelService; |
| | | @Autowired |
| | | private LaneService laneService; |
| | | private LaneBuilder laneBuilder; |
| | | @Autowired |
| | | private ActionSorter actionSorter; |
| | | @Autowired |
| | |
| | | throw new BusinessException("seqNum: " + task.getSeqNum() + " failed to update"); |
| | | } |
| | | // update reserve |
| | | staReserveService.allocateCallBack(sta, task, agvId); |
| | | staReserveService.allocateCallBack(task, agvId); |
| | | } |
| | | // normal |
| | | , (task, agvNo, sta) -> { |
| | |
| | | throw new BusinessException("seqNum: " + task.getSeqNum() + " failed to update"); |
| | | } |
| | | // update reserve |
| | | staReserveService.allocateCallBack(sta, task, agvId); |
| | | staReserveService.allocateCallBack(task, agvId); |
| | | }); |
| | | // if (Cools.isEmpty(agvNo)) { |
| | | //// log.warn("Task[{}] has an issue, because it failed to check out agv which is idle...", task.getSeqNum()); |
| | |
| | | |
| | | |
| | | // generate travel |
| | | travelService.finishAll(agvId); |
| | | Travel travel = new Travel(); |
| | | travel.setUuid(String.valueOf(snowflakeIdWorker.nextId()).substring(3)); |
| | | travel.setTravelId(String.valueOf(snowflakeIdWorker.nextId()).substring(3)); |
| | |
| | | task.setOriCode(agvDetail.getCode()); |
| | | task.setDestCode(endCode.getId()); |
| | | // lane |
| | | Lane destLane = laneService.search(endCode.getData()); |
| | | if (null != destLane) { |
| | | task.setDestLaneHash(destLane.getHashCode()); |
| | | LaneDto destLaneDto = laneBuilder.search(endCode.getData()); |
| | | if (null != destLaneDto) { |
| | | task.setDestLaneHash(destLaneDto.getHashCode()); |
| | | } |
| | | task.setPriority(taskType.equals(TaskTypeType.TO_CHARGE)?2:1); |
| | | task.setTaskSts(TaskStsType.ASSIGN.val()); |
| | |
| | | } |
| | | |
| | | // generate travel |
| | | travelService.finishAll(agvId); |
| | | Travel travel = new Travel(); |
| | | travel.setUuid(String.valueOf(snowflakeIdWorker.nextId()).substring(3)); |
| | | travel.setTravelId(String.valueOf(snowflakeIdWorker.nextId()).substring(3)); |
| | |
| | | AGV_06_DOWN agv_06_down = new AGV_06_DOWN(); |
| | | agv_06_down.setSerialNo(agv_06_up.getSerialNo()); |
| | | agv_06_down.setActionCode(agv_06_up.getActionCode()); |
| | | agv_06_down.setResult(success ? 1 : 0); |
| | | |
| | | //agv_06_down.setResult(success ? 1 : 0); |
| | | agv_06_down.setResult(1); |
| | | redis.push(RedisConstant.AGV_PATH_DOWN_FLAG, AgvProtocol.build(protocol.getAgvNo()).setMessageBody(agv_06_down)); |
| | | } |
| | | |