自动化立体仓库 - WCS系统
#
whycq
2023-05-11 7d792a89d6ff605f1a33316731b1486239317aa3
#
7个文件已修改
76 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/SiteController.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/BasDevp.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/model/protocol/StaProtocol.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/thread/SiemensDevpThread.java 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application.yml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/console.js 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/console.map.js 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/SiteController.java
@@ -85,7 +85,8 @@
            vo.setPakMk(staProtocol.isPakMk()?"Y":"N");       // 入库标记
            vo.setEmptyMk(staProtocol.isEmptyMk()?"Y":"N");     // 空板信号
            vo.setStaNo(staProtocol.getStaNo());                // 目标站
            vo.setLocType1(staProtocol.isHigh() != staProtocol.isLow() && staProtocol.isLow() ? "小" : "大");     //高低库位
//            vo.setLocType1(staProtocol.isHigh() != staProtocol.isLow() && staProtocol.isLow() ? "小" : "大");     //高低库位
            vo.setLocType1(devp.getLocType1$());
//            vo.setLocType1(devp.getDevNo()==102 ? "高" : "低");
        }
        return R.ok().add(list);
src/main/java/com/zy/asrs/entity/BasDevp.java
@@ -228,9 +228,13 @@
            case 0:
                return "未知";
            case 1:
                return "低库位";
                return "较低库位";
            case 2:
                return "低库位";
            case 3:
                return "高库位";
            case 4:
                return "特高库位";
            default:
                return String.valueOf(this.locType1);
        }
src/main/java/com/zy/core/model/protocol/StaProtocol.java
@@ -76,6 +76,7 @@
        basDevp.setLocType2((short) 0);  // 宽窄类型{0:未知,1:窄库位,2:宽库位}
        basDevp.setLocType3((short) 0);  // 轻重类型{0:未知,1:轻库位,2:重库位}
        basDevp.setLocType1(high != low && low ? (short) 1 : (short) 2);
//        basDevp.
        basDevp.setInQty(inQty !=null ?(int)inQty : 0);
        return basDevp;
    }
src/main/java/com/zy/core/thread/SiemensDevpThread.java
@@ -143,9 +143,9 @@
                    staProtocol.setSiteId(siteId);
                    station.put(siteId, staProtocol);
                }
                staProtocol.setWorkNo(siemensS7Net.getByteTransform().TransInt16(result.Content, i*2));     // 工作号
                staProtocol.setWorkNo(siemensS7Net.getByteTransform().TransInt16(result.Content, i*4));     // 工作号
                staProtocol.setStaNo(siemensS7Net.getByteTransform().TransInt16(result.Content, i*2 + 2 ));   // 目标站
                staProtocol.setStaNo(siemensS7Net.getByteTransform().TransInt16(result.Content, i*4 + 2 ));   // 目标站
            }
        }
        Thread.sleep(200);
@@ -176,10 +176,10 @@
                staProtocol.setOutEnable(status[3]);// 可出
                staProtocol.setEmptyMk(status[4]);  // 空板信号
                staProtocol.setFullPlt(status[5]);  // 满托盘
                staProtocol.setHigh(status[6]);
                staProtocol.setHigh1(status[7]);
                staProtocol.setLow(status[8]);
                staProtocol.setLow1(status[9]);
                staProtocol.setLow(status[6]);   // 低 -- 高
                staProtocol.setLow1(status[7]);
                staProtocol.setHigh(status[8]);
                staProtocol.setHigh1(status[9]);
                if (!staProtocol.isPakMk() && !staProtocol.isLoading()) {
                    staProtocol.setPakMk(true);
@@ -188,10 +188,10 @@
        }
