From b30a9bc3be541896054abfb46acc49efb3c66ee2 Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期一, 26 二月 2024 13:53:12 +0800
Subject: [PATCH] 添加钻孔数据导出Excel、Word

---
 src/main/java/com/lf/server/service/sys/ReportService.java |   45 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 45 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/lf/server/service/sys/ReportService.java b/src/main/java/com/lf/server/service/sys/ReportService.java
index af00af8..1790071 100644
--- a/src/main/java/com/lf/server/service/sys/ReportService.java
+++ b/src/main/java/com/lf/server/service/sys/ReportService.java
@@ -164,6 +164,9 @@
                 case "countServices":
                     createCountServicesWord(source, target);
                     break;
+                case "countExplorationPoints":
+                    createCountExplorationPointsWord(source, target);
+                    break;
                 default:
                     break;
             }
@@ -177,6 +180,9 @@
                     break;
                 case "countServices":
                     createCountServicesExcel(source, target);
+                    break;
+                case "countExplorationPoints":
+                    createCountExplorationPointsExcel(source, target);
                     break;
                 default:
                     break;
@@ -242,6 +248,25 @@
     }
 
     /**
+     * 鍒涘缓 閽诲瓟鏁版嵁缁熻 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) {
@@ -303,6 +328,26 @@
     }
 
     /**
+     * 鍒涘缓 閽诲瓟鏁版嵁缁熻 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) {

--
Gitblit v1.9.3