| | |
| | | import com.zy.acs.manager.common.domain.param.HandlerPublishParam; |
| | | import com.zy.acs.manager.common.exception.BusinessException; |
| | | import com.zy.acs.manager.core.service.*; |
| | | import com.zy.acs.manager.core.service.hik.HikInstantActionPublishService; |
| | | import com.zy.acs.manager.core.service.astart.MapDataDispatcher; |
| | | import com.zy.acs.manager.core.service.astart.domain.DynamicNode; |
| | | import com.zy.acs.manager.manager.entity.*; |
| | |
| | | private AgvAreaDispatcher agvAreaDispatcher; |
| | | @Autowired |
| | | private ConfigService configService; |
| | | @Autowired |
| | | private HikInstantActionPublishService hikInstantActionPublishService; |
| | | |
| | | @PreAuthorize("hasAuthority('manager:agv:update')") |
| | | @OperationLog("Locate All Agv") |
| | |
| | | } |
| | | |
| | | if (null != agv) { |
| | | publishRestoreCancelIfNeeded(agv); |
| | | mapDataDispatcher.modifyDynamicMatrix(null, null, agv.getUuid(), true); |
| | | avoidWaveCalculator.calcDynamicNodeByVehicle(agv, null); |
| | | |
| | |
| | | } else { |
| | | List<Agv> agvList = agvService.list(new LambdaQueryWrapper<Agv>()); |
| | | for (Agv one : agvList) { |
| | | publishRestoreCancelIfNeeded(one); |
| | | mapDataDispatcher.modifyDynamicMatrix(null, null, one.getUuid(), true); |
| | | avoidWaveCalculator.calcDynamicNodeByVehicle(one, null); |
| | | } |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | private void publishRestoreCancelIfNeeded(Agv agv) { |
| | | if (agv == null) { |
| | | return; |
| | | } |
| | | if (hikInstantActionPublishService.support(agv.getId())) { |
| | | hikInstantActionPublishService.publishCancelOrder(agv.getUuid()); |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/unlock", method = {RequestMethod.GET, RequestMethod.POST}) |
| | | public R unlockPath(@RequestHeader String appKey, |
| | | @RequestBody HandlerPublishParam param) throws ExecutionException, InterruptedException { |