| | |
| | | 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 |
| | |
| | | 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(); |
| | | } |
| | | |
| | | /** |