| | |
| | | import com.zy.acs.common.enums.AgvStatusType; |
| | | import com.zy.acs.framework.common.Cools; |
| | | import com.zy.acs.manager.common.utils.CommonUtil; |
| | | import com.zy.acs.manager.core.constant.AgvAreaDispatcher; |
| | | import com.zy.acs.manager.manager.entity.*; |
| | | import com.zy.acs.manager.manager.enums.FuncStaType; |
| | | import com.zy.acs.manager.manager.enums.StatusType; |
| | |
| | | private AgvModelService agvModelService; |
| | | @Autowired |
| | | private TaskService taskService; |
| | | @Autowired |
| | | private AgvAreaDispatcher agvAreaDispatcher; |
| | | |
| | | @Override |
| | | public FuncSta getByCodeAndType(Long codeId, String type) { |
| | |
| | | return new ArrayList<>(); |
| | | } |
| | | |
| | | Collections.shuffle(funcStaList); |
| | | // area limit |
| | | List<String> areaCodeList = agvAreaDispatcher.getAreaCodeListByAgvNo(agvService.getAgvNo(agvId)); |
| | | if (Cools.isEmpty(areaCodeList)) { |
| | | funcStaList.clear(); |
| | | } else { |
| | | funcStaList.removeIf(funcSta -> { |
| | | Code code = codeService.getCacheById(funcSta.getCode()); |
| | | if (Cools.isEmpty(code, code.getData())) { return true; } |
| | | return !areaCodeList.contains(code.getData()); |
| | | }); |
| | | } |
| | | |
| | | if (!Cools.isEmpty(funcStaList)) { |
| | | Collections.shuffle(funcStaList); |
| | | } |
| | | |
| | | // filter idle |
| | | funcStaList = funcStaList.stream().filter(funcSta -> { |
| | | |