| | |
| | | //@Transactional |
| | | @Async("threadPoolTaskExecutor") |
| | | public void insertSuYuanDatasAsync(List<SuYuan> lists, String time) throws Exception { |
| | | //插入数据 |
| | | List<List<SuYuan>> list = Lists.partition(lists, AsyncService.BATCH_INSERT_NUMBER); |
| | | CountDownLatch countDownLatch = new CountDownLatch(list.size()); |
| | | for (List<SuYuan> corpReserveList : list) { |
| | |
| | | } |
| | | if (suYuanMapper.isTableExists(dictRecord.getTableName()) == 0) return null; |
| | | |
| | | List<DistanceSuYuan> list = suYuanMapper.getDistanceSuYuan(dictRecord.getTableName(), ids3d); |
| | | List<DistanceSuYuan> source = suYuanMapper.getDistanceSuYuan(dictRecord.getTableName(), ids3d); |
| | | List<DistanceSuYuan> list = getList(ids3d, source); |
| | | AtomicInteger i = new AtomicInteger(0); |
| | | list.stream().forEach(s -> { |
| | | s.setName(checkPoint.getName()); |
| | |
| | | return result; |
| | | } |
| | | |
| | | private List<DistanceSuYuan> getList(List<String> ids3d, List<DistanceSuYuan> source) { |
| | | List<DistanceSuYuan> list = new ArrayList<>(); |
| | | for (String id : ids3d) { |
| | | DistanceSuYuan suYuan = source.stream().filter(db -> id.equals(db.getId())).findFirst().orElse(null); |
| | | if (null == suYuan) { |
| | | String[] strs = id.split("_"); |
| | | suYuan = new DistanceSuYuan(null, null, 0.0, id, Integer.parseInt(strs[0]), Integer.parseInt(strs[1]), 0, 0, null, 0.0, 0.0, 0.0, 0.0); |
| | | } |
| | | list.add(suYuan); |
| | | } |
| | | |
| | | return list; |
| | | } |
| | | |
| | | public Map<String, Object> selectSuYuan200(String name, Date date) { |
| | | Map<String, Object> result = new HashMap<String, Object>(); |
| | | MonitorPointPosition checkPoint = commonService.select3dCheckPointByName(name); |
| | |
| | | } |
| | | if (suYuanMapper.isTableExists(dictRecord.getTableName()) == 0) return null; |
| | | |
| | | List<DistanceSuYuan> list = suYuanMapper.getDistanceSuYuan(dictRecord.getTableName(), ids3d); |
| | | List<DistanceSuYuan> source = suYuanMapper.getDistanceSuYuan(dictRecord.getTableName(), ids3d); |
| | | List<DistanceSuYuan> list = getList(ids3d, source); |
| | | AtomicInteger i = new AtomicInteger(0); |
| | | list.stream().forEach(s -> { |
| | | s.setName(checkPoint.getName()); |
| | |
| | | } |
| | | if (suYuanMapper.isTableExists(dictRecord.getTableName()) == 0) return null; |
| | | |
| | | List<DistanceSuYuan> list = suYuanMapper.getDistanceSuYuan(dictRecord.getTableName(), ids3d); |
| | | List<DistanceSuYuan> source = suYuanMapper.getDistanceSuYuan(dictRecord.getTableName(), ids3d); |
| | | List<DistanceSuYuan> list = getList(ids3d, source); |
| | | AtomicInteger i = new AtomicInteger(0); |
| | | list.stream().forEach(s -> { |
| | | s.setName(checkPoint.getName()); |
| | |
| | | } |
| | | if (suYuanMapper.isTableExists(dictRecord.getTableName()) == 0) return null; |
| | | |
| | | List<DistanceSuYuan> list = suYuanMapper.getDistanceSuYuan(dictRecord.getTableName(), ids3d); |
| | | List<DistanceSuYuan> source = suYuanMapper.getDistanceSuYuan(dictRecord.getTableName(), ids3d); |
| | | List<DistanceSuYuan> list = getList(ids3d, source); |
| | | AtomicInteger i = new AtomicInteger(0); |
| | | list.stream().forEach(s -> { |
| | | s.setName(checkPoint.getName()); |
| | |
| | | return suYuanId; |
| | | } |
| | | |
| | | /** |
| | | * 根据ID查询快速溯源 |
| | | */ |
| | | public List<SuYuanFast> selectFastById(String id, Date date) { |
| | | String time = DateUtils.getYyyyMmDdHhMmSs(date); |
| | | |