diff --git a/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java index 254208b86..6f16c59b1 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java @@ -638,9 +638,9 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(98819, "薪资核算结果还未归档,可直接核算")); } // 税款所在年的日期范围(第一天~最后一天) - LocalDateRange yearRange = SalaryDateUtil.localDate2YearRange(salaryAcctRecordPO.getSalaryMonth()); + LocalDateRange yearRange = SalaryDateUtil.localDate2YearRange(salaryAcctRecordPO.getTaxCycle()); if (Objects.isNull(yearRange)) { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(84026, "薪资所属月为空")); + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(84026, "税款所属期为空")); } // 查询税款所在年的该个税扣缴义务人所有薪资核算记录 // 获取账套所属个税扣缴义务人的核算记录 @@ -657,13 +657,13 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe if (!taxDeclarationFunctionEnum.getValue().equals(TaxDeclarationFunctionEnum.CLOSURE.getValue())) { // 如果已经存在之后月份的薪资核算记录了,就不允许重新核算本月了 SalaryAcctRecordPO afterSalaryAcctRecordPO = selfSalaryAcctRecordPOS.stream() - .filter(po -> po.getSalaryMonth().compareTo(salaryAcctRecordPO.getSalaryMonth()) > 0) + .filter(po -> po.getTaxCycle().compareTo(salaryAcctRecordPO.getTaxCycle()) > 0) .findAny() .orElse(null); if (Objects.nonNull(afterSalaryAcctRecordPO)) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(105826, "已经存在{0}的薪资核算记录了,不能重新核算{1}的薪资了") - .replace("{0}", SalaryDateUtil.localDate2YearMonth(afterSalaryAcctRecordPO.getSalaryMonth()).toString()) - .replace("{1}", SalaryDateUtil.localDate2YearMonth(salaryAcctRecordPO.getSalaryMonth()).toString())); + .replace("{0}", SalaryDateUtil.localDate2YearMonth(afterSalaryAcctRecordPO.getTaxCycle()).toString()) + .replace("{1}", SalaryDateUtil.localDate2YearMonth(salaryAcctRecordPO.getTaxCycle()).toString())); } }