From 46e260fb7757dafd379c1cc7d1130cb788e34dbb Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Tue, 18 Feb 2025 16:43:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B1=87=E9=80=9A=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=E8=A1=A8=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../engine/salary/web/SalaryAcctController.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/com/engine/salary/web/SalaryAcctController.java b/src/com/engine/salary/web/SalaryAcctController.java index 201160e14..96dc6053a 100644 --- a/src/com/engine/salary/web/SalaryAcctController.java +++ b/src/com/engine/salary/web/SalaryAcctController.java @@ -1,12 +1,15 @@ package com.engine.salary.web; import com.engine.common.util.ServiceUtil; +import com.engine.salary.entity.hrm.SubCompanyInfo; import com.engine.salary.entity.salaryacct.dto.*; import com.engine.salary.entity.salaryacct.param.*; import com.engine.salary.entity.salarysob.dto.SalarySobCycleDTO; import com.engine.salary.enums.salarysob.SalaryEmployeeStatusEnum; import com.engine.salary.service.SalaryAcctExcelService; +import com.engine.salary.service.SalaryEmployeeService; import com.engine.salary.service.impl.SalaryAcctExcelServiceImpl; +import com.engine.salary.service.impl.SalaryEmployeeServiceImpl; import com.engine.salary.util.ResponseResult; import com.engine.salary.util.SalaryDateUtil; import com.engine.salary.util.excel.ExcelPreviewDTO; @@ -30,10 +33,7 @@ import javax.ws.rs.core.StreamingOutput; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.time.LocalDate; -import java.util.Arrays; -import java.util.Collection; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.stream.Collectors; /** @@ -72,6 +72,10 @@ public class SalaryAcctController { return ServiceUtil.getService(SalaryAcctExcelServiceImpl.class, user); } + private SalaryEmployeeService getSalaryEmployeeService(User user) { + return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user); + } + // /**********************************薪资核算记录相关 start*********************************/ //薪资核算列表 @@ -975,7 +979,8 @@ public class SalaryAcctController { try { User user = HrmUserVarify.getUser(request, response); XSSFWorkbook workbook = getSalaryAcctExcelWrapper(user).exportHtjsXcssDataDetail(param); - String fileName = "薪酬送审" + LocalDate.now(); + SubCompanyInfo subCompanyInfo = getSalaryEmployeeService(user).getSubCompanyInfoById(param.getSubcompanyId()); + String fileName = subCompanyInfo == null ? "" : subCompanyInfo.getName() + SalaryDateUtil.getFormatYearMonth(new Date()); try { fileName = URLEncoder.encode(fileName + ".xlsx", "UTF-8"); } catch (UnsupportedEncodingException e) {