#
vincentlu
5 分钟以前 6cbb420754e6e29fa134a6afca4514b8dfd62918
zy-acs-manager/src/main/java/com/zy/acs/manager/manager/service/impl/FuncStaServiceImpl.java
@@ -61,15 +61,17 @@
        }
        // area limit
        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 (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)) {
@@ -92,7 +94,7 @@
                    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 {