自动化立体仓库 - WMS系统
#
lsh
2024-07-10 d4f51021f6232c31b63c9ea3a628ccdc156378f3
src/main/java/com/zy/common/service/CommonService.java
@@ -180,11 +180,13 @@
            if (basCrnpService.checkSiteError(crnNo, true)) {
                rowCount =  locNecessaryParameters[0];
                nearRow = locNecessaryParameters[3];
                List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow).eq("loc_sts", "O"));
                int crnCountO = wrkMastService.selectCount(new EntityWrapper<WrkMast>().eq("crn_no", crnNo).le("io_type",100));
                if (locMasts.size()-crnCountO<=2){
                    times++;
                    continue;
                if (crnNo>5 || crnNo<3){
                    List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow).eq("loc_sts", "O"));
                    int crnCountO = wrkMastService.selectCount(new EntityWrapper<WrkMast>().eq("crn_no", crnNo).le("io_type",100));
                    if (locMasts.size()-crnCountO<=2){
                        times++;
                        continue;
                    }
                }
                break;
            } else {
@@ -238,7 +240,7 @@
                if (Utils.isShallowLoc(slaveProperties, locNo)) {
                    continue;
                }
                String shallowLocNo = Utils.getShallowLoc5(slaveProperties, locNo,whsType);
                String shallowLocNo = Utils.getShallowLoc(slaveProperties, locNo);
                // 检测目标库位是否为空库位
                LocMast shallowLoc = locMastService.selectById(shallowLocNo);
                if (shallowLoc != null && shallowLoc.getLocSts().equals("O")) {
@@ -277,7 +279,7 @@
                    if (Utils.isShallowLoc(slaveProperties, loc.getLocNo())) {
                        continue;
                    }
                    String shallowLocNo = Utils.getShallowLoc5(slaveProperties, loc.getLocNo(),whsType);
                    String shallowLocNo = Utils.getShallowLoc(slaveProperties, loc.getLocNo());
                    // 检测目标库位是否为空库位
                    LocMast shallowLoc = locMastService.selectById(shallowLocNo);
                    if (shallowLoc != null && shallowLoc.getLocSts().equals("O")) {
@@ -332,13 +334,16 @@
            List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>()
                    .eq("row1", nearRow)
                    .eq("loc_sts", "O")
                    .orderBy("lev1",true).orderBy("bay1",true));
                    .orderBy("inv_wh",false).orderBy("lev1",true).orderBy("bay1",true));
            System.out.println("00000000000000000000whsType:"+whsType);
            for (LocMast locMast1 : locMasts) {
                if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) {
                    continue;
                }
                if (Utils.BooleanWhsTypeStaIoType(whsType)){
                    String shallowLoc = Utils.getDeepLoc5(slaveProperties, locMast1.getLocNo(),whsType);
                    System.out.println("111111111111111whsType:"+whsType);
                    String shallowLoc = Utils.getDeepLoc(slaveProperties, locMast1.getLocNo());
                    LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>()
                            .eq("loc_no", shallowLoc).eq("loc_sts", "O"));
                    if (!Cools.isEmpty(locMast2)) {
@@ -346,6 +351,7 @@
                        break;
                    }
                } else {
                    System.out.println("22222222222222222222whsType:"+whsType);
                    if (!Cools.isEmpty(locMast1)) {
                        locMast = locMast1;
                        break;
@@ -359,7 +365,7 @@
                        continue;
                    }
                    if (Utils.BooleanWhsTypeStaIoType(whsType)){
                        String shallowLoc = Utils.getDeepLoc5(slaveProperties, locMast1.getLocNo(),whsType);
                        String shallowLoc = Utils.getDeepLoc(slaveProperties, locMast1.getLocNo());
                        LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>()
                                .eq("loc_no", shallowLoc).eq("loc_sts", "O"));
                        if (!Cools.isEmpty(locMast2)) {
@@ -369,13 +375,13 @@
                            locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>()
                                    .eq("loc_no", shallowLoc).eq("loc_sts", "F"));
                            if (!Cools.isEmpty(locMast2)) {
                                locMast = locMast2;
                                locMast = locMast1;
                                break;
                            } else {
                                locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>()
                                        .eq("loc_no", shallowLoc).eq("loc_sts", "D"));
                                if (!Cools.isEmpty(locMast2)) {
                                    locMast = locMast2;
                                    locMast = locMast1;
                                    break;
                                }
                            }