From e3200f79325719d51cdd384596bc8a0ef444fd13 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Fri, 30 Aug 2024 13:35:17 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix=E6=8A=A5=E8=A1=A8=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=80=8F=E8=A7=86=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/SalaryStatisticsReportServiceImpl.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java b/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java index b75c5c413..962e3b135 100644 --- a/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java +++ b/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java @@ -445,8 +445,18 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary // 获取报表统计薪资项目 List salaryItemIds = salaryStatisticsItemPOS.stream().filter(item -> StringUtils.isNotBlank(item.getItemValue())).map(p -> p.getItemValue().split(",")).flatMap(Arrays::stream).map(Long::valueOf).collect(Collectors.toList()); // 参数转换 - param.setSalaryStartMonth(SalaryDateUtil.getFormatYearMonth(reportPO.getSalaryStartMonth())); - param.setSalaryEndMonth(SalaryDateUtil.getFormatYearMonth(reportPO.getSalaryEndMonth())); + String salaryStartMonth = param.getSalaryStartMonth(); + if (salaryStartMonth == null) { + param.setSalaryStartMonth(SalaryDateUtil.getFormatYearMonth(reportPO.getSalaryStartMonth())); + } else { + param.setSalaryStartMonth(SalaryDateUtil.getFormatYearMonth(SalaryDateUtil.dateStrToLocalDate(salaryStartMonth))); + } + String salaryEndMonth = param.getSalaryEndMonth(); + if (salaryEndMonth == null) { + param.setSalaryEndMonth(SalaryDateUtil.getFormatYearMonth(reportPO.getSalaryEndMonth())); + } else { + param.setSalaryEndMonth(SalaryDateUtil.getFormatYearMonth(SalaryDateUtil.dateStrToLocalDate(salaryEndMonth))); + } String key = "id"; if (reportPO.getTaxAgentSetting() != null) { param.setTaxAgent(((List) JSON.parseArray(reportPO.getTaxAgentSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList())); From c212a2782f35f4ff413da57618249c8fddd01348 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Fri, 13 Sep 2024 14:54:52 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E5=A2=9E=E5=8A=A0=E5=B2=97=E4=BD=8D=E7=AD=9B?= =?UTF-8?q?=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/SalaryAcctEmployeeServiceImpl.java | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/com/engine/salary/service/impl/SalaryAcctEmployeeServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctEmployeeServiceImpl.java index 621b2b068..7ca1a1f4d 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctEmployeeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctEmployeeServiceImpl.java @@ -712,19 +712,20 @@ public class SalaryAcctEmployeeServiceImpl extends Service implements SalaryAcct // } // list = list.stream().filter(po -> employeeIdsByGradeFilter.contains(po.getEmployeeId())).collect(Collectors.toList()); // } -// // 岗位过滤 -// if (CollectionUtils.isNotEmpty(param.getPosition())) { -// Set employeeIdsByPostionFilter = new HashSet<>(); -// simpleEmployeeList.forEach(simpleEmployee -> { -// if (simpleEmployee.getPosition() != null && param.getPosition().contains(simpleEmployee.getPosition().getId())) { -// employeeIdsByPostionFilter.add(simpleEmployee.getEmployeeId()); -// } -// }); -// if (CollectionUtils.isEmpty(employeeIdsByPostionFilter)) { -// return Lists.newArrayList(); -// } -// list = list.stream().filter(po -> employeeIdsByPostionFilter.contains(po.getEmployeeId())).collect(Collectors.toList()); -// } + // 岗位过滤 + List position = param.getPosition(); + if (CollectionUtils.isNotEmpty(position)) { + // Set employeeIdsByPostionFilter = new HashSet<>(); + // simpleEmployeeList.forEach(simpleEmployee -> { + // if (simpleEmployee.getPosition() != null && param.getPosition().contains(simpleEmployee.getPosition().getId())) { + // employeeIdsByPostionFilter.add(simpleEmployee.getEmployeeId()); + // } + // }); + // if (CollectionUtils.isEmpty(employeeIdsByPostionFilter)) { + // return Lists.newArrayList(); + // } + employeeList = employeeList.stream().filter(emp -> position.contains(emp.getJobtitleId())).collect(Collectors.toList()); + } // 人事状态过滤 if (CollectionUtils.isNotEmpty(param.getStatus())) { Set employeeIdsByStatus = new HashSet<>(); From eefd4d1795052991150d0b585c5e50a661e0b7be Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Sat, 14 Sep 2024 15:33:31 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=B2=97=E4=BD=8D=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/report/entity/bo/SalaryStatisticsReportBO.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/com/engine/salary/report/entity/bo/SalaryStatisticsReportBO.java b/src/com/engine/salary/report/entity/bo/SalaryStatisticsReportBO.java index 59abb699b..9ad7fb2fc 100644 --- a/src/com/engine/salary/report/entity/bo/SalaryStatisticsReportBO.java +++ b/src/com/engine/salary/report/entity/bo/SalaryStatisticsReportBO.java @@ -129,7 +129,9 @@ public class SalaryStatisticsReportBO { param.setDepart(((List) JSON.parseArray(po.getDepartSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList())); } // param.setGrade(((List) JSON.parseArray(po.getGradeSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList())); -// param.setPosition(((List) JSON.parseArray(po.getPositionSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList())); + if (po.getPositionSetting() != null) { + param.setPosition(((List) JSON.parseArray(po.getPositionSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList())); + } if (po.getStatusSetting() != null) { param.setStatus(((List) JSON.parseArray(po.getStatusSetting(), Map.class)).stream().map(m -> m.get(key).toString()).collect(Collectors.toList())); }