From 014639637a80b0549cc0aee00b9a9670fb57827c Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期五, 10 二月 2023 17:26:30 +0800
Subject: [PATCH] 1

---
 src/main/java/com/lf/server/service/sys/ReportService.java |   23 +++++++++++++++++++++++
 1 files changed, 23 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 80382b0..fcce48c 100644
--- a/src/main/java/com/lf/server/service/sys/ReportService.java
+++ b/src/main/java/com/lf/server/service/sys/ReportService.java
@@ -3,10 +3,12 @@
 import com.lf.server.entity.ctrl.CountEntity;
 import com.lf.server.entity.sys.ReportEntity;
 import com.lf.server.helper.StringHelper;
+import com.lf.server.helper.WordHelper;
 import com.lf.server.mapper.sys.ReportMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -86,4 +88,25 @@
     public List<CountEntity> countOperates() {
         return reportMapper.countOperates();
     }
+
+    /**
+     * 鍒涘缓 鐢ㄦ埛娴侀噺缁熻 Word
+     */
+    public void createCountSizesWord() {
+        List<CountEntity> list = countOperates();
+        if (null == list || list.isEmpty()) {
+            return;
+        }
+
+        String inputFile = "D:\\LF\\鐢ㄦ埛娴侀噺缁熻.docx";
+        String outPutFile = "D:\\LF\\鐢ㄦ埛娴侀噺缁熻_new.docx";
+
+        ArrayList<String[]> addList = new ArrayList<>();
+        for (CountEntity ce : list) {
+            String[] strs = new String[]{ce.getM1(), ce.getM2(), ce.getCount().toString()};
+            addList.add(strs);
+        }
+
+        WordHelper.generateWord(inputFile, outPutFile, null, addList);
+    }
 }

--
Gitblit v1.9.3