From a156726f9823a6d690c31da7d0114db718a89867 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期四, 22 五月 2025 16:56:02 +0800
Subject: [PATCH] 权限初始化逻辑修改
---
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/station/StationCtrl.java | 25 ++++++++++++++++++++++---
1 files changed, 22 insertions(+), 3 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 fcaafc3..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;
@@ -149,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);
@@ -164,7 +182,8 @@
}
list.add(vo);
});
- QrCodeUtil.downloadExcel(response, fileName,sheetName,list);
+ */
+ ExportExcelUtil.downloadExcel(response, fileName, sheetName, list);
}
}
--
Gitblit v1.8.0