自动化立体仓库 - WMS系统
#
Junjie
3 天以前 9c5dc8b744446ec2a1ec170b2834b8bb0241982d
#
1个文件已修改
76 ■■■■ 已修改文件
src/main/java/com/zy/common/service/CommonService.java 76 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/service/CommonService.java
@@ -256,6 +256,7 @@
        if (crnNo == 2 || crnNo == 3) {
            if (crnSearchList >= 2) {
                if (basCrnpService.checkSiteError(1, true)) {
                    boolean flag = true;
                    //尝试找1号弯轨堆垛机库位
                    crnNo = 1;
                    List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>()
@@ -264,7 +265,19 @@
                    );
                    if(wrkMasts.size() > crnSearchDetectTaskCount){
                        log.error(crnNo + "号堆垛机已达到入库控制上限!!! 任务数量: {}, 控制数量:{}", wrkMasts.size(), crnSearchDetectTaskCount);
                    }else {
                        flag = false;
                    }
                    List<WrkMast> wrkMastsList = wrkMastService.selectList(new EntityWrapper<WrkMast>()
                            .eq("crn_no", crnNo)
                            .in("io_type", 1, 10, 53, 57, 101, 103, 107, 110)
                    );
                    if (wrkMastsList.size() > applyInTaskTotalCount) {
                        log.error(crnNo + "号堆垛机已达到申请入库时总任务数量上限(入库、出库)!!! 任务数量: {}, 控制数量:{}", wrkMastsList.size(), applyInTaskTotalCount);
                        flag = false;
                    }
                    if (flag) {
                        List<Integer> nearRowList = new ArrayList<Integer>() {{
                            add(4);
                            add(6);
@@ -297,26 +310,47 @@
                //尝试找1号弯轨堆垛机库位
                crnNo = 1;
                if (basCrnpService.checkSiteError(crnNo, true)) {
                    List<Integer> nearRowList = new ArrayList<Integer>() {{
                        add(4);
                        add(6);
                        add(3);
                        add(1);
                    }};
                    for (Integer near : nearRowList) {
                        List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>()
                                .eq("row1", near)
                                .eq("loc_sts", "O")
                                .eq("whs_type", rowLastnoType.getType().longValue())
                                .eq("loc_type1", locTypeDto.getLocType1())
                                .eq("loc_type2", locTypeDto.getLocType2())
                        );
                        int crnCountO = wrkMastService.selectCount(new EntityWrapper<WrkMast>().eq("crn_no", crnNo).le("io_type", 100));
                        if (locMasts.size() - crnCountO <= 2) {
                            log.error(crnNo + "号堆垛机没有空库位!!! 尺寸规格: {}, 轮询次数:{}", JSON.toJSONString(locTypeDto), times);
                        } else {
                            nearRow = near;
                            break;
                    boolean flag = true;
                    List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>()
                            .eq("crn_no", crnNo)
                            .in("io_type", 1, 10, 53, 57)
                    );
                    if(wrkMasts.size() > crnSearchDetectTaskCount){
                        log.error(crnNo + "号堆垛机已达到入库控制上限!!! 任务数量: {}, 控制数量:{}", wrkMasts.size(), crnSearchDetectTaskCount);
                        flag = false;
                    }
                    List<WrkMast> wrkMastsList = wrkMastService.selectList(new EntityWrapper<WrkMast>()
                            .eq("crn_no", crnNo)
                            .in("io_type", 1, 10, 53, 57, 101, 103, 107, 110)
                    );
                    if (wrkMastsList.size() > applyInTaskTotalCount) {
                        log.error(crnNo + "号堆垛机已达到申请入库时总任务数量上限(入库、出库)!!! 任务数量: {}, 控制数量:{}", wrkMastsList.size(), applyInTaskTotalCount);
                        flag = false;
                    }
                    if (flag) {
                        List<Integer> nearRowList = new ArrayList<Integer>() {{
                            add(4);
                            add(6);
                            add(3);
                            add(1);
                        }};
                        for (Integer near : nearRowList) {
                            List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>()
                                    .eq("row1", near)
                                    .eq("loc_sts", "O")
                                    .eq("whs_type", rowLastnoType.getType().longValue())
                                    .eq("loc_type1", locTypeDto.getLocType1())
                                    .eq("loc_type2", locTypeDto.getLocType2())
                            );
                            int crnCountO = wrkMastService.selectCount(new EntityWrapper<WrkMast>().eq("crn_no", crnNo).le("io_type", 100));
                            if (locMasts.size() - crnCountO <= 2) {
                                log.error(crnNo + "号堆垛机没有空库位!!! 尺寸规格: {}, 轮询次数:{}", JSON.toJSONString(locTypeDto), times);
                            } else {
                                nearRow = near;
                                break;
                            }
                        }
                    }
                }