From d6061fa0596759d6cd1aa44a67879135ba96a177 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Wed, 2 Jul 2025 20:43:53 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=B3=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/datacollection/OtherDeductionMapper.xml | 10 +++++++++- .../engine/salary/service/OtherDeductionService.java | 4 ++-- .../salary/service/impl/OtherDeductionServiceImpl.java | 6 +++--- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.xml b/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.xml index c3fd0e391..ef566fdd7 100644 --- a/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.xml @@ -813,14 +813,22 @@ left join hrsa_other_derate_deduction f on t.id=f.main_id and f.delete_type=0 and f.income_category=#{param.incomeCategory} left join hrsa_personal_pension g on t.id=g.main_id and g.delete_type=0 and g.income_category=#{param.incomeCategory} where t.delete_type=0 - and t.tax_agent_id = #{param.taxAgentId} and t.declare_month = #{param.declareMonth} + + and t.tax_agent_id = #{param.taxAgentId} + AND t.employee_id IN #{employeeId} + + AND t.tax_agent_id IN + + #{taxAgentId} + + \ No newline at end of file diff --git a/src/com/engine/salary/service/OtherDeductionService.java b/src/com/engine/salary/service/OtherDeductionService.java index 874b93bc2..c2fd7f1e0 100644 --- a/src/com/engine/salary/service/OtherDeductionService.java +++ b/src/com/engine/salary/service/OtherDeductionService.java @@ -102,11 +102,11 @@ public interface OtherDeductionService { * 按照申报表类型,获取其他免税扣除数据 * @param declareMonth * @param employeeIds - * @param taxAgentId + * @param taxAgentIds * @param incomeCategory * @return */ - List getOtherDeductionList(YearMonth declareMonth, List employeeIds, Long taxAgentId, Integer incomeCategory); + List getOtherDeductionList(YearMonth declareMonth, List employeeIds, List taxAgentIds, Integer incomeCategory); /** * 编辑数据 diff --git a/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java b/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java index ea4ceeb3a..b192459e7 100644 --- a/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java @@ -1894,18 +1894,18 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction } @Override - public List getOtherDeductionList(YearMonth declareMonth, List employeeIds, Long taxAgentId, Integer incomeCategory) { + public List getOtherDeductionList(YearMonth declareMonth, List employeeIds, List taxAgentIds, Integer incomeCategory) { if (declareMonth == null) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100342, "参数有误:申报月份必传")); } - if (taxAgentId == null) { + if (CollUtil.isEmpty(taxAgentIds)) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100342, "参数有误:扣缴义务人必传")); } if (incomeCategory == null) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100342, "参数有误:所得项目必传")); } - List otherDeductionPOS = listDetails(OtherDeductionPO.builder().incomeCategory(incomeCategory).declareMonth(SalaryDateUtil.toDateStartOfMonth(declareMonth)).employeeIds(employeeIds).taxAgentId(taxAgentId).build()); + List otherDeductionPOS = listDetails(OtherDeductionPO.builder().incomeCategory(incomeCategory).declareMonth(SalaryDateUtil.toDateStartOfMonth(declareMonth)).employeeIds(employeeIds).taxAgentIds(taxAgentIds).build()); if (CollUtil.isEmpty(otherDeductionPOS)) { return new ArrayList<>(); }