#
whycq
1 天以前 2fac93af41a62eea9bbd48cdac2df09fcf463f56
src/main/java/com/zy/core/thread/SiemensCrnThread.java
@@ -205,7 +205,9 @@
                    if (!basCrnpService.updateById(crnProtocol.toSqlModel(basCrnp))){
                        News.error("堆垛机plc数据库更新失败 ===>> [id:{}] [ip:{}] [port:{}] [rack:{}] [slot:{}]", slave.getId(), slave.getIp(), slave.getPort(), slave.getRack(), slave.getSlot());
                    }
                } catch (Exception ignore){}
                } catch (Exception ignore){
                }
            } else {
                initCrn();
@@ -282,8 +284,12 @@
        News.info("堆垛机命令下发[id:{}] >>>>> {}", slave.getId(), array);
        if(!result.IsSuccess){
            News.error("写入堆垛机plc数据失败,重新添加任务到队列 ===>> [id:{}],{}", slave.getId(), JSON.toJSON(command));
            MessageQueue.offer(SlaveType.Crn, slave.getId(), new Task(2, command));
//            News.error("写入堆垛机plc数据失败,重新添加任务到队列 ===>> [id:{}],{}", slave.getId(), JSON.toJSON(command));
//            MessageQueue.offer(SlaveType.Crn, slave.getId(), new Task(2, command));
            if(!resetFlag){
                News.error("堆垛机命令回读失败后,重新添加任务到队列1 ===>> [id:{}],{}", slave.getId(), JSON.toJSON(command));
                MessageQueue.offer(SlaveType.Crn, slave.getId(), new Task(2, command));
            }
            Thread.sleep(100);
            readStatus();
            return false;
@@ -318,7 +324,7 @@
                        }
                    }
                    if(!resetFlag){
                        News.error("堆垛机命令回读失败后,重新添加任务到队列 ===>> [id:{}],{}", slave.getId(), JSON.toJSON(command));
                        News.error("堆垛机命令回读失败后,重新添加任务到队列2 ===>> [id:{}],{}", slave.getId(), JSON.toJSON(command));
                        MessageQueue.offer(SlaveType.Crn, slave.getId(), new Task(2, command));
                    }
                    Thread.sleep(100);