From f71b8bf7c98a693d0bb220c9d880712abe3ecf6d Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Fri, 14 Jun 2024 10:43:15 +0800 Subject: [PATCH] =?UTF-8?q?=E8=89=BE=E5=BF=97=20-=20=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=8A=A5=E9=80=81=E5=88=B7=E6=96=B0=E6=A0=B9?= =?UTF-8?q?=E6=8D=AE=E9=A6=96=E6=AC=A1=E5=8F=91=E8=96=AA=E6=97=A5=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/EmployeeDeclareServiceImpl.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/com/engine/salary/service/impl/EmployeeDeclareServiceImpl.java b/src/com/engine/salary/service/impl/EmployeeDeclareServiceImpl.java index 6a53fe013..7976594c2 100644 --- a/src/com/engine/salary/service/impl/EmployeeDeclareServiceImpl.java +++ b/src/com/engine/salary/service/impl/EmployeeDeclareServiceImpl.java @@ -28,7 +28,6 @@ import com.engine.salary.entity.taxagent.po.TaxAgentPO; import com.engine.salary.entity.taxagent.po.TaxAgentTaxReturnPO; import com.engine.salary.entity.taxapiflow.bo.TaxApiFlowBO; import com.engine.salary.entity.taxapiflow.po.TaxDeclarationApiFlowRecordPO; -import com.engine.salary.entity.taxdeclaration.dto.AzGssbDTO; import com.engine.salary.entity.taxdeclaration.po.TaxDeclarationApiConfigPO; import com.engine.salary.enums.OperateTypeEnum; import com.engine.salary.enums.SalaryCycleTypeEnum; @@ -60,10 +59,8 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; -import weaver.conn.RecordSet; import weaver.general.Util; import weaver.hrm.User; -import weaver.hrm.company.DepartmentComInfo; import java.time.LocalDate; import java.util.*; @@ -506,6 +503,13 @@ public class EmployeeDeclareServiceImpl extends Service implements EmployeeDecla List salaryArchiveDataDTOS = getSalaryArchiveService(user).getSalaryArchiveTaxAgentData(salaryCycleRange, Collections.emptyList(), refreshParam.getTaxAgentId()); List employeeIds = salaryArchiveDataDTOS.stream().map(SalaryArchiveDataDTO::getEmployeeId).collect(Collectors.toList()); List salaryArchivePOS = getSalaryArchiveService(user).listSome(SalaryArchivePO.builder().taxAgentId(refreshParam.getTaxAgentId()).employeeIds(employeeIds).build()); + // 艾志二开 判断首次薪资发放日期是否满足 + LocalDate salaryCycleLocalDate = SalaryDateUtil.dateToLocalDate(SalaryDateUtil.getLastDayOfMonth(salaryCycle)); + salaryArchivePOS = salaryArchivePOS.stream().filter(archive -> archive.getFirstPayDate() != null && !SalaryDateUtil.dateToLocalDate(archive.getFirstPayDate()).isAfter(salaryCycleLocalDate) ).collect(Collectors.toList()); + employeeIds = salaryArchivePOS.stream().map(SalaryArchivePO::getEmployeeId).collect(Collectors.toList()); + List finalEmployeeIds = employeeIds; + salaryArchiveDataDTOS = salaryArchiveDataDTOS.stream().filter(dto -> finalEmployeeIds.contains(dto.getEmployeeId())).collect(Collectors.toList()); + // 本月增加了哪些人员 Set orgEmployeeIds = ((List) CollectionUtils.union(preTaxCycleEmployeeDeclares, employeeDeclares))