cpT
7 天以前 acb4d07da40454517a3b211d6dc92ac5bd4a65d3
#改造
3个文件已修改
111 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/model/RgvSlave.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application-prod.yml 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -979,8 +979,11 @@
                    }
                    // 判断堆垛机出库站状态
                    if (staProtocol.isAutoing() && !staProtocol.isLoading() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y")
                            && staProtocol.getWorkNo() == 0 && staProtocol.isOutEnable()) {
                    if (staProtocol.isAutoing() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y")) {
//                    // 判断堆垛机出库站状态
//                    if (staProtocol.isAutoing() && !staProtocol.isLoading() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y")
//                            && staProtocol.getWorkNo() == 0 && staProtocol.isOutEnable()) {
                        // 命令下发区 --------------------------------------------------------------------------
                        // 堆垛机控制过滤
@@ -1568,9 +1571,15 @@
        }
        if (rgvProtocolOther.statusEnable) {
            BasDevpPosition basDevpPosition = basDevpPositionService.selectOne(new EntityWrapper<BasDevpPosition>().eq("DEV_NO", staNo));
            if (Math.abs(basDevpPosition.getPlcPosition()-rgvProtocol.getRgvPos())
            long abs = Math.abs(Math.abs(basDevpPosition.getPlcPosition() - rgvProtocol.getRgvPos())
                    -
                    Math.abs(basDevpPosition.getPlcPosition() - rgvProtocolOther.getRgvPos()));
            if (abs<100){
                return true;
            }
            if (Math.abs(basDevpPosition.getPlcPosition() - rgvProtocol.getRgvPos())
                    >=
                    Math.abs(basDevpPosition.getPlcPosition()-rgvProtocolOther.getRgvPos())){
                    Math.abs(basDevpPosition.getPlcPosition() - rgvProtocolOther.getRgvPos())){
                return false;
            }
        }
@@ -1594,6 +1603,12 @@
        }
        if (rgvProtocolOther.statusEnable) {
            BasDevpPosition basDevpPosition = basDevpPositionService.selectOne(new EntityWrapper<BasDevpPosition>().eq("DEV_NO", staNo));
            long abs = Math.abs(Math.abs(basDevpPosition.getPlcPosition() - rgvProtocol.getRgvPos())
                    -
                    Math.abs(basDevpPosition.getPlcPosition() - rgvProtocolOther.getRgvPos()));
            if (abs<100){
                return true;
            }
            if (Math.abs(basDevpPosition.getPlcPosition()-rgvProtocol.getRgvPos())
                    >=
                    Math.abs(basDevpPosition.getPlcPosition()-rgvProtocolOther.getRgvPos())){
@@ -1618,7 +1633,6 @@
            TaskWrk taskWrk = taskWrkService.selectByWrkNo(staProtocol.getWorkNo());
            if (taskWrk != null) {
                Integer stano = staProtocol.getStaNo();
                if (staProtocol.getSiteId() == 1004 || staProtocol.getSiteId()==1020){
                    // 尺寸检测异常
@@ -1682,6 +1696,21 @@
                    }
                }
                return taskWrk;
            }
        } else if (staProtocol.isAutoing() && staProtocol.getWorkNo() == 0 && !staProtocol.isLoading()){
            if (inSta.isDirectionOther()){
                StaProtocol staProtocolOther = devpThread.getStation().get(inSta.getStaNoOther());
                if (staProtocolOther == null) {
                    return null;
                }
                // 判断是否满足取货条件
                if (staProtocolOther.isAutoing()
                        && staProtocolOther.getWorkNo() != 0) {
                    TaskWrk taskWrkOther = taskWrkService.selectByWrkNo(staProtocolOther.getWorkNo());
                    if (taskWrkOther != null) {
                        return taskWrkOther;
                    }
                }
            }
        }
        return null;
@@ -1828,7 +1857,6 @@
                            if (rgvOtherIDLEOther2(rgvSlave)){
                                if (!rgvOtherIDLE2(rgvSlave,staList.get(0))){
                                    System.out.println("运行就近跳过==="+rgvSlave.getId()+"===");
                                    sign=true;
                                }
                            }
src/main/java/com/zy/core/model/RgvSlave.java
@@ -45,6 +45,12 @@
        // RGV站点编号
        private boolean direction;
        // RGV站点编号
        private Integer staNoOther;
        // RGV站点编号
        private boolean directionOther;
//        // 排
//        private Integer row;
//
src/main/resources/application-prod.yml
@@ -101,76 +101,109 @@
    rgvInSta[0]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 1004
      #执行方向(面朝轨道 定位值左小右大)  true:左   false:右
      direction: true
      staNoOther: 1005
      directionOther: false
    rgvInSta[1]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 1014
      #执行方向(面朝轨道 定位值左小右大)  true:左   false:右
      direction: true
      staNoOther: 1016
      directionOther: true
    rgvInSta[2]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 1020
      #执行方向(面朝轨道 定位值左小右大)  true:左   false:右
      direction: true
      staNoOther: 1021
      directionOther: false
    rgvInSta[3]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 1003
      #执行方向(面朝轨道 定位值左小右大)  true:左   false:右
      direction: false
      staNoOther: 1003
      directionOther: false
    rgvInSta[4]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 1007
      #执行方向(面朝轨道 定位值左小右大)  true:左   false:右
      direction: false
      staNoOther: 1007
      directionOther: false
    rgvInSta[5]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 1013
      #执行方向(面朝轨道 定位值左小右大)  true:左   false:右
      direction: false
      staNoOther: 1013
      directionOther: false
    rgvInSta[6]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 1018
      #执行方向(面朝轨道 定位值左小右大)  true:左   false:右
      direction: false
      staNoOther: 1018
      directionOther: false
    rgvInSta[7]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 1019
      #执行方向(面朝轨道 定位值左小右大)  true:左   false:右
      direction: false
      staNoOther: 1019
      directionOther: false
    #RGV目标站点
    rgvOutSta[0]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 1002
      direction: true
      staNoOther: 1002
      directionOther: false
    rgvOutSta[1]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 1009
      #执行方向(面朝轨道 定位值左小右大)  true:左   false:右
      direction: true
      staNoOther: 1009
      directionOther: false
    rgvOutSta[2]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 1001
      direction: false
      staNoOther: 1001
      directionOther: false
    rgvOutSta[3]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 1006
      direction: false
      staNoOther: 1006
      directionOther: false
    rgvOutSta[4]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 1008
      direction: false
      staNoOther: 1008
      directionOther: false
    rgvOutSta[5]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 1017
      direction: false
      staNoOther: 1017
      directionOther: false
    rgvSuperSta[0]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 1001
      direction: false
      staNoOther: 1001
      directionOther: false
    rgvSuperSta[1]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 1002
      direction: false
      staNoOther: 1002
      directionOther: false
  # RGV穿梭车2
  rgv[0]:
    id: 1
@@ -186,75 +219,107 @@
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 1004
      direction: true
      staNoOther: 1005
      directionOther: false
    rgvInSta[1]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 1014
      #执行方向(面朝轨道 定位值左小右大)  true:左   false:右
      direction: true
      staNoOther: 1016
      directionOther: true
    rgvInSta[2]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 1020
      #执行方向(面朝轨道 定位值左小右大)  true:左   false:右
      direction: true
      staNoOther: 1021
      directionOther: false
    rgvInSta[3]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 1003
      #执行方向(面朝轨道 定位值左小右大)  true:左   false:右
      direction: false
      staNoOther: 1003
      directionOther: false
    rgvInSta[4]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 1007
      #执行方向(面朝轨道 定位值左小右大)  true:左   false:右
      direction: false
      staNoOther: 1007
      directionOther: false
    rgvInSta[5]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 1013
      #执行方向(面朝轨道 定位值左小右大)  true:左   false:右
      direction: false
      staNoOther: 1013
      directionOther: false
    rgvInSta[6]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 1018
      #执行方向(面朝轨道 定位值左小右大)  true:左   false:右
      direction: false
      staNoOther: 1018
      directionOther: false
    rgvInSta[7]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 1019
      #执行方向(面朝轨道 定位值左小右大)  true:左   false:右
      direction: false
      staNoOther: 1019
      directionOther: false
    #RGV目标站点
    rgvOutSta[0]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 1023
      direction: true
      staNoOther: 1023
      directionOther: false
    rgvOutSta[1]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 1009
      #执行方向(面朝轨道 定位值左小右大)  true:左   false:右
      direction: true
      staNoOther: 1009
      directionOther: false
    rgvOutSta[2]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 1022
      direction: false
      staNoOther: 1022
      directionOther: false
    rgvOutSta[3]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 1006
      direction: false
      staNoOther: 1006
      directionOther: false
    rgvOutSta[4]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 1008
      direction: false
      staNoOther: 1008
      directionOther: false
    rgvOutSta[5]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 1017
      direction: false
      staNoOther: 1017
      directionOther: false
    rgvSuperSta[0]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 1023
      direction: false
      staNoOther: 1023
      directionOther: false
    rgvSuperSta[1]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 1022
      direction: false
      staNoOther: 1022
      directionOther: false
  barcode[0]: #条码扫描仪1004
    port: 51236