From bb4b52014013c9b9d2222ea873287cfc4cc875fb Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Thu, 4 Jan 2024 15:50:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=AF=E6=B9=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/SalaryAcctExcelServiceImpl.java | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java index 0e2c2ade6..aab8a8f5a 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java @@ -30,6 +30,7 @@ import com.engine.salary.entity.salarysob.po.SalarySobItemPO; import com.engine.salary.entity.taxagent.param.TaxAgentQueryParam; import com.engine.salary.entity.taxagent.po.TaxAgentPO; import com.engine.salary.enums.UserStatusEnum; +import com.engine.salary.enums.datacollection.UseEmployeeTypeEnum; import com.engine.salary.enums.salaryaccounting.LockStatusEnum; import com.engine.salary.enums.salaryaccounting.SalaryAcctResultDataSourceEnum; import com.engine.salary.enums.salaryitem.SalaryDataTypeEnum; @@ -1569,14 +1570,21 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc int mainId = rs.getInt("id"); // 获取明细数据 rs.execute("select * from uf_txjlgljmb_dt1 where mainid="+mainId); + Map empMap = SalaryEntityUtil.convert2Map(getSalaryEmployeeService(user).listAll(UseEmployeeTypeEnum.ORG), DataCollectionEmployee::getEmployeeId); while (rs.next()) { + Long empId = Long.valueOf(rs.getInt("xm")); + DataCollectionEmployee emp = empMap.getOrDefault(empId, DataCollectionEmployee.builder().username("").departmentName("").departmentId(0L).build()); result.add(pltxEmployeeDTO.builder() - .employee(Long.valueOf(rs.getInt("xm"))) - .qnjxfs(rs.getDouble("qnjxfs")) - .jbgz(rs.getDouble("jbgz")) - .dx(rs.getDouble("dx")) - .dxhjbgz(rs.getDouble("dxhjbgz")) - .dxbl(rs.getDouble("dxbl")) + .employee(empId) + .employeeName(emp.getUsername()) + .bmId(emp.getDepartmentId()) + .bmName(emp.getDepartmentName()) + .gskjywr(rs.getString("gskjywr")) + .qnjxfs(rs.getDouble("qnjxfs") == -1 ? null : rs.getDouble("qnjxfs")) + .jbgz(rs.getDouble("jbgz") == -1 ? null : rs.getDouble("jbgz")) + .dx(rs.getDouble("dx") == -1 ? null : rs.getDouble("dx")) + .dxhjbgz(rs.getDouble("dxhjbgz") == -1 ? null : rs.getDouble("dxhjbgz")) + .dxbl(rs.getDouble("dxbl") == -1 ? null : rs.getDouble("dxbl")) .build()); } }