自动化立体仓库 - WCS系统
#
zjj
2025-03-07 1e6a8c2695f6ac1e58bc46eb08ef1b8c7c03259b
#
7个文件已修改
780 ■■■■■ 已修改文件
pom.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/MainProcess.java 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/thread/SiemensCrnThread.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/thread/SiemensDevpThread.java 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application.yml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/common.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/console.map.js 668 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pom.xml
@@ -185,7 +185,7 @@
    </dependencies>
    <build>
        <finalName>ykwcs</finalName>
        <finalName>fyxccrnwcs</finalName>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
src/main/java/com/zy/core/MainProcess.java
@@ -81,60 +81,6 @@
                    mainService.outOfDevp(11);
                    if (i>10){
                        //空托盘自动出库
                        mainService.autoEmptyOut();
                        //空托盘自动入库
                        mainService.autoEmptyIn();
                        i=0;
                    }
                    i++;
                    // 其他  ===>> 入出库模式切换
//                    i++;
//                    if (i > 1) {
//                        mainService.ioConvert();
//                        i = 0;
//                    }
                    /////////////////////////////////////RGV调度/////////////////////////////////////
//
                    //完成小车任务
//                    mainService.rgvCompleteWrkMastSta();
//                    //执行小车空板搬运任务
//                    mainService.rgvRunWrkMastEmptyStaPut();//放
//                    mainService.rgvRunWrkMastEmptyStaTake();//取
//                    if (rgcWrk){
//                        //执行小车货物搬运任务
//                        mainService.rgvRunWrkMastFullSta();
//                        rgcWrk = false;
//                    }else {
//                        mainService.rgvRunWrkMastEmptyStaAvoidance();//避让
//                        rgcWrk = true;
//                    }
                    /////////////////////////////////////RGV调度/////////////////////////////////////
                    /////////////////////////////////////RGV调度/////////////////////////////////////
                    k++;
                    // RGV  ===>>  小车任务作业下发
                    try{
                        boolean rgvIoExecuteSign = mainService.rgvRunWrkMastFullSta();
                        if (rgvIoExecuteSign){
                            k = 0;
                        } else if (k>4){
                            k = 0;
                            mainService.rgvRunWrkMastEmptyStaAvoidance();//避让
                        }
                    }catch (Exception e){
                        log.error("RGV  ===>>  小车任务作业下发异常"+e);
                    }
                    //完成小车任务
                    mainService.rgvCompleteWrkMastSta();
                    /////////////////////////////////////RGV调度/////////////////////////////////////
                } catch (Exception e) {
                    e.printStackTrace();
                }
src/main/java/com/zy/core/thread/SiemensCrnThread.java
@@ -285,10 +285,8 @@
        array[9] = command.getCommand();
//        array[10] = 0;   //备用1
        boolean[] array2 = new boolean[1];
        array2[0] = command.isTraySize();
        OperateResult result = siemensNet.Write("DB100.0", array);
        OperateResult result2 = siemensNet.Write("DB100.22", array2);
        News.info("堆垛机命令下发[id:{}] >>>>> {}", slave.getId(), array);
        //堆垛机任务写入后,回读一次,看是否成功
