| | |
| | | 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.core.service.AgvAreaDispatcher; |
| | | import com.zy.acs.manager.manager.entity.*; |
| | | import com.zy.acs.manager.manager.enums.*; |
| | | import com.zy.acs.manager.manager.mapper.FuncStaMapper; |
| | |
| | | } |
| | | |
| | | // 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 (agvAreaDispatcher.isAgvExistsInAnyArea(agvId)) { |
| | | List<String> areaCodeList = agvAreaDispatcher.getCodesByAgvId(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)) { |
| | |
| | | AgvModel agvModel = agvModelService.getByAgvId(agv.getId()); |
| | | AgvDetail agvDetail = agvDetailService.selectByAgvId(agv.getId()); |
| | | if (agvDetail.getAgvStatus().equals(AgvStatusType.CHARGE)) { |
| | | if (agvDetail.getVol() < agvModel.getQuaBattery()) { |
| | | if (agvDetail.getSoc() < agvModel.getQuaBattery()) { |
| | | return false; |
| | | } |
| | | } else { |