报表数据透视fixbug

This commit is contained in:
Harryxzy 2023-06-08 12:25:11 +08:00
parent 50fd5812d4
commit 3d11c74d32
2 changed files with 3 additions and 5 deletions

View File

@ -419,9 +419,8 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary
}
// 同一个人放在一起
listByDimensionValue = listByDimensionValue.stream().sorted(Comparator.comparing(SalaryAcctEmployeePO::getEmployeeId)).collect(Collectors.toList());
PageInfo<SalaryAcctEmployeePO> salaryAcctEmployeePOPageInfo = SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), listByDimensionValue);
// 构建核算结果数据
List<Map<String, Object>> records = buildResultRecords(salaryAcctEmployeePOPageInfo.getList(), map);
List<Map<String, Object>> records = buildResultRecords(listByDimensionValue, map);
PageInfo<Map<String, Object>> pageInfo = SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), records);
pageInfo.setTotal(listByDimensionValue.size());
return pageInfo;
@ -457,7 +456,7 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary
});
DataCollectionEmployee emp = employeeMap.get(se.getEmployeeId());
resultMap.put("id", se.getId().toString());
resultMap.put("username", emp == null ? "" : emp.getUsername());
resultMap.put("userName", emp == null ? "" : emp.getUsername());
resultMap.put("departmentName", emp == null ? "" : emp.getDepartmentName());
resultMap.put("salaryMonth", SalaryDateUtil.getFormatYearMonth(se.getSalaryMonth()));
resultMap.put("taxAgent", taxAgentMap.get(se.getTaxAgentId()));

View File

@ -1,7 +1,6 @@
package com.engine.salary.report.wrapper;
import com.alibaba.fastjson.JSONArray;
import com.cloudstore.eccom.constant.WeaBoolAttr;
import com.cloudstore.eccom.pc.table.WeaTableColumn;
import com.cloudstore.eccom.result.WeaResultMsg;
import com.engine.common.util.ServiceUtil;
@ -373,7 +372,7 @@ public class SalaryStatisticsReportWrapper extends Service {
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(87614, "薪资所属月"), "salaryMonth"));
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86184, "个税扣缴义务人"), "taxAgent"));
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86184, "账套"), "salarySob"));
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86184, "次数"), "acctTimes").setDisplay(WeaBoolAttr.FALSE));
// columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86184, "次数"), "acctTimes").setDisplay(WeaBoolAttr.FALSE));
salaryItems.forEach(item -> {
columns.add(new WeaTableColumn("100px", item.getName(), item.getId() + SalaryConstant.DYNAMIC_SUFFIX));
});