Merge branch 'fix/240603_薪资明细导出排序' into release/2.14.5.2406.03

This commit is contained in:
Harryxzy 2024-06-26 10:37:51 +08:00
commit c1c8bae9da
4 changed files with 42 additions and 0 deletions

View File

@ -36,6 +36,8 @@ public class SalaryArchiveQueryParam extends BaseQueryParam {
//个税扣缴义务人id
private Long taxAgentId;
private List<Long> taxAgentIds;
private String taxAgentName;
//分部id

View File

@ -136,6 +136,13 @@
<if test="param.workcode != null and param.workcode != ''">
AND e.workcode like CONCAT('%',#{param.workcode},'%')
</if>
<!-- 个税扣缴义务人 -->
<if test="param.taxAgentIds != null and param.taxAgentIds.size()>0">
AND t.tax_agent_id IN
<foreach collection="param.taxAgentIds" open="(" item="taxAgentId" separator="," close=")">
#{taxAgentId}
</foreach>
</if>
<!-- 分部 -->
<if test="param.subcompanyIds != null and param.subcompanyIds.size()>0">
AND c.id IN
@ -232,6 +239,13 @@
<if test="param.workcode != null and param.workcode != ''">
AND e.workcode like '%'||#{param.workcode}||'%'
</if>
<!-- 个税扣缴义务人 -->
<if test="param.taxAgentIds != null and param.taxAgentIds.size()>0">
AND t.tax_agent_id IN
<foreach collection="param.taxAgentIds" open="(" item="taxAgentId" separator="," close=")">
#{taxAgentId}
</foreach>
</if>
<if test="param.subcompanyIds != null and param.subcompanyIds.size()>0">
AND c.id IN
<foreach collection="param.subcompanyIds" open="(" item="subcompanyId" separator="," close=")">
@ -326,6 +340,13 @@
<if test="param.workcode != null and param.workcode != ''">
AND e.workcode like '%'+#{param.workcode}+'%'
</if>
<!-- 个税扣缴义务人 -->
<if test="param.taxAgentIds != null and param.taxAgentIds.size()>0">
AND t.tax_agent_id IN
<foreach collection="param.taxAgentIds" open="(" item="taxAgentId" separator="," close=")">
#{taxAgentId}
</foreach>
</if>
<if test="param.subcompanyIds != null and param.subcompanyIds.size()>0">
AND c.id IN
<foreach collection="param.subcompanyIds" open="(" item="subcompanyId" separator="," close=")">
@ -430,6 +451,12 @@
<if test="param.taxAgentId != null">
AND t.tax_agent_id = #{param.taxAgentId}
</if>
<if test="param.taxAgentIds != null and param.taxAgentIds.size()>0">
AND t.tax_agent_id IN
<foreach collection="param.taxAgentIds" open="(" item="taxAgentId" separator="," close=")">
#{taxAgentId}
</foreach>
</if>
<!-- 姓名 -->
<if test="param.username != null and param.username != ''">
AND e.username like CONCAT('%',#{param.username},'%')

View File

@ -47,4 +47,7 @@ public class SalaryStatisticsEmployeeSalaryQueryParam extends BaseQueryParam {
// 部分导出id
private List<Long> ids;
// 导出时显示列定制信息
List<String> columns;
}

View File

@ -20,6 +20,7 @@ import com.engine.salary.report.entity.param.SalaryStatisticsEmployeeSalaryQuery
import com.engine.salary.report.service.SalaryStatisticsEmployeeService;
import com.engine.salary.report.service.impl.SalaryStatisticsEmployeeServiceImpl;
import com.engine.salary.report.util.ReportDataUtil;
import com.engine.salary.util.SalaryEntityUtil;
import com.engine.salary.util.SalaryI18nUtil;
import com.engine.salary.util.excel.ExcelUtilPlus;
import com.engine.salary.util.page.PageInfo;
@ -264,6 +265,15 @@ public class SalaryStatisticsEmployeeWrapper extends Service {
List<Map<String, Object>> resultList = ((PageInfo<Map<String, Object>>) resultMap.get("pageInfo")).getList();
Map<String, Object> countResult = (Map<String, Object>)resultMap.get("countResult");
Map<String, WeaTableColumn> columnMap = SalaryEntityUtil.convert2Map(columns, WeaTableColumn::getColumn);
List<WeaTableColumn> finalColumns = new ArrayList<>();
queryParam.getColumns().forEach(col -> {
WeaTableColumn column = columnMap.get(col);
if (column != null) {
finalColumns.add(column);
}
});
columns = finalColumns;
List<List<Object>> rowList = new ArrayList<>();
// 表头
rowList.add(columns.stream().map(WeaTableColumn::getText).collect(Collectors.toList()));