From 63c95583310b31c372b5d0994d9c4830b236f855 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Thu, 19 Jun 2025 11:38:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=A4=BE=E4=BF=9D=E4=B8=8A?= =?UTF-8?q?=E4=B8=8B=E9=99=90=E6=A0=A1=E9=AA=8C=20=E6=BC=8F=E6=8E=89?= =?UTF-8?q?=E5=8F=AA=E5=BC=80=E5=90=AF=E4=BA=86=E5=85=AC=E5=8F=B8=E6=B2=A1?= =?UTF-8?q?=E5=BC=80=E5=90=AF=E4=B8=AA=E4=BA=BA=E7=9A=84=E5=9C=BA=E6=99=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/SIArchivesServiceImpl.java | 60 +++++++++++++++++++ .../service/impl/SISchemeServiceImpl.java | 24 ++++++-- 2 files changed, 80 insertions(+), 4 deletions(-) diff --git a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java index 6d45abc1f..a45dc3bf2 100644 --- a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java @@ -2881,12 +2881,22 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService if (otherPaymentBaseString != null) { updateOtherInfo.setOtherPaymentBaseString(otherPaymentBaseString); } + if (!welBaseDiffSign) { + otherPaymentBaseString = adaptWelBaseLimit(updateOtherInfo.getOtherSchemeId(), updateOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue()); + if (otherPaymentBaseString != null) { + updateOtherInfo.setOtherPaymentBaseString(otherPaymentBaseString); + } + } } else { StringBuilder errorMsg = new StringBuilder(""); if (!checkWelBaseLimit(updateOtherInfo.getOtherSchemeId(),updateOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) { // throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); combineErrorMsg = "其他福利个人: " + errorMsg; } + if ( (!welBaseDiffSign) && (!checkWelBaseLimit(updateOtherInfo.getOtherSchemeId(),updateOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg))) { + // throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); + combineErrorMsg = "其他福利公司: " + errorMsg; + } } //需要拆分个人和公司福利基数时 if (welBaseDiffSign) { @@ -2952,12 +2962,22 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService if (otherPaymentBaseString != null) { insertOtherInfo.setOtherPaymentBaseString(otherPaymentBaseString); } + if (!welBaseDiffSign) { + otherPaymentBaseString = adaptWelBaseLimit(insertOtherInfo.getOtherSchemeId(), insertOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue()); + if (otherPaymentBaseString != null) { + insertOtherInfo.setOtherPaymentBaseString(otherPaymentBaseString); + } + } } else { StringBuilder errorMsg = new StringBuilder(""); if (!checkWelBaseLimit(insertOtherInfo.getOtherSchemeId(),insertOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) { // throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); combineErrorMsg = "其他福利个人:" + errorMsg; } + if ( (!welBaseDiffSign) && (!checkWelBaseLimit(insertOtherInfo.getOtherSchemeId(),insertOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg))) { + // throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); + combineErrorMsg = "其他福利公司:" + errorMsg; + } } //需要拆分个人和公司福利基数时 if (welBaseDiffSign) { @@ -3092,12 +3112,22 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService if (fundPaymentBaseString != null) { updateFundInfo.setFundPaymentBaseString(fundPaymentBaseString); } + if (!welBaseDiffSign) { + fundPaymentBaseString = adaptWelBaseLimit(updateFundInfo.getFundSchemeId(), updateFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue()); + if (fundPaymentBaseString != null) { + updateFundInfo.setFundPaymentBaseString(fundPaymentBaseString); + } + } } else { StringBuilder errorMsg = new StringBuilder(""); if (!checkWelBaseLimit(updateFundInfo.getFundSchemeId(),updateFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) { // throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); combineErrorMsg = "公积金个人" + errorMsg; } + if ( (!welBaseDiffSign) && (!checkWelBaseLimit(updateFundInfo.getFundSchemeId(),updateFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg))) { + // throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); + combineErrorMsg = "公积金公司" + errorMsg; + } } //需要拆分个人和公司福利基数时 @@ -3168,12 +3198,22 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService if (fundPaymentBaseString != null) { insertFundInfo.setFundPaymentBaseString(fundPaymentBaseString); } + if (!welBaseDiffSign) { + fundPaymentBaseString = adaptWelBaseLimit(insertFundInfo.getFundSchemeId(), insertFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue()); + if (fundPaymentBaseString != null) { + insertFundInfo.setFundPaymentBaseString(fundPaymentBaseString); + } + } } else { StringBuilder errorMsg = new StringBuilder(""); if (!checkWelBaseLimit(insertFundInfo.getFundSchemeId(),insertFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) { // throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); combineErrorMsg = "公积金个人:" + errorMsg; } + if ((!welBaseDiffSign) && (!checkWelBaseLimit(insertFundInfo.getFundSchemeId(),insertFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg))) { + // throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); + combineErrorMsg = "公积金公司:" + errorMsg; + } } //需要拆分个人和公司福利基数时 @@ -3315,12 +3355,22 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService if (socialPaymentBaseString != null) { updateSocialInfo.setSocialPaymentBaseString(socialPaymentBaseString); } + if (!welBaseDiffSign) { + socialPaymentBaseString = adaptWelBaseLimit(updateSocialInfo.getSocialSchemeId(), updateSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue()); + if (socialPaymentBaseString != null) { + updateSocialInfo.setSocialPaymentBaseString(socialPaymentBaseString); + } + } } else { StringBuilder errorMsg = new StringBuilder(""); if (!checkWelBaseLimit(updateSocialInfo.getSocialSchemeId(),updateSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) { // throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); combineErrorMsg = "社保个人:" + errorMsg; } + if ((!welBaseDiffSign) && (!checkWelBaseLimit(updateSocialInfo.getSocialSchemeId(),updateSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg))) { + // throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); + combineErrorMsg = "社保公司:" + errorMsg; + } } //需要拆分个人和公司福利基数时 @@ -3390,12 +3440,22 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService if (socialPaymentBaseString != null) { insertSocialInfo.setSocialPaymentBaseString(socialPaymentBaseString); } + if (!welBaseDiffSign) { + socialPaymentBaseString = adaptWelBaseLimit(insertSocialInfo.getSocialSchemeId(), insertSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue()); + if (socialPaymentBaseString != null) { + insertSocialInfo.setSocialPaymentBaseString(socialPaymentBaseString); + } + } } else { StringBuilder errorMsg = new StringBuilder(""); if (!checkWelBaseLimit(insertSocialInfo.getSocialSchemeId(),insertSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) { // throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); combineErrorMsg = "社保个人:" + errorMsg; } + if ((!welBaseDiffSign) && (!checkWelBaseLimit(insertSocialInfo.getSocialSchemeId(),insertSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg))) { + // throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); + combineErrorMsg = "社保公司:" + errorMsg; + } } //需要拆分个人和公司福利基数时 if (welBaseDiffSign) { diff --git a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java index 504142ea9..4d688978f 100644 --- a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java @@ -1432,6 +1432,14 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { Boolean otherCheckBase = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg); + Boolean socialCheckBase2 = true; + Boolean fundCheckBase2 = true; + Boolean otherCheckBase2 = true; + if (!welBaseDiffSign) { + socialCheckBase2 = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesSocialSchemePO.getSocialSchemeId(), insuranceArchivesSocialSchemePO.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg); + fundCheckBase2 = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesFundSchemePO.getFundSchemeId(), insuranceArchivesFundSchemePO.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg); + otherCheckBase2 = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg); + } Boolean socialCheckComBase = true; Boolean fundCheckComBase = true; Boolean otherCheckComBase = true; @@ -1440,17 +1448,17 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { fundCheckComBase = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesFundSchemePO.getFundSchemeId(), insuranceArchivesFundSchemePO.getFundPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg); otherCheckComBase = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg); } - if (socialCheckBase && fundCheckBase && otherCheckBase && socialCheckComBase && fundCheckComBase && otherCheckComBase) { + if (socialCheckBase && fundCheckBase && otherCheckBase && socialCheckBase2 && fundCheckBase2 && otherCheckBase2 && socialCheckComBase && fundCheckComBase && otherCheckComBase) { insuranceArchivesAccountPOS.add(insuranceArchivesAccountPO); } else { String checkMessage = "该条数据中"; - if (!socialCheckBase || !socialCheckComBase) { + if (!socialCheckBase || !socialCheckBase2 || !socialCheckComBase) { checkMessage = checkMessage + "社保福利基数、"; } - if (!fundCheckBase || !fundCheckComBase) { + if (!fundCheckBase || !fundCheckBase2 || !fundCheckComBase) { checkMessage = checkMessage + "公积金福利基数、"; } - if (!otherCheckBase || !otherCheckComBase) { + if (!otherCheckBase || !otherCheckBase2 || !otherCheckComBase) { checkMessage = checkMessage + "其他福利基数、"; } checkMessage = checkMessage.substring(0, checkMessage.length() - 1); @@ -1470,6 +1478,14 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { insuranceArchivesSocialSchemePO.setSocialPaymentBaseString(newSocialPaymentBaseString); insuranceArchivesFundSchemePO.setFundPaymentBaseString(newFundPaymentBaseString); insuranceArchivesOtherSchemePO.setOtherPaymentBaseString(newOtherPaymentBaseString); + if (!welBaseDiffSign) { + newSocialPaymentBaseString = getSIArchivesService(user).checkAndBuildWelBaseWithLimit(insuranceArchivesSocialSchemePO.getSocialSchemeId(), insuranceArchivesSocialSchemePO.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue()); + newFundPaymentBaseString = getSIArchivesService(user).checkAndBuildWelBaseWithLimit(insuranceArchivesFundSchemePO.getFundSchemeId(), insuranceArchivesFundSchemePO.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue()); + newOtherPaymentBaseString = getSIArchivesService(user).checkAndBuildWelBaseWithLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue()); + insuranceArchivesSocialSchemePO.setSocialPaymentBaseString(newSocialPaymentBaseString); + insuranceArchivesFundSchemePO.setFundPaymentBaseString(newFundPaymentBaseString); + insuranceArchivesOtherSchemePO.setOtherPaymentBaseString(newOtherPaymentBaseString); + } if (welBaseDiffSign) { String newSocialPaymentComBaseString = getSIArchivesService(user).checkAndBuildWelBaseWithLimit(insuranceArchivesSocialSchemePO.getSocialSchemeId(), insuranceArchivesSocialSchemePO.getSocialPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue());