pjb
2024-07-02 02e5449fc0e582a1d3bbd160f6557218eca013b0
修改led显示
2个文件已修改
24 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/thread/LedThread.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -226,7 +226,7 @@
                        // led 异常显示
                        if (ledThread != null) {
                            String errorMsg = "工作档已存在该条码号===>>" + barcode;
                            MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(5, errorMsg));
//                            MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(5, errorMsg));
                        }
                        continue;
                    }
@@ -277,9 +277,9 @@
                                ledCommand.setBarcode(barcode);
                                commands.add(ledCommand);
                                if (devp.getId() == 1) {
                                     if (MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(1, commands))){
                                         ledThread.setLedMk(false);
                                     }
//                                     if (MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(1, commands))){
//                                         ledThread.setLedMk(false);
//                                     }
                                } else {
                                    if (MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(3, commands))){
                                        ledThread.setLedMk(false);
@@ -538,9 +538,9 @@
                    ledCommand.setMatDtos(matDtos);
                    commands.add(ledCommand);
                    if (devp.getId() == 1) {
                        if (MessageQueue.offer(SlaveType.Led, pickSta.getLed(), new Task(1, commands))) {
                            ledThread.setLedMk(false);
                        }
//                        if (MessageQueue.offer(SlaveType.Led, pickSta.getLed(), new Task(1, commands))) {
//                            ledThread.setLedMk(false);
//                        }
                    } else {
                        if (MessageQueue.offer(SlaveType.Led, pickSta.getLed(), new Task(3, commands))){
                            ledThread.setLedMk(false);
@@ -1604,7 +1604,7 @@
                                ledCommand.setMatDtos(matDtos);
                                commands.add(ledCommand);
                                if (devp.getId() == 1) {
                                    MessageQueue.offer(SlaveType.Led, emptyInSta.getLed(), new Task(1, commands));
//                                    MessageQueue.offer(SlaveType.Led, emptyInSta.getLed(), new Task(1, commands));
                                } else {
                                    MessageQueue.offer(SlaveType.Led, emptyInSta.getLed(), new Task(3, commands));
                                }
src/main/java/com/zy/core/thread/LedThread.java
@@ -103,6 +103,7 @@
    }
    private void write(List<LedCommand> list) throws Bx5GException {
        try {
        if (!connect()) {
            return;
        }
@@ -155,9 +156,13 @@
//            resetStatus = false;
        }
        close();
        }catch (Exception e){
        }
    }
    private void reset() throws Bx5GException {
        try {
        if (!connect()) {
            return;
        }
@@ -205,6 +210,9 @@
//            resetStatus = true;
        }
        close();
        } catch (Exception e){
        }
    }
    private void write7(List<LedCommand> list) {