万德隆 动态薪资标准
This commit is contained in:
parent
f72d76540a
commit
db99e8239b
|
|
@ -440,7 +440,8 @@ public class SalaryArchiveItemServiceImpl extends Service implements SalaryArchi
|
|||
|
||||
List<Long> effectiveSalaryItemDels = Lists.newArrayList();
|
||||
List<SalaryArchiveItemPO> salaryArchiveItemNews = Lists.newArrayList();
|
||||
salaryArchiveItems.forEach(e -> {
|
||||
for (int j = 0; j < salaryArchiveItems.size(); j++) {
|
||||
SalaryArchiveItemDetailSaveParam e = salaryArchiveItems.get(j);
|
||||
// 已生效
|
||||
List<SalaryArchiveItemPO> effectiveList = effectiveSalaryItems.stream().filter(i -> i.getSalaryItemId().equals(e.getSalaryItemId())).collect(Collectors.toList());
|
||||
// 当前已生效
|
||||
|
|
@ -461,7 +462,8 @@ public class SalaryArchiveItemServiceImpl extends Service implements SalaryArchi
|
|||
// 1.2 如果等于当前已生效 fixme 日期比较可能有bug
|
||||
} else if (saveEffectiveTime.equals(effectiveTime)) {
|
||||
if (effectiveBeforeSalaryItem != null && effectiveBeforeSalaryItem.getItemValue().equals(e.getAdjustValue())) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100432, "调整前后不可相同"));
|
||||
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100432, "调整前后不可相同"));
|
||||
continue;
|
||||
}
|
||||
if (ineffectiveSalaryItem != null && ineffectiveSalaryItem.getItemValue().equals(e.getAdjustValue())) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100434, "与未生效的调整后不可相同"));
|
||||
|
|
@ -469,14 +471,16 @@ public class SalaryArchiveItemServiceImpl extends Service implements SalaryArchi
|
|||
// 1.3 如果>已经生效且<=今天
|
||||
} else if (saveEffectiveTime.after(effectiveTime) && !saveEffectiveTime.after(today)) {
|
||||
if (effectiveSalaryItem.getItemValue().equals(e.getAdjustValue())) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100432, "调整前后不可相同"));
|
||||
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100432, "调整前后不可相同"));
|
||||
continue;
|
||||
}
|
||||
if (ineffectiveSalaryItem != null && ineffectiveSalaryItem.getItemValue().equals(e.getAdjustValue())) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100434, "与未生效的调整后不可相同"));
|
||||
}
|
||||
// 1.4 如果>今天
|
||||
} else if (saveEffectiveTime.after(today) && effectiveSalaryItem.getItemValue().equals(e.getAdjustValue())) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100432, "调整前后不可相同"));
|
||||
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100432, "调整前后不可相同"));
|
||||
continue;
|
||||
}
|
||||
} else if (ineffectiveSalaryItem != null && ineffectiveSalaryItem.getItemValue().equals(e.getAdjustValue())) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100434, "与未生效的调整后不可相同"));
|
||||
|
|
@ -489,7 +493,7 @@ public class SalaryArchiveItemServiceImpl extends Service implements SalaryArchi
|
|||
effectiveSalaryItemDels.add(ineffectiveSalaryItem.getId());
|
||||
}
|
||||
salaryArchiveItemNews.add(buildInsert(salaryArchive, e.getSalaryItemId(), e.getAdjustValue(), saveParam, nowTime, e.getDescription()));
|
||||
});
|
||||
}
|
||||
|
||||
// 落库处理
|
||||
if (CollectionUtils.isNotEmpty(effectiveSalaryItemDels)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue