From 3274043397821fa15f46ac27cdf1116df5d89346 Mon Sep 17 00:00:00 2001 From: Harryxzy <822365880@qq.com> Date: Tue, 9 Sep 2025 18:46:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=93=E9=A1=B9=E9=99=84=E5=8A=A0=E6=89=A3?= =?UTF-8?q?=E9=99=A4=E4=B8=9A=E5=8A=A1=E7=BA=BFbug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/SpecialAddDeductionServiceImpl.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java b/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java index ed7102c46..85a3b8207 100644 --- a/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java @@ -471,15 +471,20 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd SpecialAddDeductionBiz SpecialAddDeductionBiz = new SpecialAddDeductionBiz(); Long currentEmployeeId = (long) user.getUID(); // 获取所有个税扣缴义务人 - Collection taxAgentList = - getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId); + // Collection taxAgentList = + // getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId); + + TaxAgentQueryParam param = TaxAgentQueryParam.builder().build(); + param.setFilterType(AuthFilterTypeEnum.ADMIN_DATA); + Collection taxAgentList = getTaxAgentService(user).listAuth(param); + SpecialAddDeductionPO byId = SpecialAddDeductionBiz.getById(specialAddDeductionParam.getId()); if (byId == null) { throw new SalaryRunTimeException("该数据不存在!"); } //管理员可以编辑该扣缴义务人数据,其他人可以编辑本人数据 boolean canEdit = byId.getEmployeeId().equals((long) user.getUID()) - || taxAgentList.stream().anyMatch(t -> Objects.equals(t.getTaxAgentId(), byId.getTaxAgentId())); + || taxAgentList.stream().anyMatch(t -> Objects.equals(t.getId(), byId.getTaxAgentId())); if (!canEdit) { //没有编辑权限 throw new SalaryRunTimeException("该个税扣缴义务人无权限编辑此数据!");