From b03e5efbcfdc606b32be7615f29009be3e6ea439 Mon Sep 17 00:00:00 2001 From: fcli Date: Thu, 17 Nov 2022 15:13:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B2=BF=E7=94=A8=E4=B8=8A=E6=9C=88?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/OtherDeductionServiceImpl.java | 11 +++++------ .../engine/salary/wrapper/OtherDeductionWrapper.java | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java b/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java index a2faf3ebe..828d7ee8f 100644 --- a/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java @@ -793,11 +793,10 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction //查询已经核算的数据 List salaryAcctEmployees = getAddUpDeductionService(user) - .getAccountedEmployeeData(param.getDeclareMonth()); - Map acctInfoMap = salaryAcctEmployees.stream().collect(Collectors.toMap( - i -> i.getTaxAgentId() + "" + i.getEmployeeId(), - SalaryAcctEmployeePO::getId - )); + .getAccountedEmployeeData(param.getDeclareMonth()); + Map> acctInfoMap = salaryAcctEmployees.stream() + .distinct().collect(Collectors.groupingBy( + i -> i.getTaxAgentId() + "" + i.getEmployeeId())); // 查找到所有个税扣缴义务人 Boolean needAuth = getTaxAgentService(user).isNeedAuth((long) user.getUID()); @@ -840,7 +839,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction //核算过的数据直接跳过不做更改 po.setId(updateIdMap.get(po.getEmployeeId() + "" + po.getTaxAgentId())); updatetInfo.add(po); - } else if (!hasOld){ + } else if (!hasOld) { po.setCreator((long) user.getUID()); po.setCreateTime(new Date()); insertInfo.add(po); diff --git a/src/com/engine/salary/wrapper/OtherDeductionWrapper.java b/src/com/engine/salary/wrapper/OtherDeductionWrapper.java index 1589ac74b..b3b4e8475 100644 --- a/src/com/engine/salary/wrapper/OtherDeductionWrapper.java +++ b/src/com/engine/salary/wrapper/OtherDeductionWrapper.java @@ -262,7 +262,7 @@ public class OtherDeductionWrapper extends Service { throw new SalaryRunTimeException("当前年月不合法"); } if (Month.JANUARY.equals(localDate.getMonth())) { - throw new SalaryRunTimeException("失败,当前年度内第一个月无法沿用上月"); + throw new SalaryRunTimeException("操作失败,每年度内首月无法沿用上月"); } param.setYearMonthTime(localDate); return getOtherDeductionService(user).extendToLastMonth(param);