@@ -297,11 +295,10 @@
        do {
            try{
                if(!result.IsSuccess || !result2.IsSuccess){
                if(!result.IsSuccess ){
                    News.error("写入堆垛机plc数据失败,重新下发任务  写入直接失败 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSON(command),writeCount1);
//                    MessageQueue.offer(SlaveType.Crn, slave.getId(), new Task(2, command));
                    result = siemensNet.Write("DB100.0", array);
                    result2 = siemensNet.Write("DB100.22", array2);
                    Thread.sleep(100);
                    writeCount1++;
                    continue;
@@ -344,7 +341,6 @@
//                            MessageQueue.offer(SlaveType.Crn, slave.getId(), new Task(2, command));
                        News.error("写入堆垛机plc数据失败,重新下发任务  回读不一致 ===>> [id:{}],{},[写入次数:{}]", slave.getId(), JSON.toJSON(command),writeCount1);
                        result = siemensNet.Write("DB100.0", array);
                        result2 = siemensNet.Write("DB100.22", array2);
                        writeCount1++;
                        continue;
src/main/java/com/zy/core/thread/SiemensDevpThread.java
@@ -51,34 +51,17 @@
//
//    }};
    public static final ArrayList<Integer> staNos1 = new ArrayList<Integer>() {{
        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(112);add(113);add(114);add(115);
        add(116);add(117);add(118);add(119);
        add(120);add(121);add(122);add(123);
        add(124);add(125);add(126);add(127);
        add(128);add(129);add(130);add(131);
        add(132);add(133);add(134);add(135);
        add(136);add(137);add(138);add(139);
        add(140);add(141);add(142);add(143);
        add(144);add(145);add(146);add(147);
        add(148);add(149);add(150);add(151);
        add(152);add(153);add(154);add(155);
        add(156);add(157);add(158);add(159);
        add(160);add(161);
        add(1);
//        add(200);add(201);add(202);
        add(1111);add(1112);add(1113);add(1114);
        add(1121);add(1122);add(1123);add(1124);
        add(1131);add(1132);add(1133);add(1134);add(1135);
    }};
    public static final ArrayList<Integer> BarcodeList = new ArrayList<Integer>() {{
        add(0); add(1); add(2);
        add(1112); add(1122);
    }};
    public static final ArrayList<Integer> BarcodeListMat = new ArrayList<Integer>() {{
        add(3); add(4);
    }};
    public static final ArrayList<Integer> staNosErrList = new ArrayList<Integer>() {{
        add(106); add(107); add(159);
        add(1112); add(1122);
    }};
    private Integer count=0;
@@ -296,19 +279,6 @@
            for (int i = 0; i < barcodeList.size(); i++) {
                Integer barcodeId = barcodeList.get(i);
                String barcode = siemensS7Net.getByteTransform().TransString(result2.Content,i*8,8, "UTF-8");
                BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, barcodeId + 1);
                if(!Cools.isEmpty(barcodeThread) && !barcodeThread.getBarcode().equals(barcode)) {
                    barcodeThread.setBarcode(barcode);
                }
            }
        }
        //条码扫描器
        ArrayList<Integer> barcodeListMat = BarcodeListMat;
        OperateResultExOne<byte[]> result2Mat = siemensS7Net.Read("DB103.0", (short) (barcodeListMat.size() * 30));
        if (result2Mat.IsSuccess) {
            for (int i = 0; i < barcodeListMat.size(); i++) {
                Integer barcodeId = barcodeListMat.get(i);
                String barcode = siemensS7Net.getByteTransform().TransString(result2Mat.Content,i*30,30, "UTF-8");
                BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, barcodeId + 1);
                if(!Cools.isEmpty(barcodeThread) && !barcodeThread.getBarcode().equals(barcode)) {
                    barcodeThread.setBarcode(barcode);
src/main/resources/application.yml
@@ -1,5 +1,5 @@
server:
  port: 8080
  port: 9090
  servlet:
    context-path: /@pom.build.finalName@
@@ -8,7 +8,7 @@
    name: @pom.build.finalName@
  datasource:
    driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
    url: jdbc:sqlserver://localhost:1433;databasename=gdykasrs
    url: jdbc:sqlserver://localhost:1433;databasename=fyxcasrs
    username: sa
    password: sa@123
  mvc:
src/main/webapp/static/js/common.js
@@ -1,4 +1,4 @@
var baseUrl = "/ykwcs";
var baseUrl = "/fyxccrnwcs";
// 赋值
function setVal(el, val) {
src/main/webapp/static/js/console.map.js
@@ -8,42 +8,6 @@
    "floors": 1,
    "racks": [{
        "type": "rack",
        "id": "rack16",
        "top": 167,
        "left": 529,
        "width": 1280,
        "height": 22,
        "minBayNo": 2,
        "maxBayNo": 56
    }, {
        "type": "rack",
        "id": "rack15",
        "top": 188,
        "left": 529,
        "width": 1280,
        "height": 22,
        "minBayNo": 2,
        "maxBayNo": 56
    }, {
        "type": "rack",
        "id": "rack14",
        "top": 236,
        "left": 529,
        "width": 1280,
        "height": 22,
        "minBayNo": 2,
        "maxBayNo": 56
    }, {
        "type": "rack",
        "id": "rack13",
        "top": 257,
        "left": 529,
        "width": 1280,
        "height": 22,
        "minBayNo": 2,
        "maxBayNo": 56
    }, {
        "type": "rack",
        "id": "rack12",
        "top": 280,
        "left": 529,
@@ -78,78 +42,6 @@
        "height": 22,
        "minBayNo": 2,
        "maxBayNo": 56
    }, {
        "type": "rack",
        "id": "rack8",
        "top": 393,
        "left": 529,
        "width": 1280,
        "height": 22,
        "minBayNo": 2,
        "maxBayNo": 56
    }, {
        "type": "rack",
        "id": "rack7",
        "top": 414,
        "left": 529,
        "width": 1280,
        "height": 22,
        "minBayNo": 2,
        "maxBayNo": 56
    }, {
        "type": "rack",
        "id": "rack6",
        "top": 462,
        "left": 529,
        "width": 1280,
        "height": 22,
        "minBayNo": 2,
        "maxBayNo": 56
    }, {
        "type": "rack",
        "id": "rack5",
        "top": 483,
        "left": 529,
        "width": 1280,
        "height": 22,
        "minBayNo": 2,
        "maxBayNo": 56
    }, {
        "type": "rack",
        "id": "rack4",
        "top": 506,
        "left": 529,
        "width": 1280,
        "height": 22,
        "minBayNo": 2,
        "maxBayNo": 56
    }, {
        "type": "rack",
        "id": "rack3",
        "top": 527,
        "left": 529,
        "width": 1280,
        "height": 22,
        "minBayNo": 2,
        "maxBayNo": 56
    }, {
        "type": "rack",
        "id": "rack2",
        "top": 575,
        "left": 529,
        "width": 1280,
        "height": 22,
        "minBayNo": 2,
        "maxBayNo": 56
    }, {
        "type": "rack",
        "id": "rack1",
        "top": 596,
        "left": 529,
        "width": 1280,
        "height": 22,
        "minBayNo": 2,
        "maxBayNo": 56
    }],
    "rackDescs": [{
        "type": "rackDescs",
@@ -170,22 +62,6 @@
    }],
    "crns": [{
        "type": "track",
        "id": "lb_track4",
        "text": "",
        "top": 226,
        "left": 490,
        "width": 1300,
        "height": 2
    }, {
        "type": "crane",
        "id": "crn-4",
        "text": "4",
        "top": 213,
        "left": 490,
        "width": 93,
        "height": 22
    },{
        "type": "track",
        "id": "lb_track3",
        "text": "",
        "top": 338,
@@ -197,38 +73,6 @@
        "id": "crn-3",
        "text": "3",
        "top": 325,
        "left": 490,
        "width": 93,
        "height": 22
    },{
        "type": "track",
        "id": "lb_track2",
        "text": "",
        "top": 451,
        "left": 490,
        "width": 1300,
        "height": 2
    }, {
        "type": "crane",
        "id": "crn-2",
        "text": "2",
        "top": 438,
        "left": 490,
        "width": 93,
        "height": 22
    },{
        "type": "track",
        "id": "lb_track1",
        "text": "",
        "top": 564,
        "left": 490,
        "width": 1300,
        "height": 2
    }, {
        "type": "crane",
        "id": "crn-1",
        "text": "1",
        "top": 553,
        "left": 490,
        "width": 93,
        "height": 22
@@ -251,523 +95,11 @@
            "height": 668,
            "stns": [{
                "type": "stn",
                "id": "site-148",
                "text": "148",
                "top": 190,
                "left": 468,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-147",
                "text": "147",
                "top": 190,
                "left": 406,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-146",
                "text": "146",
                "top": 190,
                "left": 344.5,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-149",
                "text": "149",
                "top": 190,
                "left": 283,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-150",
                "text": "150",
                "top": 169,
                "left": 344.5,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-151",
                "text": "151",
                "top": 148,
                "left": 344.5,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-153",
                "text": "153",
                "top": 148,
                "left": 283,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-152",
                "text": "152",
                "top": 148,
                "left": 406,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-154",
                "text": "154",
                "top": 127,
                "left": 344.5,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-155",
                "text": "155",
                "top": 106.5,
                "left": 344.5,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-157",
                "text": "157",
                "top": 106.5,
                "left": 283,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-156",
                "text": "156",
                "top": 106.5,
                "left": 406,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-158",
                "text": "158",
                "top": 85.5,
                "left": 344.5,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-159",
                "text": "159",
                "top": 64.5,
                "left": 344.5,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-160",
                "text": "160",
                "top": 64.5,
                "left": 406,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-161",
                "text": "161",
                "top": 64.5,
                "left": 283,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-145",
                "text": "145",
                "top": 211,
                "left": 344.5,
                "width": 60,
                "height": 26
            }, {
                "type": "stn",
                "id": "site-142",
                "text": "142",
                "top": 239,
                "left": 344.5,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-143",
                "text": "143",
                "top": 239,
                "left": 406,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-144",
                "text": "144",
                "top": 239,
                "left": 468,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-141",
                "text": "141",
                "top": 260,
                "left": 344.5,
                "width": 60,
                "height": 42
            }, {
                "type": "stn",
                "id": "site-139",
                "text": "139",
                "top": 304,
                "left": 406,
                "width": 120,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-138",
                "text": "138",
                "top": 304,
                "left": 344.5,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-134",
                "text": "134",
                "top": 352,
                "left": 344.5,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-135",
                "text": "135",
                "top": 352,
                "left": 406,
                "width": 120,
                "height": 19
            },  {
                "type": "stn",
                "id": "site-137",
                "text": "137",
                "top": 324.5,
                "left": 344.5,
                "width": 60,
                "height": 25.5
            }, {
                "type": "stn",
                "id": "site-133",
                "text": "133",
                "top": 373,
                "left": 344.5,
                "width": 60,
                "height": 42.5
            }, {
                "type": "stn",
                "id": "site-130",
                "text": "130",
                "top": 417,
                "left": 344.5,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-131",
                "text": "131",
                "top": 417,
                "left": 406,
                "width": 120,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-129",
                "text": "129",
                "top": 438,
                "left": 344.5,
                "width": 60,
                "height": 25
            }, {
                "type": "stn",
                "id": "site-126",
                "text": "126",
                "top": 464.5,
                "left": 344.5,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-127",
                "text": "127",
                "top": 464.5,
                "left": 406,
                "width": 120,
                "height": 19
            },  {
                "type": "stn",
                "id": "site-125",
                "text": "125",
                "top": 485,
                "left": 344.5,
                "width": 60,
                "height": 42.5
            }, {
                "type": "stn",
                "id": "site-124",
                "text": "124",
                "top": 529,
                "left": 283,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-121",
                "text": "121",
                "top": 529,
                "left": 344.5,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-122",
                "text": "122",
                "top": 529,
                "left": 406,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-123",
                "text": "123",
                "top": 529,
                "left": 468,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-120",
                "text": "120",
                "top": 550,
                "left": 344.5,
                "width": 60,
                "height": 25
            }, {
                "type": "stn",
                "id": "site-119",
                "text": "119",
                "top": 464.5,
                "left": 283,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-116",
                "text": "116",
                "top": 577,
                "left": 344.5,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-117",
                "text": "117",
                "top": 577,
                "left": 406,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-118",
                "text": "118",
                "top": 577,
                "left": 468,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-115",
                "text": "115",
                "top": 598,
                "left": 344.5,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-114",
                "text": "114",
                "top": 620,
                "left": 344.5,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-113",
                "text": "113",
                "top": 620,
                "left": 283,
                "width": 60,
                "height": 19
            }, {
                "type": "track",
                "id": "lb_trCart21",
                "text": "",
                "top": 65,
                "left": 226,
                "width": 6,
                "height": 742
            }, {
                "type": "track",
                "id": "lb_trCart22",
                "text": "",
                "top": 65,
                "left": 270,
                "width": 6,
                "height": 742
            },{
                "type": "stn",
                "id": "site-3",
                "text": "3",
                "top": -20,
                "left": 220,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-2",
                "text": "2",
                "top": -20,
                "left": 220,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-1",
                "text": "1",
                "top": -20,
                "left": 220,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-202",
                "text": "202",
                "top": 642,
                "left": 283,
                "width": 184,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-999",
                "text": "备用PGV、RGV维修区",
                "top": 642,
                "left": 283,
                "width": 184,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-110",
                "text": "110",
                "top": 663,
                "left": 406,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-111",
                "text": "111",
                "top": 663,
                "left": 344.5,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-112",
                "text": "112",
                "top": 663,
                "left": 283,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-109",
                "text": "109",
                "top": 684,
                "left": 406,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-108",
                "text": "108",
                "top": 705,
                "left": 406,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-107",
                "text": "107",
                "top": 705,
                "left": 283,
                "width": 122,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-105",
                "text": "105",
                "top": 727,
                "left": 406,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-106",
                "text": "106",
                "top": 727,
                "left": 283,
                "width": 122,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-104",
                "text": "104",
                "top": 749,
                "left": 406,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-103",
                "text": "103",
                "top": 771,
                "left": 406,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-102",
                "text": "102",
                "top": 771,
                "left": 344.5,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-101",
                "text": "101",
                "top": 771,
                "left": 283,
                "width": 60,
                "height": 19
            }, {
                "type": "stn",
                "id": "site-100",
                "text": "100",
                "top": 792,
                "left": 283,
                "width": 184,
                "height": 19
            }],
            "barcode":[