From 84339ab7158b5da19db9fe22d09b05a6cb851325 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Tue, 10 Jun 2025 17:35:44 +0800 Subject: [PATCH 01/18] =?UTF-8?q?=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E8=B6=851000bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../engine/salary/service/impl/SIArchivesServiceImpl.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java index c77ff7375..a27a3487e 100644 --- a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java @@ -4028,7 +4028,12 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService if (org.apache.commons.collections.CollectionUtils.isEmpty(employeeIds)) { return Collections.emptyList(); } - return getInsuranceBaseInfoMapper().listEndDateIsNull(employeeIds); + List resultList = new ArrayList<>(); + List> partition = Lists.partition(employeeIds, 500); + partition.forEach(part -> { + resultList.addAll(getInsuranceBaseInfoMapper().listEndDateIsNull(part)); + }); + return resultList; } /** From 2c39a1fa120628613aff5fec82772daba3f70974 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Thu, 12 Jun 2025 10:25:31 +0800 Subject: [PATCH 02/18] =?UTF-8?q?toMap=E7=A9=BA=E6=8C=87=E9=92=88bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../report/service/impl/SalaryStatisticsReportServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java b/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java index 481d61425..a894213bb 100644 --- a/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java +++ b/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java @@ -508,7 +508,7 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary List finalSalaryAcctEmpIds = getSalaryAcctResultService(user).listAcctEmpIdByAcctEmpId(salaryAcctEmployeeIds); Map> salaryAcctEmpResultMap = SalaryEntityUtil.group2Map(salaryAcctResultValues, SalaryAcctResultPO::getSalaryAcctEmpId); salaryAcctEmpResultMap.forEach((k, v) -> { - Map collect = v.stream().collect(Collectors.toMap(p -> Util.null2String(p.getSalaryItemId()), SalaryAcctResultPO::getResultValue, (key1, key2) -> key2)); + Map collect = v.stream().collect(Collectors.toMap(p -> Util.null2String(p.getSalaryItemId()), p -> Util.null2String(p.getResultValue()), (key1, key2) -> key2)); resultMap.put(k, collect); }); salaryAcctEmployeeIds.stream().forEach(id -> { From c2f2390013d51fb355c1a56cbb87534589edff22 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Mon, 16 Jun 2025 16:41:38 +0800 Subject: [PATCH 03/18] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=96=AA=E8=B5=84?= =?UTF-8?q?=E6=98=8E=E7=BB=86=E5=AF=BC=E5=87=BA=EF=BC=8C=E5=90=88=E8=AE=A1?= =?UTF-8?q?=E8=A1=8C=E7=BB=9F=E8=AE=A1=E6=96=87=E6=9C=AC=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/report/wrapper/SalaryStatisticsEmployeeWrapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/engine/salary/report/wrapper/SalaryStatisticsEmployeeWrapper.java b/src/com/engine/salary/report/wrapper/SalaryStatisticsEmployeeWrapper.java index 3a5efdb87..2a4bdd282 100644 --- a/src/com/engine/salary/report/wrapper/SalaryStatisticsEmployeeWrapper.java +++ b/src/com/engine/salary/report/wrapper/SalaryStatisticsEmployeeWrapper.java @@ -334,7 +334,7 @@ public class SalaryStatisticsEmployeeWrapper extends Service { sumRow.add(Util.null2String(countResult.get(weaTableColumnGroup.getColumn()))); } } else { - sumRow.add(Util.null2String(countResult.get(weaTableColumnGroup.getColumn()))); + sumRow.add(""); } } rowList.add(sumRow); From d4ff9af8b76428a687e1b4959238f64a01f9315d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Tue, 17 Jun 2025 11:23:30 +0800 Subject: [PATCH 04/18] =?UTF-8?q?=E5=88=86=E7=B1=BB=E6=89=80=E5=BE=97-?= =?UTF-8?q?=E4=B8=8A=E5=B8=82=E5=85=AC=E5=8F=B8=E8=82=A1=E6=81=AF=E7=BA=A2?= =?UTF-8?q?=E5=88=A9=E6=89=80=E5=BE=97(=E6=B2=AA=E5=B8=82=E3=80=81?= =?UTF-8?q?=E6=B7=B1=E5=B8=82=E3=80=81=E5=88=9B=E4=B8=9A=E6=9D=BF)=20?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E6=89=80=E5=BE=97-=E5=85=B6=E4=BB=96?= =?UTF-8?q?=E5=88=A9=E6=81=AF=E8=82=A1=E6=81=AF=E7=BA=A2=E5=88=A9=E6=89=80?= =?UTF-8?q?=E5=BE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/salaryacct/bo/SalaryCalcTax.java | 42 ++++ .../salaryacct/bo/SalaryCalcTaxRequest.java | 2 +- .../bo/TaxDeclarationRequest.java | 65 +++++- .../enums/salarysob/IncomeCategoryEnum.java | 91 ++++++++ ...ynIndividualIncomeTaxFeedbackResponse.java | 195 +++++++++++++++++- .../GetDeclareTaxResultFeedbackResponse.java | 194 ++++++++++++++++- .../impl/TaxDeclareRecordServiceImpl.java | 8 +- .../salary/wrapper/SalarySobWrapper.java | 3 +- 8 files changed, 578 insertions(+), 22 deletions(-) diff --git a/src/com/engine/salary/entity/salaryacct/bo/SalaryCalcTax.java b/src/com/engine/salary/entity/salaryacct/bo/SalaryCalcTax.java index 3dab288f0..8be3d2ed9 100644 --- a/src/com/engine/salary/entity/salaryacct/bo/SalaryCalcTax.java +++ b/src/com/engine/salary/entity/salaryacct/bo/SalaryCalcTax.java @@ -122,6 +122,9 @@ public class SalaryCalcTax { // 综合所得 requestParam.put("zhsd", buildZHSDRequestParam(salaryAcctTaxAgents, salaryAcctEmployees, salaryAcctResultValueMap, taxReportColumnMap, salarySobTaxReportRuleMap, employeeDeclares)); + // 综合所得 + requestParam.put("flsd", buildFLSDRequestParam(salaryAcctTaxAgents, salaryAcctEmployees, + salaryAcctResultValueMap, taxReportColumnMap, salarySobTaxReportRuleMap, employeeDeclares)); resultMap.put(taxAgent.getId(), requestParam); } @@ -196,4 +199,43 @@ public class SalaryCalcTax { } return requestParam; } + + private Map buildFLSDRequestParam(List salaryAcctTaxAgents, + List salaryAcctEmployees, + Map> salaryAcctResultValueMap, + Map> taxReportColumnMap, + Map salarySobTaxReportRuleMap, + List employeeDeclares) { + Map> incomeCategoryKeySalaryAcctEmployeeMap = SalaryEntityUtil + .group2Map(salaryAcctEmployees, SalaryAcctEmployeePO::getIncomeCategory); + + Map requestParam = new HashMap<>(); + + for (SalaryAcctTaxAgentPO salaryAcctTaxAgent : salaryAcctTaxAgents) { + IncomeCategoryEnum incomeCategoryEnum = IncomeCategoryEnum + .parseByValue(salaryAcctTaxAgent.getIncomeCategory()); + List taxReportColumns = taxReportColumnMap.get(incomeCategoryEnum.getValue().toString()); + List subSalaryAcctEmployees = incomeCategoryKeySalaryAcctEmployeeMap.get(incomeCategoryEnum.getValue().toString()); + Map salaryAcctEmployeeMap = SalaryEntityUtil.convert2Map(subSalaryAcctEmployees, SalaryAcctEmployeePO::getEmployeeId); + + SalaryCalcTaxRequest salaryCalcTaxRequest = new SalaryCalcTaxRequest(salaryAcctEmployeeMap, + salaryAcctResultValueMap, taxReportColumns, salarySobTaxReportRuleMap, employeeDeclares); + + switch (incomeCategoryEnum) { + case CLASSIFIED_INCOME_LISTED_COMPANY_DIVIDENDS_BONUSES: + List> ssgsgxhllb = salaryCalcTaxRequest.buildRequestParams(IncomeCategoryEnum.CLASSIFIED_INCOME_LISTED_COMPANY_DIVIDENDS_BONUSES, + employeeDeclares, salaryAcctEmployeeMap, salaryAcctResultValueMap); + requestParam.put("ssgsgxhllb", ssgsgxhllb); + break; + case CLASSIFIED_INCOME_OTHER_INTEREST_DIVIDENDS_BONUSES: + List> lxgxhllb = salaryCalcTaxRequest.buildRequestParams(IncomeCategoryEnum.CLASSIFIED_INCOME_OTHER_INTEREST_DIVIDENDS_BONUSES, + employeeDeclares, salaryAcctEmployeeMap, salaryAcctResultValueMap); + requestParam.put("lxgxhllb", lxgxhllb); + break; + default: + break; + } + } + return requestParam; + } } diff --git a/src/com/engine/salary/entity/salaryacct/bo/SalaryCalcTaxRequest.java b/src/com/engine/salary/entity/salaryacct/bo/SalaryCalcTaxRequest.java index 7e836152a..39eb225c0 100644 --- a/src/com/engine/salary/entity/salaryacct/bo/SalaryCalcTaxRequest.java +++ b/src/com/engine/salary/entity/salaryacct/bo/SalaryCalcTaxRequest.java @@ -200,7 +200,7 @@ public class SalaryCalcTaxRequest { employeeDeclares, salaryAcctEmployeeMap, salaryAcctResultValueMap); } - private List> buildRequestParams(IncomeCategoryEnum incomeCategoryEnum, + public List> buildRequestParams(IncomeCategoryEnum incomeCategoryEnum, List employeeDeclares, Map salaryAcctEmployeeMap, Map> salaryAcctResultValueMap) { diff --git a/src/com/engine/salary/entity/taxdeclaration/bo/TaxDeclarationRequest.java b/src/com/engine/salary/entity/taxdeclaration/bo/TaxDeclarationRequest.java index 495e4635b..cd4140605 100644 --- a/src/com/engine/salary/entity/taxdeclaration/bo/TaxDeclarationRequest.java +++ b/src/com/engine/salary/entity/taxdeclaration/bo/TaxDeclarationRequest.java @@ -1,5 +1,6 @@ package com.engine.salary.entity.taxdeclaration.bo; +import cn.hutool.core.util.NumberUtil; import com.engine.salary.entity.datacollection.po.*; import com.engine.salary.entity.employeedeclare.po.EmployeeDeclarePO; import com.engine.salary.entity.taxdeclaration.po.TaxDeclarationPO; @@ -35,7 +36,7 @@ public class TaxDeclarationRequest { List taxDeclarations, List taxDeclarationValues, List employeeDeclares, - Map> taxFreeMap) { + Map> taxFreeMap) { Map> objRequestParam = Maps.newHashMap(); Map>> listRequestParam = Maps.newHashMap(); Map> taxReportColumnMap = SalaryEntityUtil.group2Map(taxReportColumns, TaxReportColumnPO::getIncomeCategory); @@ -75,7 +76,7 @@ public class TaxDeclarationRequest { } else if (incomeCategoryEnum == IncomeCategoryEnum.COMPENSATION_FOR_DISMISS) { // 解除劳动合同一次性补偿金 List> employeeRequestParams = listRequestParam.computeIfAbsent("jcldhtycxbcjlb", k -> Lists.newArrayList()); - employeeRequestParam.put("sfzdscmsfb","是"); + employeeRequestParam.put("sfzdscmsfb", "是"); employeeRequestParams.add(employeeRequestParam); } else if (incomeCategoryEnum == IncomeCategoryEnum.INCOME_FOR_INDIVIDUAL_EQUITY_INCENTIVE) { // 个人股权激励收入 @@ -126,7 +127,7 @@ public class TaxDeclarationRequest { } else if (incomeCategoryEnum == IncomeCategoryEnum.REMUNERATION_FOR_AUTHOR) { // 稿酬所得 List> employeeRequestParams = listRequestParam.computeIfAbsent("gcsdlb", k -> Lists.newArrayList()); - employeeRequestParam.put("sfzdscmsfb","是"); + employeeRequestParam.put("sfzdscmsfb", "是"); employeeRequestParams.add(employeeRequestParam); } else if (incomeCategoryEnum == IncomeCategoryEnum.ROYALTIES) { // 特许权使用费所得 @@ -145,7 +146,8 @@ public class TaxDeclarationRequest { } private static void buildOtherDeductionDetailParams(Map> taxFreeMap, Map>> listRequestParam, EmployeeDeclarePO employeeDeclare, IncomeCategoryEnum incomeCategoryEnum, Map employeeRequestParam) { - if (new BigDecimal(employeeRequestParam.getOrDefault("mssd", "0").toString()).compareTo(new BigDecimal("0")) > 0) { + String mssd = employeeRequestParam.getOrDefault("mssd", "0").toString(); + if (NumberUtil.isNumber(mssd) && new BigDecimal(mssd).compareTo(new BigDecimal("0")) > 0) { Map freeIncomeMap = taxFreeMap.get(TaxFreeTypeEnum.FREE_INCOME); List poList = (List) freeIncomeMap.get(employeeDeclare.getTaxAgentId() + "-" + employeeDeclare.getEmployeeId() + "-" + SalaryDateUtil.getFormatYearMonth(employeeDeclare.getTaxCycle())); if (CollectionUtils.isNotEmpty(poList)) { @@ -169,7 +171,8 @@ public class TaxDeclarationRequest { } } - if (new BigDecimal(employeeRequestParam.getOrDefault("syjkbx", "0").toString()).compareTo(new BigDecimal("0")) > 0) { + String syjkbx = employeeRequestParam.getOrDefault("syjkbx", "0").toString(); + if (NumberUtil.isNumber(syjkbx) && new BigDecimal(syjkbx).compareTo(new BigDecimal("0")) > 0) { Map healthInsuranceMap = taxFreeMap.get(TaxFreeTypeEnum.HEALTH_INSURANCE); List pos = (List) healthInsuranceMap.get(employeeDeclare.getTaxAgentId() + "-" + employeeDeclare.getEmployeeId() + "-" + SalaryDateUtil.getFormatYearMonth(employeeDeclare.getTaxCycle())); if (CollectionUtils.isNotEmpty(pos)) { @@ -184,7 +187,7 @@ public class TaxDeclarationRequest { map.put("zzhm", employeeDeclare.getCardNum()); // 所得项目 map.put("sdxm", incomeCategoryEnum.getDefaultLabel()); - map.put("bdsxrq",SalaryDateUtil.getFormatLocalDate(healthInsurancePO.getEffectiveDate()) ); + map.put("bdsxrq", SalaryDateUtil.getFormatLocalDate(healthInsurancePO.getEffectiveDate())); map.put("sysbm", healthInsurancePO.getIdentificationNumber()); map.put("ndbf", healthInsurancePO.getYearPremium()); map.put("ydbf", healthInsurancePO.getMonthPremium()); @@ -194,7 +197,9 @@ public class TaxDeclarationRequest { listRequestParam.put("syjkbxfblb", paramMaps); } } - if (new BigDecimal(employeeRequestParam.getOrDefault("syylbx", "0").toString()).compareTo(new BigDecimal("0")) > 0) { + + String syylbx = employeeRequestParam.getOrDefault("syylbx", "0").toString(); + if (NumberUtil.isNumber(syylbx) && new BigDecimal(syylbx).compareTo(new BigDecimal("0")) > 0) { Map posMap = taxFreeMap.get(TaxFreeTypeEnum.ENDOWMENT_INSURANCE); List pos = (List) posMap.get(employeeDeclare.getTaxAgentId() + "-" + employeeDeclare.getEmployeeId() + "-" + SalaryDateUtil.getFormatYearMonth(employeeDeclare.getTaxCycle())); if (CollectionUtils.isNotEmpty(pos)) { @@ -220,7 +225,9 @@ public class TaxDeclarationRequest { listRequestParam.put("syjkbxfblb", paramMaps); } } - if (new BigDecimal(employeeRequestParam.getOrDefault("zykcjze", "0").toString()).compareTo(new BigDecimal("0")) > 0) { + + String zykcjze = employeeRequestParam.getOrDefault("zykcjze", "0").toString(); + if (NumberUtil.isNumber(zykcjze) && new BigDecimal(zykcjze).compareTo(new BigDecimal("0")) > 0) { Map posMap = taxFreeMap.get(TaxFreeTypeEnum.GRANT_DONATION); List pos = (List) posMap.get(employeeDeclare.getTaxAgentId() + "-" + employeeDeclare.getEmployeeId() + "-" + SalaryDateUtil.getFormatYearMonth(employeeDeclare.getTaxCycle())); if (CollectionUtils.isNotEmpty(pos)) { @@ -250,7 +257,8 @@ public class TaxDeclarationRequest { } } - if (new BigDecimal(employeeRequestParam.getOrDefault("jmse", "0").toString()).compareTo(new BigDecimal("0")) > 0) { + String jmse = employeeRequestParam.getOrDefault("jmse", "0").toString(); + if (NumberUtil.isNumber(jmse) && new BigDecimal(jmse).compareTo(new BigDecimal("0")) > 0) { Map posMap = taxFreeMap.get(TaxFreeTypeEnum.DERATE_DEDUCTION); List pos = (List) posMap.get(employeeDeclare.getTaxAgentId() + "-" + employeeDeclare.getEmployeeId() + "-" + SalaryDateUtil.getFormatYearMonth(employeeDeclare.getTaxCycle())); if (CollectionUtils.isNotEmpty(pos)) { @@ -274,9 +282,10 @@ public class TaxDeclarationRequest { } } - if (new BigDecimal(employeeRequestParam.getOrDefault("qt", "0").toString()).compareTo(new BigDecimal("0")) > 0) { + String qt = employeeRequestParam.getOrDefault("qt", "0").toString(); + if (NumberUtil.isNumber(qt) && new BigDecimal(qt).compareTo(new BigDecimal("0")) > 0) { Map posMap = taxFreeMap.get(TaxFreeTypeEnum.OTHER_DERATE_DEDUCTION); - List pos = (List) posMap.get(employeeDeclare.getTaxAgentId() + "-" + employeeDeclare.getEmployeeId() + "-" + SalaryDateUtil.getFormatYearMonth(employeeDeclare.getTaxCycle())); + List pos = (List) posMap.get(employeeDeclare.getTaxAgentId() + "-" + employeeDeclare.getEmployeeId() + "-" + SalaryDateUtil.getFormatYearMonth(employeeDeclare.getTaxCycle())); if (CollectionUtils.isNotEmpty(pos)) { employeeRequestParam.put("bz", pos.get(0).getRemark()); } @@ -312,6 +321,40 @@ public class TaxDeclarationRequest { } + public static Map convert2flsdRequestParam(List taxReportColumns, + List taxDeclarations, + List taxDeclarationValues, + List employeeDeclares) { + Map> objRequestParam = Maps.newHashMap(); + Map>> listRequestParam = Maps.newHashMap(); + Map> taxReportColumnMap = SalaryEntityUtil.group2Map(taxReportColumns, TaxReportColumnPO::getIncomeCategory); + Map employeeDeclareMap = SalaryEntityUtil.convert2Map(employeeDeclares, EmployeeDeclarePO::getEmployeeId); + Map> taxDeclarationValueMap = SalaryEntityUtil.group2Map(taxDeclarationValues, TaxDeclarationValuePO::getTaxDeclarationId); + for (TaxDeclarationPO taxDeclaration : taxDeclarations) { + List values = taxDeclarationValueMap.get(taxDeclaration.getId()); + for (TaxDeclarationValuePO taxDeclarationValue : values) { + EmployeeDeclarePO employeeDeclare = employeeDeclareMap.get(taxDeclarationValue.getEmployeeId()); + IncomeCategoryEnum incomeCategoryEnum = IncomeCategoryEnum.parseByValue(taxDeclaration.getIncomeCategory()); + if (employeeDeclare == null || incomeCategoryEnum == null) { + continue; + } + List taxReportColumnList = taxReportColumnMap.get(Util.null2String(incomeCategoryEnum.getValue())); + Map employeeRequestParam = convert2RequestParam(incomeCategoryEnum, taxReportColumnList, taxDeclarationValue, employeeDeclare); + if (incomeCategoryEnum == IncomeCategoryEnum.CLASSIFIED_INCOME_OTHER_INTEREST_DIVIDENDS_BONUSES) { + // 其他利息股息红利所得 + List> employeeRequestParams = listRequestParam.computeIfAbsent("lxgxhllb", k -> Lists.newArrayList()); + employeeRequestParams.add(employeeRequestParam); + } + } + } + + Map requestParam = Maps.newHashMap(); + requestParam.putAll(objRequestParam); + requestParam.putAll(listRequestParam); + return requestParam; + } + + public static Map convert2fjmsdRequestParam(List taxReportColumns, List taxDeclarations, List taxDeclarationValues, diff --git a/src/com/engine/salary/enums/salarysob/IncomeCategoryEnum.java b/src/com/engine/salary/enums/salarysob/IncomeCategoryEnum.java index 504e7d3d7..b2476e6b8 100644 --- a/src/com/engine/salary/enums/salarysob/IncomeCategoryEnum.java +++ b/src/com/engine/salary/enums/salarysob/IncomeCategoryEnum.java @@ -1,5 +1,6 @@ package com.engine.salary.enums.salarysob; +import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollectionUtil; import com.engine.salary.constant.SzyhApiConstant; import com.engine.salary.entity.employeedeclare.po.EmployeeDeclarePO; @@ -673,6 +674,88 @@ public enum IncomeCategoryEnum implements BaseEnum { return resultMap; } + }, + CLASSIFIED_INCOME_LISTED_COMPANY_DIVIDENDS_BONUSES(810, "0810", "上市公司股息红利所得(沪市、深市、创业板)", DeclareReportTypeEnum.CLASSIFIED_INCOME, 181945) { + @Override + public void parseGetDeclareTaxResultFeedbackResponse(Map>> result, GetDeclareTaxResultFeedbackResponse declareTaxResultFeedbackResponse) { + List flsd = declareTaxResultFeedbackResponse.getBody().getFlsd().getSsgsgxhllb().getSscglb(); + List> sheetData = ExcelUtil.getExcelSheetData(GetDeclareTaxResultFeedbackResponse.Body.flsd.flsdssjgdx.flsdscbw.class, flsd); + result.put(this.getDefaultLabel(), sheetData); + } + + @Override + public Map parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List employeeDeclares, SalarySobTaxRuleDTO taxRuleDTO) { + checkGetASynIndividualIncomeTaxFeedbackResponse(declareTaxResultFeedbackResponse); + GetASynIndividualIncomeTaxFeedbackResponse.Body.flsd.flsdssjgdx ssgsgxhllb = declareTaxResultFeedbackResponse.getBody().getFlsd().getSsgsgxhllb(); + checkSSSBYYLBResponse(ssgsgxhllb.getSssbyylb()); + + Gson gs = new Gson(); + List taxRules = taxRuleDTO.getTaxRules(); + + List sscglb = ssgsgxhllb.getSscglb(); + Map idNoResultMap = SalaryEntityUtil.convert2Map(sscglb, GetASynIndividualIncomeTaxFeedbackResponse.Body.flsd.flsdssjgdx.result::getZzhm); + Map resultMap = new HashMap<>(); + for (EmployeeDeclarePO employeeDeclare : employeeDeclares) { + GetASynIndividualIncomeTaxFeedbackResponse.Body.flsd.flsdssjgdx.result result = idNoResultMap.get(employeeDeclare.getCardNum()); + if (result == null) { + continue; + } + taxRules.forEach(rule -> { + String getter = "get" + rule.getTaxIndex().substring(0, 1).toUpperCase() + rule.getTaxIndex().substring(1); + try { + Method method = result.getClass().getMethod(getter); + Object invoke = method.invoke(result); + rule.setValue(Util.null2String(invoke)); + } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { + log.error("getTaxErr no such method {}", getter, ex); + } + }); + resultMap.put(employeeDeclare.getEmployeeId(), gs.fromJson(gs.toJson(taxRuleDTO), (Type) SalarySobTaxRuleDTO.class)); + } + return resultMap; + } + + }, + CLASSIFIED_INCOME_OTHER_INTEREST_DIVIDENDS_BONUSES(800, "0800", "其他利息股息红利所得", DeclareReportTypeEnum.CLASSIFIED_INCOME, 181945) { + @Override + public void parseGetDeclareTaxResultFeedbackResponse(Map>> result, GetDeclareTaxResultFeedbackResponse declareTaxResultFeedbackResponse) { + List flsd = declareTaxResultFeedbackResponse.getBody().getFlsd().getLxgxhllb().getSscglb(); + List> sheetData = ExcelUtil.getExcelSheetData(GetDeclareTaxResultFeedbackResponse.Body.flsd.flsdssjgdx.flsdscbw.class, flsd); + result.put(this.getDefaultLabel(), sheetData); + } + + @Override + public Map parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List employeeDeclares, SalarySobTaxRuleDTO taxRuleDTO) { + checkGetASynIndividualIncomeTaxFeedbackResponse(declareTaxResultFeedbackResponse); + GetASynIndividualIncomeTaxFeedbackResponse.Body.flsd.flsdssjgdx ssgsgxhllb = declareTaxResultFeedbackResponse.getBody().getFlsd().getLxgxhllb(); + checkSSSBYYLBResponse(ssgsgxhllb.getSssbyylb()); + + Gson gs = new Gson(); + List taxRules = taxRuleDTO.getTaxRules(); + + List sscglb = ssgsgxhllb.getSscglb(); + Map idNoResultMap = SalaryEntityUtil.convert2Map(sscglb, GetASynIndividualIncomeTaxFeedbackResponse.Body.flsd.flsdssjgdx.result::getZzhm); + Map resultMap = new HashMap<>(); + for (EmployeeDeclarePO employeeDeclare : employeeDeclares) { + GetASynIndividualIncomeTaxFeedbackResponse.Body.flsd.flsdssjgdx.result result = idNoResultMap.get(employeeDeclare.getCardNum()); + if (result == null) { + continue; + } + taxRules.forEach(rule -> { + String getter = "get" + rule.getTaxIndex().substring(0, 1).toUpperCase() + rule.getTaxIndex().substring(1); + try { + Method method = result.getClass().getMethod(getter); + Object invoke = method.invoke(result); + rule.setValue(Util.null2String(invoke)); + } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { + log.error("getTaxErr no such method {}", getter, ex); + } + }); + resultMap.put(employeeDeclare.getEmployeeId(), gs.fromJson(gs.toJson(taxRuleDTO), (Type) SalarySobTaxRuleDTO.class)); + } + return resultMap; + } + }; @@ -716,6 +799,14 @@ public enum IncomeCategoryEnum implements BaseEnum { } } + private static void checkSSSBYYLBResponse(List sssbyylb) { + if(CollUtil.isNotEmpty(sssbyylb)){ + String err = sssbyylb.stream().map(sssbyy -> sssbyy.getXm() + sssbyy.getCwxx()).collect(Collectors.joining(",")); + throw new OnlineCalculateTaxException(err); + } + } + + public Map>> parseGetCompanyIncomesResponse(Map>> result, GetCompanyIncomesResponse response) { List sfmx = Optional.ofNullable(response.getBody().getSfmx()) .orElse(new ArrayList<>()) diff --git a/src/com/engine/salary/remote/tax/response/calculate/GetASynIndividualIncomeTaxFeedbackResponse.java b/src/com/engine/salary/remote/tax/response/calculate/GetASynIndividualIncomeTaxFeedbackResponse.java index ff4fb6484..ad6d5ed8a 100644 --- a/src/com/engine/salary/remote/tax/response/calculate/GetASynIndividualIncomeTaxFeedbackResponse.java +++ b/src/com/engine/salary/remote/tax/response/calculate/GetASynIndividualIncomeTaxFeedbackResponse.java @@ -46,10 +46,10 @@ public class GetASynIndividualIncomeTaxFeedbackResponse extends BaseResponse { * 综合所得 必填:是 见综合所得计算结果 */ private zhsd zhsd; -// /** -// * 分类所得 必填:是 见分类所得计算结果 -// */ -// private flsd flsd; + /** + * 分类所得 必填:是 见分类所得计算结果 + */ + private flsd flsd; /** * 非居民所得 必填:是 见非居民所得计算结果 */ @@ -543,6 +543,193 @@ public class GetASynIndividualIncomeTaxFeedbackResponse extends BaseResponse { } + /** + * 分类所得 + */ + @Data + public static class flsd { + + /** + * 利息股息红利所得列表 必填:null + */ + private flsdssjgdx lxgxhllb; + /** + * 股权转让所得列表 必填:null + */ + private flsdssjgdx ggzrlb; + /** + * 其他财产转让所得列表 必填:null + */ + private flsdssjgdx qtcczrlb; + /** + * 偶然所得列表 必填:null + */ + private flsdssjgdx orsdlb; + /** + * 其他财产租赁列表 必填:null + */ + private flsdssjgdx qtcczllb; + /** + * 上市公司股息红利 必填:null + */ + private flsdssjgdx ssgsgxhllb; + /** + * 个人房屋出租所得列表 必填:null + */ + private flsdssjgdx grfwczsdlb; + /** + * 随机赠送礼品列表 必填:null + */ + private flsdssjgdx sjzslplb; + /** + * 三板市场股息红利所得 必填:null + */ + private flsdssjgdx sbscgxhllb; + /** + * 证劵资金利息所得 必填:null + */ + private flsdssjgdx zjzjlxlb; + + + /** + * 分类所得算税结果对象 + */ + @Data + public static class flsdssjgdx { + /** + * 算税成功列表 参考输入报文非居民所得输出结果报文 + */ + private List sscglb; + /** + * 算税失败列表 参考输入报文非居民所得输出结果报文 + */ + private List sssblb; + /** + * 算税失败原因列表 参考算税失败原因对象 + */ + private List sssbyylb; + /** + * 算税总人数 + */ + private int sszrs; + /** + * 算税失败总人数 + */ + private int sssbrs; + + /** + * 所得输出结果报文 + */ + @Data + public static class result { + /** + * 是否明细申报 必填:否 是或者否 + */ + private String sfmxsb; + /** + * 姓名 必填:null 汇总申报返回空 + */ + private String xm; + /** + * 证件类型名称 必填:null 汇总申报返回空 + */ + private String zzlx; + /** + * 证件号码 必填:null 汇总申报返回空 + */ + private String zzhm; + /** + * 收入额 必填:是 + */ + private String sre; + /** + * 免税收入 必填:是 + */ + private String mssd; + /** + * 财产原值 必填:是 + */ + private String ccyz; + /** + * 允许扣除的税费 必填:是 + */ + private String yxkcsf; + /** + * 投资抵扣 必填:是 + */ + private String tzdk; + /** + * 其他 必填:是 + */ + private String qt; + /** + * 备注 必填:是 + */ + private String bz; + /** + * 减除费用 必填:是 + */ + private String jcfy; + /** + * 减计比例 必填:是 + */ + private String jjbl; + /** + * 准予扣除的捐赠额 必填:是 + */ + private String zykcjze; + /** + * 税前扣除项目合计 必填:是 + */ + private String sqkcxmhj; + /** + * 应纳税所得额 必填:是 + */ + private String ynssde; + /** + * 应纳税额 必填:是 + */ + private String ynse; + /** + * 减免税额 必填:是 + */ + private String jmse; + /** + * 已缴税额 必填:是 无需填写该值,按0处理 + */ + private String ykjse; + /** + * 应扣缴税额 必填:是 + */ + private String yingkjse; + /** + * 税率 必填:是 + */ + private String sl; + /** + * 速算扣除数 必填:是 + */ + private String sskcs; + /** + * 应补退税额 必填:是 + */ + private String ybtse; + /** + * 分类所得名字 必填:是 分类所得薪金类别-利息股息红利所得,股权转让所得,其他财产转让所得,偶然所得,其他所得" + */ + private String sdxm; + /** + * 所得期间起 必填:是 YYYY-MM + */ + private String sdqjq; + /** + * 所得期间止 必填:是 YYYY-MM + */ + private String sdqjz; + } + } + } + @Data public static class fjmsd { diff --git a/src/com/engine/salary/remote/tax/response/declare/GetDeclareTaxResultFeedbackResponse.java b/src/com/engine/salary/remote/tax/response/declare/GetDeclareTaxResultFeedbackResponse.java index 6691cdb96..aec9cc394 100644 --- a/src/com/engine/salary/remote/tax/response/declare/GetDeclareTaxResultFeedbackResponse.java +++ b/src/com/engine/salary/remote/tax/response/declare/GetDeclareTaxResultFeedbackResponse.java @@ -47,10 +47,10 @@ public class GetDeclareTaxResultFeedbackResponse extends BaseResponse { * 综合所得 必填:是 见综合所得计算结果 */ private zhsd zhsd; -// /** -// * 分类所得 必填:是 见分类所得计算结果 -// */ -// private 对象 flsd; + /** + * 分类所得 必填:是 见分类所得计算结果 + */ + private flsd flsd; /** * 非居民所得 必填:是 见非居民所得计算结果 */ @@ -657,6 +657,192 @@ public class GetDeclareTaxResultFeedbackResponse extends BaseResponse { } + /** + * 分类所得 + */ + @Data + public static class flsd { + + /** + * 利息股息红利所得列表 必填:null + */ + private flsdssjgdx lxgxhllb; + /** + * 股权转让所得列表 必填:null + */ + private flsdssjgdx ggzrlb; + /** + * 其他财产转让所得列表 必填:null + */ + private flsdssjgdx qtcczrlb; + /** + * 偶然所得列表 必填:null + */ + private flsdssjgdx orsdlb; + /** + * 其他财产租赁列表 必填:null + */ + private flsdssjgdx qtcczllb; + /** + * 上市公司股息红利 必填:null + */ + private flsdssjgdx ssgsgxhllb; + /** + * 个人房屋出租所得列表 必填:null + */ + private flsdssjgdx grfwczsdlb; + /** + * 随机赠送礼品列表 必填:null + */ + private flsdssjgdx sjzslplb; + /** + * 三板市场股息红利所得 必填:null + */ + private flsdssjgdx sbscgxhllb; + /** + * 证劵资金利息所得 必填:null + */ + private flsdssjgdx zjzjlxlb; + + + /** + * 4.3.1.3.3.1分类所得算税结果对象 + */ + @Data + public static class flsdssjgdx { + /** + * 非算税成功列表 参考输入报文非居民所得输出结果报文 + */ + private List sscglb; + /** + * 算税失败列表 参考输入报文非居民所得输出结果报文 + */ + private List sssblb; + /** + * 失败原因列表 参考算税失败原因对象 + */ + private List sssbyylb; + /** + * 算税总人数 + */ + private int sszrs; + /** + * 失败总人数 + */ + private int sssbrs; + + /** + * 所得输出结果报文 + */ + @Data + public static class flsdscbw { + /** + * 是否明细申报 必填:否 是或者否 + */ + private String sfmxsb; + /** + * 姓名 必填:null 汇总申报返回空 + */ + private String xm; + /** + * 证件类型名称 必填:null 汇总申报返回空 + */ + private String zzlx; + /** + * 证件号码 必填:null 汇总申报返回空 + */ + private String zzhm; + /** + * 收入额 必填:是 + */ + private String sre; + /** + * 免税收入 必填:是 + */ + private String mssd; + /** + * 财产原值 必填:是 + */ + private String ccyz; + /** + * 允许扣除的税费 必填:是 + */ + private String yxkcsf; + /** + * 投资抵扣 必填:是 + */ + private String tzdk; + /** + * 其他 必填:是 + */ + private String qt; + /** + * 备注 必填:是 + */ + private String bz; + /** + * 减除费用 必填:是 + */ + private String jcfy; + /** + * 减计比例 必填:是 + */ + private String jjbl; + /** + * 准予扣除的捐赠额 必填:是 + */ + private String zykcjze; + /** + * 税前扣除项目合计 必填:是 + */ + private String sqkcxmhj; + /** + * 应纳税所得额 必填:是 + */ + private String ynssde; + /** + * 应纳税额 必填:是 + */ + private String ynse; + /** + * 减免税额 必填:是 + */ + private String jmse; + /** + * 已缴税额 必填:是 无需填写该值,按0处理 + */ + private String ykjse; + /** + * 应扣缴税额 必填:是 + */ + private String yingkjse; + /** + * 税率 必填:是 + */ + private String sl; + /** + * 速算扣除数 必填:是 + */ + private String sskcs; + /** + * 应补退税额 必填:是 + */ + private String ybtse; + /** + * 分类所得名字 必填:是 分类所得薪金类别-利息股息红利所得,股权转让所得,其他财产转让所得,偶然所得,其他所得" + */ + private String sdxm; + /** + * 所得期间起 必填:是 YYYY-MM + */ + private String sdqjq; + /** + * 所得期间止 必填:是 YYYY-MM + */ + private String sdqjz; + } + } + } @Data public static class fjmsd { diff --git a/src/com/engine/salary/service/impl/TaxDeclareRecordServiceImpl.java b/src/com/engine/salary/service/impl/TaxDeclareRecordServiceImpl.java index 334ea2f51..28914157d 100644 --- a/src/com/engine/salary/service/impl/TaxDeclareRecordServiceImpl.java +++ b/src/com/engine/salary/service/impl/TaxDeclareRecordServiceImpl.java @@ -717,6 +717,12 @@ public class TaxDeclareRecordServiceImpl extends Service implements TaxDeclareRe requestParam.put("zhsd", taxDeclarationParam); } + if (declareReportType == DeclareReportTypeEnum.CLASSIFIED_INCOME) { + //分类所得 + Map flsdRequestParam = TaxDeclarationRequest.convert2flsdRequestParam(taxReportColumns, taxDeclarations, taxDeclarationValues, employeeDeclares); + requestParam.put("flsd", flsdRequestParam); + } + if (declareReportType == DeclareReportTypeEnum.NONRESIDENT_INCOME) { //非居民所得代扣代缴 fjmsd Map fjmsdRequestParam = TaxDeclarationRequest.convert2fjmsdRequestParam(taxReportColumns, taxDeclarations, taxDeclarationValues, employeeDeclares); @@ -728,7 +734,7 @@ public class TaxDeclareRecordServiceImpl extends Service implements TaxDeclareRe Map params = new HashMap<>(1); Map header = SingnatureData.initHeader(params, apiConfig.getAppKey(), apiConfig.getAppSecret()); String res = HttpUtil.doPost(url, header, reqJson, HttpUtil.JSON_TYPE); - log.info("个税申报返回数据: {} , taxDeclareRecord: {}", res, taxDeclareRecord); + log.info("个税申报数据:params {} ,res {}, taxDeclareRecord: {}",params, res, taxDeclareRecord); DeclareTaxResponse declareTaxResponse = JsonUtil.parseObject(res, DeclareTaxResponse.class); if (Objects.isNull(declareTaxResponse) || Objects.isNull(declareTaxResponse.getHead())) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(156449, "服务异常")); diff --git a/src/com/engine/salary/wrapper/SalarySobWrapper.java b/src/com/engine/salary/wrapper/SalarySobWrapper.java index 3eea30516..97e7c99d0 100644 --- a/src/com/engine/salary/wrapper/SalarySobWrapper.java +++ b/src/com/engine/salary/wrapper/SalarySobWrapper.java @@ -281,7 +281,8 @@ public class SalarySobWrapper extends Service { public List> incomeCategoryList() { List> list = new ArrayList<>(); Arrays.stream(IncomeCategoryEnum.values()) - .filter(incomeCategory -> incomeCategory.getReportType() == DeclareReportTypeEnum.COMPREHENSIVE_INCOME) + .filter(incomeCategory -> incomeCategory.getReportType() == DeclareReportTypeEnum.COMPREHENSIVE_INCOME + || incomeCategory.getReportType() == DeclareReportTypeEnum.CLASSIFIED_INCOME) .forEach(incomeCategory -> { Map map = new HashMap(); map.put("enum", incomeCategory); From c3d6ac8b66009db35f226954f6fc49d0b22884d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Tue, 17 Jun 2025 17:25:27 +0800 Subject: [PATCH 05/18] =?UTF-8?q?=E5=88=86=E7=B1=BB=E6=89=80=E5=BE=97-?= =?UTF-8?q?=E4=B8=8A=E5=B8=82=E5=85=AC=E5=8F=B8=E8=82=A1=E6=81=AF=E7=BA=A2?= =?UTF-8?q?=E5=88=A9=E6=89=80=E5=BE=97(=E6=B2=AA=E5=B8=82=E3=80=81?= =?UTF-8?q?=E6=B7=B1=E5=B8=82=E3=80=81=E5=88=9B=E4=B8=9A=E6=9D=BF)=20?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E6=89=80=E5=BE=97-=E5=85=B6=E4=BB=96?= =?UTF-8?q?=E5=88=A9=E6=81=AF=E8=82=A1=E6=81=AF=E7=BA=A2=E5=88=A9=E6=89=80?= =?UTF-8?q?=E5=BE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bo/TaxDeclarationRequest.java | 5 ++ .../GetDeclareTaxResultFeedbackResponse.java | 46 ++++++++++++++++++- .../impl/TaxDeclarationValueServiceImpl.java | 12 +++-- .../impl/TaxDeclareRecordServiceImpl.java | 2 +- 4 files changed, 60 insertions(+), 5 deletions(-) diff --git a/src/com/engine/salary/entity/taxdeclaration/bo/TaxDeclarationRequest.java b/src/com/engine/salary/entity/taxdeclaration/bo/TaxDeclarationRequest.java index cd4140605..1dbb8de4b 100644 --- a/src/com/engine/salary/entity/taxdeclaration/bo/TaxDeclarationRequest.java +++ b/src/com/engine/salary/entity/taxdeclaration/bo/TaxDeclarationRequest.java @@ -340,6 +340,11 @@ public class TaxDeclarationRequest { } List taxReportColumnList = taxReportColumnMap.get(Util.null2String(incomeCategoryEnum.getValue())); Map employeeRequestParam = convert2RequestParam(incomeCategoryEnum, taxReportColumnList, taxDeclarationValue, employeeDeclare); + if (incomeCategoryEnum == IncomeCategoryEnum.CLASSIFIED_INCOME_LISTED_COMPANY_DIVIDENDS_BONUSES) { + // 上市公司股息红利所得(沪市、深市、创业板) + List> employeeRequestParams = listRequestParam.computeIfAbsent("ssgsgxhllb", k -> Lists.newArrayList()); + employeeRequestParams.add(employeeRequestParam); + } if (incomeCategoryEnum == IncomeCategoryEnum.CLASSIFIED_INCOME_OTHER_INTEREST_DIVIDENDS_BONUSES) { // 其他利息股息红利所得 List> employeeRequestParams = listRequestParam.computeIfAbsent("lxgxhllb", k -> Lists.newArrayList()); diff --git a/src/com/engine/salary/remote/tax/response/declare/GetDeclareTaxResultFeedbackResponse.java b/src/com/engine/salary/remote/tax/response/declare/GetDeclareTaxResultFeedbackResponse.java index aec9cc394..137d849ae 100644 --- a/src/com/engine/salary/remote/tax/response/declare/GetDeclareTaxResultFeedbackResponse.java +++ b/src/com/engine/salary/remote/tax/response/declare/GetDeclareTaxResultFeedbackResponse.java @@ -711,7 +711,7 @@ public class GetDeclareTaxResultFeedbackResponse extends BaseResponse { @Data public static class flsdssjgdx { /** - * 非算税成功列表 参考输入报文非居民所得输出结果报文 + * 算税成功列表 参考输入报文非居民所得输出结果报文 */ private List sscglb; /** @@ -743,90 +743,134 @@ public class GetDeclareTaxResultFeedbackResponse extends BaseResponse { /** * 姓名 必填:null 汇总申报返回空 */ + @SalaryTableColumn(text = "姓名", width = "10%", column = "xm") + @ExcelHead(title = "姓名", dataIndex = "xm") private String xm; /** * 证件类型名称 必填:null 汇总申报返回空 */ + @SalaryTableColumn(text = "证件类型", width = "10%", column = "zzlx") + @ExcelHead(title = "证件类型", dataIndex = "zzlx") private String zzlx; /** * 证件号码 必填:null 汇总申报返回空 */ + @SalaryTableColumn(text = "证件号码", width = "10%", column = "zzhm") + @ExcelHead(title = "证件号码", dataIndex = "zzhm") private String zzhm; /** * 收入额 必填:是 */ + @SalaryTableColumn(text = "本期收入", width = "10%", column = "sre") + @ExcelHead(title = "本期收入", dataIndex = "sre") private String sre; /** * 免税收入 必填:是 */ + @SalaryTableColumn(text = "本期免税收入", width = "10%", column = "mssd") + @ExcelHead(title = "本期免税收入", dataIndex = "mssd") private String mssd; /** * 财产原值 必填:是 */ + @SalaryTableColumn(text = "财产原值", width = "10%", column = "ccyz") + @ExcelHead(title = "财产原值", dataIndex = "ccyz") private String ccyz; /** * 允许扣除的税费 必填:是 */ + @SalaryTableColumn(text = "允许扣除的税费", width = "10%", column = "yxkcsf") + @ExcelHead(title = "允许扣除的税费", dataIndex = "yxkcsf") private String yxkcsf; /** * 投资抵扣 必填:是 */ + @SalaryTableColumn(text = "投资抵扣", width = "10%", column = "tzdk") + @ExcelHead(title = "投资抵扣", dataIndex = "tzdk") private String tzdk; /** * 其他 必填:是 */ + @SalaryTableColumn(text = "其他", width = "10%", column = "qt") + @ExcelHead(title = "其他", dataIndex = "qt") private String qt; /** * 备注 必填:是 */ + @SalaryTableColumn(text = "备注", width = "10%", column = "bz") + @ExcelHead(title = "备注", dataIndex = "bz") private String bz; /** * 减除费用 必填:是 */ + @SalaryTableColumn(text = "减除费用", width = "10%", column = "jcfy") + @ExcelHead(title = "减除费用", dataIndex = "jcfy") private String jcfy; /** * 减计比例 必填:是 */ + @SalaryTableColumn(text = "减计比例", width = "10%", column = "jjbl") + @ExcelHead(title = "减计比例", dataIndex = "jjbl") private String jjbl; /** * 准予扣除的捐赠额 必填:是 */ + @SalaryTableColumn(text = "准予扣除的捐赠额", width = "10%", column = "zykcjze") + @ExcelHead(title = "准予扣除的捐赠额", dataIndex = "zykcjze") private String zykcjze; /** * 税前扣除项目合计 必填:是 */ + @SalaryTableColumn(text = "税前扣除项目合计", width = "10%", column = "sqkcxmhj") + @ExcelHead(title = "税前扣除项目合计", dataIndex = "sqkcxmhj") private String sqkcxmhj; /** * 应纳税所得额 必填:是 */ + @SalaryTableColumn(text = "应纳税所得额", width = "10%", column = "ynssde") + @ExcelHead(title = "应纳税所得额", dataIndex = "ynssde") private String ynssde; /** * 应纳税额 必填:是 */ + @SalaryTableColumn(text = "应纳税额", width = "10%", column = "ynse") + @ExcelHead(title = "应纳税额", dataIndex = "ynse") private String ynse; /** * 减免税额 必填:是 */ + @SalaryTableColumn(text = "减免税额", width = "10%", column = "jmse") + @ExcelHead(title = "减免税额", dataIndex = "jmse") private String jmse; /** * 已缴税额 必填:是 无需填写该值,按0处理 */ + @SalaryTableColumn(text = "已缴税额", width = "10%", column = "ykjse") + @ExcelHead(title = "已缴税额", dataIndex = "ykjse") private String ykjse; /** * 应扣缴税额 必填:是 */ + @SalaryTableColumn(text = "应扣缴税额", width = "10%", column = "yingkjse") + @ExcelHead(title = "应扣缴税额", dataIndex = "yingkjse") private String yingkjse; /** * 税率 必填:是 */ + @SalaryTableColumn(text = "税率", width = "10%", column = "sl") + @ExcelHead(title = "税率", dataIndex = "sl") private String sl; /** * 速算扣除数 必填:是 */ + @SalaryTableColumn(text = "速算扣除数", width = "10%", column = "sskcs") + @ExcelHead(title = "速算扣除数", dataIndex = "sskcs") private String sskcs; /** * 应补退税额 必填:是 */ + @SalaryTableColumn(text = "应补退税额", width = "10%", column = "ybtse") + @ExcelHead(title = "应补退税额", dataIndex = "ybtse") private String ybtse; /** * 分类所得名字 必填:是 分类所得薪金类别-利息股息红利所得,股权转让所得,其他财产转让所得,偶然所得,其他所得" diff --git a/src/com/engine/salary/service/impl/TaxDeclarationValueServiceImpl.java b/src/com/engine/salary/service/impl/TaxDeclarationValueServiceImpl.java index f0f5f9a38..5d75c8efa 100644 --- a/src/com/engine/salary/service/impl/TaxDeclarationValueServiceImpl.java +++ b/src/com/engine/salary/service/impl/TaxDeclarationValueServiceImpl.java @@ -25,6 +25,7 @@ import com.engine.salary.entity.taxdeclaration.po.*; import com.engine.salary.enums.OperateTypeEnum; import com.engine.salary.enums.salaryaccounting.EmployeeTypeEnum; import com.engine.salary.enums.salaryitem.SalaryDataTypeEnum; +import com.engine.salary.enums.salarysob.DeclareReportTypeEnum; import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import com.engine.salary.enums.sicategory.DeleteTypeEnum; import com.engine.salary.enums.taxdeclaration.SourceEnum; @@ -365,7 +366,12 @@ public class TaxDeclarationValueServiceImpl extends Service implements TaxDeclar Map>> onlineDataMap = new HashMap<>(); List list = getTaxDeclarationService(user).listByTaxDeclareRecordId(taxDeclareRecordPO.getId()); - list.stream().map(TaxDeclarationPO::getIncomeCategory).map(IncomeCategoryEnum::parseByValue).forEach(e -> e.parseGetDeclareTaxResultFeedbackResponse(onlineDataMap, declareTaxResultFeedbackResponse)); + list.stream() + .map(TaxDeclarationPO::getIncomeCategory) + .map(IncomeCategoryEnum::parseByValue) + .filter(Objects::nonNull) + .filter(e -> e.getReportType() == DeclareReportTypeEnum.parseByValue(reportType)) + .forEach(e -> e.parseGetDeclareTaxResultFeedbackResponse(onlineDataMap, declareTaxResultFeedbackResponse)); Map resultList = new HashMap<>(); List taxDeclarationValues = listByTaxDeclarationId(taxDeclaration.getId()); @@ -446,7 +452,7 @@ public class TaxDeclarationValueServiceImpl extends Service implements TaxDeclar onlyShowColumns.add(col); hasDiff.set(true); } - } else if ((StrUtil.isBlank(localValue) && "0.00".equals(onlineValue)) || (StrUtil.isBlank(onlineValue) && "0.00".equals(localValue))) { + } else if ((StrUtil.isBlank(localValue) && ("0.00".equals(onlineValue) || "0".equals(onlineValue))) || (StrUtil.isBlank(onlineValue) && ("0.00".equals(localValue) || "0".equals(localValue)))) { //短路 } else { if (!Objects.equals(localValue, onlineValue)) { @@ -504,7 +510,7 @@ public class TaxDeclarationValueServiceImpl extends Service implements TaxDeclar // 获取线下对比结果 Map contrastMap = contrast(param); List header = ((List) contrastMap.get("columns")); - PageInfo> pageInfo = (PageInfo>)contrastMap.get("pageInfo"); + PageInfo> pageInfo = (PageInfo>) contrastMap.get("pageInfo"); List> list = pageInfo.getList(); List empInfoColumns = new ArrayList<>(); diff --git a/src/com/engine/salary/service/impl/TaxDeclareRecordServiceImpl.java b/src/com/engine/salary/service/impl/TaxDeclareRecordServiceImpl.java index 28914157d..57afeeb08 100644 --- a/src/com/engine/salary/service/impl/TaxDeclareRecordServiceImpl.java +++ b/src/com/engine/salary/service/impl/TaxDeclareRecordServiceImpl.java @@ -734,7 +734,7 @@ public class TaxDeclareRecordServiceImpl extends Service implements TaxDeclareRe Map params = new HashMap<>(1); Map header = SingnatureData.initHeader(params, apiConfig.getAppKey(), apiConfig.getAppSecret()); String res = HttpUtil.doPost(url, header, reqJson, HttpUtil.JSON_TYPE); - log.info("个税申报数据:params {} ,res {}, taxDeclareRecord: {}",params, res, taxDeclareRecord); + log.info("个税申报数据:params {} ,res {}, taxDeclareRecord: {}",reqJson, res, taxDeclareRecord); DeclareTaxResponse declareTaxResponse = JsonUtil.parseObject(res, DeclareTaxResponse.class); if (Objects.isNull(declareTaxResponse) || Objects.isNull(declareTaxResponse.getHead())) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(156449, "服务异常")); From de5caded9e12b3811cada0007960ff4aaa42e91f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Wed, 18 Jun 2025 13:32:12 +0800 Subject: [PATCH 06/18] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E6=80=A7=E5=88=AB=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/mapper/datacollection/EmployMapper.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/com/engine/salary/mapper/datacollection/EmployMapper.xml b/src/com/engine/salary/mapper/datacollection/EmployMapper.xml index 3a2ed14af..5111bf7e1 100644 --- a/src/com/engine/salary/mapper/datacollection/EmployMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/EmployMapper.xml @@ -11,6 +11,7 @@ e.workcode, e.certificatenum as idNo, e.accounttype as accountType, + e.sex as sex, 'false' as extEmp from hrmresource e left join hrmdepartment d on e.departmentid = d.id @@ -21,6 +22,7 @@ select e.id as employeeId, e.lastname as username, + e.sex as sex, e.certificatenum as idNo, e.status as status, e.workcode as workcode, @@ -122,6 +125,7 @@ select e.id as employeeId, e.lastname as username, e.status as status, + e.sex as sex, e.certificatenum as idNo, e.workcode as workcode, d.departmentname as departmentName, @@ -228,6 +232,7 @@ select e.id as employeeId, e.lastname as username, e.status as status, + e.sex as sex, e.certificatenum as idNo, e.workcode as workcode, d.departmentname as departmentName, @@ -282,6 +287,7 @@ e.lastname as username, e.status as status, e.workcode as workcode, + e.sex as sex, e.certificatenum as idNo, e.companystartdate as companystartdate, e.mobile as mobile, @@ -303,6 +309,7 @@ e.status as status, e.workcode as workcode, e.certificatenum as idNo, + e.sex as sex, e.companystartdate as companystartdate, e.mobile as mobile, e.accounttype as accountType, @@ -323,6 +330,7 @@ e.status as status, e.workcode as workcode, e.certificatenum as idNo, + e.sex as sex, e.companystartdate as companystartdate, e.mobile as mobile, e.departmentid as departmentId, @@ -486,6 +494,7 @@ e.lastname as username, e.status as status, e.certificatenum as idNo, + e.sex as sex, e.workcode as workcode, e.companystartdate as companystartdate, e.mobile as mobile, @@ -561,6 +570,7 @@ e.lastname as username, e.status as status, e.certificatenum as idNo, + e.sex as sex, e.workcode as workcode, d.departmentname as departmentName, d.id as departmentId, From f7cba636b30d592cfa367095893bcbb4552adc9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Wed, 18 Jun 2025 17:21:22 +0800 Subject: [PATCH 07/18] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=80=BC=E4=BF=9D=E7=95=99=E4=BD=8D=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/entity/salarysob/bo/SalarySobItemAggregateBO.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/engine/salary/entity/salarysob/bo/SalarySobItemAggregateBO.java b/src/com/engine/salary/entity/salarysob/bo/SalarySobItemAggregateBO.java index b1a76a4a4..2daccbec2 100644 --- a/src/com/engine/salary/entity/salarysob/bo/SalarySobItemAggregateBO.java +++ b/src/com/engine/salary/entity/salarysob/bo/SalarySobItemAggregateBO.java @@ -144,7 +144,7 @@ public class SalarySobItemAggregateBO { .canEdit(openFormulaForcedEditing || Objects.equals(salaryItemPO.getCanEdit(), 1)) .canDelete(openFormulaForcedEditing || salaryItemPO.getCanDelete() == null || Objects.equals(salaryItemPO.getCanDelete(), 1)) .width(salaryItemPO.getWidth()) - .defaultValue(salaryItemPO.getDefaultValue()) + .defaultValue(salarySobItemPO.getDefaultValue()) .build()); } } From f5b1768438901ba1cea5bc74154b1f64cbb88fd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Thu, 19 Jun 2025 10:49:29 +0800 Subject: [PATCH 08/18] =?UTF-8?q?=E5=88=A9=E6=81=AF=E8=82=A1=E6=81=AF?= =?UTF-8?q?=E7=BA=A2=E5=88=A9=E6=89=80=E5=BE=97sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resource/sqlupgrade/DM/sql202506190103.sql | 24 +++++++++++++++++++ resource/sqlupgrade/GS/sql202506190103.sql | 24 +++++++++++++++++++ resource/sqlupgrade/JC/sql202506190103.sql | 24 +++++++++++++++++++ resource/sqlupgrade/Mysql/sql202506190103.sql | 10 ++++++++ .../sqlupgrade/Oracle/sql202506190103.sql | 18 ++++++++++++++ resource/sqlupgrade/PG/sql202506190103.sql | 10 ++++++++ .../sqlupgrade/SQLServer/sql202506190103.sql | 18 ++++++++++++++ resource/sqlupgrade/ST/sql202506190103.sql | 24 +++++++++++++++++++ 8 files changed, 152 insertions(+) create mode 100644 resource/sqlupgrade/DM/sql202506190103.sql create mode 100644 resource/sqlupgrade/GS/sql202506190103.sql create mode 100644 resource/sqlupgrade/JC/sql202506190103.sql create mode 100644 resource/sqlupgrade/Mysql/sql202506190103.sql create mode 100644 resource/sqlupgrade/Oracle/sql202506190103.sql create mode 100644 resource/sqlupgrade/PG/sql202506190103.sql create mode 100644 resource/sqlupgrade/SQLServer/sql202506190103.sql create mode 100644 resource/sqlupgrade/ST/sql202506190103.sql diff --git a/resource/sqlupgrade/DM/sql202506190103.sql b/resource/sqlupgrade/DM/sql202506190103.sql new file mode 100644 index 000000000..952cd69b8 --- /dev/null +++ b/resource/sqlupgrade/DM/sql202506190103.sql @@ -0,0 +1,24 @@ +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158200, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '', 'dividendsIncome', 'number', 'sre', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158201, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '˰', 'dividendsFreeIncome', 'number', 'mssd', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158202, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '׼۳ľ', 'dividendsAllowedDonation', 'number', 'zykcjze', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158203, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '˰', 'dividendsTaxDeduction', 'string', 'jmse', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158204, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '', 'listedCompanyIncome', 'number', 'sre', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158206, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '˰', 'listedCompanyFreeIncome', 'number', 'mssd', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158207, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '׼۳ľ', 'listedCompanyAllowedDonation', 'number', 'zykcjze', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158208, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '˰', 'listedCompanyTaxDeduction', 'string', 'jmse', NULL, 0); +/ + diff --git a/resource/sqlupgrade/GS/sql202506190103.sql b/resource/sqlupgrade/GS/sql202506190103.sql new file mode 100644 index 000000000..952cd69b8 --- /dev/null +++ b/resource/sqlupgrade/GS/sql202506190103.sql @@ -0,0 +1,24 @@ +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158200, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '', 'dividendsIncome', 'number', 'sre', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158201, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '˰', 'dividendsFreeIncome', 'number', 'mssd', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158202, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '׼۳ľ', 'dividendsAllowedDonation', 'number', 'zykcjze', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158203, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '˰', 'dividendsTaxDeduction', 'string', 'jmse', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158204, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '', 'listedCompanyIncome', 'number', 'sre', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158206, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '˰', 'listedCompanyFreeIncome', 'number', 'mssd', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158207, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '׼۳ľ', 'listedCompanyAllowedDonation', 'number', 'zykcjze', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158208, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '˰', 'listedCompanyTaxDeduction', 'string', 'jmse', NULL, 0); +/ + diff --git a/resource/sqlupgrade/JC/sql202506190103.sql b/resource/sqlupgrade/JC/sql202506190103.sql new file mode 100644 index 000000000..952cd69b8 --- /dev/null +++ b/resource/sqlupgrade/JC/sql202506190103.sql @@ -0,0 +1,24 @@ +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158200, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '', 'dividendsIncome', 'number', 'sre', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158201, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '˰', 'dividendsFreeIncome', 'number', 'mssd', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158202, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '׼۳ľ', 'dividendsAllowedDonation', 'number', 'zykcjze', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158203, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '˰', 'dividendsTaxDeduction', 'string', 'jmse', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158204, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '', 'listedCompanyIncome', 'number', 'sre', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158206, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '˰', 'listedCompanyFreeIncome', 'number', 'mssd', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158207, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '׼۳ľ', 'listedCompanyAllowedDonation', 'number', 'zykcjze', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158208, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '˰', 'listedCompanyTaxDeduction', 'string', 'jmse', NULL, 0); +/ + diff --git a/resource/sqlupgrade/Mysql/sql202506190103.sql b/resource/sqlupgrade/Mysql/sql202506190103.sql new file mode 100644 index 000000000..2ee229b09 --- /dev/null +++ b/resource/sqlupgrade/Mysql/sql202506190103.sql @@ -0,0 +1,10 @@ +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158200, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '', 'dividendsIncome', 'number', 'sre', NULL, 0); +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158201, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '˰', 'dividendsFreeIncome', 'number', 'mssd', NULL, 0); +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158202, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '׼۳ľ', 'dividendsAllowedDonation', 'number', 'zykcjze', NULL, 0); +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158203, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '˰', 'dividendsTaxDeduction', 'string', 'jmse', NULL, 0); + + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158204, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '', 'listedCompanyIncome', 'number', 'sre', NULL, 0); +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158206, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '˰', 'listedCompanyFreeIncome', 'number', 'mssd', NULL, 0); +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158207, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '׼۳ľ', 'listedCompanyAllowedDonation', 'number', 'zykcjze', NULL, 0); +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158208, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '˰', 'listedCompanyTaxDeduction', 'string', 'jmse', NULL, 0); \ No newline at end of file diff --git a/resource/sqlupgrade/Oracle/sql202506190103.sql b/resource/sqlupgrade/Oracle/sql202506190103.sql new file mode 100644 index 000000000..4196b1982 --- /dev/null +++ b/resource/sqlupgrade/Oracle/sql202506190103.sql @@ -0,0 +1,18 @@ +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158200, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '', 'dividendsIncome', 'number', 'sre', NULL, 0) +/ +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158201, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '˰', 'dividendsFreeIncome', 'number', 'mssd', NULL, 0) +/ +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158202, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '׼۳ľ', 'dividendsAllowedDonation', 'number', 'zykcjze', NULL, 0) +/ +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158203, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '˰', 'dividendsTaxDeduction', 'string', 'jmse', NULL, 0) +/ + + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158204, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '', 'listedCompanyIncome', 'number', 'sre', NULL, 0) +/ +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158206, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '˰', 'listedCompanyFreeIncome', 'number', 'mssd', NULL, 0) +/ +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158207, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '׼۳ľ', 'listedCompanyAllowedDonation', 'number', 'zykcjze', NULL, 0) +/ +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158208, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '˰', 'listedCompanyTaxDeduction', 'string', 'jmse', NULL, 0) +/ \ No newline at end of file diff --git a/resource/sqlupgrade/PG/sql202506190103.sql b/resource/sqlupgrade/PG/sql202506190103.sql new file mode 100644 index 000000000..2ee229b09 --- /dev/null +++ b/resource/sqlupgrade/PG/sql202506190103.sql @@ -0,0 +1,10 @@ +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158200, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '', 'dividendsIncome', 'number', 'sre', NULL, 0); +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158201, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '˰', 'dividendsFreeIncome', 'number', 'mssd', NULL, 0); +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158202, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '׼۳ľ', 'dividendsAllowedDonation', 'number', 'zykcjze', NULL, 0); +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158203, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '˰', 'dividendsTaxDeduction', 'string', 'jmse', NULL, 0); + + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158204, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '', 'listedCompanyIncome', 'number', 'sre', NULL, 0); +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158206, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '˰', 'listedCompanyFreeIncome', 'number', 'mssd', NULL, 0); +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158207, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '׼۳ľ', 'listedCompanyAllowedDonation', 'number', 'zykcjze', NULL, 0); +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158208, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '˰', 'listedCompanyTaxDeduction', 'string', 'jmse', NULL, 0); \ No newline at end of file diff --git a/resource/sqlupgrade/SQLServer/sql202506190103.sql b/resource/sqlupgrade/SQLServer/sql202506190103.sql new file mode 100644 index 000000000..adfe5e358 --- /dev/null +++ b/resource/sqlupgrade/SQLServer/sql202506190103.sql @@ -0,0 +1,18 @@ +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158200, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '', 'dividendsIncome', 'number', 'sre', NULL, 0) +go +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158201, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '˰', 'dividendsFreeIncome', 'number', 'mssd', NULL, 0) +go +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158202, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '׼۳ľ', 'dividendsAllowedDonation', 'number', 'zykcjze', NULL, 0) +go +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158203, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '˰', 'dividendsTaxDeduction', 'string', 'jmse', NULL, 0) +go + + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158204, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '', 'listedCompanyIncome', 'number', 'sre', NULL, 0) +go +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158206, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '˰', 'listedCompanyFreeIncome', 'number', 'mssd', NULL, 0) +go +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158207, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '׼۳ľ', 'listedCompanyAllowedDonation', 'number', 'zykcjze', NULL, 0) +go +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158208, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '˰', 'listedCompanyTaxDeduction', 'string', 'jmse', NULL, 0) +go \ No newline at end of file diff --git a/resource/sqlupgrade/ST/sql202506190103.sql b/resource/sqlupgrade/ST/sql202506190103.sql new file mode 100644 index 000000000..952cd69b8 --- /dev/null +++ b/resource/sqlupgrade/ST/sql202506190103.sql @@ -0,0 +1,24 @@ +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158200, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '', 'dividendsIncome', 'number', 'sre', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158201, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '˰', 'dividendsFreeIncome', 'number', 'mssd', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158202, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '׼۳ľ', 'dividendsAllowedDonation', 'number', 'zykcjze', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158203, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '˰', 'dividendsTaxDeduction', 'string', 'jmse', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158204, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '', 'listedCompanyIncome', 'number', 'sre', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158206, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '˰', 'listedCompanyFreeIncome', 'number', 'mssd', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158207, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '׼۳ľ', 'listedCompanyAllowedDonation', 'number', 'zykcjze', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158208, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '˰', 'listedCompanyTaxDeduction', 'string', 'jmse', NULL, 0); +/ + From 63c95583310b31c372b5d0994d9c4830b236f855 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Thu, 19 Jun 2025 11:38:05 +0800 Subject: [PATCH 09/18] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=A4=BE=E4=BF=9D?= =?UTF-8?q?=E4=B8=8A=E4=B8=8B=E9=99=90=E6=A0=A1=E9=AA=8C=20=E6=BC=8F?= =?UTF-8?q?=E6=8E=89=E5=8F=AA=E5=BC=80=E5=90=AF=E4=BA=86=E5=85=AC=E5=8F=B8?= =?UTF-8?q?=E6=B2=A1=E5=BC=80=E5=90=AF=E4=B8=AA=E4=BA=BA=E7=9A=84=E5=9C=BA?= =?UTF-8?q?=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()); From 45acec8468eeee1ded5e3fe5328182ba2ab7b1e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Thu, 19 Jun 2025 14:40:09 +0800 Subject: [PATCH 10/18] =?UTF-8?q?=E4=B8=8A=E7=BA=BF=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resource/WEB-INF/prop/hrmSalary.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resource/WEB-INF/prop/hrmSalary.properties b/resource/WEB-INF/prop/hrmSalary.properties index c4b7713cc..c558fd72d 100644 --- a/resource/WEB-INF/prop/hrmSalary.properties +++ b/resource/WEB-INF/prop/hrmSalary.properties @@ -1,5 +1,5 @@ log=false defaultCloseNonStandard149=true AESEncryptScrect=990EB004A1C862721C1513AE90038C9E -version=3.0.2.2504.03 +version=3.0.2.2504.04 openFormulaForcedEditing=false \ No newline at end of file From bfd953d08272710ac84d5d9183bc3fc879764a62 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Thu, 19 Jun 2025 17:28:09 +0800 Subject: [PATCH 11/18] =?UTF-8?q?=E6=B0=B4=E5=8D=B0=E5=8D=95=E7=8B=AC?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=88=86=E9=83=A8=E4=B8=8D=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java b/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java index aea5cede9..b6c6971a3 100644 --- a/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java +++ b/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java @@ -869,7 +869,7 @@ public class SalaryBillBO { if ("text".equals(wmClassify)) { wmTextFieldIds = (List) salaryBillWatermark.getWmSetting().getOrDefault("wmSelectedFieldIds", Collections.emptyList()); - List empFields = Arrays.asList(HRM_Name, HRM_Num, HRM_Mobile, HRM_Email, HRM_CurrentOperatorId, HRM_Department); + List empFields = Arrays.asList(HRM_Name, HRM_Num, HRM_Mobile, HRM_Email, HRM_CurrentOperatorId, HRM_Department, HRM_SecondDepartment); if (wmTextFieldIds.contains(HRM_SecondDepartment)) { // 需要查分部 salaryBillWatermark.getWmSetting().put("needQuerySubDepart", true); From 5cc0dda5f6f4ea5aa3b4f8e0f09920c2c4867128 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Fri, 27 Jun 2025 13:45:57 +0800 Subject: [PATCH 12/18] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E7=BA=BF=E7=89=88=E6=9C=AC=E4=B8=AA=E7=A8=8E=E7=94=B3=E6=8A=A5?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/service/impl/TaxDeclarationServiceImpl.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/com/engine/salary/service/impl/TaxDeclarationServiceImpl.java b/src/com/engine/salary/service/impl/TaxDeclarationServiceImpl.java index 73445ee72..e6ad762f4 100644 --- a/src/com/engine/salary/service/impl/TaxDeclarationServiceImpl.java +++ b/src/com/engine/salary/service/impl/TaxDeclarationServiceImpl.java @@ -210,7 +210,14 @@ public class TaxDeclarationServiceImpl extends Service implements TaxDeclaration .replace("{1}", SalaryDateUtil.getFormatYearMonth(saveParam.getSalaryMonth()))); } // 查询薪资所属月的薪资核算记录 - salaryAcctRecordPOS = listBySalaryMonth(SalaryAcctRecordPO.builder().salaryMonths(salaryMonthDateRange).taxAgentId(taxAgentId).build()); + salaryAcctRecordPOS = listBySalaryMonth(SalaryAcctRecordPO.builder().salaryMonths(salaryMonthDateRange).build()); + List salarySobPOS = getSalarySobService(user).listByTaxAgentId(saveParam.getTaxAgentId()); + if (CollectionUtils.isEmpty(salarySobPOS)) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(98874, "{0}该义务人下无账套数据").replace("{0}", saveParam.getSalaryMonth().toString())); + } + List salarySobIds = salarySobPOS.stream().map(SalarySobPO::getId).collect(Collectors.toList()); + + salaryAcctRecordPOS.stream().filter(record -> salarySobIds.contains(record.getSalarySobId())).collect(Collectors.toList()); // 无薪资核算记录,不允许生成个税申报表 if (CollectionUtils.isEmpty(salaryAcctRecordPOS)) { From cb02136ff6d61b832c5e6246571ba41bc22cd73e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Tue, 1 Jul 2025 18:37:50 +0800 Subject: [PATCH 13/18] =?UTF-8?q?=E5=85=8D=E7=A8=8E=E6=94=B6=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resource/sqlupgrade/DM/sql202507010303.sql | 21 +++++++++++++++++++ resource/sqlupgrade/DM/sql202507010403.sql | 21 +++++++++++++++++++ resource/sqlupgrade/GS/sql202507010303.sql | 21 +++++++++++++++++++ resource/sqlupgrade/GS/sql202507010403.sql | 21 +++++++++++++++++++ resource/sqlupgrade/JC/sql202507010303.sql | 21 +++++++++++++++++++ resource/sqlupgrade/JC/sql202507010403.sql | 21 +++++++++++++++++++ resource/sqlupgrade/Mysql/sql202507010303.sql | 7 +++++++ resource/sqlupgrade/Mysql/sql202507010403.sql | 7 +++++++ .../sqlupgrade/Oracle/sql202507010303.sql | 20 ++++++++++++++++++ .../sqlupgrade/Oracle/sql202507010403.sql | 14 +++++++++++++ resource/sqlupgrade/PG/sql202507010303.sql | 20 ++++++++++++++++++ resource/sqlupgrade/PG/sql202507010403.sql | 20 ++++++++++++++++++ .../sqlupgrade/SQLServer/sql202507010303.sql | 20 ++++++++++++++++++ .../sqlupgrade/SQLServer/sql202507010403.sql | 14 +++++++++++++ resource/sqlupgrade/ST/sql202507010303.sql | 21 +++++++++++++++++++ resource/sqlupgrade/ST/sql202507010403.sql | 21 +++++++++++++++++++ .../dto/DerateDeductionListDTO.java | 11 +++++++--- .../dto/EndowmentInsuranceListDTO.java | 17 +++++++++------ .../datacollection/dto/FreeIncomeListDTO.java | 9 ++++++-- .../dto/GrantDonationListDTO.java | 19 ++++++++++------- .../dto/HealthInsuranceListDTO.java | 13 ++++++++---- .../dto/OtherDerateDeductionListDTO.java | 7 ++++++- .../dto/PersonalPensionListDTO.java | 11 +++++++--- .../param/DerateDeductionSaveParam.java | 7 +++++++ .../param/EndowmentInsuranceSaveParam.java | 7 +++++++ .../param/FreeIncomeSaveParam.java | 6 ++++++ .../param/GrantDonationSaveParam.java | 7 +++++++ .../param/HealthInsuranceSaveParam.java | 7 +++++++ .../param/OtherDerateDeductionSaveParam.java | 7 +++++++ .../param/PersonalPensionSaveParam.java | 7 +++++++ .../datacollection/po/DerateDeductionPO.java | 7 +++++++ .../po/EndowmentInsurancePO.java | 7 +++++++ .../datacollection/po/FreeIncomePO.java | 7 +++++++ .../datacollection/po/GrantDonationPO.java | 7 +++++++ .../datacollection/po/HealthInsurancePO.java | 7 +++++++ .../po/OtherDerateDeductionPO.java | 7 +++++++ .../datacollection/po/PersonalPensionPO.java | 7 +++++++ .../bo/TaxDeclarationRequest.java | 21 ++++++++++++++++--- .../datacollection/FreeIncomeMapper.xml | 15 +++++++++++++ .../impl/OtherDeductionServiceImpl.java | 16 ++++++++++++++ 40 files changed, 497 insertions(+), 29 deletions(-) create mode 100644 resource/sqlupgrade/DM/sql202507010303.sql create mode 100644 resource/sqlupgrade/DM/sql202507010403.sql create mode 100644 resource/sqlupgrade/GS/sql202507010303.sql create mode 100644 resource/sqlupgrade/GS/sql202507010403.sql create mode 100644 resource/sqlupgrade/JC/sql202507010303.sql create mode 100644 resource/sqlupgrade/JC/sql202507010403.sql create mode 100644 resource/sqlupgrade/Mysql/sql202507010303.sql create mode 100644 resource/sqlupgrade/Mysql/sql202507010403.sql create mode 100644 resource/sqlupgrade/Oracle/sql202507010303.sql create mode 100644 resource/sqlupgrade/Oracle/sql202507010403.sql create mode 100644 resource/sqlupgrade/PG/sql202507010303.sql create mode 100644 resource/sqlupgrade/PG/sql202507010403.sql create mode 100644 resource/sqlupgrade/SQLServer/sql202507010303.sql create mode 100644 resource/sqlupgrade/SQLServer/sql202507010403.sql create mode 100644 resource/sqlupgrade/ST/sql202507010303.sql create mode 100644 resource/sqlupgrade/ST/sql202507010403.sql diff --git a/resource/sqlupgrade/DM/sql202507010303.sql b/resource/sqlupgrade/DM/sql202507010303.sql new file mode 100644 index 000000000..a25d13d65 --- /dev/null +++ b/resource/sqlupgrade/DM/sql202507010303.sql @@ -0,0 +1,21 @@ +ALTER TABLE hrsa_free_income ADD income_category int; +/ + +ALTER TABLE hrsa_derate_deduction ADD income_category int; +/ + +ALTER TABLE hrsa_endowment_insurance ADD income_category int; +/ + +ALTER TABLE hrsa_grant_donation ADD income_category int; +/ + +ALTER TABLE hrsa_health_insurance ADD income_category int; +/ + +ALTER TABLE hrsa_other_derate_deduction ADD income_category int; +/ + +ALTER TABLE hrsa_personal_pension ADD income_category int; +/ + diff --git a/resource/sqlupgrade/DM/sql202507010403.sql b/resource/sqlupgrade/DM/sql202507010403.sql new file mode 100644 index 000000000..69d97a34e --- /dev/null +++ b/resource/sqlupgrade/DM/sql202507010403.sql @@ -0,0 +1,21 @@ +update hrsa_free_income set income_category = 1; +/ + +update hrsa_derate_deduction set income_category = 1; +/ + +update hrsa_endowment_insurance set income_category = 1; +/ + +update hrsa_grant_donation set income_category = 1; +/ + +update hrsa_health_insurance set income_category = 1; +/ + +update hrsa_other_derate_deduction set income_category = 1; +/ + +update hrsa_personal_pension set income_category = 1; +/ + diff --git a/resource/sqlupgrade/GS/sql202507010303.sql b/resource/sqlupgrade/GS/sql202507010303.sql new file mode 100644 index 000000000..a25d13d65 --- /dev/null +++ b/resource/sqlupgrade/GS/sql202507010303.sql @@ -0,0 +1,21 @@ +ALTER TABLE hrsa_free_income ADD income_category int; +/ + +ALTER TABLE hrsa_derate_deduction ADD income_category int; +/ + +ALTER TABLE hrsa_endowment_insurance ADD income_category int; +/ + +ALTER TABLE hrsa_grant_donation ADD income_category int; +/ + +ALTER TABLE hrsa_health_insurance ADD income_category int; +/ + +ALTER TABLE hrsa_other_derate_deduction ADD income_category int; +/ + +ALTER TABLE hrsa_personal_pension ADD income_category int; +/ + diff --git a/resource/sqlupgrade/GS/sql202507010403.sql b/resource/sqlupgrade/GS/sql202507010403.sql new file mode 100644 index 000000000..69d97a34e --- /dev/null +++ b/resource/sqlupgrade/GS/sql202507010403.sql @@ -0,0 +1,21 @@ +update hrsa_free_income set income_category = 1; +/ + +update hrsa_derate_deduction set income_category = 1; +/ + +update hrsa_endowment_insurance set income_category = 1; +/ + +update hrsa_grant_donation set income_category = 1; +/ + +update hrsa_health_insurance set income_category = 1; +/ + +update hrsa_other_derate_deduction set income_category = 1; +/ + +update hrsa_personal_pension set income_category = 1; +/ + diff --git a/resource/sqlupgrade/JC/sql202507010303.sql b/resource/sqlupgrade/JC/sql202507010303.sql new file mode 100644 index 000000000..a25d13d65 --- /dev/null +++ b/resource/sqlupgrade/JC/sql202507010303.sql @@ -0,0 +1,21 @@ +ALTER TABLE hrsa_free_income ADD income_category int; +/ + +ALTER TABLE hrsa_derate_deduction ADD income_category int; +/ + +ALTER TABLE hrsa_endowment_insurance ADD income_category int; +/ + +ALTER TABLE hrsa_grant_donation ADD income_category int; +/ + +ALTER TABLE hrsa_health_insurance ADD income_category int; +/ + +ALTER TABLE hrsa_other_derate_deduction ADD income_category int; +/ + +ALTER TABLE hrsa_personal_pension ADD income_category int; +/ + diff --git a/resource/sqlupgrade/JC/sql202507010403.sql b/resource/sqlupgrade/JC/sql202507010403.sql new file mode 100644 index 000000000..69d97a34e --- /dev/null +++ b/resource/sqlupgrade/JC/sql202507010403.sql @@ -0,0 +1,21 @@ +update hrsa_free_income set income_category = 1; +/ + +update hrsa_derate_deduction set income_category = 1; +/ + +update hrsa_endowment_insurance set income_category = 1; +/ + +update hrsa_grant_donation set income_category = 1; +/ + +update hrsa_health_insurance set income_category = 1; +/ + +update hrsa_other_derate_deduction set income_category = 1; +/ + +update hrsa_personal_pension set income_category = 1; +/ + diff --git a/resource/sqlupgrade/Mysql/sql202507010303.sql b/resource/sqlupgrade/Mysql/sql202507010303.sql new file mode 100644 index 000000000..8b3a971e8 --- /dev/null +++ b/resource/sqlupgrade/Mysql/sql202507010303.sql @@ -0,0 +1,7 @@ +ALTER TABLE hrsa_free_income ADD COLUMN income_category int(0); +ALTER TABLE hrsa_derate_deduction ADD COLUMN income_category int(0); +ALTER TABLE hrsa_endowment_insurance ADD COLUMN income_category int(0); +ALTER TABLE hrsa_grant_donation ADD COLUMN income_category int(0); +ALTER TABLE hrsa_health_insurance ADD COLUMN income_category int(0); +ALTER TABLE hrsa_other_derate_deduction ADD COLUMN income_category int(0); +ALTER TABLE hrsa_personal_pension ADD COLUMN income_category int(0); \ No newline at end of file diff --git a/resource/sqlupgrade/Mysql/sql202507010403.sql b/resource/sqlupgrade/Mysql/sql202507010403.sql new file mode 100644 index 000000000..d6247eefc --- /dev/null +++ b/resource/sqlupgrade/Mysql/sql202507010403.sql @@ -0,0 +1,7 @@ +update hrsa_free_income set income_category = 1; +update hrsa_derate_deduction set income_category = 1; +update hrsa_endowment_insurance set income_category = 1; +update hrsa_grant_donation set income_category = 1; +update hrsa_health_insurance set income_category = 1; +update hrsa_other_derate_deduction set income_category = 1; +update hrsa_personal_pension set income_category = 1; \ No newline at end of file diff --git a/resource/sqlupgrade/Oracle/sql202507010303.sql b/resource/sqlupgrade/Oracle/sql202507010303.sql new file mode 100644 index 000000000..7cfc02c85 --- /dev/null +++ b/resource/sqlupgrade/Oracle/sql202507010303.sql @@ -0,0 +1,20 @@ +ALTER TABLE hrsa_free_income ADD income_category int +/ + +ALTER TABLE hrsa_derate_deduction ADD income_category int +/ + +ALTER TABLE hrsa_endowment_insurance ADD income_category int +/ + +ALTER TABLE hrsa_grant_donation ADD income_category int +/ + +ALTER TABLE hrsa_health_insurance ADD income_category int +/ + +ALTER TABLE hrsa_other_derate_deduction ADD income_category int +/ + +ALTER TABLE hrsa_personal_pension ADD income_category int +/ \ No newline at end of file diff --git a/resource/sqlupgrade/Oracle/sql202507010403.sql b/resource/sqlupgrade/Oracle/sql202507010403.sql new file mode 100644 index 000000000..4eff5bab6 --- /dev/null +++ b/resource/sqlupgrade/Oracle/sql202507010403.sql @@ -0,0 +1,14 @@ +update hrsa_free_income set income_category = 1 +/ +update hrsa_derate_deduction set income_category = 1 +/ +update hrsa_endowment_insurance set income_category = 1 +/ +update hrsa_grant_donation set income_category = 1 +/ +update hrsa_health_insurance set income_category = 1 +/ +update hrsa_other_derate_deduction set income_category = 1 +/ +update hrsa_personal_pension set income_category = 1 +/ \ No newline at end of file diff --git a/resource/sqlupgrade/PG/sql202507010303.sql b/resource/sqlupgrade/PG/sql202507010303.sql new file mode 100644 index 000000000..f54b534b9 --- /dev/null +++ b/resource/sqlupgrade/PG/sql202507010303.sql @@ -0,0 +1,20 @@ +ALTER TABLE hrsa_free_income ADD income_category int; +/ + +ALTER TABLE hrsa_derate_deduction ADD income_category int; +/ + +ALTER TABLE hrsa_endowment_insurance ADD income_category int; +/ + +ALTER TABLE hrsa_grant_donation ADD income_category int; +/ + +ALTER TABLE hrsa_health_insurance ADD income_category int; +/ + +ALTER TABLE hrsa_other_derate_deduction ADD income_category int; +/ + +ALTER TABLE hrsa_personal_pension ADD income_category int; +/ \ No newline at end of file diff --git a/resource/sqlupgrade/PG/sql202507010403.sql b/resource/sqlupgrade/PG/sql202507010403.sql new file mode 100644 index 000000000..f5ebbdb76 --- /dev/null +++ b/resource/sqlupgrade/PG/sql202507010403.sql @@ -0,0 +1,20 @@ +update hrsa_free_income set income_category = 1; +/ + +update hrsa_derate_deduction set income_category = 1; +/ + +update hrsa_endowment_insurance set income_category = 1; +/ + +update hrsa_grant_donation set income_category = 1; +/ + +update hrsa_health_insurance set income_category = 1; +/ + +update hrsa_other_derate_deduction set income_category = 1; +/ + +update hrsa_personal_pension set income_category = 1; +/ \ No newline at end of file diff --git a/resource/sqlupgrade/SQLServer/sql202507010303.sql b/resource/sqlupgrade/SQLServer/sql202507010303.sql new file mode 100644 index 000000000..9ca6c463d --- /dev/null +++ b/resource/sqlupgrade/SQLServer/sql202507010303.sql @@ -0,0 +1,20 @@ +ALTER TABLE hrsa_free_income ADD income_category int +GO + +ALTER TABLE hrsa_derate_deduction ADD income_category int +GO + +ALTER TABLE hrsa_endowment_insurance ADD income_category int +GO + +ALTER TABLE hrsa_grant_donation ADD income_category int +GO + +ALTER TABLE hrsa_health_insurance ADD income_category int +GO + +ALTER TABLE hrsa_other_derate_deduction ADD income_category int +GO + +ALTER TABLE hrsa_personal_pension ADD income_category int +GO \ No newline at end of file diff --git a/resource/sqlupgrade/SQLServer/sql202507010403.sql b/resource/sqlupgrade/SQLServer/sql202507010403.sql new file mode 100644 index 000000000..99fc8e409 --- /dev/null +++ b/resource/sqlupgrade/SQLServer/sql202507010403.sql @@ -0,0 +1,14 @@ +update hrsa_free_income set income_category = 1 +GO +update hrsa_derate_deduction set income_category = 1 +GO +update hrsa_endowment_insurance set income_category = 1 +GO +update hrsa_grant_donation set income_category = 1 +GO +update hrsa_health_insurance set income_category = 1 +GO +update hrsa_other_derate_deduction set income_category = 1 +GO +update hrsa_personal_pension set income_category = 1 +GO \ No newline at end of file diff --git a/resource/sqlupgrade/ST/sql202507010303.sql b/resource/sqlupgrade/ST/sql202507010303.sql new file mode 100644 index 000000000..a25d13d65 --- /dev/null +++ b/resource/sqlupgrade/ST/sql202507010303.sql @@ -0,0 +1,21 @@ +ALTER TABLE hrsa_free_income ADD income_category int; +/ + +ALTER TABLE hrsa_derate_deduction ADD income_category int; +/ + +ALTER TABLE hrsa_endowment_insurance ADD income_category int; +/ + +ALTER TABLE hrsa_grant_donation ADD income_category int; +/ + +ALTER TABLE hrsa_health_insurance ADD income_category int; +/ + +ALTER TABLE hrsa_other_derate_deduction ADD income_category int; +/ + +ALTER TABLE hrsa_personal_pension ADD income_category int; +/ + diff --git a/resource/sqlupgrade/ST/sql202507010403.sql b/resource/sqlupgrade/ST/sql202507010403.sql new file mode 100644 index 000000000..69d97a34e --- /dev/null +++ b/resource/sqlupgrade/ST/sql202507010403.sql @@ -0,0 +1,21 @@ +update hrsa_free_income set income_category = 1; +/ + +update hrsa_derate_deduction set income_category = 1; +/ + +update hrsa_endowment_insurance set income_category = 1; +/ + +update hrsa_grant_donation set income_category = 1; +/ + +update hrsa_health_insurance set income_category = 1; +/ + +update hrsa_other_derate_deduction set income_category = 1; +/ + +update hrsa_personal_pension set income_category = 1; +/ + diff --git a/src/com/engine/salary/entity/datacollection/dto/DerateDeductionListDTO.java b/src/com/engine/salary/entity/datacollection/dto/DerateDeductionListDTO.java index c0751492b..dc2ec8f44 100644 --- a/src/com/engine/salary/entity/datacollection/dto/DerateDeductionListDTO.java +++ b/src/com/engine/salary/entity/datacollection/dto/DerateDeductionListDTO.java @@ -82,17 +82,22 @@ public class DerateDeductionListDTO { @TableTitle(title = "证件号码", dataIndex = "idNo", key = "idNo") private String idNo; - @ExcelProperty(index = 6) + @TableTitle(title = "所得项目", dataIndex = "incomeCategoryName", key = "incomeCategoryName") + private String incomeCategoryName; + private Integer incomeCategory; + + + @ExcelProperty(index = 7) @TableTitle(title = "减免事项", dataIndex = "derateItem", key = "derateItem") private String derateItem; - @ExcelProperty(index = 7) + @ExcelProperty(index = 8) @TableTitle(title = "减免性质", dataIndex = "derateProperty", key = "derateProperty") @ElogTransform(name = "减免性质") private String derateProperty; - @ExcelProperty(index = 8) + @ExcelProperty(index = 9) @TableTitle(title = "减免金额", dataIndex = "derateAmount", key = "derateAmount") @ElogTransform(name = "减免金额") private String derateAmount; diff --git a/src/com/engine/salary/entity/datacollection/dto/EndowmentInsuranceListDTO.java b/src/com/engine/salary/entity/datacollection/dto/EndowmentInsuranceListDTO.java index 4b48e20bc..d56a961ae 100644 --- a/src/com/engine/salary/entity/datacollection/dto/EndowmentInsuranceListDTO.java +++ b/src/com/engine/salary/entity/datacollection/dto/EndowmentInsuranceListDTO.java @@ -81,28 +81,33 @@ public class EndowmentInsuranceListDTO { @TableTitle(title = "证件号码", dataIndex = "idNo", key = "idNo") private String idNo; - @ExcelProperty(index = 6) + @ExcelProperty(index = 7) + @TableTitle(title = "所得项目", dataIndex = "incomeCategoryName", key = "incomeCategoryName") + private String incomeCategoryName; + private Integer incomeCategory; + + @ExcelProperty(index = 8) @TableTitle(title = "申报扣除月份", dataIndex = "deductionMonth", key = "deductionMonth") @JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8") private Date deductionMonth; - @ExcelProperty(index = 7) + @ExcelProperty(index = 9) @TableTitle(title = "税延养老账户编号", dataIndex = "accountNumber", key = "accountNumber") private String accountNumber; - @ExcelProperty(index = 8) + @ExcelProperty(index = 10) @TableTitle(title = "报税校验码", dataIndex = "checkCode", key = "checkCode") private String checkCode; - @ExcelProperty(index = 9) + @ExcelProperty(index = 11) @TableTitle(title = "年度保费", dataIndex = "yearPremium", key = "yearPremium") private String yearPremium; - @ExcelProperty(index = 10) + @ExcelProperty(index = 12) @TableTitle(title = "月度保费", dataIndex = "monthPremium", key = "monthPremium") private String monthPremium; - @ExcelProperty(index = 11) + @ExcelProperty(index = 13) @TableTitle(title = "本期扣除金额", dataIndex = "currentDeduction", key = "currentDeduction") private String currentDeduction; diff --git a/src/com/engine/salary/entity/datacollection/dto/FreeIncomeListDTO.java b/src/com/engine/salary/entity/datacollection/dto/FreeIncomeListDTO.java index 698dcbde0..d6ae1ada7 100644 --- a/src/com/engine/salary/entity/datacollection/dto/FreeIncomeListDTO.java +++ b/src/com/engine/salary/entity/datacollection/dto/FreeIncomeListDTO.java @@ -84,14 +84,19 @@ public class FreeIncomeListDTO { @ExcelProperty(index = 6) + @TableTitle(title = "所得项目", dataIndex = "incomeCategoryName", key = "incomeCategoryName") + private String incomeCategoryName; + private Integer incomeCategory; + + @ExcelProperty(index = 7) @TableTitle(title = "免税事项", dataIndex = "freeItem", key = "freeItem") private String freeItem; - @ExcelProperty(index = 7) + @ExcelProperty(index = 8) @TableTitle(title = "免税性质", dataIndex = "freeProperty", key = "freeProperty") private String freeProperty; - @ExcelProperty(index = 8) + @ExcelProperty(index = 9) @TableTitle(title = "免税金额", dataIndex = "freeAmount", key = "freeAmount") @Encrypt private String freeAmount; diff --git a/src/com/engine/salary/entity/datacollection/dto/GrantDonationListDTO.java b/src/com/engine/salary/entity/datacollection/dto/GrantDonationListDTO.java index f38aa7181..a6a26aaf1 100644 --- a/src/com/engine/salary/entity/datacollection/dto/GrantDonationListDTO.java +++ b/src/com/engine/salary/entity/datacollection/dto/GrantDonationListDTO.java @@ -88,33 +88,38 @@ public class GrantDonationListDTO { @ExcelProperty(index = 5) private String idNo; - @ExcelProperty(index = 6) + @TableTitle(title = "所得项目", dataIndex = "incomeCategoryName", key = "incomeCategoryName") + private String incomeCategoryName; + private Integer incomeCategory; + + + @ExcelProperty(index = 7) @TableTitle(title = "受赠单位名称", dataIndex = "recipientName", key = "recipientName") private String recipientName; - @ExcelProperty(index = 7) + @ExcelProperty(index = 8) @TableTitle(title = "受赠单位纳税人识别号", dataIndex = "taxCode", key = "taxCode") private String taxCode; - @ExcelProperty(index = 8) + @ExcelProperty(index = 9) @TableTitle(title = "捐赠凭证号", dataIndex = "donationNumber", key = "donationNumber") private String donationNumber; - @ExcelProperty(index = 9) + @ExcelProperty(index = 10) @TableTitle(title = "捐赠日期", dataIndex = "donateDate", key = "donateDate") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date donateDate; - @ExcelProperty(index = 10) + @ExcelProperty(index = 11) @TableTitle(title = "捐赠金额", dataIndex = "donateAmount", key = "donateAmount") private String donateAmount; - @ExcelProperty(index = 11) + @ExcelProperty(index = 12) @TableTitle(title = "扣除比例", dataIndex = "deductionProportion", key = "deductionProportion") private String deductionProportion; - @ExcelProperty(index = 12) + @ExcelProperty(index = 13) @TableTitle(title = "实际扣除金额", dataIndex = "actualDeduction", key = "actualDeduction") private String actualDeduction; diff --git a/src/com/engine/salary/entity/datacollection/dto/HealthInsuranceListDTO.java b/src/com/engine/salary/entity/datacollection/dto/HealthInsuranceListDTO.java index 890682379..6f2393a9e 100644 --- a/src/com/engine/salary/entity/datacollection/dto/HealthInsuranceListDTO.java +++ b/src/com/engine/salary/entity/datacollection/dto/HealthInsuranceListDTO.java @@ -85,23 +85,28 @@ public class HealthInsuranceListDTO { private String idNo; @ExcelProperty(index = 6) + @TableTitle(title = "所得项目", dataIndex = "incomeCategoryName", key = "incomeCategoryName") + private String incomeCategoryName; + private Integer incomeCategory; + + @ExcelProperty(index = 7) @TableTitle(title = "税优识别码", dataIndex = "identificationNumber", key = "identificationNumber") private String identificationNumber; - @ExcelProperty(index = 7) + @ExcelProperty(index = 8) @TableTitle(title = "保单生效日期", dataIndex = "effectiveDate", key = "effectiveDate") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date effectiveDate; - @ExcelProperty(index = 8) + @ExcelProperty(index = 9) @TableTitle(title = "年度保费", dataIndex = "yearPremium", key = "yearPremium") private String yearPremium; - @ExcelProperty(index = 9) + @ExcelProperty(index = 10) @TableTitle(title = "月度保费", dataIndex = "monthPremium", key = "monthPremium") private String monthPremium; - @ExcelProperty(index = 10) + @ExcelProperty(index = 11) @TableTitle(title = "本期扣除金额", dataIndex = "currentDeduction", key = "currentDeduction") private String currentDeduction; diff --git a/src/com/engine/salary/entity/datacollection/dto/OtherDerateDeductionListDTO.java b/src/com/engine/salary/entity/datacollection/dto/OtherDerateDeductionListDTO.java index d4d292a14..216b5ab7a 100644 --- a/src/com/engine/salary/entity/datacollection/dto/OtherDerateDeductionListDTO.java +++ b/src/com/engine/salary/entity/datacollection/dto/OtherDerateDeductionListDTO.java @@ -85,10 +85,15 @@ public class OtherDerateDeductionListDTO { private String idNo; @ExcelProperty(index = 6) + @TableTitle(title = "所得项目", dataIndex = "incomeCategoryName", key = "incomeCategoryName") + private String incomeCategoryName; + private Integer incomeCategory; + + @ExcelProperty(index = 7) @TableTitle(title = "减免税额", dataIndex = "otherDeduction", key = "otherDeduction") private String otherDeduction; - @ExcelProperty(index = 7) + @ExcelProperty(index = 8) @TableTitle(title = "备注", dataIndex = "remark", key = "remark") private String remark; diff --git a/src/com/engine/salary/entity/datacollection/dto/PersonalPensionListDTO.java b/src/com/engine/salary/entity/datacollection/dto/PersonalPensionListDTO.java index d4f28e78b..eafeae03e 100644 --- a/src/com/engine/salary/entity/datacollection/dto/PersonalPensionListDTO.java +++ b/src/com/engine/salary/entity/datacollection/dto/PersonalPensionListDTO.java @@ -83,6 +83,11 @@ public class PersonalPensionListDTO { @TableTitle(title = "证件号码", dataIndex = "idNo", key = "idNo") private String idNo; + @ExcelProperty(index = 6) + @TableTitle(title = "所得项目", dataIndex = "incomeCategoryName", key = "incomeCategoryName") + private String incomeCategoryName; + private Integer incomeCategory; + //缴费月度 private Date payMonth; @@ -91,17 +96,17 @@ public class PersonalPensionListDTO { private Integer voucherType; //凭证类别名称 - @ExcelProperty(index = 6) + @ExcelProperty(index = 7) @TableTitle(title = "凭证类型", dataIndex = "voucherTypeName", key = "voucherTypeName") private String voucherTypeName; //凭证编码 - @ExcelProperty(index = 7) + @ExcelProperty(index = 8) @TableTitle(title = "凭证编码", dataIndex = "voucherNo", key = "voucherNo") private String voucherNo; //缴费金额 - @ExcelProperty(index = 8) + @ExcelProperty(index = 9) @TableTitle(title = "缴费金额", dataIndex = "payAmount", key = "payAmount") private String payAmount; diff --git a/src/com/engine/salary/entity/datacollection/param/DerateDeductionSaveParam.java b/src/com/engine/salary/entity/datacollection/param/DerateDeductionSaveParam.java index cd70723d3..196da93c3 100644 --- a/src/com/engine/salary/entity/datacollection/param/DerateDeductionSaveParam.java +++ b/src/com/engine/salary/entity/datacollection/param/DerateDeductionSaveParam.java @@ -1,5 +1,6 @@ package com.engine.salary.entity.datacollection.param; +import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -26,6 +27,12 @@ public class DerateDeductionSaveParam { //主表数据Id private Long mainId; + /** + * 所得项目 + * @see IncomeCategoryEnum + */ + private Integer incomeCategory; + //减免事项 private String derateItem; diff --git a/src/com/engine/salary/entity/datacollection/param/EndowmentInsuranceSaveParam.java b/src/com/engine/salary/entity/datacollection/param/EndowmentInsuranceSaveParam.java index f86c8603b..044e92295 100644 --- a/src/com/engine/salary/entity/datacollection/param/EndowmentInsuranceSaveParam.java +++ b/src/com/engine/salary/entity/datacollection/param/EndowmentInsuranceSaveParam.java @@ -1,5 +1,6 @@ package com.engine.salary.entity.datacollection.param; +import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.AllArgsConstructor; import lombok.Builder; @@ -30,6 +31,12 @@ public class EndowmentInsuranceSaveParam { //主表数据Id private Long mainId; + /** + * 所得项目 + * @see IncomeCategoryEnum + */ + private Integer incomeCategory; + //申报扣除月份 @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") diff --git a/src/com/engine/salary/entity/datacollection/param/FreeIncomeSaveParam.java b/src/com/engine/salary/entity/datacollection/param/FreeIncomeSaveParam.java index 216f2e3a5..213a3391d 100644 --- a/src/com/engine/salary/entity/datacollection/param/FreeIncomeSaveParam.java +++ b/src/com/engine/salary/entity/datacollection/param/FreeIncomeSaveParam.java @@ -1,5 +1,6 @@ package com.engine.salary.entity.datacollection.param; +import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -26,6 +27,11 @@ public class FreeIncomeSaveParam { //主表数据Id private Long mainId; + /** + * 所得项目 + * @see IncomeCategoryEnum + */ + private Integer incomeCategory; //免税事项 private String freeItem; diff --git a/src/com/engine/salary/entity/datacollection/param/GrantDonationSaveParam.java b/src/com/engine/salary/entity/datacollection/param/GrantDonationSaveParam.java index ec98e212b..47ef897ca 100644 --- a/src/com/engine/salary/entity/datacollection/param/GrantDonationSaveParam.java +++ b/src/com/engine/salary/entity/datacollection/param/GrantDonationSaveParam.java @@ -1,5 +1,6 @@ package com.engine.salary.entity.datacollection.param; +import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -26,6 +27,12 @@ public class GrantDonationSaveParam { //主表数据Id private Long mainId; + /** + * 所得项目 + * @see IncomeCategoryEnum + */ + private Integer incomeCategory; + //受赠单位名称 private String recipientName; diff --git a/src/com/engine/salary/entity/datacollection/param/HealthInsuranceSaveParam.java b/src/com/engine/salary/entity/datacollection/param/HealthInsuranceSaveParam.java index 13c8a9030..971fc5ccb 100644 --- a/src/com/engine/salary/entity/datacollection/param/HealthInsuranceSaveParam.java +++ b/src/com/engine/salary/entity/datacollection/param/HealthInsuranceSaveParam.java @@ -1,5 +1,6 @@ package com.engine.salary.entity.datacollection.param; +import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -28,6 +29,12 @@ public class HealthInsuranceSaveParam { //主表数据Id private Long mainId; + /** + * 所得项目 + * @see IncomeCategoryEnum + */ + private Integer incomeCategory; + //税优识别码 private String identificationNumber; diff --git a/src/com/engine/salary/entity/datacollection/param/OtherDerateDeductionSaveParam.java b/src/com/engine/salary/entity/datacollection/param/OtherDerateDeductionSaveParam.java index ab4114d6e..8aa1c17d9 100644 --- a/src/com/engine/salary/entity/datacollection/param/OtherDerateDeductionSaveParam.java +++ b/src/com/engine/salary/entity/datacollection/param/OtherDerateDeductionSaveParam.java @@ -1,5 +1,6 @@ package com.engine.salary.entity.datacollection.param; +import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -26,6 +27,12 @@ public class OtherDerateDeductionSaveParam { //主表数据Id private Long mainId; + /** + * 所得项目 + * @see IncomeCategoryEnum + */ + private Integer incomeCategory; + //减免税额 private String otherDeduction; diff --git a/src/com/engine/salary/entity/datacollection/param/PersonalPensionSaveParam.java b/src/com/engine/salary/entity/datacollection/param/PersonalPensionSaveParam.java index ecd0f92c5..ad7ceea3f 100644 --- a/src/com/engine/salary/entity/datacollection/param/PersonalPensionSaveParam.java +++ b/src/com/engine/salary/entity/datacollection/param/PersonalPensionSaveParam.java @@ -2,6 +2,7 @@ package com.engine.salary.entity.datacollection.param; import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum; import com.engine.salary.enums.datacollection.EnumDeductionDataSource; +import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -31,6 +32,12 @@ public class PersonalPensionSaveParam { //主表数据Id private Long mainId; + /** + * 所得项目 + * @see IncomeCategoryEnum + */ + private Integer incomeCategory; + //缴费月度 private Date payMonth; diff --git a/src/com/engine/salary/entity/datacollection/po/DerateDeductionPO.java b/src/com/engine/salary/entity/datacollection/po/DerateDeductionPO.java index 5d94d3627..226f05848 100644 --- a/src/com/engine/salary/entity/datacollection/po/DerateDeductionPO.java +++ b/src/com/engine/salary/entity/datacollection/po/DerateDeductionPO.java @@ -2,6 +2,7 @@ package com.engine.salary.entity.datacollection.po; import com.engine.hrmelog.annotation.ElogTransform; import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum; +import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import io.swagger.annotations.ApiModel; import lombok.AllArgsConstructor; import lombok.Builder; @@ -42,6 +43,12 @@ public class DerateDeductionPO{ @ElogTransform(name = "个税扣缴义务人") private Long taxAgentId; + /** + * 所得项目 + * @see IncomeCategoryEnum + */ + private Integer incomeCategory; + @ElogTransform(name = "减免事项") private String derateItem; diff --git a/src/com/engine/salary/entity/datacollection/po/EndowmentInsurancePO.java b/src/com/engine/salary/entity/datacollection/po/EndowmentInsurancePO.java index 9bb444ebe..6718ee753 100644 --- a/src/com/engine/salary/entity/datacollection/po/EndowmentInsurancePO.java +++ b/src/com/engine/salary/entity/datacollection/po/EndowmentInsurancePO.java @@ -2,6 +2,7 @@ package com.engine.salary.entity.datacollection.po; import com.engine.hrmelog.annotation.ElogTransform; import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum; +import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -41,6 +42,12 @@ public class EndowmentInsurancePO { @ElogTransform(name = "个税扣缴义务人ID") private Long taxAgentId; + /** + * 所得项目 + * @see IncomeCategoryEnum + */ + private Integer incomeCategory; + @ElogTransform(name = "申报扣除月份") private Date deductionMonth; diff --git a/src/com/engine/salary/entity/datacollection/po/FreeIncomePO.java b/src/com/engine/salary/entity/datacollection/po/FreeIncomePO.java index 085b7f751..96c39dfc6 100644 --- a/src/com/engine/salary/entity/datacollection/po/FreeIncomePO.java +++ b/src/com/engine/salary/entity/datacollection/po/FreeIncomePO.java @@ -2,6 +2,7 @@ package com.engine.salary.entity.datacollection.po; import com.engine.hrmelog.annotation.ElogTransform; import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum; +import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -52,6 +53,12 @@ public class FreeIncomePO { @ElogTransform(name = "归档状态 0未归档 1已归档") private Integer fileStatus; + /** + * 所得项目 + * @see IncomeCategoryEnum + */ + private Integer incomeCategory; + /** * 人员类型 * diff --git a/src/com/engine/salary/entity/datacollection/po/GrantDonationPO.java b/src/com/engine/salary/entity/datacollection/po/GrantDonationPO.java index f65f73caa..6cce0fb66 100644 --- a/src/com/engine/salary/entity/datacollection/po/GrantDonationPO.java +++ b/src/com/engine/salary/entity/datacollection/po/GrantDonationPO.java @@ -2,6 +2,7 @@ package com.engine.salary.entity.datacollection.po; import com.engine.hrmelog.annotation.ElogTransform; import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum; +import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -38,6 +39,12 @@ public class GrantDonationPO { @ElogTransform(name = "个税扣缴义务人") private Long taxAgentId; + /** + * 所得项目 + * @see IncomeCategoryEnum + */ + private Integer incomeCategory; + @ElogTransform(name = "受赠单位名称") private String recipientName; diff --git a/src/com/engine/salary/entity/datacollection/po/HealthInsurancePO.java b/src/com/engine/salary/entity/datacollection/po/HealthInsurancePO.java index 86152ffef..7ecad5ab7 100644 --- a/src/com/engine/salary/entity/datacollection/po/HealthInsurancePO.java +++ b/src/com/engine/salary/entity/datacollection/po/HealthInsurancePO.java @@ -2,6 +2,7 @@ package com.engine.salary.entity.datacollection.po; import com.engine.hrmelog.annotation.ElogTransform; import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum; +import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -40,6 +41,12 @@ public class HealthInsurancePO { @ElogTransform(name = "个税扣缴义务人") private Long taxAgentId; + /** + * 所得项目 + * @see IncomeCategoryEnum + */ + private Integer incomeCategory; + @ElogTransform(name = "税优识别码") private String identificationNumber; diff --git a/src/com/engine/salary/entity/datacollection/po/OtherDerateDeductionPO.java b/src/com/engine/salary/entity/datacollection/po/OtherDerateDeductionPO.java index 74f403bab..c0ff75f42 100644 --- a/src/com/engine/salary/entity/datacollection/po/OtherDerateDeductionPO.java +++ b/src/com/engine/salary/entity/datacollection/po/OtherDerateDeductionPO.java @@ -2,6 +2,7 @@ package com.engine.salary.entity.datacollection.po; import com.engine.hrmelog.annotation.ElogTransform; import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum; +import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -40,6 +41,12 @@ public class OtherDerateDeductionPO { @ElogTransform(name = "个税扣缴义务人") private Long taxAgentId; + /** + * 所得项目 + * @see IncomeCategoryEnum + */ + private Integer incomeCategory; + @ElogTransform(name = "减免税额") private String otherDeduction; diff --git a/src/com/engine/salary/entity/datacollection/po/PersonalPensionPO.java b/src/com/engine/salary/entity/datacollection/po/PersonalPensionPO.java index 766ad4783..b60bda6fd 100644 --- a/src/com/engine/salary/entity/datacollection/po/PersonalPensionPO.java +++ b/src/com/engine/salary/entity/datacollection/po/PersonalPensionPO.java @@ -3,6 +3,7 @@ package com.engine.salary.entity.datacollection.po; import com.engine.hrmelog.annotation.ElogTransform; import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum; import com.engine.salary.enums.datacollection.EnumDeductionDataSource; +import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -45,6 +46,12 @@ public class PersonalPensionPO{ @ElogTransform(name = "个税扣缴义务人") private Long taxAgentId; + /** + * 所得项目 + * @see IncomeCategoryEnum + */ + private Integer incomeCategory; + @ElogTransform(name = "凭证类别") private Integer voucherType; diff --git a/src/com/engine/salary/entity/taxdeclaration/bo/TaxDeclarationRequest.java b/src/com/engine/salary/entity/taxdeclaration/bo/TaxDeclarationRequest.java index 1dbb8de4b..b9f2a3544 100644 --- a/src/com/engine/salary/entity/taxdeclaration/bo/TaxDeclarationRequest.java +++ b/src/com/engine/salary/entity/taxdeclaration/bo/TaxDeclarationRequest.java @@ -322,9 +322,9 @@ public class TaxDeclarationRequest { public static Map convert2flsdRequestParam(List taxReportColumns, - List taxDeclarations, - List taxDeclarationValues, - List employeeDeclares) { + List taxDeclarations, + List taxDeclarationValues, + List employeeDeclares) { Map> objRequestParam = Maps.newHashMap(); Map>> listRequestParam = Maps.newHashMap(); Map> taxReportColumnMap = SalaryEntityUtil.group2Map(taxReportColumns, TaxReportColumnPO::getIncomeCategory); @@ -351,6 +351,21 @@ public class TaxDeclarationRequest { employeeRequestParams.add(employeeRequestParam); } } + List> paramMaps = new ArrayList<>(); + Map map = new HashMap<>(); + // 姓名 + map.put("xm", "测试孔霖"); + // 证件类型 + map.put("zzlx", CardTypeEnum.RESIDENT_IDENTITY_CARDS.getDefaultLabel()); + // 证件号码 + map.put("zzhm", "828888194106301018"); + // 所得项目 + map.put("sdxm", "上市公司股息红利所得(沪市、深市、创业板)"); + map.put("jmsx", "上市公司股息红利差别化征税"); + map.put("jmxz", "其他"); + map.put("sjkcje", "1000"); + paramMaps.add(map); + listRequestParam.put("msfblb", paramMaps); } Map requestParam = Maps.newHashMap(); diff --git a/src/com/engine/salary/mapper/datacollection/FreeIncomeMapper.xml b/src/com/engine/salary/mapper/datacollection/FreeIncomeMapper.xml index 87ed57c0c..6f1f5b3f6 100644 --- a/src/com/engine/salary/mapper/datacollection/FreeIncomeMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/FreeIncomeMapper.xml @@ -17,6 +17,7 @@ + @@ -38,6 +39,7 @@ , t.tax_year_month , t.tenant_key , t.update_time + , t.income_category @@ -108,6 +110,9 @@ AND update_time = #{updateTime} + + AND income_category = #{incomeCategory} + AND id IN @@ -168,6 +173,9 @@ update_time, + + income_category, + @@ -215,6 +223,9 @@ #{updateTime}, + + #{incomeCategory}, + @@ -237,6 +248,7 @@ tax_year_month=#{taxYearMonth}, tenant_key=#{tenantKey}, update_time=#{updateTime}, + income_category=#{incomeCategory}, WHERE id = #{id} AND delete_type = 0 @@ -288,6 +300,9 @@ update_time=#{updateTime}, + + income_category=#{incomeCategory}, + WHERE id = #{id} AND delete_type = 0 diff --git a/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java b/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java index b2d7cc2d0..ef78ab4c2 100644 --- a/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java @@ -22,6 +22,7 @@ import com.engine.salary.enums.OperateTypeEnum; import com.engine.salary.enums.UserStatusEnum; import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum; import com.engine.salary.enums.datacollection.TaxFreeTypeEnum; +import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import com.engine.salary.enums.sicategory.DeleteTypeEnum; import com.engine.salary.exception.SalaryRunTimeException; import com.engine.salary.mapper.datacollection.*; @@ -2446,6 +2447,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction dto.setMobile(employee.getMobile()); dto.setJobNum(employee.getWorkcode()); dto.setIdNo(employee.getIdNo()); + dto.setIncomeCategoryName(IncomeCategoryEnum.parseByValue(po.getIncomeCategory()).getDefaultLabel()); return dto; }).collect(Collectors.toList()); return listDTOS; @@ -2734,6 +2736,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction .taxYearMonth(deductionPO.getDeclareMonth()) .employeeId(deductionPO.getEmployeeId()) .taxAgentId(deductionPO.getTaxAgentId()) + .incomeCategory(param.getIncomeCategory()) .freeItem(param.getFreeItem()) .freeProperty(param.getFreeProperty()) .freeAmount(param.getFreeAmount()) @@ -2753,6 +2756,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction } po.setUpdateTime(now); + po.setIncomeCategory(param.getIncomeCategory()); po.setFreeItem(param.getFreeItem()); po.setFreeProperty(param.getFreeProperty()); po.setFreeAmount(param.getFreeAmount()); @@ -2781,6 +2785,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction .taxYearMonth(deductionPO.getDeclareMonth()) .employeeId(deductionPO.getEmployeeId()) .taxAgentId(deductionPO.getTaxAgentId()) + .incomeCategory(param.getIncomeCategory()) .deductionMonth(param.getDeductionMonth()) .accountNumber(param.getAccountNumber()) .checkCode(param.getCheckCode()) @@ -2803,6 +2808,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction } po.setUpdateTime(now); + po.setIncomeCategory(param.getIncomeCategory()); po.setDeductionMonth(param.getDeductionMonth()); po.setAccountNumber(param.getAccountNumber()); po.setCheckCode(param.getCheckCode()); @@ -2834,6 +2840,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction .taxYearMonth(deductionPO.getDeclareMonth()) .employeeId(deductionPO.getEmployeeId()) .taxAgentId(deductionPO.getTaxAgentId()) + .incomeCategory(param.getIncomeCategory()) .recipientName(param.getRecipientName()) .taxCode(param.getTaxCode()) .donationNumber(param.getDonationNumber()) @@ -2857,6 +2864,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction } po.setUpdateTime(now); + po.setIncomeCategory(param.getIncomeCategory()); po.setRecipientName(param.getRecipientName()); po.setTaxCode(param.getTaxCode()); po.setDonationNumber(param.getDonationNumber()); @@ -2889,6 +2897,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction .taxYearMonth(deductionPO.getDeclareMonth()) .employeeId(deductionPO.getEmployeeId()) .taxAgentId(deductionPO.getTaxAgentId()) + .incomeCategory(param.getIncomeCategory()) .identificationNumber(param.getIdentificationNumber()) .effectiveDate(param.getEffectiveDate()) .yearPremium(param.getYearPremium()) @@ -2910,6 +2919,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction } po.setUpdateTime(now); + po.setIncomeCategory(param.getIncomeCategory()); po.setIdentificationNumber(param.getIdentificationNumber()); po.setEffectiveDate(param.getEffectiveDate()); po.setYearPremium(param.getYearPremium()); @@ -2940,6 +2950,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction .taxYearMonth(deductionPO.getDeclareMonth()) .employeeId(deductionPO.getEmployeeId()) .taxAgentId(deductionPO.getTaxAgentId()) + .incomeCategory(param.getIncomeCategory()) .otherDeduction(param.getOtherDeduction()) .remark(param.getRemark()) .fileStatus(1) @@ -2958,6 +2969,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction } po.setUpdateTime(now); + po.setIncomeCategory(param.getIncomeCategory()); po.setOtherDeduction(param.getOtherDeduction()); po.setRemark(param.getRemark()); @@ -2985,6 +2997,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction .taxYearMonth(deductionPO.getDeclareMonth()) .employeeId(deductionPO.getEmployeeId()) .taxAgentId(deductionPO.getTaxAgentId()) + .incomeCategory(param.getIncomeCategory()) .derateAmount(param.getDerateAmount()) .derateItem(param.getDerateItem()) .derateProperty(param.getDerateProperty()) @@ -3004,6 +3017,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction } po.setUpdateTime(now); + po.setIncomeCategory(param.getIncomeCategory()); po.setDerateAmount(param.getDerateAmount()); po.setDerateItem(param.getDerateItem()); po.setDerateProperty(param.getDerateProperty()); @@ -3032,6 +3046,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction .taxYearMonth(deductionPO.getDeclareMonth()) .employeeId(deductionPO.getEmployeeId()) .taxAgentId(deductionPO.getTaxAgentId()) + .incomeCategory(param.getIncomeCategory()) .voucherTypeName(param.getVoucherTypeName()) .voucherNo(param.getVoucherNo()) .payAmount(param.getPayAmount()) @@ -3051,6 +3066,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction } po.setUpdateTime(now); + po.setIncomeCategory(param.getIncomeCategory()); po.setVoucherTypeName(param.getVoucherTypeName()); po.setVoucherNo(param.getVoucherNo()); po.setPayAmount(param.getPayAmount()); From de713c820d61d14230fea50d304bb705491b937a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Wed, 2 Jul 2025 11:37:16 +0800 Subject: [PATCH 14/18] =?UTF-8?q?=E9=99=84=E8=A1=A8=E5=A1=AB=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bo/TaxDeclarationRequest.java | 44 +++++++++---------- .../impl/TaxDeclareRecordServiceImpl.java | 4 +- 2 files changed, 22 insertions(+), 26 deletions(-) diff --git a/src/com/engine/salary/entity/taxdeclaration/bo/TaxDeclarationRequest.java b/src/com/engine/salary/entity/taxdeclaration/bo/TaxDeclarationRequest.java index b9f2a3544..5bcad824f 100644 --- a/src/com/engine/salary/entity/taxdeclaration/bo/TaxDeclarationRequest.java +++ b/src/com/engine/salary/entity/taxdeclaration/bo/TaxDeclarationRequest.java @@ -21,6 +21,7 @@ import weaver.general.Util; import java.math.BigDecimal; import java.math.RoundingMode; import java.util.*; +import java.util.stream.Collectors; /** * 个税申报 @@ -151,7 +152,8 @@ public class TaxDeclarationRequest { Map freeIncomeMap = taxFreeMap.get(TaxFreeTypeEnum.FREE_INCOME); List poList = (List) freeIncomeMap.get(employeeDeclare.getTaxAgentId() + "-" + employeeDeclare.getEmployeeId() + "-" + SalaryDateUtil.getFormatYearMonth(employeeDeclare.getTaxCycle())); if (CollectionUtils.isNotEmpty(poList)) { - List> paramMaps = new ArrayList<>(); + poList = poList.stream().filter(po -> Objects.equals(po.getIncomeCategory(), incomeCategoryEnum.getValue())).collect(Collectors.toList()); + List> paramMaps = listRequestParam.getOrDefault("msfblb",new ArrayList<>()); for (FreeIncomePO po : poList) { Map map = new HashMap<>(); // 姓名 @@ -176,7 +178,8 @@ public class TaxDeclarationRequest { Map healthInsuranceMap = taxFreeMap.get(TaxFreeTypeEnum.HEALTH_INSURANCE); List pos = (List) healthInsuranceMap.get(employeeDeclare.getTaxAgentId() + "-" + employeeDeclare.getEmployeeId() + "-" + SalaryDateUtil.getFormatYearMonth(employeeDeclare.getTaxCycle())); if (CollectionUtils.isNotEmpty(pos)) { - List> paramMaps = new ArrayList<>(); + pos = pos.stream().filter(po -> Objects.equals(po.getIncomeCategory(), incomeCategoryEnum.getValue())).collect(Collectors.toList()); + List> paramMaps = listRequestParam.getOrDefault("syjkbxfblb",new ArrayList<>()); for (HealthInsurancePO healthInsurancePO : pos) { Map map = new HashMap<>(); // 姓名 @@ -203,7 +206,8 @@ public class TaxDeclarationRequest { Map posMap = taxFreeMap.get(TaxFreeTypeEnum.ENDOWMENT_INSURANCE); List pos = (List) posMap.get(employeeDeclare.getTaxAgentId() + "-" + employeeDeclare.getEmployeeId() + "-" + SalaryDateUtil.getFormatYearMonth(employeeDeclare.getTaxCycle())); if (CollectionUtils.isNotEmpty(pos)) { - List> paramMaps = new ArrayList<>(); + pos = pos.stream().filter(po -> Objects.equals(po.getIncomeCategory(), incomeCategoryEnum.getValue())).collect(Collectors.toList()); + List> paramMaps = listRequestParam.getOrDefault("syylbxfblb",new ArrayList<>()); for (EndowmentInsurancePO po : pos) { Map map = new HashMap<>(); // 姓名 @@ -222,7 +226,7 @@ public class TaxDeclarationRequest { map.put("sjkcje", po.getCurrentDeduction()); paramMaps.add(map); } - listRequestParam.put("syjkbxfblb", paramMaps); + listRequestParam.put("syylbxfblb", paramMaps); } } @@ -231,7 +235,8 @@ public class TaxDeclarationRequest { Map posMap = taxFreeMap.get(TaxFreeTypeEnum.GRANT_DONATION); List pos = (List) posMap.get(employeeDeclare.getTaxAgentId() + "-" + employeeDeclare.getEmployeeId() + "-" + SalaryDateUtil.getFormatYearMonth(employeeDeclare.getTaxCycle())); if (CollectionUtils.isNotEmpty(pos)) { - List> paramMaps = new ArrayList<>(); + pos = pos.stream().filter(po -> Objects.equals(po.getIncomeCategory(), incomeCategoryEnum.getValue())).collect(Collectors.toList()); + List> paramMaps = listRequestParam.getOrDefault("zykcjzefb",new ArrayList<>()); for (GrantDonationPO po : pos) { Map map = new HashMap<>(); // 姓名 @@ -262,7 +267,8 @@ public class TaxDeclarationRequest { Map posMap = taxFreeMap.get(TaxFreeTypeEnum.DERATE_DEDUCTION); List pos = (List) posMap.get(employeeDeclare.getTaxAgentId() + "-" + employeeDeclare.getEmployeeId() + "-" + SalaryDateUtil.getFormatYearMonth(employeeDeclare.getTaxCycle())); if (CollectionUtils.isNotEmpty(pos)) { - List> paramMaps = new ArrayList<>(); + pos = pos.stream().filter(po -> Objects.equals(po.getIncomeCategory(), incomeCategoryEnum.getValue())).collect(Collectors.toList()); + List> paramMaps = listRequestParam.getOrDefault("jmfblb",new ArrayList<>()); for (DerateDeductionPO po : pos) { Map map = new HashMap<>(); // 姓名 @@ -287,6 +293,7 @@ public class TaxDeclarationRequest { Map posMap = taxFreeMap.get(TaxFreeTypeEnum.OTHER_DERATE_DEDUCTION); List pos = (List) posMap.get(employeeDeclare.getTaxAgentId() + "-" + employeeDeclare.getEmployeeId() + "-" + SalaryDateUtil.getFormatYearMonth(employeeDeclare.getTaxCycle())); if (CollectionUtils.isNotEmpty(pos)) { + pos = pos.stream().filter(po -> Objects.equals(po.getIncomeCategory(), incomeCategoryEnum.getValue())).collect(Collectors.toList()); employeeRequestParam.put("bz", pos.get(0).getRemark()); } } @@ -324,7 +331,8 @@ public class TaxDeclarationRequest { public static Map convert2flsdRequestParam(List taxReportColumns, List taxDeclarations, List taxDeclarationValues, - List employeeDeclares) { + List employeeDeclares, + Map> taxFreeMap) { Map> objRequestParam = Maps.newHashMap(); Map>> listRequestParam = Maps.newHashMap(); Map> taxReportColumnMap = SalaryEntityUtil.group2Map(taxReportColumns, TaxReportColumnPO::getIncomeCategory); @@ -332,9 +340,9 @@ public class TaxDeclarationRequest { Map> taxDeclarationValueMap = SalaryEntityUtil.group2Map(taxDeclarationValues, TaxDeclarationValuePO::getTaxDeclarationId); for (TaxDeclarationPO taxDeclaration : taxDeclarations) { List values = taxDeclarationValueMap.get(taxDeclaration.getId()); + IncomeCategoryEnum incomeCategoryEnum = IncomeCategoryEnum.parseByValue(taxDeclaration.getIncomeCategory()); for (TaxDeclarationValuePO taxDeclarationValue : values) { EmployeeDeclarePO employeeDeclare = employeeDeclareMap.get(taxDeclarationValue.getEmployeeId()); - IncomeCategoryEnum incomeCategoryEnum = IncomeCategoryEnum.parseByValue(taxDeclaration.getIncomeCategory()); if (employeeDeclare == null || incomeCategoryEnum == null) { continue; } @@ -350,22 +358,9 @@ public class TaxDeclarationRequest { List> employeeRequestParams = listRequestParam.computeIfAbsent("lxgxhllb", k -> Lists.newArrayList()); employeeRequestParams.add(employeeRequestParam); } + // 其他免税扣除附表 + buildOtherDeductionDetailParams(taxFreeMap, listRequestParam, employeeDeclare, incomeCategoryEnum, employeeRequestParam); } - List> paramMaps = new ArrayList<>(); - Map map = new HashMap<>(); - // 姓名 - map.put("xm", "测试孔霖"); - // 证件类型 - map.put("zzlx", CardTypeEnum.RESIDENT_IDENTITY_CARDS.getDefaultLabel()); - // 证件号码 - map.put("zzhm", "828888194106301018"); - // 所得项目 - map.put("sdxm", "上市公司股息红利所得(沪市、深市、创业板)"); - map.put("jmsx", "上市公司股息红利差别化征税"); - map.put("jmxz", "其他"); - map.put("sjkcje", "1000"); - paramMaps.add(map); - listRequestParam.put("msfblb", paramMaps); } Map requestParam = Maps.newHashMap(); @@ -378,7 +373,8 @@ public class TaxDeclarationRequest { public static Map convert2fjmsdRequestParam(List taxReportColumns, List taxDeclarations, List taxDeclarationValues, - List employeeDeclares) { + List employeeDeclares, + Map> taxFreeMap) { Map> objRequestParam = Maps.newHashMap(); Map>> listRequestParam = Maps.newHashMap(); Map> taxReportColumnMap = SalaryEntityUtil.group2Map(taxReportColumns, TaxReportColumnPO::getIncomeCategory); diff --git a/src/com/engine/salary/service/impl/TaxDeclareRecordServiceImpl.java b/src/com/engine/salary/service/impl/TaxDeclareRecordServiceImpl.java index 57afeeb08..13ae9c1a8 100644 --- a/src/com/engine/salary/service/impl/TaxDeclareRecordServiceImpl.java +++ b/src/com/engine/salary/service/impl/TaxDeclareRecordServiceImpl.java @@ -719,13 +719,13 @@ public class TaxDeclareRecordServiceImpl extends Service implements TaxDeclareRe if (declareReportType == DeclareReportTypeEnum.CLASSIFIED_INCOME) { //分类所得 - Map flsdRequestParam = TaxDeclarationRequest.convert2flsdRequestParam(taxReportColumns, taxDeclarations, taxDeclarationValues, employeeDeclares); + Map flsdRequestParam = TaxDeclarationRequest.convert2flsdRequestParam(taxReportColumns, taxDeclarations, taxDeclarationValues, employeeDeclares, taxFreeMap); requestParam.put("flsd", flsdRequestParam); } if (declareReportType == DeclareReportTypeEnum.NONRESIDENT_INCOME) { //非居民所得代扣代缴 fjmsd - Map fjmsdRequestParam = TaxDeclarationRequest.convert2fjmsdRequestParam(taxReportColumns, taxDeclarations, taxDeclarationValues, employeeDeclares); + Map fjmsdRequestParam = TaxDeclarationRequest.convert2fjmsdRequestParam(taxReportColumns, taxDeclarations, taxDeclarationValues, employeeDeclares, taxFreeMap); requestParam.put("fjmsd", fjmsdRequestParam); } From cabaed627bd66679529a5696f2de8d8641766027 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Wed, 2 Jul 2025 13:42:41 +0800 Subject: [PATCH 15/18] =?UTF-8?q?=E5=85=B6=E4=BB=96=E9=99=84=E5=8A=A0?= =?UTF-8?q?=E6=89=A3=E9=99=A4=E5=A2=9E=E5=8A=A0=E7=94=B3=E6=8A=A5=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datacollection/DerateDeductionMapper.xml | 15 +++++++++++++++ .../datacollection/EndowmentInsuranceMapper.xml | 15 +++++++++++++++ .../mapper/datacollection/GrantDonationMapper.xml | 15 +++++++++++++++ .../datacollection/HealthInsuranceMapper.xml | 15 +++++++++++++++ .../datacollection/OtherDerateDeductionMapper.xml | 15 +++++++++++++++ .../datacollection/PersonalPensionMapper.xml | 15 +++++++++++++++ 6 files changed, 90 insertions(+) diff --git a/src/com/engine/salary/mapper/datacollection/DerateDeductionMapper.xml b/src/com/engine/salary/mapper/datacollection/DerateDeductionMapper.xml index e3585c01f..824c2466e 100644 --- a/src/com/engine/salary/mapper/datacollection/DerateDeductionMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/DerateDeductionMapper.xml @@ -17,6 +17,7 @@ + @@ -38,6 +39,7 @@ , t.tax_year_month , t.tenant_key , t.update_time + , t.income_category @@ -108,6 +110,9 @@ AND update_time = #{updateTime} + + AND income_category = #{incomeCategory} + AND id IN @@ -168,6 +173,9 @@ update_time, + + income_category, + @@ -215,6 +223,9 @@ #{updateTime}, + + #{incomeCategory}, + @@ -237,6 +248,7 @@ tax_year_month=#{taxYearMonth}, tenant_key=#{tenantKey}, update_time=#{updateTime}, + income_category=#{incomeCategory}, WHERE id = #{id} AND delete_type = 0 @@ -288,6 +300,9 @@ update_time=#{updateTime}, + + income_category=#{incomeCategory}, + WHERE id = #{id} AND delete_type = 0 diff --git a/src/com/engine/salary/mapper/datacollection/EndowmentInsuranceMapper.xml b/src/com/engine/salary/mapper/datacollection/EndowmentInsuranceMapper.xml index 8d673f35b..30f404db9 100644 --- a/src/com/engine/salary/mapper/datacollection/EndowmentInsuranceMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/EndowmentInsuranceMapper.xml @@ -20,6 +20,7 @@ + @@ -44,6 +45,7 @@ , t.tenant_key , t.update_time , t.year_premium + , t.income_category @@ -123,6 +125,9 @@ AND year_premium = #{yearPremium} + + AND income_category = #{incomeCategory} + AND id IN @@ -192,6 +197,9 @@ year_premium, + + income_category, + @@ -248,6 +256,9 @@ #{yearPremium}, + + #{incomeCategory}, + @@ -273,6 +284,7 @@ tenant_key=#{tenantKey}, update_time=#{updateTime}, year_premium=#{yearPremium}, + income_category=#{incomeCategory}, WHERE id = #{id} AND delete_type = 0 @@ -333,6 +345,9 @@ year_premium=#{yearPremium}, + + income_category=#{incomeCategory}, + WHERE id = #{id} AND delete_type = 0 diff --git a/src/com/engine/salary/mapper/datacollection/GrantDonationMapper.xml b/src/com/engine/salary/mapper/datacollection/GrantDonationMapper.xml index 8fa17414e..96a5dab18 100644 --- a/src/com/engine/salary/mapper/datacollection/GrantDonationMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/GrantDonationMapper.xml @@ -21,6 +21,7 @@ + @@ -46,6 +47,7 @@ , t.tax_year_month , t.tenant_key , t.update_time + , t.income_category @@ -128,6 +130,9 @@ AND update_time = #{updateTime} + + AND income_category = #{incomeCategory} + AND id IN @@ -200,6 +205,9 @@ update_time, + + income_category, + @@ -259,6 +267,9 @@ #{updateTime}, + + #{incomeCategory}, + @@ -285,6 +296,7 @@ tax_year_month=#{taxYearMonth}, tenant_key=#{tenantKey}, update_time=#{updateTime}, + income_category=#{incomeCategory}, WHERE id = #{id} AND delete_type = 0 @@ -348,6 +360,9 @@ update_time=#{updateTime}, + + income_category=#{incomeCategory}, + WHERE id = #{id} AND delete_type = 0 diff --git a/src/com/engine/salary/mapper/datacollection/HealthInsuranceMapper.xml b/src/com/engine/salary/mapper/datacollection/HealthInsuranceMapper.xml index 4ed0bd9a1..a071f7426 100644 --- a/src/com/engine/salary/mapper/datacollection/HealthInsuranceMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/HealthInsuranceMapper.xml @@ -19,6 +19,7 @@ + @@ -42,6 +43,7 @@ , t.tenant_key , t.update_time , t.year_premium + , t.income_category @@ -118,6 +120,9 @@ AND year_premium = #{yearPremium} + + AND income_category = #{incomeCategory} + AND id IN @@ -184,6 +189,9 @@ year_premium, + + income_category, + @@ -237,6 +245,9 @@ #{yearPremium}, + + #{incomeCategory}, + @@ -261,6 +272,7 @@ tenant_key=#{tenantKey}, update_time=#{updateTime}, year_premium=#{yearPremium}, + income_category=#{incomeCategory}, WHERE id = #{id} AND delete_type = 0 @@ -318,6 +330,9 @@ year_premium=#{yearPremium}, + + income_category=#{incomeCategory}, + WHERE id = #{id} AND delete_type = 0 diff --git a/src/com/engine/salary/mapper/datacollection/OtherDerateDeductionMapper.xml b/src/com/engine/salary/mapper/datacollection/OtherDerateDeductionMapper.xml index 330fb74f8..397b091c0 100644 --- a/src/com/engine/salary/mapper/datacollection/OtherDerateDeductionMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/OtherDerateDeductionMapper.xml @@ -16,6 +16,7 @@ + @@ -36,6 +37,7 @@ , t.tax_year_month , t.tenant_key , t.update_time + , t.income_category @@ -103,6 +105,9 @@ AND update_time = #{updateTime} + + AND income_category = #{incomeCategory} + AND id IN @@ -160,6 +165,9 @@ update_time, + + income_category, + @@ -204,6 +212,9 @@ #{updateTime}, + + #{incomeCategory}, + @@ -225,6 +236,7 @@ tax_year_month=#{taxYearMonth}, tenant_key=#{tenantKey}, update_time=#{updateTime}, + income_category=#{incomeCategory}, WHERE id = #{id} AND delete_type = 0 @@ -273,6 +285,9 @@ update_time=#{updateTime}, + + income_category=#{incomeCategory}, + WHERE id = #{id} AND delete_type = 0 diff --git a/src/com/engine/salary/mapper/datacollection/PersonalPensionMapper.xml b/src/com/engine/salary/mapper/datacollection/PersonalPensionMapper.xml index da3185d56..1db068c24 100644 --- a/src/com/engine/salary/mapper/datacollection/PersonalPensionMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/PersonalPensionMapper.xml @@ -22,6 +22,7 @@ + @@ -48,6 +49,7 @@ , t.voucher_no , t.voucher_type , t.voucher_type_name + , t.income_category @@ -133,6 +135,9 @@ AND voucher_type_name = #{voucherTypeName} + + AND income_category = #{incomeCategory} + AND id IN @@ -208,6 +213,9 @@ voucher_type_name, + + income_category, + @@ -270,6 +278,9 @@ #{voucherTypeName}, + + #{incomeCategory}, + @@ -297,6 +308,7 @@ voucher_no=#{voucherNo}, voucher_type=#{voucherType}, voucher_type_name=#{voucherTypeName}, + income_category=#{incomeCategory}, WHERE id = #{id} AND delete_type = 0 @@ -363,6 +375,9 @@ voucher_type_name=#{voucherTypeName}, + + income_category=#{incomeCategory}, + WHERE id = #{id} AND delete_type = 0 From b2507306e59029d68e40175fae146ad70f695674 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Wed, 2 Jul 2025 15:46:32 +0800 Subject: [PATCH 16/18] =?UTF-8?q?=E9=99=84=E8=A1=A8=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/EndowmentInsuranceListDTO.java | 14 +-- .../enums/salarysob/IncomeCategoryEnum.java | 13 ++- .../impl/OtherDeductionServiceImpl.java | 106 +++++++++++++++--- 3 files changed, 110 insertions(+), 23 deletions(-) diff --git a/src/com/engine/salary/entity/datacollection/dto/EndowmentInsuranceListDTO.java b/src/com/engine/salary/entity/datacollection/dto/EndowmentInsuranceListDTO.java index d56a961ae..1a9919d01 100644 --- a/src/com/engine/salary/entity/datacollection/dto/EndowmentInsuranceListDTO.java +++ b/src/com/engine/salary/entity/datacollection/dto/EndowmentInsuranceListDTO.java @@ -81,33 +81,33 @@ public class EndowmentInsuranceListDTO { @TableTitle(title = "证件号码", dataIndex = "idNo", key = "idNo") private String idNo; - @ExcelProperty(index = 7) + @ExcelProperty(index = 6) @TableTitle(title = "所得项目", dataIndex = "incomeCategoryName", key = "incomeCategoryName") private String incomeCategoryName; private Integer incomeCategory; - @ExcelProperty(index = 8) + @ExcelProperty(index = 7) @TableTitle(title = "申报扣除月份", dataIndex = "deductionMonth", key = "deductionMonth") @JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8") private Date deductionMonth; - @ExcelProperty(index = 9) + @ExcelProperty(index = 8) @TableTitle(title = "税延养老账户编号", dataIndex = "accountNumber", key = "accountNumber") private String accountNumber; - @ExcelProperty(index = 10) + @ExcelProperty(index = 9) @TableTitle(title = "报税校验码", dataIndex = "checkCode", key = "checkCode") private String checkCode; - @ExcelProperty(index = 11) + @ExcelProperty(index = 10) @TableTitle(title = "年度保费", dataIndex = "yearPremium", key = "yearPremium") private String yearPremium; - @ExcelProperty(index = 12) + @ExcelProperty(index = 11) @TableTitle(title = "月度保费", dataIndex = "monthPremium", key = "monthPremium") private String monthPremium; - @ExcelProperty(index = 13) + @ExcelProperty(index = 12) @TableTitle(title = "本期扣除金额", dataIndex = "currentDeduction", key = "currentDeduction") private String currentDeduction; diff --git a/src/com/engine/salary/enums/salarysob/IncomeCategoryEnum.java b/src/com/engine/salary/enums/salarysob/IncomeCategoryEnum.java index b2476e6b8..0fec5bc83 100644 --- a/src/com/engine/salary/enums/salarysob/IncomeCategoryEnum.java +++ b/src/com/engine/salary/enums/salarysob/IncomeCategoryEnum.java @@ -800,8 +800,8 @@ public enum IncomeCategoryEnum implements BaseEnum { } private static void checkSSSBYYLBResponse(List sssbyylb) { - if(CollUtil.isNotEmpty(sssbyylb)){ - String err = sssbyylb.stream().map(sssbyy -> sssbyy.getXm() + sssbyy.getCwxx()).collect(Collectors.joining(",")); + if (CollUtil.isNotEmpty(sssbyylb)) { + String err = sssbyylb.stream().map(sssbyy -> sssbyy.getXm() + sssbyy.getCwxx()).collect(Collectors.joining(",")); throw new OnlineCalculateTaxException(err); } } @@ -852,6 +852,15 @@ public enum IncomeCategoryEnum implements BaseEnum { return null; } + public static IncomeCategoryEnum parseByDefaultLabel(String defaultLabel) { + for (IncomeCategoryEnum incomeCategoryEnum : IncomeCategoryEnum.values()) { + if (incomeCategoryEnum.getDefaultLabel().equals(defaultLabel)) { + return incomeCategoryEnum; + } + } + return null; + } + public static List parseByValue(Collection values) { if (CollectionUtils.isEmpty(values)) { return Collections.emptyList(); diff --git a/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java b/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java index ef78ab4c2..b44b1ad3b 100644 --- a/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java @@ -460,7 +460,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction List errorData = new ArrayList<>(); //免税收入 - List freeIncomeList = ExcelParseHelper.parse2Map(fileInputStream, FreeIncomeListDTO.class, 0, 1, 9, "OtherDeductionTemplate.xlsx"); + List freeIncomeList = ExcelParseHelper.parse2Map(fileInputStream, FreeIncomeListDTO.class, 0, 1, 10, "OtherDeductionTemplate.xlsx"); for (int i = 0; i < freeIncomeList.size(); i++) { FreeIncomeListDTO dto = freeIncomeList.get(i); @@ -569,6 +569,16 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction } } + IncomeCategoryEnum incomeCategoryEnum = IncomeCategoryEnum.parseByDefaultLabel(dto.getIncomeCategoryName()); + if (incomeCategoryEnum == null) { + Map errorMessageMap = Maps.newHashMap(); + errorMessageMap.put("message", rowIndex + "所得项目不存在!"); + errorData.add(errorMessageMap); + errorSum += 1; + } else { + freeIncomePO.setIncomeCategory(incomeCategoryEnum.getValue()); + } + //免税收入 String freeIncome = dto.getFreeItem(); String freeProperty = dto.getFreeProperty(); @@ -614,7 +624,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction // 错误excel内容 List errorData = new ArrayList<>(); - List dtoList = ExcelParseHelper.parse2Map(fileInputStream, HealthInsuranceListDTO.class, 1, 1, 11, "OtherDeductionTemplate.xlsx"); + List dtoList = ExcelParseHelper.parse2Map(fileInputStream, HealthInsuranceListDTO.class, 1, 1, 12, "OtherDeductionTemplate.xlsx"); for (int i = 0; i < dtoList.size(); i++) { HealthInsuranceListDTO dto = dtoList.get(i); @@ -723,6 +733,16 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction } } + IncomeCategoryEnum incomeCategoryEnum = IncomeCategoryEnum.parseByDefaultLabel(dto.getIncomeCategoryName()); + if (incomeCategoryEnum == null) { + Map errorMessageMap = Maps.newHashMap(); + errorMessageMap.put("message", rowIndex + "所得项目不存在!"); + errorData.add(errorMessageMap); + errorSum += 1; + } else { + po.setIncomeCategory(incomeCategoryEnum.getValue()); + } + po.setIdentificationNumber(dto.getIdentificationNumber()); po.setEffectiveDate(dto.getEffectiveDate()); po.setYearPremium(dto.getYearPremium()); @@ -764,7 +784,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction // 错误excel内容 List errorData = new ArrayList<>(); - List derateDeductionList = ExcelParseHelper.parse2Map(fileInputStream, EndowmentInsuranceListDTO.class, 2, 1, 11, "OtherDeductionTemplate.xlsx"); + List derateDeductionList = ExcelParseHelper.parse2Map(fileInputStream, EndowmentInsuranceListDTO.class, 2, 1, 13, "OtherDeductionTemplate.xlsx"); for (int i = 0; i < derateDeductionList.size(); i++) { EndowmentInsuranceListDTO dto = derateDeductionList.get(i); @@ -873,6 +893,16 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction } } + IncomeCategoryEnum incomeCategoryEnum = IncomeCategoryEnum.parseByDefaultLabel(dto.getIncomeCategoryName()); + if (incomeCategoryEnum == null) { + Map errorMessageMap = Maps.newHashMap(); + errorMessageMap.put("message", rowIndex + "所得项目不存在!"); + errorData.add(errorMessageMap); + errorSum += 1; + } else { + po.setIncomeCategory(incomeCategoryEnum.getValue()); + } + po.setAccountNumber(dto.getAccountNumber()); po.setCheckCode(dto.getCheckCode()); po.setYearPremium(dto.getYearPremium()); @@ -916,7 +946,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction // 错误excel内容 List errorData = new ArrayList<>(); - List dtoList = ExcelParseHelper.parse2Map(fileInputStream, GrantDonationListDTO.class, 3, 1, 13, "OtherDeductionTemplate.xlsx"); + List dtoList = ExcelParseHelper.parse2Map(fileInputStream, GrantDonationListDTO.class, 3, 1, 14, "OtherDeductionTemplate.xlsx"); for (int i = 0; i < dtoList.size(); i++) { GrantDonationListDTO dto = dtoList.get(i); @@ -1025,6 +1055,16 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction } } + IncomeCategoryEnum incomeCategoryEnum = IncomeCategoryEnum.parseByDefaultLabel(dto.getIncomeCategoryName()); + if (incomeCategoryEnum == null) { + Map errorMessageMap = Maps.newHashMap(); + errorMessageMap.put("message", rowIndex + "所得项目不存在!"); + errorData.add(errorMessageMap); + errorSum += 1; + } else { + po.setIncomeCategory(incomeCategoryEnum.getValue()); + } + po.setRecipientName(dto.getRecipientName()); po.setTaxCode(dto.getTaxCode()); po.setDonationNumber(dto.getDonationNumber()); @@ -1069,7 +1109,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction // 错误excel内容 List errorData = new ArrayList<>(); - List derateDeductionList = ExcelParseHelper.parse2Map(fileInputStream, DerateDeductionListDTO.class, 4, 1, 9, "OtherDeductionTemplate.xlsx"); + List derateDeductionList = ExcelParseHelper.parse2Map(fileInputStream, DerateDeductionListDTO.class, 4, 1, 10, "OtherDeductionTemplate.xlsx"); for (int i = 0; i < derateDeductionList.size(); i++) { DerateDeductionListDTO dto = derateDeductionList.get(i); @@ -1178,6 +1218,16 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction } } + IncomeCategoryEnum incomeCategoryEnum = IncomeCategoryEnum.parseByDefaultLabel(dto.getIncomeCategoryName()); + if (incomeCategoryEnum == null) { + Map errorMessageMap = Maps.newHashMap(); + errorMessageMap.put("message", rowIndex + "所得项目不存在!"); + errorData.add(errorMessageMap); + errorSum += 1; + } else { + po.setIncomeCategory(incomeCategoryEnum.getValue()); + } + po.setDerateAmount(dto.getDerateAmount()); po.setDerateItem(dto.getDerateItem()); po.setDerateProperty(dto.getDerateProperty()); @@ -1218,7 +1268,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction // 错误excel内容 List errorData = new ArrayList<>(); - List dtoList = ExcelParseHelper.parse2Map(fileInputStream, OtherDerateDeductionListDTO.class, 5, 1, 8, "OtherDeductionTemplate.xlsx"); + List dtoList = ExcelParseHelper.parse2Map(fileInputStream, OtherDerateDeductionListDTO.class, 5, 1, 9, "OtherDeductionTemplate.xlsx"); for (int i = 0; i < dtoList.size(); i++) { OtherDerateDeductionListDTO dto = dtoList.get(i); @@ -1327,6 +1377,16 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction } } + IncomeCategoryEnum incomeCategoryEnum = IncomeCategoryEnum.parseByDefaultLabel(dto.getIncomeCategoryName()); + if (incomeCategoryEnum == null) { + Map errorMessageMap = Maps.newHashMap(); + errorMessageMap.put("message", rowIndex + "所得项目不存在!"); + errorData.add(errorMessageMap); + errorSum += 1; + } else { + po.setIncomeCategory(incomeCategoryEnum.getValue()); + } + po.setOtherDeduction(dto.getOtherDeduction()); po.setRemark(dto.getRemark()); @@ -1367,7 +1427,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction // 错误excel内容 List errorData = new ArrayList<>(); - List dtoList = ExcelParseHelper.parse2Map(fileInputStream, PersonalPensionListDTO.class, 6, 1, 9, "OtherDeductionTemplate.xlsx"); + List dtoList = ExcelParseHelper.parse2Map(fileInputStream, PersonalPensionListDTO.class, 6, 1, 10, "OtherDeductionTemplate.xlsx"); for (int i = 0; i < dtoList.size(); i++) { PersonalPensionListDTO dto = dtoList.get(i); @@ -1476,6 +1536,16 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction } } + IncomeCategoryEnum incomeCategoryEnum = IncomeCategoryEnum.parseByDefaultLabel(dto.getIncomeCategoryName()); + if (incomeCategoryEnum == null) { + Map errorMessageMap = Maps.newHashMap(); + errorMessageMap.put("message", rowIndex + "所得项目不存在!"); + errorData.add(errorMessageMap); + errorSum += 1; + } else { + po.setIncomeCategory(incomeCategoryEnum.getValue()); + } + po.setVoucherTypeName(dto.getVoucherTypeName()); po.setVoucherNo(dto.getVoucherNo()); po.setPayAmount(dto.getPayAmount()); @@ -2277,7 +2347,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction Map>> map = new LinkedHashMap<>(); List> freeIncomeRowList = new ArrayList<>(); - List freeIncomeTitle = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "免税事项", "免税性质", "免税金额"); + List freeIncomeTitle = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "所得项目", "免税事项", "免税性质", "免税金额"); freeIncomeRowList.add(freeIncomeTitle); freeIncomeList.forEach(dto -> { List row = new ArrayList<>(); @@ -2287,6 +2357,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction row.add(dto.getMobile()); row.add(dto.getJobNum()); row.add(dto.getIdNo()); + row.add(dto.getIncomeCategoryName()); row.add(dto.getFreeItem()); row.add(dto.getFreeProperty()); row.add(dto.getFreeAmount()); @@ -2295,7 +2366,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction map.put("免税收入", freeIncomeRowList); List> healthInsuranceRowList = new ArrayList<>(); - List healthInsuranceTitle = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "税优识别码", "保单生效日期", "年度保费", "月度保费", "本期扣除金额"); + List healthInsuranceTitle = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "所得项目", "税优识别码", "保单生效日期", "年度保费", "月度保费", "本期扣除金额"); healthInsuranceRowList.add(healthInsuranceTitle); healthInsuranceList.forEach(dto -> { List row = new ArrayList<>(); @@ -2305,6 +2376,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction row.add(dto.getMobile()); row.add(dto.getJobNum()); row.add(dto.getIdNo()); + row.add(dto.getIncomeCategoryName()); row.add(dto.getIdentificationNumber()); row.add(dto.getEffectiveDate()); row.add(dto.getYearPremium()); @@ -2316,7 +2388,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction List> endowmentInsuranceRowList = new ArrayList<>(); - List endowmentInsuranceTitle = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "税延养老账户编号", "报税校验码", "年度保费", "月度保费", "本期扣除金额"); + List endowmentInsuranceTitle = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "所得项目","申报扣除月份", "税延养老账户编号", "报税校验码", "年度保费", "月度保费", "本期扣除金额"); endowmentInsuranceRowList.add(endowmentInsuranceTitle); endowmentInsuranceList.forEach(dto -> { List row = new ArrayList<>(); @@ -2326,6 +2398,8 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction row.add(dto.getMobile()); row.add(dto.getJobNum()); row.add(dto.getIdNo()); + row.add(dto.getIncomeCategoryName()); + row.add(dto.getDeductionMonth()); row.add(dto.getAccountNumber()); row.add(dto.getCheckCode()); row.add(dto.getYearPremium()); @@ -2336,7 +2410,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction map.put("税延养老保险", endowmentInsuranceRowList); List> grantDonationRowList = new ArrayList<>(); - List grantDonationTitle = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "受赠单位名称", "受赠单位纳税人识别号", "凭证号", "捐赠日期", "捐赠金额", "扣除比例", "实际扣除金额"); + List grantDonationTitle = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "所得项目", "受赠单位名称", "受赠单位纳税人识别号", "凭证号", "捐赠日期", "捐赠金额", "扣除比例", "实际扣除金额"); grantDonationRowList.add(grantDonationTitle); grantDonationList.forEach(dto -> { List row = new ArrayList<>(); @@ -2346,6 +2420,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction row.add(dto.getMobile()); row.add(dto.getJobNum()); row.add(dto.getIdNo()); + row.add(dto.getIncomeCategoryName()); row.add(dto.getRecipientName()); row.add(dto.getTaxCode()); row.add(dto.getDonationNumber()); @@ -2358,7 +2433,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction map.put("准予扣除的捐赠额", grantDonationRowList); List> derateDeductionRowList = new ArrayList<>(); - List derateDeductionTitle = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "减免事项", "减免性质", "减免金额"); + List derateDeductionTitle = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "所得项目", "减免事项", "减免性质", "减免金额"); derateDeductionRowList.add(derateDeductionTitle); derateDeductionList.forEach(dto -> { List row = new ArrayList<>(); @@ -2368,6 +2443,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction row.add(dto.getMobile()); row.add(dto.getJobNum()); row.add(dto.getIdNo()); + row.add(dto.getIncomeCategoryName()); row.add(dto.getDerateItem()); row.add(dto.getDerateProperty()); row.add(dto.getDerateAmount()); @@ -2376,7 +2452,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction map.put("减免税额", derateDeductionRowList); List> otherDerateDeductionRowList = new ArrayList<>(); - List otherDerateDeductionTitle = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "其他免税扣除金额", "备注"); + List otherDerateDeductionTitle = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "所得项目", "其他免税扣除金额", "备注"); otherDerateDeductionRowList.add(otherDerateDeductionTitle); otherDerateDeductionList.forEach(dto -> { List row = new ArrayList<>(); @@ -2386,6 +2462,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction row.add(dto.getMobile()); row.add(dto.getJobNum()); row.add(dto.getIdNo()); + row.add(dto.getIncomeCategoryName()); row.add(dto.getOtherDeduction()); row.add(dto.getRemark()); otherDerateDeductionRowList.add(row); @@ -2393,7 +2470,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction map.put("其他", otherDerateDeductionRowList); List> personalPensionRowList = new ArrayList<>(); - List personalPensionTitle = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "凭证类型", "凭证编码", "缴费金额"); + List personalPensionTitle = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "所得项目", "凭证类型", "凭证编码", "缴费金额"); personalPensionRowList.add(personalPensionTitle); personalPensionList.forEach(dto -> { List row = new ArrayList<>(); @@ -2403,6 +2480,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction row.add(dto.getMobile()); row.add(dto.getJobNum()); row.add(dto.getIdNo()); + row.add(dto.getIncomeCategoryName()); row.add(dto.getVoucherTypeName()); row.add(dto.getVoucherNo()); row.add(dto.getPayAmount()); From fe7481d753b1a08aee6370bce6da1601ead3cc44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Wed, 2 Jul 2025 20:02:05 +0800 Subject: [PATCH 17/18] =?UTF-8?q?=E6=A0=B8=E7=AE=97=E7=B2=BE=E5=87=86?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E9=99=84=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datacollection/po/OtherDeductionPO.java | 1 + .../datacollection/OtherDeductionMapper.java | 2 + .../datacollection/OtherDeductionMapper.xml | 90 +++++++++++++++++++ .../salary/service/OtherDeductionService.java | 10 +++ .../impl/OtherDeductionServiceImpl.java | 39 +++++++- .../impl/SalaryAcctCalculateServiceImpl.java | 6 +- 6 files changed, 145 insertions(+), 3 deletions(-) diff --git a/src/com/engine/salary/entity/datacollection/po/OtherDeductionPO.java b/src/com/engine/salary/entity/datacollection/po/OtherDeductionPO.java index bea18e842..02426212a 100644 --- a/src/com/engine/salary/entity/datacollection/po/OtherDeductionPO.java +++ b/src/com/engine/salary/entity/datacollection/po/OtherDeductionPO.java @@ -135,6 +135,7 @@ public class OtherDeductionPO { private List employeeIds; private Collection taxAgentIds; + private Integer incomeCategory; private List freeIncomeList; diff --git a/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.java b/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.java index bfdcf2ecc..073363001 100644 --- a/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.java +++ b/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.java @@ -72,4 +72,6 @@ public interface OtherDeductionMapper { int delete(OtherDeductionPO otherDeduction); OtherDeductionPO getByTaxAgentIdAndEmployeeIdAndDeclareMonth(@Param("taxAgentId") Long taxAgentId, @Param("employeeId") Long employeeId, @Param("declareMonth") Date declareMonth); + + List listDetails(@Param("param") OtherDeductionPO param); } \ No newline at end of file diff --git a/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.xml b/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.xml index 6d8496521..c3fd0e391 100644 --- a/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.xml @@ -732,5 +732,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/com/engine/salary/service/OtherDeductionService.java b/src/com/engine/salary/service/OtherDeductionService.java index c02d4a948..bbebf8c9b 100644 --- a/src/com/engine/salary/service/OtherDeductionService.java +++ b/src/com/engine/salary/service/OtherDeductionService.java @@ -98,6 +98,16 @@ public interface OtherDeductionService { */ List getOtherDeductionList(YearMonth declareMonth, List employeeIds, Long taxAgentId); + /** + * 按照申报表类型,获取其他免税扣除数据 + * @param declareMonth + * @param employeeIds + * @param taxAgentId + * @param incomeCategory + * @return + */ + List getOtherDeductionList(YearMonth declareMonth, List employeeIds, Long taxAgentId, Integer incomeCategory); + /** * 编辑数据 */ diff --git a/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java b/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java index b44b1ad3b..65495a2b5 100644 --- a/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java @@ -1,5 +1,6 @@ package com.engine.salary.service.impl; +import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.NumberUtil; import com.alibaba.fastjson.JSONObject; import com.api.formmode.mybatis.util.SqlProxyHandle; @@ -1910,6 +1911,42 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction return OtherDeductionBiz.listSome(OtherDeductionPO.builder().declareMonth(SalaryDateUtil.toDateStartOfMonth(declareMonth)).employeeIds(employeeIds).taxAgentId(taxAgentId).build()); } + @Override + public List getOtherDeductionList(YearMonth declareMonth, List employeeIds, Long taxAgentId, Integer incomeCategory) { + if (declareMonth == null) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100342, "参数有误:申报月份必传")); + } + if (taxAgentId == null) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100342, "参数有误:扣缴义务人必传")); + } + if (incomeCategory == null) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100342, "参数有误:所得项目必传")); + } + + List otherDeductionPOS = listDetails(OtherDeductionPO.builder().incomeCategory(incomeCategory).declareMonth(SalaryDateUtil.toDateStartOfMonth(declareMonth)).employeeIds(employeeIds).taxAgentId(taxAgentId).build()); + if (CollUtil.isEmpty(otherDeductionPOS)) { + return new ArrayList<>(); + } + otherDeductionPOS.forEach(OtherDeductionPO::handleList); + return otherDeductionPOS; + } + + private List listDetails(OtherDeductionPO param) { + if (CollectionUtils.isNotEmpty(param.getEmployeeIds())) { + List> partition = Lists.partition(param.getEmployeeIds(), 500); + List otherDeductionPOS = new ArrayList<>(); + partition.forEach(l -> { + param.setEmployeeIds(l); + otherDeductionPOS.addAll(getOtherDeductionMapper().listDetails(param)); + }); + return encryptUtil.decryptList(otherDeductionPOS, OtherDeductionPO.class); + } else { + List otherDeductionPOS = getOtherDeductionMapper().listDetails(param); + return encryptUtil.decryptList(otherDeductionPOS, OtherDeductionPO.class); + } + } + + @Override public void editData(OtherDeductionParam otherDeductionParam) { String declareMonthStr = otherDeductionParam.getDeclareMonth(); @@ -2388,7 +2425,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction List> endowmentInsuranceRowList = new ArrayList<>(); - List endowmentInsuranceTitle = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "所得项目","申报扣除月份", "税延养老账户编号", "报税校验码", "年度保费", "月度保费", "本期扣除金额"); + List endowmentInsuranceTitle = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "所得项目", "申报扣除月份", "税延养老账户编号", "报税校验码", "年度保费", "月度保费", "本期扣除金额"); endowmentInsuranceRowList.add(endowmentInsuranceTitle); endowmentInsuranceList.forEach(dto -> { List row = new ArrayList<>(); diff --git a/src/com/engine/salary/service/impl/SalaryAcctCalculateServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctCalculateServiceImpl.java index 16ab88f30..f3bd61e79 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctCalculateServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctCalculateServiceImpl.java @@ -23,6 +23,7 @@ import com.engine.salary.entity.salaryitem.po.SalaryItemPO; import com.engine.salary.entity.salarysob.dto.SalarySobCycleDTO; import com.engine.salary.entity.salarysob.po.SalarySobBackItemPO; import com.engine.salary.entity.salarysob.po.SalarySobItemPO; +import com.engine.salary.entity.salarysob.po.SalarySobPO; import com.engine.salary.enums.salaryformula.SalaryFormulaReferenceEnum; import com.engine.salary.formlua.entity.standard.ExcelResult; import com.engine.salary.service.*; @@ -125,7 +126,8 @@ public class SalaryAcctCalculateServiceImpl extends Service implements SalaryAcc List employeeIds = SalaryEntityUtil.properties(salaryAcctCalculateBO.getSalaryAcctEmployeePOS(), SalaryAcctEmployeePO::getEmployeeId, Collectors.toList()); List simpleEmployees = getSalaryEmployeeService(user).getEmployeeByIdsAll(employeeIds); SalarySobCycleDTO salarySobCycleDTO = salaryAcctCalculateBO.getSalarySobCycleDTO(); - Long taxAgentId = salaryAcctCalculateBO.getSalarySobPO().getTaxAgentId(); + SalarySobPO salarySobPO = salaryAcctCalculateBO.getSalarySobPO(); + Long taxAgentId = salarySobPO.getTaxAgentId(); sw.stop(); // 2、查询薪资档案的数据 sw.start("查询薪资档案的数据"); @@ -147,7 +149,7 @@ public class SalaryAcctCalculateServiceImpl extends Service implements SalaryAcc sw.stop(); // 5、查询其他免税扣除 sw.start("查询其他免税扣除"); - List otherDeductionPOS = getOtherDeductionService(user).getOtherDeductionList(salarySobCycleDTO.getTaxCycle(), employeeIds, taxAgentId); + List otherDeductionPOS = getOtherDeductionService(user).getOtherDeductionList(salarySobCycleDTO.getTaxCycle(), employeeIds, taxAgentId,salarySobPO.getIncomeCategory()); sw.stop(); //6、查询社保福利 sw.start("查询社保福利"); From d6061fa0596759d6cd1aa44a67879135ba96a177 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Wed, 2 Jul 2025 20:43:53 +0800 Subject: [PATCH 18/18] =?UTF-8?q?=E7=94=B3=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/datacollection/OtherDeductionMapper.xml | 10 +++++++++- .../engine/salary/service/OtherDeductionService.java | 4 ++-- .../salary/service/impl/OtherDeductionServiceImpl.java | 6 +++--- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.xml b/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.xml index c3fd0e391..ef566fdd7 100644 --- a/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.xml @@ -813,14 +813,22 @@ left join hrsa_other_derate_deduction f on t.id=f.main_id and f.delete_type=0 and f.income_category=#{param.incomeCategory} left join hrsa_personal_pension g on t.id=g.main_id and g.delete_type=0 and g.income_category=#{param.incomeCategory} where t.delete_type=0 - and t.tax_agent_id = #{param.taxAgentId} and t.declare_month = #{param.declareMonth} + + and t.tax_agent_id = #{param.taxAgentId} + AND t.employee_id IN #{employeeId} + + AND t.tax_agent_id IN + + #{taxAgentId} + + \ No newline at end of file diff --git a/src/com/engine/salary/service/OtherDeductionService.java b/src/com/engine/salary/service/OtherDeductionService.java index 874b93bc2..c2fd7f1e0 100644 --- a/src/com/engine/salary/service/OtherDeductionService.java +++ b/src/com/engine/salary/service/OtherDeductionService.java @@ -102,11 +102,11 @@ public interface OtherDeductionService { * 按照申报表类型,获取其他免税扣除数据 * @param declareMonth * @param employeeIds - * @param taxAgentId + * @param taxAgentIds * @param incomeCategory * @return */ - List getOtherDeductionList(YearMonth declareMonth, List employeeIds, Long taxAgentId, Integer incomeCategory); + List getOtherDeductionList(YearMonth declareMonth, List employeeIds, List taxAgentIds, Integer incomeCategory); /** * 编辑数据 diff --git a/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java b/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java index ea4ceeb3a..b192459e7 100644 --- a/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java @@ -1894,18 +1894,18 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction } @Override - public List getOtherDeductionList(YearMonth declareMonth, List employeeIds, Long taxAgentId, Integer incomeCategory) { + public List getOtherDeductionList(YearMonth declareMonth, List employeeIds, List taxAgentIds, Integer incomeCategory) { if (declareMonth == null) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100342, "参数有误:申报月份必传")); } - if (taxAgentId == null) { + if (CollUtil.isEmpty(taxAgentIds)) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100342, "参数有误:扣缴义务人必传")); } if (incomeCategory == null) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100342, "参数有误:所得项目必传")); } - List otherDeductionPOS = listDetails(OtherDeductionPO.builder().incomeCategory(incomeCategory).declareMonth(SalaryDateUtil.toDateStartOfMonth(declareMonth)).employeeIds(employeeIds).taxAgentId(taxAgentId).build()); + List otherDeductionPOS = listDetails(OtherDeductionPO.builder().incomeCategory(incomeCategory).declareMonth(SalaryDateUtil.toDateStartOfMonth(declareMonth)).employeeIds(employeeIds).taxAgentIds(taxAgentIds).build()); if (CollUtil.isEmpty(otherDeductionPOS)) { return new ArrayList<>(); }