自动化立体仓库 - WMS系统
#
zjj
2024-10-23 fbf8ca17b45027d0f75e12a055cf7e2e588a0f4c
src/main/java/com/zy/common/service/CommonService.java
@@ -209,7 +209,7 @@
        //此程序用于优化堆垛机异常时的运行时间
        for (int i = times; i < crnNumber*2; i++) {
            int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRow, crnNumber);
            int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRow, crnNumber,whsType);
            curRow = locNecessaryParameters[1];
            crnNo = locNecessaryParameters[2];
            if (basCrnpService.checkSiteError(crnNo, true)) {
@@ -369,10 +369,19 @@
        // 1.按规则查找库位
        if (Cools.isEmpty(locMast) && crnNo != 0) {
            List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>()
                    .eq("row1", nearRow)
                    .eq("loc_sts", "O").eq("whs_type",rowLastnoType.getType().longValue())
                    .orderBy("lev1",true).orderBy("bay1",true));
            List<LocMast> locMasts = null;
            if (Utils.isNorth(sourceStaNo)){
                locMasts = locMastService.selectList(new EntityWrapper<LocMast>()
                        .eq("row1", nearRow)
                        .eq("loc_sts", "O").eq("whs_type",rowLastnoType.getType().longValue())
                        .orderBy("lev1",true).orderBy("bay1",false));
            }else {
                locMasts = locMastService.selectList(new EntityWrapper<LocMast>()
                        .eq("row1", nearRow)
                        .eq("loc_sts", "O").eq("whs_type",rowLastnoType.getType().longValue())
                        .orderBy("lev1",true).orderBy("bay1",true));
            }
            for (LocMast locMast1 : locMasts) {
                if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) {
                    continue;
@@ -507,7 +516,7 @@
        //此程序用于优化堆垛机异常时的运行时间
        for (int i = times; i < crnNumber*2; i++) {
            int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRow, crnNumber);
            int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRow, crnNumber,whsType);
            rowCount =  locNecessaryParameters[0];
            curRow = locNecessaryParameters[1];
            crnNo = locNecessaryParameters[2];
@@ -560,7 +569,7 @@
                for (int i = 0; i < crnNumber*2; i++) {
                    if (!(Utils.getRow(locMastGro.getLocNo())>nearRowW && Utils.getRow(locMastGro.getLocNo())<=curRowW) && !(Utils.getRow(locMastGro.getLocNo())<nearRowW && Utils.getRow(locMastGro.getLocNo())>=curRowW) ){
                        int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRowW, crnNumber);
                        int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRowW, crnNumber,whsType);
                        curRowW = locNecessaryParameters[1];
                        nearRowW = locNecessaryParameters[3];
                    }else {
@@ -626,7 +635,7 @@
                for (int i = 0; i < crnNumber*2; i++) {
                    if (!(Utils.getRow(locMastGro.getLocNo())>nearRowW && Utils.getRow(locMastGro.getLocNo())<=curRowW) && !(Utils.getRow(locMastGro.getLocNo())<nearRowW && Utils.getRow(locMastGro.getLocNo())>=curRowW) ){
                        int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRowW, crnNumber);
                        int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRowW, crnNumber,whsType);
                        curRowW = locNecessaryParameters[1];
                        nearRowW = locNecessaryParameters[3];
                    }else {
@@ -655,7 +664,7 @@
        // 靠近摆放规则 --- 空托 //互通版
        if (staDescId == 10  && Utils.BooleanWhsTypeStaIoType(rowLastno)) {
            List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("loc_sts", "D").ge("row1", sRow).le("row1", eRow));
            List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("loc_sts", "D").ge("row1", sRow).le("row1", eRow).eq("crn_no",7));
            int nearbay = 0;
            int nearlev = 0;
            for (LocMast locMastSign:locMasts){
@@ -678,7 +687,7 @@
                for (int i = 0; i < crnNumber*2; i++) {
                    if (!(Utils.getRow(locMastGro.getLocNo())>nearRowW && Utils.getRow(locMastGro.getLocNo())<=curRowW) && !(Utils.getRow(locMastGro.getLocNo())<nearRowW && Utils.getRow(locMastGro.getLocNo())>=curRowW) ){
                        int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRowW, crnNumber);
                        int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRowW, crnNumber,whsType);
                        curRowW = locNecessaryParameters[1];
                        nearRowW = locNecessaryParameters[3];
                    }else {
@@ -696,7 +705,7 @@
                        bay2=Utils.getBay(locMast2.getLocNo())+1;
                    }
                    String targetLocNo = locMast2.getLocNo().substring(0,2)  +zerofill(String.valueOf(bay2), 3) + locMast2.getLocNo().substring(5);
                    locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no",targetLocNo).eq("loc_sts","O"));
                    locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no",targetLocNo).eq("crn_no",7).eq("loc_sts","O"));
                    if (Cools.isEmpty(locMast)){
                        continue;
                    }
@@ -742,7 +751,9 @@
            List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>()
                    .eq("bay1", nearRow)
                    .eq("loc_sts", "O").eq("whs_type",rowLastnoType.getType().longValue())
                    .eq("crn_no",7)
                    .orderBy("lev1",true).orderBy("row1",false));//最浅库位
            for (LocMast locMast1 : locMasts) {
                if (locMast != null){
                    break;
@@ -761,15 +772,18 @@
                    if (curRow < nearRow){
                        locMasts1 = locMastService.selectList(new EntityWrapper<LocMast>()
                                .eq("gro1", locMast1.getGro1())
                                .eq("crn_no",7)
                                .orderBy("bay1",true));
                        if(locMasts1.size() == 3  || (curRow>20 && locMasts1.size() == 2)){
                            locMasts1 = locMastService.selectList(new EntityWrapper<LocMast>()
                                    .eq("gro1", locMast1.getGro1())
                                    .eq("crn_no",7)
                                    .orderBy("bay1",false));
                        }
                    }else {
                        locMasts1 = locMastService.selectList(new EntityWrapper<LocMast>()
                                .eq("gro1", locMast1.getGro1())
                                .eq("crn_no",7)
                                .orderBy("bay1",false));
                    }
                    if (Cools.isEmpty(locMasts1)) {
@@ -879,7 +893,7 @@
        }
        //此程序用于优化堆垛机异常时的运行时间
        int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRow, crnNumber);
        int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRow, crnNumber,whsType);
        curRow = locNecessaryParameters[1];
        crnNo = locNecessaryParameters[2];
        rowCount =  locNecessaryParameters[0];