lsh
2024-03-26 47b4326b6167d520d57d33d71a2cd02ef3e926f2
#XGHYSRJTXC  优化
3个文件已修改
135 ■■■■ 已修改文件
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/utils/RouteUtils.java 92 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/WrkMastMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -3693,9 +3693,17 @@
                            continue;
                        }
                        BasDevp basDevp = basDevpService.selectById(wrkMastSta.getStaEnd());
                        if (!basDevp.getAutoing().equals("Y") || basDevp.getLoading().equals("Y")){
                        if (!basDevp.getAutoing().equals("Y") || basDevp.getLoading().equals("Y") || basDevp.getWrkNo()!=0){
                            continue;
                        }
                        if (basDevp.getDevNo()>=118 && basDevp.getDevNo()<=123){
                            if (!basDevp.getEmptyMk().equals("Y")){
                                continue;
                            }
                        }
                        Date date = new Date();
                        log.info(date+"取放任务下发:小车工作档:"+wrkMastSta);
                        log.info(date+"取放任务下发:目标站状态:"+basDevp);
                        boolean sign = rgvTakeFullAll(basRgvMap.getRgvNo(), wrkMastSta);
                        if (sign){
                            boolean signMap = rgvMapUpdate(basRgvMap, wrkMastSta.getStaStart(), wrkMastSta.getStaEnd());
@@ -3763,9 +3771,17 @@
                        boolean sign = false;
                        if ( wrkMastSta.getStaEnd()!=0){//放
                            BasDevp basDevp = basDevpService.selectById(wrkMastSta.getStaEnd());
                            if (!basDevp.getAutoing().equals("Y") || basDevp.getLoading().equals("Y")){
                            if (!basDevp.getAutoing().equals("Y") || basDevp.getLoading().equals("Y") || basDevp.getWrkNo()!=0){
                                continue;
                            }
                            if (basDevp.getDevNo()>=118 && basDevp.getDevNo()<=123){
                                if (!basDevp.getEmptyMk().equals("Y")){
                                    continue;
                                }
                            }
                            Date date = new Date();
                            log.info(date+"拆盘任务下发:小车工作档:"+wrkMastSta);
                            log.info(date+"拆盘任务下发:目标站状态:"+basDevp);
                            sign = rgvPutEmpty(rgvProtocol.getRgvNo(),wrkMastSta);//拆盘
                        }else {
                            continue;
@@ -3837,9 +3853,17 @@
                        boolean sign = false;
                        if ( wrkMastSta.getStaEnd()!=0){//满放
                            BasDevp basDevp = basDevpService.selectById(wrkMastSta.getStaEnd());
                            if (!basDevp.getAutoing().equals("Y") || basDevp.getLoading().equals("Y")){
                            if (!basDevp.getAutoing().equals("Y") || basDevp.getLoading().equals("Y") || basDevp.getWrkNo()!=0){
                                continue;
                            }
                            if (basDevp.getDevNo()>=118 && basDevp.getDevNo()<=123){
                                if (!basDevp.getEmptyMk().equals("Y")){
                                    continue;
                                }
                            }
                            Date date = new Date();
                            log.info(date+"满放任务下发:小车工作档:"+wrkMastSta);
                            log.info(date+"满放任务下发:目标站状态:"+basDevp);
                            sign = rgvPutEmptyFull(rgvProtocol.getRgvNo(),wrkMastSta);
                        }else {
                            continue;
@@ -3911,6 +3935,14 @@
                            if (!basDevp.getAutoing().equals("Y") || !basDevp.getLoading().equals("Y")){
                                continue;
                            }
                            if (basDevp.getDevNo()>=118 && basDevp.getDevNo()<=123){
                                if (basDevp.getEmptyMk().equals("Y")){
                                    continue;
                                }
                            }
                            Date date = new Date();
                            log.info(date+"叠盘任务下发:小车工作档:"+wrkMastSta);
                            log.info(date+"叠盘任务下发:目标站状态:"+basDevp);
                            sign = rgvTakeEmpty(rgvProtocol.getRgvNo(),wrkMastSta);//叠盘
                        }else {
                            continue;
@@ -3989,6 +4021,9 @@
                            if (!basDevp.getAutoing().equals("Y") || !basDevp.getLoading().equals("Y")){
                                continue;
                            }
                            Date date = new Date();
                            log.info(date+"满取任务下发:小车工作档:"+wrkMastSta);
                            log.info(date+"满取任务下发:目标站状态:"+basDevp);
                            sign = rgvTakeEmptyFull(rgvProtocol.getRgvNo(),wrkMastSta);
                        }else {
                            continue;
src/main/java/com/zy/asrs/utils/RouteUtils.java
@@ -32,7 +32,7 @@
    }};
    public static final List<Integer> MERGE_STA_NO_SIX = new ArrayList<Integer>() {{
        add(108);add(119);add(110);add(120);
    }};
    public static final List<Integer> MERGE_STA_NO_SEVEN = new ArrayList<Integer>() {{
@@ -44,7 +44,7 @@
    }};
    public static final List<Integer> MERGE_STA_NO_NINE = new ArrayList<Integer>() {{
//        add(108);add(119);add(110);add(120);
    }};
//    正序
@@ -69,30 +69,82 @@
            return msgBuilder.toString();
        }
    }
//    /*
//     * 获取干涉最远站点
//     * */
//    public static Integer RouteIndexFarMas(int rgvNo,Integer staNo){
//        List<Integer> staFall = new ArrayList<>();
//        if (MERGE_STA_NO_SIX.contains(staNo)){
//            staFall = MERGE_STA_NO_SIX;
//        }else if (MERGE_STA_NO_One.contains(staNo)){
//            staFall = MERGE_STA_NO_One;
//        }else if (MERGE_STA_NO_TWO.contains(staNo)){
//            staFall = MERGE_STA_NO_TWO;
//        }else if (MERGE_STA_NO_THREE.contains(staNo)){
//            staFall = MERGE_STA_NO_THREE;
//        }else if (MERGE_STA_NO_FOUR.contains(staNo)){
//            staFall = MERGE_STA_NO_FOUR;
//        }else if (MERGE_STA_NO_FIVE.contains(staNo)){
//            staFall = MERGE_STA_NO_FIVE;
//        }else {
//            return staNo;
//        }
//
//        int indexNo = 0;
//        if (rgvNo==1){
//            indexNo=staFall.size()-1;
//        }
//        return staFall.get(indexNo);
//    }
    /*
     * 获取干涉最远站点
     * */
    public static Integer RouteIndexFarMas(int rgvNo,Integer staNo){
        List<Integer> staFall = new ArrayList<>();
        if (MERGE_STA_NO_One.contains(staNo)){
            staFall = MERGE_STA_NO_One;
        }else if (MERGE_STA_NO_TWO.contains(staNo)){
            staFall = MERGE_STA_NO_TWO;
        }else if (MERGE_STA_NO_THREE.contains(staNo)){
            staFall = MERGE_STA_NO_THREE;
        }else if (MERGE_STA_NO_FOUR.contains(staNo)){
            staFall = MERGE_STA_NO_FOUR;
        }else if (MERGE_STA_NO_FIVE.contains(staNo)){
            staFall = MERGE_STA_NO_FIVE;
        }else {
            return staNo;
        }
        int indexNo = 0;
        if (rgvNo==1){
            indexNo=staFall.size()-1;
            switch (staNo){
                case 101:
                case 102: return  102;
                case 104:
                case 122: return  118;
                case 105: return  119;
                case 107:
                case 118: return  120;
                case 108:
                case 119: return  111;
                case 110:
                case 120: return  113;
                case 111:
                case 121: return  113;
                case 113: return  114;
                case 123:
                case 114: return  1142;
                default:
                    return 116;
        }
        return staFall.get(indexNo);
        }else {
            switch (staNo){
                case 117:
                case 116: return  123;
                case 1142:
                case 114: return  113;
                case 123:
                case 113: return  111;
                case 121:
                case 111: return  108;
                case 120:
                case 110: return 107;
                case 119:
                case 108: return  107;
                case 118:
                case 107: return  105;
                case 105:
                case 122:
                case 104: return  104;
                default:
                    return 102;
            }
        }
    }
src/main/resources/mapper/WrkMastMapper.xml
@@ -115,7 +115,7 @@
    </select>
    <select id="selectPakInStep5" resultMap="BaseResultMap">
        select top 1 * from dbo.asr_wrk_mast where sta_no=#{staNo} and wrk_sts = 14 and io_type>100 and sheet_no!=#{sheetNo}
        select top 1 * from dbo.asr_wrk_mast where sta_no=#{staNo} and wrk_sts = 14 and io_type>100 and sheet_no!=#{sheetNo} and sheet_no!= '0'
    </select>
    <select id="selectPickStep" resultMap="BaseResultMap">