| | |
| | | private short heartBeatVal = 1; |
| | | private StaError1 staError1; |
| | | public static final ArrayList<Integer> staNos = new ArrayList<Integer>() {{ |
| | | add(100);add(101);add(102);add(103); |
| | | add(104);add(105);add(106);add(107); |
| | | add(101);add(102);add(103);add(104);add(105);add(106);add(107);add(108); |
| | | }}; |
| | | |
| | | public static final ArrayList<Integer> BarcodeList = new ArrayList<Integer>() {{ |
| | |
| | | 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 |