From 8490eb11583ffdc586436f165860de5cfc39f915 Mon Sep 17 00:00:00 2001
From: cjl <909710561@qq.com>
Date: Mon, 06 Jan 2025 09:18:29 +0800
Subject: [PATCH] fix:sql查询时间调整

---
 screen-api/src/main/java/com/moral/api/controller/AllocationController.java |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/screen-api/src/main/java/com/moral/api/controller/AllocationController.java b/screen-api/src/main/java/com/moral/api/controller/AllocationController.java
index 5865bd9..e2e2ab0 100644
--- a/screen-api/src/main/java/com/moral/api/controller/AllocationController.java
+++ b/screen-api/src/main/java/com/moral/api/controller/AllocationController.java
@@ -7,6 +7,7 @@
 import com.moral.api.entity.ResponsibilityUnit;
 import com.moral.api.pojo.enums.AllocationApproveEnum;
 import com.moral.api.pojo.enums.ChangeEnum;
+import com.moral.api.pojo.enums.YesOrNo;
 import com.moral.api.pojo.ext.allocation.AllocationExcelExt;
 import com.moral.api.pojo.ext.allocation.AllocationExt;
 import com.moral.api.pojo.ext.allocation.AllocationPageExt;
@@ -172,7 +173,6 @@
         return ResultMessage.ok(ObjectUtils.isEmpty(map1)? "0":map1);
     }
 
-
     @GetMapping("unitExel")
     public void unitExel(HttpServletResponse response,HttpServletRequest request){
         Map<String, Object> params = WebUtils.getParametersStartingWith(request, null);
@@ -243,12 +243,14 @@
         for(int i = 0;i<list.size();i++){
             AllocationExcelExt excelExt = list.get(i);
             AllocationListExcelVo item = AllocationListExcelVo.convert(excelExt);
+            String stateStr = Objects.nonNull(excelExt.getState())?AllocationApproveEnum.getByValue(excelExt.getState()).getName():"���������������";
+            item.setStateStr(stateStr);
             List<String> urls = new ArrayList<>();
             for(FileAddressVo z : excelExt.getFileBaseList()){
                 urls.add(handleFileRealPath(z.getFileAddress()));
             }
             item.setChangeTypeStr(Objects.isNull(excelExt.getChangeType())?" ":ChangeEnum.getByValue(excelExt.getChangeType()).getName());
-            item.setChangeStr(Objects.isNull(excelExt.getIsChange())?"���":ChangeEnum.getByValue(excelExt.getChangeType()).getName());
+            item.setChangeStr(Objects.isNull(excelExt.getIsChange())?"���": YesOrNo.getByValue(excelExt.getIsChange()).getName());
             item.setWriteCellDataFile(urls);
             List<String> urlsAfter = new ArrayList<>();
             for(FileAddressVo z : excelExt.getFileChangeList()){
@@ -265,6 +267,7 @@
             response.setHeader("Access-Control-Expose-Headers", "Content-Disposition");
         EasyExcel.write(response.getOutputStream(), AllocationListExcelVo.class)
                 .registerWriteHandler(new CustomImageModifyHandler()).sheet("���������").doWrite(demoDataList);
+            response.getOutputStream().close();
         }catch (Exception e){
             log.error("error result ",e);
         }

--
Gitblit v1.8.0