| | |
| | | } |
| | | |
| | | QueryWrapper wrapper = createQueryWrapper(baseMapper, dr); |
| | | List list = baseMapper.selectList(wrapper); |
| | | if (null == list || list.size() == 0) { |
| | | continue; |
| | | } |
| | | |
| | | if (!dataMap.containsKey(entity)) { |
| | | dataMap.put(entity, list); |
| | | } else { |
| | | dataMap.get(entity).addAll(list); |
| | | } |
| | | if (wrapper.isEmptyOfWhere()) { |
| | | wrapper.apply("1 = 1"); |
| | | } |
| | | if ("bborehole".equals(entity)) { |
| | | wrapper.last("limit 100"); |
| | | } |
| | | |
| | | String tab = BaseQueryService.getTabName(baseMapper); |
| | | List<AttachEntity> annex = baseMapper.selectAnnex(tab, wrapper); |
| | | if (null == annex || annex.isEmpty()) { |
| | | continue; |
| | | } |
| | | |
| | | if (!annexMap.containsKey(entity)) { |
| | | annexMap.put(tab.replace(".", "_"), annex); |
| | | } else { |
| | | annexMap.get(tab.replace(".", "_")).addAll(annex); |
| | | } |
| | | downloadService.addData(entity, baseMapper, wrapper, dataMap, annexMap); |
| | | } catch (Exception ex) { |
| | | log.error(ex.getMessage(), ex); |
| | | } |