pjb
2 天以前 29e0a8a8f74a7155f7e6c0d854bb7566c655b0c8
src/main/java/com/zy/core/thread/SiemensDevpThread.java
@@ -198,6 +198,25 @@
                    staProtocol.setPakMk(true);
                }
            }
        // 根据实时信息更新数据库
        try {
            List<BasDevp> basDevps = new ArrayList<>();
            for (Integer siteId2 : staNos) {
                StaProtocol staProtocol2 = station.get(siteId2);
                basDevps.add(staProtocol2.toSqlModel());
            }
            BasDevpService basDevpService = SpringUtils.getBean(BasDevpService.class);
            if(basDevps.size() > 0) {
                if (null != basDevpService && !basDevpService.updateBatchById(basDevps)) {
                    throw new Exception("更新数据库数据失败");
                }
            }
        } catch (Exception e){
        }
    }
    @Override
@@ -465,6 +484,7 @@
            OutputQueue.DEVP.offer(MessageFormat.format("【{0}】 输送线命令下发 [id:{1}] >>>>> {2}", DateUtils.convert(new Date()), slave.getId(), JSON.toJSON(staProtocol)));
            News.info("SiemensDevp"+" - 5"+" - 输送线命令下发 [id:{}] >>>>> 命令下发: {}",  slave.getId(), JSON.toJSON(staProtocol));
        }
        read();
    }
    /**