parent
61cf337bde
commit
9978eefcfe
|
|
@ -21,6 +21,8 @@ public class FsdReportJSONParam {
|
||||||
|
|
||||||
private String xh;
|
private String xh;
|
||||||
|
|
||||||
|
private String historyTableName;
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
private FsdReportRuleJSONParam rule;
|
private FsdReportRuleJSONParam rule;
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ public class FsdReportRuleJSONParam {
|
||||||
private List<Long> deptids;
|
private List<Long> deptids;
|
||||||
private List<Long> jobtitleids;
|
private List<Long> jobtitleids;
|
||||||
private List<Long> subcomids;
|
private List<Long> subcomids;
|
||||||
|
private List<Long> salarysobids;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1404,10 +1404,16 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
|
||||||
List<Long> totalSalaryAcctEmpIds = totalSalaryAcctEmployeeList.stream().map(SalaryAcctEmployeePO::getId).collect(Collectors.toList());
|
List<Long> totalSalaryAcctEmpIds = totalSalaryAcctEmployeeList.stream().map(SalaryAcctEmployeePO::getId).collect(Collectors.toList());
|
||||||
log.info("salaryReport 当月核算人数{}", totalSalaryAcctEmpIds == null ? 0 : totalSalaryAcctEmpIds.size());
|
log.info("salaryReport 当月核算人数{}", totalSalaryAcctEmpIds == null ? 0 : totalSalaryAcctEmpIds.size());
|
||||||
List<SalaryAcctResultPO> totalAcctResultPOList = listByAcctEmployeeIdsAndSalaryItemIds(totalSalaryAcctEmpIds, itemIds);
|
List<SalaryAcctResultPO> totalAcctResultPOList = listByAcctEmployeeIdsAndSalaryItemIds(totalSalaryAcctEmpIds, itemIds);
|
||||||
|
|
||||||
|
List<FsdReportJSONParam> fsdReportJSONParams = JsonUtil.parseList(param.getParam(), FsdReportJSONParam.class);
|
||||||
// 获取建模中的历史数据
|
// 获取建模中的历史数据
|
||||||
RecordSet rs = new RecordSet();
|
RecordSet rs = new RecordSet();
|
||||||
List<FsdReportLssjDTO> lssjList = new ArrayList<FsdReportLssjDTO>();
|
List<FsdReportLssjDTO> lssjList = new ArrayList<FsdReportLssjDTO>();
|
||||||
rs.execute("select lb,xzssy,dygzrs,dygzze from uf_xcfxbzblssj where xzssy >= '"+ SalaryDateUtil.getFormatYearMonth(salaryMonth)+"' and xzssy <='"+ SalaryDateUtil.getFormatYearMonth(salaryMonth)+"'");
|
String historyTableName = "";
|
||||||
|
if (CollectionUtils.isNotEmpty(fsdReportJSONParams) && fsdReportJSONParams.get(0) != null) {
|
||||||
|
historyTableName = fsdReportJSONParams.get(0).getHistoryTableName();
|
||||||
|
}
|
||||||
|
rs.execute("select lb,xzssy,dygzrs,dygzze from " +historyTableName+ " where xzssy >= '"+ SalaryDateUtil.getFormatYearMonth(salaryMonth)+"' and xzssy <='"+ SalaryDateUtil.getFormatYearMonth(salaryMonth)+"'");
|
||||||
while (rs.next()) {
|
while (rs.next()) {
|
||||||
lssjList.add(FsdReportLssjDTO.builder()
|
lssjList.add(FsdReportLssjDTO.builder()
|
||||||
.lb(rs.getString("lb"))
|
.lb(rs.getString("lb"))
|
||||||
|
|
@ -1416,9 +1422,9 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
|
||||||
.dygzze(SalaryEntityUtil.string2BigDecimalDefault0(rs.getString("dygzze")))
|
.dygzze(SalaryEntityUtil.string2BigDecimalDefault0(rs.getString("dygzze")))
|
||||||
.build());
|
.build());
|
||||||
}
|
}
|
||||||
|
|
||||||
log.info("salaryReport 当月核算历史数据人数{}", lssjList == null ? 0 : lssjList.size());
|
log.info("salaryReport 当月核算历史数据人数{}", lssjList == null ? 0 : lssjList.size());
|
||||||
Map<String, List<FsdReportLssjDTO>> lssjMap = SalaryEntityUtil.group2Map(lssjList, FsdReportLssjDTO::getLb);
|
Map<String, List<FsdReportLssjDTO>> lssjMap = SalaryEntityUtil.group2Map(lssjList, FsdReportLssjDTO::getLb);
|
||||||
List<FsdReportJSONParam> fsdReportJSONParams = JsonUtil.parseList(param.getParam(), FsdReportJSONParam.class);
|
|
||||||
for (FsdReportJSONParam rangeParam : fsdReportJSONParams) {
|
for (FsdReportJSONParam rangeParam : fsdReportJSONParams) {
|
||||||
List<FsdReportJSONParam> childrenParamList = rangeParam.getChildren();
|
List<FsdReportJSONParam> childrenParamList = rangeParam.getChildren();
|
||||||
if (!CollectionUtils.isEmpty(childrenParamList)) {
|
if (!CollectionUtils.isEmpty(childrenParamList)) {
|
||||||
|
|
@ -1461,7 +1467,7 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
|
||||||
totalAcctResultPOList = listByAcctEmployeeIdsAndSalaryItemIds(totalSalaryAcctEmpIds, itemIds);
|
totalAcctResultPOList = listByAcctEmployeeIdsAndSalaryItemIds(totalSalaryAcctEmpIds, itemIds);
|
||||||
// 获取建模中的历史数据
|
// 获取建模中的历史数据
|
||||||
lssjList = new ArrayList<FsdReportLssjDTO>();
|
lssjList = new ArrayList<FsdReportLssjDTO>();
|
||||||
rs.execute("select lb,xzssy,dygzrs,dygzze from uf_xcfxbzblssj where xzssy >= '"+ SalaryDateUtil.getFormatYearMonth(thisYearStartDate)+"' and xzssy <='"+ SalaryDateUtil.getFormatYearMonth(salaryMonth)+"'");
|
rs.execute("select lb,xzssy,dygzrs,dygzze from "+historyTableName+" where xzssy >= '"+ SalaryDateUtil.getFormatYearMonth(thisYearStartDate)+"' and xzssy <='"+ SalaryDateUtil.getFormatYearMonth(salaryMonth)+"'");
|
||||||
while (rs.next()) {
|
while (rs.next()) {
|
||||||
lssjList.add(FsdReportLssjDTO.builder()
|
lssjList.add(FsdReportLssjDTO.builder()
|
||||||
.lb(rs.getString("lb"))
|
.lb(rs.getString("lb"))
|
||||||
|
|
@ -1518,7 +1524,7 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
|
||||||
totalAcctResultPOList = listByAcctEmployeeIdsAndSalaryItemIds(totalSalaryAcctEmpIds, itemIds);
|
totalAcctResultPOList = listByAcctEmployeeIdsAndSalaryItemIds(totalSalaryAcctEmpIds, itemIds);
|
||||||
// 获取建模中的历史数据
|
// 获取建模中的历史数据
|
||||||
lssjList = new ArrayList<FsdReportLssjDTO>();
|
lssjList = new ArrayList<FsdReportLssjDTO>();
|
||||||
rs.execute("select lb,xzssy,dygzrs,dygzze from uf_xcfxbzblssj where xzssy >= '"+ SalaryDateUtil.getFormatYearMonth(lastYearStartDate)+"' and xzssy <='"+ SalaryDateUtil.getFormatYearMonth(lastYearEndDate)+"'");
|
rs.execute("select lb,xzssy,dygzrs,dygzze from "+historyTableName+" where xzssy >= '"+ SalaryDateUtil.getFormatYearMonth(lastYearStartDate)+"' and xzssy <='"+ SalaryDateUtil.getFormatYearMonth(lastYearEndDate)+"'");
|
||||||
while (rs.next()) {
|
while (rs.next()) {
|
||||||
lssjList.add(FsdReportLssjDTO.builder()
|
lssjList.add(FsdReportLssjDTO.builder()
|
||||||
.lb(rs.getString("lb"))
|
.lb(rs.getString("lb"))
|
||||||
|
|
@ -1609,6 +1615,9 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
|
||||||
resultMap.put("value", lsValSum.toString());
|
resultMap.put("value", lsValSum.toString());
|
||||||
return resultMap;
|
return resultMap;
|
||||||
}
|
}
|
||||||
|
if (CollectionUtils.isNotEmpty(rule.getSalarysobids())) {
|
||||||
|
salaryAcctEmployeeList = salaryAcctEmployeeList.stream().filter(salaryAcctEmployee -> rule.getSalarysobids().contains(salaryAcctEmployee.getSalarySobId())).collect(Collectors.toList());
|
||||||
|
}
|
||||||
if (CollectionUtils.isNotEmpty(rule.getSubcomids())) {
|
if (CollectionUtils.isNotEmpty(rule.getSubcomids())) {
|
||||||
salaryAcctEmployeeList = salaryAcctEmployeeList.stream().filter(salaryAcctEmployee -> rule.getSubcomids().contains(salaryAcctEmployee.getSubcompanyId())).collect(Collectors.toList());
|
salaryAcctEmployeeList = salaryAcctEmployeeList.stream().filter(salaryAcctEmployee -> rule.getSubcomids().contains(salaryAcctEmployee.getSubcompanyId())).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue