feat: 沿用上月增加校验
This commit is contained in:
parent
0aa59757c5
commit
b03e5efbcf
|
|
@ -793,11 +793,10 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
//查询已经核算的数据
|
||||
List<SalaryAcctEmployeePO> salaryAcctEmployees =
|
||||
getAddUpDeductionService(user)
|
||||
.getAccountedEmployeeData(param.getDeclareMonth());
|
||||
Map<String, Long> acctInfoMap = salaryAcctEmployees.stream().collect(Collectors.toMap(
|
||||
i -> i.getTaxAgentId() + "" + i.getEmployeeId(),
|
||||
SalaryAcctEmployeePO::getId
|
||||
));
|
||||
.getAccountedEmployeeData(param.getDeclareMonth());
|
||||
Map<String, List<SalaryAcctEmployeePO>> acctInfoMap = salaryAcctEmployees.stream()
|
||||
.distinct().collect(Collectors.groupingBy(
|
||||
i -> i.getTaxAgentId() + "" + i.getEmployeeId()));
|
||||
|
||||
// 查找到所有个税扣缴义务人
|
||||
Boolean needAuth = getTaxAgentService(user).isNeedAuth((long) user.getUID());
|
||||
|
|
@ -840,7 +839,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
//核算过的数据直接跳过不做更改
|
||||
po.setId(updateIdMap.get(po.getEmployeeId() + "" + po.getTaxAgentId()));
|
||||
updatetInfo.add(po);
|
||||
} else if (!hasOld){
|
||||
} else if (!hasOld) {
|
||||
po.setCreator((long) user.getUID());
|
||||
po.setCreateTime(new Date());
|
||||
insertInfo.add(po);
|
||||
|
|
|
|||
|
|
@ -262,7 +262,7 @@ public class OtherDeductionWrapper extends Service {
|
|||
throw new SalaryRunTimeException("当前年月不合法");
|
||||
}
|
||||
if (Month.JANUARY.equals(localDate.getMonth())) {
|
||||
throw new SalaryRunTimeException("失败,当前年度内第一个月无法沿用上月");
|
||||
throw new SalaryRunTimeException("操作失败,每年度内首月无法沿用上月");
|
||||
}
|
||||
param.setYearMonthTime(localDate);
|
||||
return getOtherDeductionService(user).extendToLastMonth(param);
|
||||
|
|
|
|||
Loading…
Reference in New Issue