重新核算采用税局所属期校验
This commit is contained in:
parent
bc755769a1
commit
50684c9c68
|
|
@ -661,9 +661,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, "税款所属期为空"));
|
||||
}
|
||||
// 查询税款所在年的该个税扣缴义务人所有薪资核算记录
|
||||
// 获取账套所属个税扣缴义务人的核算记录
|
||||
|
|
@ -680,13 +680,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()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue