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))