From 0bd3125739c0d8bded4f7bd405fd99f1723df964 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期五, 30 五月 2025 15:51:49 +0800
Subject: [PATCH] 不同服务器配置文件备份

---
 pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/station/StationCtrl.java |   26 ++++++++++++++++++++++----
 1 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/station/StationCtrl.java b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/station/StationCtrl.java
index ece32c2..00c1890 100644
--- a/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/station/StationCtrl.java
+++ b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/station/StationCtrl.java
@@ -9,6 +9,7 @@
 import com.dy.common.webUtil.QueryResultVo;
 import com.dy.pmsGlobal.aop.Log;
 import com.dy.pmsGlobal.pojoPlt.PltStation;
+import com.dy.pmsGlobal.util.ExportExcelUtil;
 import com.dy.pmsGlobal.util.QrCodeConstant;
 import com.dy.pmsGlobal.util.QrCodeUtil;
 import com.google.zxing.WriterException;
@@ -17,7 +18,6 @@
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
-import io.netty.channel.EventLoopGroup ;
 
 import java.io.IOException;
 import java.util.ArrayList;
@@ -150,11 +150,28 @@
         List<Converter> list = new ArrayList<>() ;
 
         List<PltStation> stations = sv.selectAll();
-        // 浣跨敤骞惰娴佹彁楂樻�ц兘
+        if(stations != null){
+            for(PltStation station : stations){
+                ExcelVo vo = new ExcelVo();
+                vo.name = station.name;
+                //vo.code = "103"+station.id;
+                vo.lineName = station.lineName;
+                try {
+                    vo.qrCode = QrCodeUtil.genQrCode(QrCodeConstant.TypeStation+station.id);
+                } catch (IOException e) {
+                    e.printStackTrace();
+                } catch (WriterException e) {
+                    e.printStackTrace();
+                }
+                list.add(vo);
+            }
+        }
+        // 浣跨敤骞惰娴佹彁楂樻�ц兘锛屼絾鐢熸垚鐨勭粨鏋滃彉鎴愭棤搴忕殑浜�
+        /*
         stations.parallelStream().forEach(station -> {
             ExcelVo vo = new ExcelVo();
             vo.name = station.name;
-//                vo.code = "103"+station.id;
+            //vo.code = "103"+station.id;
             vo.lineName = station.lineName;
             try {
                 vo.qrCode = QrCodeUtil.genQrCode(QrCodeConstant.TypeStation+station.id);
@@ -165,7 +182,8 @@
             }
             list.add(vo);
         });
-        QrCodeUtil.downloadExcel(response, fileName,sheetName,list);
+         */
+        ExportExcelUtil.downloadExcel(response, fileName, sheetName, list);
     }
 }
 

--
Gitblit v1.8.0