#
野心家
2023-07-13 ab246a3f1e94056d57df505b5cc56a08fe6be24e
#
7个文件已修改
124 ■■■■ 已修改文件
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/utils/Utils.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/model/LocTypeDto.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/enums/CrnStatusType.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/thread/SiemensDevpThread.java 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application.yml 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/console.map.js 52 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -706,6 +706,7 @@
                News.error(""+mark+" - 1"+" - 2"+" - 入库 ===>> 堆垛机站点在数据库不存在, 站点编号={}", crnStn.getStaNo());
                continue;
            }
            if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.getWorkNo() > 0 && staProtocol.isInEnable()
                    && staDetl.getCanining() != null && staDetl.getCanining().equals("Y")) {
                flag = true;
@@ -1372,7 +1373,6 @@
                if (!staProtocol.isLoading()){
                    continue;
                }
                // 站点条件判断
                if (staProtocol.isAutoing()
                        && staProtocol.isInEnable()
@@ -1423,8 +1423,8 @@
//                                ledThread.errorReset();
                            }
                        } else {
                            staProtocol.setWorkNo((short)9999);
                            staProtocol.setStaNo(emptyInSta.getBackSta().shortValue());
                            staProtocol.setWorkNo((short)9991);
                            staProtocol.setStaNo((short)100);
                            devpThread.setPakMk(staProtocol.getSiteId(), false);
                            boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
                            if (!result) {
src/main/java/com/zy/asrs/utils/Utils.java
@@ -89,10 +89,8 @@
        int row = getRow(deepLoc);
        int remainder = (int) Arith.remainder(row, slaveProperties.getGroupCount());
        int shallowRow = remainder == 1 ? (row + 1) : (row - 1);
        if(row==9 ||  row==15 ){
        if(row==3){
            shallowRow = row + 1;
        }else if(row==12 ||  row==18 ){
            shallowRow = row - 1;
        }else {
            return null;
        }
src/main/java/com/zy/common/model/LocTypeDto.java
@@ -35,11 +35,11 @@
        if (staProtocol.isLow()) {
            this.locType1 = 1; // 低库位
        } else if (staProtocol.isHigh()){
            this.locType1 = 2; // 高库位
            this.locType1 = 2; // 中库位
        } else if (staProtocol.isMedium()) {
            this.locType1 = 3;
            this.locType1 = 3; // 中高库位
        } else if (staProtocol.isMedium_high()) {
            this.locType1 = 4;
            this.locType1 = 4; // 高库位
        }
src/main/java/com/zy/core/enums/CrnStatusType.java
@@ -13,7 +13,7 @@
    ORIGIN_GO(7, "回原点"),
    ORIGIN_BACK(8, "回反原点"),
    MOVING(9, "走行中"),
    WAITING(90, "任务完成等待WCS确认"),
    WAITING(10, "任务完成等待WCS确认"),
    PAUSE(11, "任务暂停"),
    SOS(99, "报警"),
    UNKNOW(100, "其他"),
src/main/java/com/zy/core/thread/SiemensDevpThread.java
@@ -47,10 +47,10 @@
//
//    }};
    public static final ArrayList<Integer> staNos1 = new ArrayList<Integer>() {{
        add(1);add(2);add(3);add(4);
        add(5);add(6);add(7);add(8);
        add(9);add(10);add(11);add(12);
        add(13);
        add(100);add(101);add(102);add(103);
        add(104);add(105);add(106);add(107);
        add(108);add(109);add(110);add(111);
        add(1000);
    }};
@@ -61,7 +61,7 @@
    /**
     * 条码数量
     */
    private int barcodeSize = 6;
    private int barcodeSize = 1;
    /**
     * 入出库模式
@@ -212,7 +212,7 @@
//        }
        //条码扫描器
        Thread.sleep(200);
        OperateResultExOne<byte[]> result2 = siemensS7Net.Read("DB100.200",(short)(8));
        OperateResultExOne<byte[]> result2 = siemensS7Net.Read("DB101.33",(short)(8));
        if (result2.IsSuccess) {
            if (slave.getId()==1){
                    String barcode = siemensS7Net.getByteTransform().TransString(result2.Content,0,8, "UTF-8");
@@ -227,7 +227,7 @@
        }
        Thread.sleep(200);
        OperateResultExOne<byte[]> result1 = siemensS7Net.Read("DB102.100", (short) (staNoSize * 2));
        OperateResultExOne<byte[]> result1 = siemensS7Net.Read("DB101.0", (short) (staNoSize * 2));
        if (result1.IsSuccess) {
            for (int i = 0; i < staNoSize; i++) {
                Integer siteId = staNos.get(i); // 站点编号
@@ -296,9 +296,9 @@
        //RGV台车位置
        Thread.sleep(200);
        OperateResultExOne<byte[]> result3 = siemensS7Net.Read("DB100.1",(short)2);
        OperateResultExOne<byte[]> result3 = siemensS7Net.Read("DB100.160",(short)2);
        if (result3.IsSuccess) {
                Integer siteId = 13; // 站点编号
                Integer siteId = 1000; // 站点编号
                StaProtocol staProtocol = station.get(siteId);
                if (null == staProtocol) {
                    staProtocol = new StaProtocol();
@@ -376,13 +376,13 @@
        //任务下发次数
        int writeCount = 0;
        do {
            write = siemensS7Net.Write("DB100." + index*2, staProtocol.getWorkNo());    // 工作号
            write = siemensS7Net.Write("DB100." + index*4, staProtocol.getWorkNo());    // 工作号
            Thread.sleep(500);
            write1 = siemensS7Net.Write("DB101." + index*2, staProtocol.getStaNo());    // 目标站
            write1 = siemensS7Net.Write("DB100." + (index*4+2), staProtocol.getStaNo());    // 目标站
            if(write.IsSuccess || write1.IsSuccess){
                Thread.sleep(200);
                OperateResultExOne<byte[]> readResult = siemensS7Net.Read("DB100." + index*2, (short) 2);
                OperateResultExOne<byte[]> readResult1 = siemensS7Net.Read("DB101." + index*2, (short) 2);
                OperateResultExOne<byte[]> readResult = siemensS7Net.Read("DB100." + index*4, (short) 2);
                OperateResultExOne<byte[]> readResult1 = siemensS7Net.Read("DB100." + (index*4+2), (short) 2);
                if(readResult.IsSuccess && readResult1.IsSuccess){
                    short workNo = siemensS7Net.getByteTransform().TransInt16(readResult.Content, 0);
                    short staNo = siemensS7Net.getByteTransform().TransInt16(readResult1.Content, 0);
src/main/resources/application.yml
@@ -8,7 +8,7 @@
    name: @pom.build.finalName@
  datasource:
    driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
    url: jdbc:sqlserver://192.168.4.13:1433;databasename=jxfyasrs
    url: jdbc:sqlserver://127.0.0.1:1433;databasename=jxfyasrs
    username: sa
    password: sa@123
  mvc:
@@ -34,7 +34,7 @@
  enable: false
wms:
  url: 192.168.4.121:8081/fywms
  url: 127.0.0.1:8081/fywms
# 下位机配置
wcs-slave:
@@ -47,7 +47,7 @@
  # 堆垛机1
  crn[0]:
    id: 1
    ip: 10.10.10.2
    ip: 10.10.10.100
    port: 102
    rack: 0
    slot: 0
@@ -57,21 +57,21 @@
    # 堆垛机入库站点
    crnInStn[0]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 10
      staNo: 111
      row: 1
      bay: 1
      lev: 1
    # 堆垛机出库站点
    crnOutStn[0]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 007
      staNo: 109
      row: 2
      bay: 1
      lev: 1
  # 堆垛机2
  crn[1]:
    id: 2
    ip: 10.10.10.3
    ip: 10.10.10.110
    port: 102
    rack: 0
    slot: 0
@@ -81,45 +81,45 @@
    # 堆垛机入库站点
    crnInStn[0]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 6
      staNo: 107
      row: 4
      bay: 1
      lev: 1
    # 堆垛机出库站点
    crnOutStn[0]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 3
      staNo: 102
      row: 5
      bay: 1
      bay: 2
      lev: 1
  # 输送线1
  devp[0]:
    id: 1
    ip: 192.168.4.250
    ip: 10.10.10.120
    port: 102
    rack: 0
    slot: 0
    # 入库口1
    inSta[0]:
      staNo: 2
      staNo: 101
      barcode: ${wcs-slave.barcode[0].id}
      backSta: 1
      led: ${wcs-slave.led[0].id}
    # 空板入库口1
    emptyInSta[0]:
      staNo: 2
      staNo: 101
      barcode: ${wcs-slave.barcode[0].id}
      backSta: 1
      led: ${wcs-slave.led[0].id}
    # 拣料入库口1
    pickSta[0]:
      staNo: 2
      staNo: 101
      barcode: ${wcs-slave.barcode[0].id}
      led: ${wcs-slave.led[0].id}
    # 出库口1
    outSta[0]:
      staNo: 12
      staNo: 105
      led: ${wcs-slave.led[1].id}
  # 条码扫描仪1
src/main/webapp/static/js/console.map.js
@@ -137,8 +137,8 @@
                    "stns": [
                        {
                            "type": "stn",
                            "id": "site-001",
                            "text": "001",
                            "id": "site-100",
                            "text": "100",
                            "top": 415,
                            "left": 402,
                            "width": 60,
@@ -146,8 +146,8 @@
                        },
                        {
                            "type": "stn",
                            "id": "site-012",
                            "text": "012",
                            "id": "site-105",
                            "text": "105",
                            "top": 415,
                            "left": 341,
                            "width": 60,
@@ -155,8 +155,8 @@
                        },
                        {
                            "type": "stn",
                            "id": "site-013",
                            "text": "013",
                            "id": "site-1000",
                            "text": "1000",
                            "top": 330,
                            "left": 279,
                            "width": 60,
@@ -182,8 +182,8 @@
                        },
                        {
                            "type": "stn",
                            "id": "site-003",
                            "text": "003",
                            "id": "site-102",
                            "text": "102",
                            "top": 363,
                            "left": 402,
                            "width": 60,
@@ -191,8 +191,8 @@
                        },
                        {
                            "type": "stn",
                            "id": "site-004",
                            "text": "004",
                            "id": "site-103",
                            "text": "103",
                            "top": 363,
                            "left": 341,
                            "width": 60,
@@ -200,8 +200,8 @@
                        },
                        {
                            "type": "stn",
                            "id": "site-006",
                            "text": "006",
                            "id": "site-107",
                            "text": "107",
                            "top": 305,
                            "left": 402,
                            "width": 60,
@@ -209,8 +209,8 @@
                        },
                        {
                            "type": "stn",
                            "id": "site-005",
                            "text": "005",
                            "id": "site-106",
                            "text": "106",
                            "top": 305,
                            "left": 341,
                            "width": 60,
@@ -218,8 +218,8 @@
                        },
                        {
                            "type": "stn",
                            "id": "site-007",
                            "text": "007",
                            "id": "site-109",
                            "text": "109",
                            "top": 226,
                            "left": 402,
                            "width": 60,
@@ -227,8 +227,8 @@
                        },
                        {
                            "type": "stn",
                            "id": "site-008",
                            "text": "008",
                            "id": "site-108",
                            "text": "108",
                            "top": 226,
                            "left": 341,
                            "width": 60,
@@ -236,8 +236,8 @@
                        },
                        {
                            "type": "stn",
                            "id": "site-010",
                            "text": "010",
                            "id": "site-111",
                            "text": "111",
                            "top": 168,
                            "left": 402,
                            "width": 60,
@@ -245,8 +245,8 @@
                        },
                        {
                            "type": "stn",
                            "id": "site-011",
                            "text": "011",
                            "id": "site-104",
                            "text": "104",
                            "top": 389,
                            "left": 341,
                            "width": 60,
@@ -254,8 +254,8 @@
                        },
                        {
                            "type": "stn",
                            "id": "site-002",
                            "text": "002",
                            "id": "site-101",
                            "text": "101",
                            "top": 389,
                            "left": 402,
                            "width": 60,
@@ -263,8 +263,8 @@
                        },
                        {
                            "type": "stn",
                            "id": "site-009",
                            "text": "009",
                            "id": "site-110",
                            "text": "110",
                            "top": 168,
                            "left": 341,
                            "width": 60,