//        条码扫描器
        if(slave.getId() == 2) {
        if(slave.getId() == 1) {
            Thread.sleep(200);
            OperateResultExOne<byte[]> result2 = null;
            result2 = siemensS7Net.Read("DB100.200", (short) (barcodeSize * 8));
            result2 = siemensS7Net.Read("DB100.150", (short) (barcodeSize * 8));
            if (result2.IsSuccess) {
                for (int i = 0; i < barcodeSize; i++) {
                    String barcode = siemensS7Net.getByteTransform().TransString(result2.Content, i * 8, 8, "UTF-8");
@@ -259,11 +259,11 @@
        short[] array = new short[2];
        array[0] = staProtocol.getWorkNo();
        array[1] = staProtocol.getStaNo();
//        OperateResult write = siemensS7Net.Write("DB100." + index*4, array);
        OperateResult write = siemensS7Net.Write("DB100." + index*4, array);
        OperateResult write = siemensS7Net.Write("DB100." + index*2, staProtocol.getWorkNo());    // 工作号
        Thread.sleep(300);
        OperateResult write1 = siemensS7Net.Write("DB100." + index*2, staProtocol.getStaNo());    // 目标站
//        OperateResult write = siemensS7Net.Write("DB100." + index*2, staProtocol.getWorkNo());    // 工作号
//        Thread.sleep(300);
//        OperateResult write1 = siemensS7Net.Write("DB100." + index*2, staProtocol.getStaNo());    // 目标站
        if (!write.IsSuccess) {
            staProtocol = station.get(staProtocol.getSiteId());
src/main/resources/application.yml
@@ -129,12 +129,12 @@
  # 条码扫描仪1 左下 1楼开始,111
  barcode[0]:
    id: 1
    ip: 10.10.10.100
    ip: 10.10.10.3
    port: 51236
  # 条码扫描仪2, 114
  barcode[1]:
    id: 2
    ip: 10.10.10.101
    ip: 10.10.10.4
    port: 51236
  # LED1
  led[0]:
src/main/webapp/static/js/console.js
@@ -62,11 +62,29 @@
                }
            }
        }
        bayWidth = rackss[i].width / bLen
        bayWidth = (rackss[i].width / bLen)-4
        // hpPosition 0 表示货架序号 左->右 1 表示货架序号 左<-右
        if (mapInfo.hpPosition == 1) {
            bNum = maxBayNo
            for (let j = bLen; j > 0; j--) {
                if (i === 0) {
                    if (j === 13) {
                        bay = "<button class='item' style='width: " + 160 + "px'>" + bNum + "</button>"
                        bays = bays + bay
                        bNum = bNum - interval;
                        continue
                    }
                    bay = "<button class='item' style='width: "+ bayWidth +"px'>" + bNum + "</button>"
                    bays = bays + bay
                    bNum = bNum - interval;
                    continue
                }
                if (j === 13) {
                    bay = "<button class='item' style='margin-left: 160px;width: "+ bayWidth +"px'>" + (bNum - 2) + "</button>"
                    bays = bays + bay
                    bNum = bNum - interval - 2;
                    continue
                }
                bay = "<button class='item' style='width: "+ bayWidth +"px'>" + bNum + "</button>"
                bays = bays + bay
                bNum = bNum - interval;
src/main/webapp/static/js/console.map.js
@@ -3,7 +3,7 @@
    "rackCount": 18,
    "crnCount": 7,
    "stbCount": 77,
    "hpPosition": 0,
    "hpPosition": 1,
    "minBayNo": 2,
    "floors": 1,
    "racks": [
@@ -34,7 +34,7 @@
            "id": "lb_desc1",
            "text": "#1",
            "top": 324,
            "left": 1794,
            "left": 1812,
            "width": 30,
            "height": 23
        },
@@ -43,7 +43,7 @@
            "id": "lb_desc2",
            "text": "#2",
            "top": 388,
            "left": 1794,
            "left": 1812,
            "width": 30,
            "height": 23
        },
@@ -93,7 +93,7 @@
                            "id": "site-105",
                            "text": "105",
                            "top": 386,
                            "left": 1067,
                            "left": 1007,
                            "width": 78,
                            "height": 24
                        },
@@ -102,7 +102,7 @@
                            "id": "site-102",
                            "text": "102",
                            "top": 386,
                            "left": 1147,
                            "left": 1087,
                            "width": 78,
                            "height": 24
                        },
@@ -111,7 +111,7 @@
                            "id": "site-104",
                            "text": "104",
                            "top": 412,
                            "left": 1067,
                            "left": 1007,
                            "width": 78,
                            "height": 24
                        },
@@ -120,7 +120,7 @@
                            "id": "site-101",
                            "text": "101",
                            "top": 412,
                            "left": 1147,
                            "left": 1087,
                            "width": 78,
                            "height": 24
                        },
@@ -129,7 +129,7 @@
                            "id": "site-103",
                            "text": "103",
                            "top": 438,
                            "left": 1067,
                            "left": 1007,
                            "width": 78,
                            "height": 24
                        },
@@ -138,7 +138,7 @@
                            "id": "site-100",
                            "text": "100",
                            "top": 438,
                            "left": 1147,
                            "left": 1087,
                            "width": 78,
                            "height": 24
                        },