fix重新核算bug

This commit is contained in:
钱涛 2023-10-11 19:55:09 +08:00
parent 7368363631
commit 665dc7b36a
2 changed files with 12 additions and 12 deletions

View File

@ -60,7 +60,7 @@ public class TaxDeclareEmployeeBO {
.setCardNum(employeeDeclare.getCardNum())
.setDeclareStatus(declareStatusEnum)
.setDeclareStatusDesc(declareStatusEnum == null ? "" : SalaryI18nUtil.getI18nLabel(declareStatusEnum.getLabelId(), declareStatusEnum.getDefaultLabel()));
} else if (Objects.equals(taxDeclareEmployee.getEmployeeType(), EmployeeTypeEnum.ORGANIZATION.getValue())) {
} else if (taxDeclareEmployee.getEmployeeType() == null || Objects.equals(taxDeclareEmployee.getEmployeeType(), EmployeeTypeEnum.ORGANIZATION.getValue())) {
DataCollectionEmployee simpleEmployee = simpleEmployeeMap.get(taxDeclareEmployee.getEmployeeId());
DataCollectionEmployee simpleUserInfo = simpleUserInfoMap.get(taxDeclareEmployee.getEmployeeId());
abnormalEmployeeListDTO

View File

@ -792,6 +792,17 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe
// salaryAcctRecordPO.setRootId(Objects.equals(salaryAcctRecordPO.getRootId(), 0L) ? salaryAcctRecordPO.getId() : salaryAcctRecordPO.getRootId());
}
// 保存回算前的薪资核算结果
if (!isReCalc) {
getSalaryAcctResultService(user).reCalc(salaryAcctRecordPO.getId());
}
// 撤回工资单
getSalarySendService(user).revokeSalaryBill(salaryAcctRecordPO);
//删除报表缓存
getSalaryStatisticsReportService(user).removeReportCache();
// 查询本次薪资核算记录关联的个税扣缴义务人
List<SalaryAcctTaxAgentPO> salaryAcctTaxAgents = getSalaryAcctRecordService(user).listBySalaryAcctRecordIds(Collections.singleton(salaryAcctRecordPO.getId()));
// 如果已经存在税款所属期为8月份的薪资核算记录就不能再重新核算1-7月份的薪资核算记录了
@ -811,17 +822,6 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe
salaryAcctRecordPO.setStatus(SalaryAcctRecordStatusEnum.NOT_ARCHIVED.getValue());
salaryAcctRecordPO.setUpdateTime(new Date());
getSalaryAcctRecordMapper().updateIgnoreNull(salaryAcctRecordPO);
// 保存回算前的薪资核算结果
if (!isReCalc) {
getSalaryAcctResultService(user).reCalc(salaryAcctRecordPO.getId());
}
// 撤回工资单
getSalarySendService(user).revokeSalaryBill(salaryAcctRecordPO);
//删除报表缓存
getSalaryStatisticsReportService(user).removeReportCache();
}