From 40c75db6d335a0335e944e5196a102d8837cad6b Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期一, 15 七月 2024 21:00:28 +0800
Subject: [PATCH] 工时bug修改+光纤接头损耗报告完成
---
performance-server/src/main/java/com/yuanchu/mom/service/impl/AuxiliaryOutputWorkingHoursServiceImpl.java | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/performance-server/src/main/java/com/yuanchu/mom/service/impl/AuxiliaryOutputWorkingHoursServiceImpl.java b/performance-server/src/main/java/com/yuanchu/mom/service/impl/AuxiliaryOutputWorkingHoursServiceImpl.java
index 58f25dd..753a514 100644
--- a/performance-server/src/main/java/com/yuanchu/mom/service/impl/AuxiliaryOutputWorkingHoursServiceImpl.java
+++ b/performance-server/src/main/java/com/yuanchu/mom/service/impl/AuxiliaryOutputWorkingHoursServiceImpl.java
@@ -90,6 +90,9 @@
ids.addAll(users.stream().map(User::getId).distinct().collect(Collectors.toList()));
}
}
+ if (ids.size()==0){
+ ids=null;
+ }
if (ObjectUtils.isNotEmpty(dates) && ObjectUtils.isNotEmpty(week)){
String[] split = dates.replaceAll("\\[", "").replaceAll("]", "").replaceAll("\"", "").split(",");
String[] weeks = week.replaceAll("\\[", "").replaceAll("]", "").replaceAll("\"", "").split(",");
@@ -167,9 +170,9 @@
//瀵煎嚭
@Override
public void exportWorkingHours(HttpServletResponse response) throws IOException {
- List<AuxiliaryOutputWorkingHoursDto> auxiliaryOutputWorkingHoursDtos = null;
- List<AuxiliaryWorkingHoursDayDto> auxiliaryWorkingHoursDayDtos = null;
- List<Integer> ids = null;
+ List<AuxiliaryOutputWorkingHoursDto> auxiliaryOutputWorkingHoursDtos = new ArrayList<>();
+ List<AuxiliaryWorkingHoursDayDto> auxiliaryWorkingHoursDayDtos = new ArrayList<>();
+ List<Integer> ids = new ArrayList<>();
//鍒ゆ柇鏄粍闀胯繕鏄粍鍛樿繕鏄鐞嗗憳
Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("selectAuxiliaryOutputWorkingHours");
User user = userMapper.selectById(map1.get("userId"));
@@ -199,7 +202,7 @@
response.setContentType("application/vnd.ms-excel");
response.setCharacterEncoding("UTF-8");
// 杩欓噷URLEncoder.encode鍙互闃叉涓枃涔辩爜 褰撶劧鍜宔asyexcel娌℃湁鍏崇郴
- String fileName = URLEncoder.encode("宸ユ椂绠$悊瀵煎嚭", "UTF-8");
+ String fileName = URLEncoder.encode("鏃ュ伐鏃剁鐞嗗鍑�", "UTF-8");
response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
try {
// 鏂板缓ExcelWriter
--
Gitblit v1.9.3