From 616ddce09204f35ee9cb052c61daa4ac683f065a Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Tue, 27 Feb 2024 16:22:16 +0800 Subject: [PATCH] =?UTF-8?q?=E8=89=BE=E5=BF=97=E3=80=8A2024-01=E4=B8=AA?= =?UTF-8?q?=E7=A8=8E=E7=94=B3=E6=8A=A5=E9=97=AE=E9=A2=98=E6=B1=87=E6=80=BB?= =?UTF-8?q?=E3=80=8B1=E3=80=813=E3=80=815=E3=80=816?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../employeedeclare/bo/EmployeeDeclareRefresh.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/com/engine/salary/entity/employeedeclare/bo/EmployeeDeclareRefresh.java b/src/com/engine/salary/entity/employeedeclare/bo/EmployeeDeclareRefresh.java index dc6baaf10..264f77ca5 100644 --- a/src/com/engine/salary/entity/employeedeclare/bo/EmployeeDeclareRefresh.java +++ b/src/com/engine/salary/entity/employeedeclare/bo/EmployeeDeclareRefresh.java @@ -45,7 +45,7 @@ public class EmployeeDeclareRefresh { // if (Objects.equals(employeeDeclare.getEmploymentStatus(), EmploymentStatusEnum.ABNORMAL.getValue()) // || Objects.equals(Util.null2String(employeeDeclare.getDismissDate()), Util.null2String(salaryArchive.getPayEndDate()))) { if (Objects.equals(employeeDeclare.getEmploymentStatus(), EmploymentStatusEnum.ABNORMAL.getValue()) - || (!SalaryDateUtil.localDate2YearMonth(salaryArchive.getLastPayDate()).plusMonths(2).isAfter(SalaryDateUtil.localDate2YearMonth(dto.getTaxCycle())) )) { + || (salaryArchive.getLastPayDate() != null && (!SalaryDateUtil.localDate2YearMonth(salaryArchive.getLastPayDate()).plusMonths(2).isAfter(SalaryDateUtil.localDate2YearMonth(dto.getTaxCycle()))) )) { employeeDeclare.setEmploymentStatus(EmploymentStatusEnum.ABNORMAL.getValue()); employeeDeclare.setDismissDate(salaryArchive.getLastPayDate()); employeeDeclare.setNewEmployeeInfo(1); @@ -80,8 +80,9 @@ public class EmployeeDeclareRefresh { // if (salaryArchive != null && (Objects.equals(salaryArchive.getRunStatus(), SalaryArchiveStatusEnum.STOP_FROM_PENDING.getValue()) // || Objects.equals(salaryArchive.getRunStatus(), SalaryArchiveStatusEnum.STOP_FROM_SUSPEND.getValue()))) { // 校验 末次发薪日期+2 是否等于或早于当前税款所属期 - if (!SalaryDateUtil.localDate2YearMonth(salaryArchive.getLastPayDate()).plusMonths(2) - .isAfter(SalaryDateUtil.localDate2YearMonth(dto.getTaxCycle())) ) { + if (salaryArchive.getLastPayDate() != null && + (!SalaryDateUtil.localDate2YearMonth(salaryArchive.getLastPayDate()).plusMonths(2) + .isAfter(SalaryDateUtil.localDate2YearMonth(dto.getTaxCycle())) )) { employeeDeclare.setDeclareStatus(DeclareStatusEnum.NOT_DECLARE.getValue()); employeeDeclare.setEmploymentStatus(EmploymentStatusEnum.ABNORMAL.getValue()); employeeDeclare.setDismissDate(salaryArchive.getLastPayDate()); @@ -137,8 +138,9 @@ public class EmployeeDeclareRefresh { // if (Objects.equals(salaryArchive.getRunStatus(), SalaryArchiveStatusEnum.STOP_FROM_PENDING.getValue()) // || Objects.equals(salaryArchive.getRunStatus(), SalaryArchiveStatusEnum.STOP_FROM_SUSPEND.getValue())) { // 校验 末次发薪日期+2 是否等于或早于当前税款所属期 - if (!SalaryDateUtil.localDate2YearMonth(salaryArchive.getLastPayDate()).plusMonths(2) - .isAfter(SalaryDateUtil.localDate2YearMonth(dto.getTaxCycle())) ) { + if (salaryArchive.getLastPayDate() != null && + (!SalaryDateUtil.localDate2YearMonth(salaryArchive.getLastPayDate()).plusMonths(2) + .isAfter(SalaryDateUtil.localDate2YearMonth(dto.getTaxCycle()))) ) { employeeDeclare.setEmploymentStatus(EmploymentStatusEnum.ABNORMAL.getValue()); employeeDeclare.setDismissDate(salaryArchive.getLastPayDate()); }