| | |
| | | case "countServices": |
| | | createCountServicesWord(source, target); |
| | | break; |
| | | case "countExplorationPoints": |
| | | createCountExplorationPointsWord(source, target); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | |
| | | break; |
| | | case "countServices": |
| | | createCountServicesExcel(source, target); |
| | | break; |
| | | case "countExplorationPoints": |
| | | createCountExplorationPointsExcel(source, target); |
| | | break; |
| | | default: |
| | | break; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 创建 钻孔数据统计 Word |
| | | */ |
| | | public void createCountExplorationPointsWord(String source, String target) { |
| | | List<CountEntity> list = countExplorationPoints(); |
| | | if (null == list || list.isEmpty()) { |
| | | return; |
| | | } |
| | | |
| | | int rows = 1; |
| | | ArrayList<String[]> addList = new ArrayList<>(); |
| | | for (CountEntity ce : list) { |
| | | String[] strs = new String[]{"" + rows++, ce.getM1(), "" + ce.getCount(), FileHelper.getSizes(ce.getSizes())}; |
| | | addList.add(strs); |
| | | } |
| | | |
| | | WordHelper.generateWord(source, target, null, addList); |
| | | } |
| | | |
| | | /** |
| | | * 创建 用户流量统计 Excel |
| | | */ |
| | | public void createCountOperatesExcel(String source, String target) { |
| | |
| | | } |
| | | |
| | | /** |
| | | * 创建 钻孔数据统计 Excel |
| | | */ |
| | | public void createCountExplorationPointsExcel(String source, String target) { |
| | | List<CountEntity> list = countExplorationPoints(); |
| | | if (null == list || list.isEmpty()) { |
| | | return; |
| | | } |
| | | |
| | | int rows = 1; |
| | | for (CountEntity ce : list) { |
| | | ce.setNo(rows++); |
| | | } |
| | | |
| | | Map<String, List<CountEntity>> map = new HashMap<>(1); |
| | | map.put("data", list); |
| | | |
| | | ExcelHelper.writeToTemplate(source, target, map); |
| | | } |
| | | |
| | | /** |
| | | * 获取下载实体类 |
| | | */ |
| | | private DownloadEntity getDownloadEntity(UserEntity ue, String file) { |