修复调薪导致起始缴纳日期消失

This commit is contained in:
钱涛 2022-09-06 17:12:56 +08:00
parent e372173b74
commit c84836d490
1 changed files with 5 additions and 5 deletions

View File

@ -908,8 +908,8 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
String deparmentName = Optional.ofNullable(map.get(SalaryI18nUtil.getI18nLabel(86185, "部门"))).orElse("").toString();
String mobile = Optional.ofNullable(map.get(SalaryI18nUtil.getI18nLabel(86186, "手机号"))).orElse("").toString();
List<DataCollectionEmployee> emps = importHandleParam.getEmployees().stream().filter(e -> (StringUtils.isBlank(userName) || Objects.equals(e.getUsername(), userName))
&& (StringUtils.isBlank(deparmentName) || Objects.equals(e.getDepartmentName(), deparmentName))
&& (StringUtils.isBlank(mobile) || Objects.equals(e.getMobile(), mobile)))
&& (StringUtils.isBlank(deparmentName) || Objects.equals(e.getDepartmentName(), deparmentName))
&& (StringUtils.isBlank(mobile) || Objects.equals(e.getMobile(), mobile)))
.collect(Collectors.toList());
List<Long> employeeSameIds = new ArrayList<>();
if (CollectionUtils.isNotEmpty(emps) && emps.size() > 1) {
@ -1044,14 +1044,14 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
errorMessageMap.put("message", rowindex + "发薪起始日期格式不正确,正确格式示例为'2022-01-01'、'2022/1/1'");
excelComments.add(errorMessageMap);
isError = true;
}else if (!isEmpty && payEndDateI18n.equals(key) && !payEndDateCellVal.equals("") && !SalaryDateUtil.checkDay(payEndDateCellVal)) {
} else if (!isEmpty && payEndDateI18n.equals(key) && !payEndDateCellVal.equals("") && !SalaryDateUtil.checkDay(payEndDateCellVal)) {
// 最后发薪日期
Map<String, String> errorMessageMap = Maps.newHashMap();
errorMessageMap.put("message", rowindex + "最后发薪日期格式不正确,正确格式示例为'2022-01-01'、'2022/1/1'");
excelComments.add(errorMessageMap);
isError = true;
// 5.薪资项目列处理(初始化导入或调薪)
}else if (!isEmpty && effectiveTimeI18n.equals(key) && effectiveTime == null) {
} else if (!isEmpty && effectiveTimeI18n.equals(key) && effectiveTime == null) {
// 3.生效时间处理
Map<String, String> errorMessageMap = Maps.newHashMap();
errorMessageMap.put("message", rowindex + "生效日期错误或格式不正确,正确格式示例为'2022-01-01'、'2022/1/1'");
@ -1530,7 +1530,7 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
}
// 修改薪资档案
if (CollectionUtils.isNotEmpty(salaryArchiveUpdates)) {
if (isInit && CollectionUtils.isNotEmpty(salaryArchiveUpdates)) {
salaryArchiveUpdates.forEach(getSalaryArchiveMapper()::update);
}