| | |
| | | //保存PLC采集数据 |
| | | // StopWatch stopWatch = new StopWatch(); |
| | | // stopWatch.start(); |
| | | List<DaParamCollection> DaParamCollectionlist = new ArrayList<>(); |
| | | List<DaParamCollection> ParamCollectionlist = new ArrayList<>(); |
| | | for(int i=0;i<nodeId.size();i++){ |
| | | DaParamCollection ParamCollection = new DaParamCollection(); |
| | | ParamCollection.setParamCode(nodeId.get(i).getIdentifier().toString().split("[.]")[2]); |
| | |
| | | ParamCollection.setParamValue(s.get(i).getValue().getValue().toString()); |
| | | ParamCollection.setSfcCode(SNCode); |
| | | ParamCollection.setParamName(b.get(i).getGatherAddress()); |
| | | DaParamCollectionlist.add(ParamCollection); |
| | | ParamCollectionlist.add(ParamCollection); |
| | | } |
| | | daParamCollectionService.saveBeachDaParamCollection(DaParamCollectionlist); |
| | | daParamCollectionService.saveBeachDaParamCollection(ParamCollectionlist); |
| | | // stopWatch.stop(); |
| | | // System.out.println("使用sqlSessionFactory实现批量插入耗时:" + stopWatch.getTotalTimeMillis()); |
| | | } |