From 9bbbd80d3663e176685ee4b59022df358e874500 Mon Sep 17 00:00:00 2001 From: sy Date: Tue, 21 Nov 2023 16:02:12 +0800 Subject: [PATCH] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-=E7=A6=8F?= =?UTF-8?q?=E5=88=A9=E6=A1=A3=E6=A1=88=EF=BC=8C=E7=A6=8F=E5=88=A9=E6=A1=A3?= =?UTF-8?q?=E6=A1=88=E5=AF=BC=E5=85=A5=E6=97=B6=EF=BC=8C=E5=B9=B4=E6=9C=88?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=85=BC=E5=AE=B92001/01=E4=B8=80=E7=B1=BB?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/SISchemeServiceImpl.java | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java index f3b9872ee..09450afb6 100644 --- a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java @@ -928,7 +928,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { if (StringUtils.isNotBlank(socialStartMonth) && socialStartMonth.length() > 7) { socialStartMonth = socialStartMonth.substring(0, 7); } - if (StringUtils.isNotBlank(socialStartMonth) && !SalaryDateUtil.checkYearMonth(socialStartMonth)) { + if (StringUtils.isNotBlank(socialStartMonth) && !SalaryDateUtil.checkYearMonth(socialStartMonth.replace("/", "-"))) { Map errorMessageMap = Maps.newHashMap(); errorMessageMap.put("message", rowIndex + SalaryI18nUtil.getI18nLabel(100315, "社保起始缴纳时间格式错误,正确格式为YYYY-MM或者yyyy-MM-dd")); excelComments.add(errorMessageMap); @@ -939,7 +939,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { if (StringUtils.isNotBlank(socialEndMonth) && socialEndMonth.length() > 7) { socialEndMonth = socialEndMonth.substring(0, 7); } - if (StringUtils.isNotBlank(socialEndMonth) && !SalaryDateUtil.checkYearMonth(socialEndMonth)) { + if (StringUtils.isNotBlank(socialEndMonth) && !SalaryDateUtil.checkYearMonth(socialEndMonth.replace("/", "-"))) { Map errorMessageMap = Maps.newHashMap(); errorMessageMap.put("message", rowIndex + SalaryI18nUtil.getI18nLabel(100316, "社保最后缴纳时间格式错误,正确格式为YYYY-MM或者yyyy-MM-dd")); excelComments.add(errorMessageMap); @@ -950,7 +950,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { if (StringUtils.isNotBlank(fundStartMonth) && fundStartMonth.length() > 7) { fundStartMonth = fundStartMonth.substring(0, 7); } - if (StringUtils.isNotBlank(fundStartMonth) && !SalaryDateUtil.checkYearMonth(fundStartMonth)) { + if (StringUtils.isNotBlank(fundStartMonth) && !SalaryDateUtil.checkYearMonth(fundStartMonth.replace("/", "-"))) { Map errorMessageMap = Maps.newHashMap(); errorMessageMap.put("message", rowIndex + SalaryI18nUtil.getI18nLabel(100317, "公积金起始缴纳时间格式错误,正确格式为YYYY-MM或者yyyy-MM-dd")); excelComments.add(errorMessageMap); @@ -961,7 +961,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { if (StringUtils.isNotBlank(fundEndMonth) && fundEndMonth.length() > 7) { fundEndMonth = fundEndMonth.substring(0, 7); } - if (StringUtils.isNotBlank(fundEndMonth) && !SalaryDateUtil.checkYearMonth(fundEndMonth)) { + if (StringUtils.isNotBlank(fundEndMonth) && !SalaryDateUtil.checkYearMonth(fundEndMonth.replace("/", "-"))) { Map errorMessageMap = Maps.newHashMap(); errorMessageMap.put("message", rowIndex + SalaryI18nUtil.getI18nLabel(100319, "公积金最后缴纳时间格式错误,正确格式为YYYY-MM或者yyyy-MM-dd")); excelComments.add(errorMessageMap); @@ -972,7 +972,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { if (StringUtils.isNotBlank(otherStartMonth) && otherStartMonth.length() > 7) { otherStartMonth = otherStartMonth.substring(0, 7); } - if (StringUtils.isNotBlank(otherStartMonth) && !SalaryDateUtil.checkYearMonth(otherStartMonth)) { + if (StringUtils.isNotBlank(otherStartMonth) && !SalaryDateUtil.checkYearMonth(otherStartMonth.replace("/", "-"))) { Map errorMessageMap = Maps.newHashMap(); errorMessageMap.put("message", rowIndex + SalaryI18nUtil.getI18nLabel(100320, "其他福利起始缴纳时间格式错误,正确格式为YYYY-MM或者yyyy-MM-dd")); excelComments.add(errorMessageMap); @@ -983,7 +983,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { if (StringUtils.isNotBlank(otherEndMonth) && otherEndMonth.length() > 7) { otherEndMonth = otherEndMonth.substring(0, 7); } - if (StringUtils.isNotBlank(otherEndMonth) && !SalaryDateUtil.checkYearMonth(otherEndMonth)) { + if (StringUtils.isNotBlank(otherEndMonth) && !SalaryDateUtil.checkYearMonth(otherEndMonth.replace("/", "-"))) { Map errorMessageMap = Maps.newHashMap(); errorMessageMap.put("message", rowIndex + SalaryI18nUtil.getI18nLabel(100321, "其他福利最后缴纳时间格式错误,正确格式为YYYY-MM或者yyyy-MM-dd")); excelComments.add(errorMessageMap); @@ -1150,13 +1150,13 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { } String socialStartDate = (String) findElement(singleAccount, SalaryI18nUtil.getI18nLabel(91319, "社保起始缴纳月")).get(SalaryI18nUtil.getI18nLabel(91319, "社保起始缴纳月")); if (StringUtils.isNotBlank(socialStartDate) && socialStartDate.length() >= 7) { - socialStartDate = socialStartDate.substring(0, 7); + socialStartDate = socialStartDate.substring(0, 7).replace("/", "-"); insuranceArchivesSocialSchemePO.setSocialStartTime(socialStartDate); } String socialEndDate = (String) findElement(singleAccount, SalaryI18nUtil.getI18nLabel(91320, "社保最后缴纳月")).get(SalaryI18nUtil.getI18nLabel(91320, "社保最后缴纳月")); if (StringUtils.isNotBlank(socialEndDate) && socialEndDate.length() >= 7) { - socialEndDate = socialEndDate.substring(0, 7); + socialEndDate = socialEndDate.substring(0, 7).replace("/", "-"); insuranceArchivesSocialSchemePO.setSocialEndTime(socialEndDate); } @@ -1238,13 +1238,13 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { } String fundStartDate = (String) findElement(singleAccount, SalaryI18nUtil.getI18nLabel(91483, "公积金起始缴纳月")).get(SalaryI18nUtil.getI18nLabel(91483, "公积金起始缴纳月")); if (StringUtils.isNotBlank(fundStartDate) && fundStartDate.length() >= 7) { - fundStartDate = fundStartDate.substring(0, 7); + fundStartDate = fundStartDate.substring(0, 7).replace("/", "-"); insuranceArchivesFundSchemePO.setFundStartTime(fundStartDate); } String fundEndDate = (String) findElement(singleAccount, SalaryI18nUtil.getI18nLabel(91484, "公积金最后缴纳月")).get(SalaryI18nUtil.getI18nLabel(91484, "公积金最后缴纳月")); if (StringUtils.isNotBlank(fundEndDate) && fundEndDate.length() >= 7) { - fundEndDate = fundEndDate.substring(0, 7); + fundEndDate = fundEndDate.substring(0, 7).replace("/", "-"); insuranceArchivesFundSchemePO.setFundEndTime(fundEndDate); } @@ -1314,13 +1314,13 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { } String otherStartDate = (String) findElement(singleAccount, SalaryI18nUtil.getI18nLabel(91490, "其他福利起始缴纳月")).get(SalaryI18nUtil.getI18nLabel(91490, "其他福利起始缴纳月")); if (StringUtils.isNotBlank(otherStartDate) && otherStartDate.length() >= 7) { - otherStartDate = otherStartDate.substring(0, 7); + otherStartDate = otherStartDate.substring(0, 7).replace("/", "-"); insuranceArchivesOtherSchemePO.setOtherStartTime(otherStartDate); } String otherEndDate = (String) findElement(singleAccount, SalaryI18nUtil.getI18nLabel(91494, "其他福利最后缴纳月")).get(SalaryI18nUtil.getI18nLabel(91494, "其他福利最后缴纳月")); if (StringUtils.isNotBlank(otherEndDate) && otherEndDate.length() >= 7) { - otherEndDate = otherEndDate.substring(0, 7); + otherEndDate = otherEndDate.substring(0, 7).replace("/", "-"); insuranceArchivesOtherSchemePO.setOtherEndTime(otherEndDate); }