From dcfc005ee387ac39de83bd4637f48ed0f8f6c9a9 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期三, 26 三月 2025 16:23:03 +0800
Subject: [PATCH] 1、修改文档“增加一个单位(orgTa)”名称; 2、config.properties配置改为ym的配置; 3、江海用测试系统调整,适应阿里云服务器环境。

---
 pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/controller/ControllerCtrl.java |   21 ++++++++++-----------
 1 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/controller/ControllerCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/controller/ControllerCtrl.java
index e8a1df2..9392245 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/controller/ControllerCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/controller/ControllerCtrl.java
@@ -1,13 +1,14 @@
 package com.dy.pipIrrProject.controller;
 
-import com.alibaba.fastjson2.JSONArray;
 import com.alibaba.excel.EasyExcel;
-import com.alibaba.excel.support.ExcelTypeEnum;
+import com.alibaba.fastjson2.JSONArray;
 import com.dy.common.aop.SsoAop;
 import com.dy.common.webUtil.BaseResponse;
 import com.dy.common.webUtil.BaseResponseUtils;
 import com.dy.common.webUtil.QueryResultVo;
 import com.dy.common.webUtil.ResultCodeMsg;
+import com.dy.pipIrrGlobal.excel.CellWriteHandler;
+import com.dy.pipIrrGlobal.excel.ExcelUtil;
 import com.dy.pipIrrGlobal.pojoBa.BaClient;
 import com.dy.pipIrrGlobal.pojoPr.PrController;
 import com.dy.pipIrrGlobal.voPr.VoController;
@@ -32,6 +33,7 @@
 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
 import java.net.URLEncoder;
+import java.time.LocalDate;
 import java.util.*;
 
 /**
@@ -224,15 +226,12 @@
     @SneakyThrows(IOException.class)
     @RequestMapping(value = "/export", method = RequestMethod.GET)
     public void export(HttpServletResponse response, QueryVo vo) {
-        setExcelRespProp(response, "鎺у埗鍣ㄥ垪琛�");
-        //List<VoDivide> memberList = LocalJsonUtil.getListFromJson("json/members.json", VoDivide.class);
-        List<VoController> memberList = controllerSv.export(vo);
-
-        EasyExcel.write(response.getOutputStream())
-                .head(VoController.class)
-                .excelType(ExcelTypeEnum.XLSX)
-                .sheet("鎺у埗鍣ㄥ垪琛�")
-                .doWrite(memberList);
+        List<VoController> controllerList = controllerSv.export(vo);
+        ExcelUtil.setExcelRespProp(response, "鎺у埗鍣ㄥ垪琛�" + LocalDate.now());
+        EasyExcel.write(response.getOutputStream(), VoController.class)
+                .registerWriteHandler(new CellWriteHandler("鎺у埗鍣ㄥ垪琛�"))
+                .sheet("鎺у埗鍣�")
+                .doWrite(controllerList);
     }
 
     /**

--
Gitblit v1.8.0