自动化立体仓库 - WMS系统
#
zjj
2024-10-22 c7f36f65a16f51f0f45ed1008d31fc6c4560541a
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)) {
@@ -507,7 +507,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 +560,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 +626,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 +655,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 +678,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 +696,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 +742,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 +763,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 +884,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];
@@ -890,6 +895,9 @@
        BasDevp staNo = null;
        if (Utils.BooleanWhsTypeSta(rowLastno, staDescId)) {
            LocMast locMast1 = locMastService.selectOne(new EntityWrapper<LocMast>().eq("row1", curRow).eq("bay1", 2).eq("lev1", 1));
            crnNo = locMast1.getCrnNo();
            // 获取目标站
            wrapper = new EntityWrapper<StaDesc>()
                    .eq("type_no", staDescId)