From d01c9bf06fcffd26a350bfa97f68f0c455d437cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Thu, 17 Apr 2025 11:06:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=89=A3=E7=BC=B4=E4=B9=89?= =?UTF-8?q?=E5=8A=A1=E4=BA=BA=E6=90=9C=E7=B4=A2=E6=A0=B8=E7=AE=97=E5=88=97?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../param/SalaryAcctRecordQueryParam.java | 6 ++++++ .../impl/SalaryAcctRecordServiceImpl.java | 18 +++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/com/engine/salary/entity/salaryacct/param/SalaryAcctRecordQueryParam.java b/src/com/engine/salary/entity/salaryacct/param/SalaryAcctRecordQueryParam.java index b737f857e..8424aa765 100644 --- a/src/com/engine/salary/entity/salaryacct/param/SalaryAcctRecordQueryParam.java +++ b/src/com/engine/salary/entity/salaryacct/param/SalaryAcctRecordQueryParam.java @@ -7,6 +7,7 @@ import lombok.Data; import lombok.NoArgsConstructor; import java.time.YearMonth; +import java.util.List; /** * 薪资核算列表查询参数 @@ -31,6 +32,11 @@ public class SalaryAcctRecordQueryParam extends BaseQueryParam { //账套名称") private String name; + /** + * 扣缴义务人id集合 + */ + private List taxAgentIds; + private String startMonthStr; private String endMonthStr; } diff --git a/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java index 2a75368dc..9958f8d27 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java @@ -1,5 +1,6 @@ package com.engine.salary.service.impl; +import cn.hutool.core.collection.CollUtil; import com.api.formmode.mybatis.util.SqlProxyHandle; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; @@ -177,6 +178,21 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe Set salarySobIds = SalaryEntityUtil.properties(salarySobPOS, SalarySobPO::getId); po.setSalarySobIds(salarySobIds); } + if (CollUtil.isNotEmpty(queryParam.getTaxAgentIds())) { + List salarySobPOS = getSalarySobService(user).listByTaxAgentIds(queryParam.getTaxAgentIds()); + if (CollectionUtils.isEmpty(salarySobPOS)) { + return page; + } + Set salarySobIds = SalaryEntityUtil.properties(salarySobPOS, SalarySobPO::getId); + + Collection existIds = po.getSalarySobIds(); + if (CollectionUtils.isNotEmpty(existIds)) { + existIds = SalaryEntityUtil.intersectionForList(existIds, salarySobIds); + po.setSalarySobIds(existIds); + } else { + po.setSalarySobIds(salarySobIds); + } + } LocalDateRange localDateRange = new LocalDateRange(); if (Objects.nonNull(queryParam.getStartMonth())) { localDateRange.setFromDate(SalaryDateUtil.localDateToDate(queryParam.getStartMonth().atDay(1))); @@ -827,6 +843,6 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe @Override public void updateDate(Long id, Date updateTime) { - getSalaryAcctRecordMapper().updateDate(id,updateTime); + getSalaryAcctRecordMapper().updateDate(id, updateTime); } }