| | |
| | | try { |
| | | // valid ----------------------------------------------- |
| | | Agv agv = agvService.getById(agvId); |
| | | if (!agvService.judgeEnable(agv.getId(), false)) { |
| | | if (!agvService.judgeEnable(agv.getId(), false, false)) { |
| | | return; |
| | | } |
| | | if (!Cools.isEmpty(taskService.selectInSts(agvId, TaskStsType.ASSIGN, TaskStsType.PROGRESS))) { |
| | |
| | | |
| | | /** |
| | | * 充电 回待机位任务 |
| | | * zc 新增了是否强制,强制说明由用户发起,小车在超过低电量就可以做移动充电去待机位 |
| | | */ |
| | | @Transactional(propagation = Propagation.REQUIRES_NEW) // although there is a Transactional here that the lock is isolated, but we can't join the caller's Transactional |
| | | public boolean buildMinorTask(Long agvId, TaskTypeType taskType, String destination, Jam jam) { |
| | | public boolean buildMinorTask(Long agvId, TaskTypeType taskType, String destination, Jam jam,boolean force) { |
| | | if (Cools.isEmpty(agvId, taskType)) { return false; } |
| | | try { |
| | | String agvNo = agvService.getAgvNo(agvId); |
| | | if (!agvService.judgeEnable(agvId)) { |
| | | if (!agvService.judgeEnable(agvId,false, force)) { |
| | | return false; |
| | | } |
| | | if (!Cools.isEmpty(taskService.selectInSts(agvId, TaskStsType.ASSIGN, TaskStsType.PROGRESS))) { |