优化导入
This commit is contained in:
parent
90c1ad1c6c
commit
a4adb0da84
|
|
@ -119,12 +119,18 @@ public class SIImportServiceImpl extends Service implements SIImportService {
|
|||
}
|
||||
});
|
||||
}else {
|
||||
rowCloumn.add(null);
|
||||
rowCloumn.add("");
|
||||
}
|
||||
});
|
||||
records.forEach(record -> {
|
||||
List<Object> row = Lists.newArrayList();
|
||||
rowCloumn.forEach(column -> row.add(record.get(column)));
|
||||
rowCloumn.forEach(column -> {
|
||||
if (record.get(column) == null){
|
||||
row.add("");
|
||||
}else {
|
||||
row.add(record.get(column));
|
||||
}
|
||||
});
|
||||
excelSheetData.add(row);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -785,10 +785,10 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
|
||||
|
||||
String socialStartMonth = (String) socialStartTimeMap.get(SalaryI18nUtil.getI18nLabel(91319, "社保起始缴纳月"));
|
||||
if (StringUtils.isNotBlank(socialStartMonth) && socialStartMonth.length() > 7) {
|
||||
socialStartMonth = socialStartMonth.substring(0, 7);
|
||||
}
|
||||
if (StringUtils.isNotBlank(socialStartMonth) && !SalaryDateUtil.checkYearMonth(socialStartMonth)) {
|
||||
// if (StringUtils.isNotBlank(socialStartMonth) && socialStartMonth.length() > 7) {
|
||||
// socialStartMonth = socialStartMonth.substring(0, 7);
|
||||
// }
|
||||
if (StringUtils.isNotBlank(socialStartMonth) && (!SalaryDateUtil.checkYearMonth(socialStartMonth) || socialStartMonth.length() != 7)) {
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
errorMessageMap.put("message", rowIndex + SalaryI18nUtil.getI18nLabel(100315, "社保起始缴纳时间格式错误,正确格式为YYYY-MM"));
|
||||
excelComments.add(errorMessageMap);
|
||||
|
|
@ -796,10 +796,10 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
}
|
||||
|
||||
String socialEndMonth = (String) socialEndTimeMap.get(SalaryI18nUtil.getI18nLabel(91320, "社保最后缴纳月"));
|
||||
if (StringUtils.isNotBlank(socialEndMonth) && socialEndMonth.length() > 7) {
|
||||
socialEndMonth = socialEndMonth.substring(0, 7);
|
||||
}
|
||||
if (StringUtils.isNotBlank(socialEndMonth) && !SalaryDateUtil.checkYearMonth(socialEndMonth)) {
|
||||
// if (StringUtils.isNotBlank(socialEndMonth) && socialEndMonth.length() > 7) {
|
||||
// socialEndMonth = socialEndMonth.substring(0, 7);
|
||||
// }
|
||||
if (StringUtils.isNotBlank(socialEndMonth) && (!SalaryDateUtil.checkYearMonth(socialEndMonth) || socialEndMonth.length() != 7)) {
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
errorMessageMap.put("message", rowIndex + SalaryI18nUtil.getI18nLabel(100316, "社保最后缴纳时间格式错误,正确格式为YYYY-MM"));
|
||||
excelComments.add(errorMessageMap);
|
||||
|
|
@ -807,10 +807,10 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
}
|
||||
|
||||
String fundStartMonth = (String) fundStartTimeMap.get(SalaryI18nUtil.getI18nLabel(91483, "公积金起始缴纳月"));
|
||||
if (StringUtils.isNotBlank(fundStartMonth) && fundStartMonth.length() > 7) {
|
||||
fundStartMonth = fundStartMonth.substring(0, 7);
|
||||
}
|
||||
if (StringUtils.isNotBlank(fundStartMonth) && !SalaryDateUtil.checkYearMonth(fundStartMonth)) {
|
||||
// if (StringUtils.isNotBlank(fundStartMonth) && fundStartMonth.length() > 7) {
|
||||
// fundStartMonth = fundStartMonth.substring(0, 7);
|
||||
// }
|
||||
if (StringUtils.isNotBlank(fundStartMonth) && (!SalaryDateUtil.checkYearMonth(fundStartMonth) || fundStartMonth.length() != 7)) {
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
errorMessageMap.put("message", rowIndex + SalaryI18nUtil.getI18nLabel(100317, "公积金起始缴纳时间格式错误,正确格式为YYYY-MM"));
|
||||
excelComments.add(errorMessageMap);
|
||||
|
|
@ -818,10 +818,10 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
}
|
||||
|
||||
String fundEndMonth = (String) fundEndTimeMap.get(SalaryI18nUtil.getI18nLabel(91484, "公积金最后缴纳月"));
|
||||
if (StringUtils.isNotBlank(fundEndMonth) && fundEndMonth.length() > 7) {
|
||||
fundEndMonth = fundEndMonth.substring(0, 7);
|
||||
}
|
||||
if (StringUtils.isNotBlank(fundEndMonth) && !SalaryDateUtil.checkYearMonth(fundEndMonth)) {
|
||||
// if (StringUtils.isNotBlank(fundEndMonth) && fundEndMonth.length() > 7) {
|
||||
// fundEndMonth = fundEndMonth.substring(0, 7);
|
||||
// }
|
||||
if (StringUtils.isNotBlank(fundEndMonth) && (!SalaryDateUtil.checkYearMonth(fundEndMonth) || fundEndMonth.length() != 7)) {
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
errorMessageMap.put("message", rowIndex + SalaryI18nUtil.getI18nLabel(100319, "公积金最后缴纳时间格式错误,正确格式为YYYY-MM"));
|
||||
excelComments.add(errorMessageMap);
|
||||
|
|
@ -829,10 +829,10 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
}
|
||||
|
||||
String otherStartMonth = (String) otherStartTimeMap.get(SalaryI18nUtil.getI18nLabel(91490, "其他福利起始缴纳月"));
|
||||
if (StringUtils.isNotBlank(otherStartMonth) && otherStartMonth.length() > 7) {
|
||||
otherStartMonth = otherStartMonth.substring(0, 7);
|
||||
}
|
||||
if (StringUtils.isNotBlank(otherStartMonth) && !SalaryDateUtil.checkYearMonth(otherStartMonth)) {
|
||||
// if (StringUtils.isNotBlank(otherStartMonth) && otherStartMonth.length() > 7) {
|
||||
// otherStartMonth = otherStartMonth.substring(0, 7);
|
||||
// }
|
||||
if (StringUtils.isNotBlank(otherStartMonth) && (!SalaryDateUtil.checkYearMonth(otherStartMonth) || otherStartMonth.length() != 7)) {
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
errorMessageMap.put("message", rowIndex + SalaryI18nUtil.getI18nLabel(100320, "其他福利起始缴纳时间格式错误,正确格式为YYYY-MM"));
|
||||
excelComments.add(errorMessageMap);
|
||||
|
|
@ -840,10 +840,10 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
}
|
||||
|
||||
String otherEndMonth = (String) otherEndTimeMap.get(SalaryI18nUtil.getI18nLabel(91494, "其他福利最后缴纳月"));
|
||||
if (StringUtils.isNotBlank(otherEndMonth) && otherEndMonth.length() > 7) {
|
||||
otherEndMonth = otherEndMonth.substring(0, 7);
|
||||
}
|
||||
if (StringUtils.isNotBlank(otherEndMonth) && !SalaryDateUtil.checkYearMonth(otherEndMonth)) {
|
||||
// if (StringUtils.isNotBlank(otherEndMonth) && otherEndMonth.length() > 7) {
|
||||
// otherEndMonth = otherEndMonth.substring(0, 7);
|
||||
// }
|
||||
if (StringUtils.isNotBlank(otherEndMonth) && (!SalaryDateUtil.checkYearMonth(otherEndMonth) || otherEndMonth.length() != 7)) {
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
errorMessageMap.put("message", rowIndex + SalaryI18nUtil.getI18nLabel(100321, "其他福利最后缴纳时间格式错误,正确格式为YYYY-MM"));
|
||||
excelComments.add(errorMessageMap);
|
||||
|
|
|
|||
Loading…
Reference in New Issue