From 79cfa0cbc07f223a875e8b5f8b3f9c223a68e1ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Tue, 21 May 2024 10:50:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=BE=80=E6=9C=9F=E7=B4=AF?= =?UTF-8?q?=E8=AE=A1=E5=A4=9A=E4=BD=99=E9=A1=B9=E7=9B=AE=20=E5=BE=80?= =?UTF-8?q?=E6=9C=9F=E7=B4=AF=E8=AE=A1=E5=88=AB=E5=90=8D=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resource/sqlupgrade/DM/sql202308150603.sql | 2 +- resource/sqlupgrade/GS/sql202308150603.sql | 2 +- resource/sqlupgrade/JC/sql202308150603.sql | 2 +- resource/sqlupgrade/Mysql/sql202308150603.sql | 2 +- .../sqlupgrade/Oracle/sql202308150603.sql | 2 +- resource/sqlupgrade/PG/sql202308150603.sql | 2 +- .../sqlupgrade/SQLServer/sql202308150603.sql | 2 +- resource/sqlupgrade/ST/sql202308150603.sql | 2 +- .../salary/annotation/SalaryFormulaVar.java | 6 ++++ .../entity/datacollection/AddUpSituation.java | 35 ++++++++++--------- .../impl/SalarySobAddUpRuleServiceImpl.java | 4 +++ 11 files changed, 36 insertions(+), 25 deletions(-) diff --git a/resource/sqlupgrade/DM/sql202308150603.sql b/resource/sqlupgrade/DM/sql202308150603.sql index afa21f4ad..42973a3fa 100644 --- a/resource/sqlupgrade/DM/sql202308150603.sql +++ b/resource/sqlupgrade/DM/sql202308150603.sql @@ -57,6 +57,6 @@ select id, create_time, update_time, creator, delete_type, tenant_key, salary_so from hrsa_salary_sob_item where delete_type = 0 and income_category = 1 - and salary_item_code in ('addUpTaxableIncome'); + and salary_item_code in ('addUpTaxableIncome','addUpTaxFreeIncome','addUpTaxDeduction'); / diff --git a/resource/sqlupgrade/GS/sql202308150603.sql b/resource/sqlupgrade/GS/sql202308150603.sql index afa21f4ad..42973a3fa 100644 --- a/resource/sqlupgrade/GS/sql202308150603.sql +++ b/resource/sqlupgrade/GS/sql202308150603.sql @@ -57,6 +57,6 @@ select id, create_time, update_time, creator, delete_type, tenant_key, salary_so from hrsa_salary_sob_item where delete_type = 0 and income_category = 1 - and salary_item_code in ('addUpTaxableIncome'); + and salary_item_code in ('addUpTaxableIncome','addUpTaxFreeIncome','addUpTaxDeduction'); / diff --git a/resource/sqlupgrade/JC/sql202308150603.sql b/resource/sqlupgrade/JC/sql202308150603.sql index afa21f4ad..42973a3fa 100644 --- a/resource/sqlupgrade/JC/sql202308150603.sql +++ b/resource/sqlupgrade/JC/sql202308150603.sql @@ -57,6 +57,6 @@ select id, create_time, update_time, creator, delete_type, tenant_key, salary_so from hrsa_salary_sob_item where delete_type = 0 and income_category = 1 - and salary_item_code in ('addUpTaxableIncome'); + and salary_item_code in ('addUpTaxableIncome','addUpTaxFreeIncome','addUpTaxDeduction'); / diff --git a/resource/sqlupgrade/Mysql/sql202308150603.sql b/resource/sqlupgrade/Mysql/sql202308150603.sql index e7e16eeb1..d79395752 100644 --- a/resource/sqlupgrade/Mysql/sql202308150603.sql +++ b/resource/sqlupgrade/Mysql/sql202308150603.sql @@ -54,5 +54,5 @@ select id, create_time, update_time, creator, delete_type, tenant_key, salary_so from hrsa_salary_sob_item where delete_type = 0 and income_category = 1 - and salary_item_code in ('addUpTaxableIncome') + and salary_item_code in ('addUpTaxableIncome','addUpTaxFreeIncome','addUpTaxDeduction') ; \ No newline at end of file diff --git a/resource/sqlupgrade/Oracle/sql202308150603.sql b/resource/sqlupgrade/Oracle/sql202308150603.sql index 824a4ce82..4f9868ff8 100644 --- a/resource/sqlupgrade/Oracle/sql202308150603.sql +++ b/resource/sqlupgrade/Oracle/sql202308150603.sql @@ -53,5 +53,5 @@ select id, create_time, update_time, creator, delete_type, tenant_key, salary_so from hrsa_salary_sob_item where delete_type = 0 and income_category = 1 - and salary_item_code in ('addUpTaxableIncome') + and salary_item_code in ('addUpTaxableIncome','addUpTaxFreeIncome','addUpTaxDeduction') / \ No newline at end of file diff --git a/resource/sqlupgrade/PG/sql202308150603.sql b/resource/sqlupgrade/PG/sql202308150603.sql index 001f75870..357a806d0 100644 --- a/resource/sqlupgrade/PG/sql202308150603.sql +++ b/resource/sqlupgrade/PG/sql202308150603.sql @@ -57,5 +57,5 @@ select id, create_time, update_time, creator, delete_type, tenant_key, salary_so from hrsa_salary_sob_item where delete_type = 0 and income_category = 1 - and salary_item_code in ('addUpTaxableIncome'); + and salary_item_code in ('addUpTaxableIncome','addUpTaxFreeIncome','addUpTaxDeduction'); / \ No newline at end of file diff --git a/resource/sqlupgrade/SQLServer/sql202308150603.sql b/resource/sqlupgrade/SQLServer/sql202308150603.sql index 4cf555b00..f6c058c12 100644 --- a/resource/sqlupgrade/SQLServer/sql202308150603.sql +++ b/resource/sqlupgrade/SQLServer/sql202308150603.sql @@ -54,5 +54,5 @@ select id, create_time, update_time, creator, delete_type, tenant_key, salary_so from hrsa_salary_sob_item where delete_type = 0 and income_category = 1 - and salary_item_code in ('addUpTaxableIncome') + and salary_item_code in ('addUpTaxableIncome','addUpTaxFreeIncome','addUpTaxDeduction') GO \ No newline at end of file diff --git a/resource/sqlupgrade/ST/sql202308150603.sql b/resource/sqlupgrade/ST/sql202308150603.sql index afa21f4ad..42973a3fa 100644 --- a/resource/sqlupgrade/ST/sql202308150603.sql +++ b/resource/sqlupgrade/ST/sql202308150603.sql @@ -57,6 +57,6 @@ select id, create_time, update_time, creator, delete_type, tenant_key, salary_so from hrsa_salary_sob_item where delete_type = 0 and income_category = 1 - and salary_item_code in ('addUpTaxableIncome'); + and salary_item_code in ('addUpTaxableIncome','addUpTaxFreeIncome','addUpTaxDeduction'); / diff --git a/src/com/engine/salary/annotation/SalaryFormulaVar.java b/src/com/engine/salary/annotation/SalaryFormulaVar.java index 2e3077158..c5d10b7d7 100644 --- a/src/com/engine/salary/annotation/SalaryFormulaVar.java +++ b/src/com/engine/salary/annotation/SalaryFormulaVar.java @@ -24,4 +24,10 @@ public @interface SalaryFormulaVar { String dataType(); String fieldId() default ""; + + /** + * 别名,用于属性名和项目名不匹配时场景 + * @return + */ + String alias() default ""; } diff --git a/src/com/engine/salary/entity/datacollection/AddUpSituation.java b/src/com/engine/salary/entity/datacollection/AddUpSituation.java index 96c6b8945..c12b48717 100644 --- a/src/com/engine/salary/entity/datacollection/AddUpSituation.java +++ b/src/com/engine/salary/entity/datacollection/AddUpSituation.java @@ -22,7 +22,7 @@ import java.util.List; @Builder @NoArgsConstructor @AllArgsConstructor -@SalaryTable(pageId = "a4f83287-e3f9-4275-9527-7d06e54y6238", fields = "id,addUpSubtraction", operates = {@SalaryTableOperate(text = "删除",index = "0")}) +@SalaryTable(pageId = "a4f83287-e3f9-4275-9527-7d06e54y6238", fields = "id,addUpSubtraction", operates = {@SalaryTableOperate(text = "删除", index = "0")}) //hrsa_add_up_situation @ElogTransform(name = "往期累计情况") public class AddUpSituation { @@ -59,6 +59,7 @@ public class AddUpSituation { /** * 人员类型 + * * @see DataCollectionEmployeeTypeEnum */ private Integer employeeType; @@ -90,15 +91,15 @@ public class AddUpSituation { /** * 累计公积金个人合计 */ - @ElogTransform(name = "累计公积金个人合计") @SalaryFormulaVar(defaultLabel = "累计公积金个人合计", labelId = 86709, dataType = "number") + @ElogTransform(name = "累计公积金个人合计") @Encrypt private String addUpAccumulationFundTotal; /** * 累计子女教育 */ - @SalaryFormulaVar(defaultLabel = "累计子女教育", labelId = 86321, dataType = "number") +// @SalaryFormulaVar(defaultLabel = "累计子女教育", labelId = 86321, dataType = "number") @Encrypt @Deprecated private String addUpChildEducation; @@ -106,7 +107,7 @@ public class AddUpSituation { /** * 累计继续教育 */ - @SalaryFormulaVar(defaultLabel = "累计继续教育", labelId = 86323, dataType = "number") +// @SalaryFormulaVar(defaultLabel = "累计继续教育", labelId = 86323, dataType = "number") @Encrypt @Deprecated private String addUpContinuingEducation; @@ -114,7 +115,7 @@ public class AddUpSituation { /** * 累计住房贷款利息 */ - @SalaryFormulaVar(defaultLabel = "累计住房贷款利息", labelId = 86324, dataType = "number") +// @SalaryFormulaVar(defaultLabel = "累计住房贷款利息", labelId = 86324, dataType = "number") @Encrypt @Deprecated private String addUpHousingLoanInterest; @@ -122,7 +123,7 @@ public class AddUpSituation { /** * 累计住房租金 */ - @SalaryFormulaVar(defaultLabel = "累计住房租金", labelId = 86325, dataType = "number") +// @SalaryFormulaVar(defaultLabel = "累计住房租金", labelId = 86325, dataType = "number") @Encrypt @Deprecated private String addUpHousingRent; @@ -130,7 +131,7 @@ public class AddUpSituation { /** * 累计赡养老人 */ - @SalaryFormulaVar(defaultLabel = "累计赡养老人", labelId = 86326, dataType = "number") +// @SalaryFormulaVar(defaultLabel = "累计赡养老人", labelId = 86326, dataType = "number") @Encrypt @Deprecated private String addUpSupportElderly; @@ -138,7 +139,7 @@ public class AddUpSituation { /** * 累计大病医疗 */ - @SalaryFormulaVar(defaultLabel = "累计大病医疗", labelId = 105142, dataType = "number") +// @SalaryFormulaVar(defaultLabel = "累计大病医疗", labelId = 105142, dataType = "number") @Encrypt @Deprecated private String addUpIllnessMedical; @@ -146,7 +147,7 @@ public class AddUpSituation { /** * 累计婴幼儿照护 */ - @SalaryFormulaVar(defaultLabel = "累计婴幼儿照护", labelId = 117732, dataType = "number") +// @SalaryFormulaVar(defaultLabel = "累计婴幼儿照护", labelId = 117732, dataType = "number") @Encrypt @Deprecated private String addUpInfantCare; @@ -154,7 +155,7 @@ public class AddUpSituation { /** * 累计婴幼儿照护 */ - @SalaryFormulaVar(defaultLabel = "累计个人养老金", labelId = 117732, dataType = "number") +// @SalaryFormulaVar(defaultLabel = "累计个人养老金", labelId = 117732, dataType = "number") @Encrypt @Deprecated private String addUpPrivatePension; @@ -162,56 +163,56 @@ public class AddUpSituation { /** * 累计企业(职业)年金及其他福利 */ - @ElogTransform(name = "累计企业(职业)年金及其他福利") @SalaryFormulaVar(defaultLabel = "累计企业(职业)年金及其他福利", labelId = 90567, dataType = "number") + @ElogTransform(name = "累计企业(职业)年金及其他福利") @Encrypt private String addUpEnterpriseAndOther; /** * 累计其他免税扣除 */ - @ElogTransform(name = "累计其他免税扣除") @SalaryFormulaVar(defaultLabel = "累计其他免税扣除", labelId = 93902, dataType = "number") + @ElogTransform(name = "累计其他免税扣除") @Encrypt private String addUpOtherDeduction; /** * 累计免税收入 */ + @SalaryFormulaVar(defaultLabel = "累计免税收入", labelId = 86704, dataType = "number",alias = "addUpTaxFreeIncome") @ElogTransform(name = "累计免税收入") - @SalaryFormulaVar(defaultLabel = "累计免税收入", labelId = 86704, dataType = "number") @Encrypt private String addUpTaxExemptIncome; /** * 累计准予扣除的捐赠额 */ - @ElogTransform(name = "累计准予扣除的捐赠额") @SalaryFormulaVar(defaultLabel = "累计准予扣除的捐赠额", labelId = 86703, dataType = "number") + @ElogTransform(name = "累计准予扣除的捐赠额") @Encrypt private String addUpAllowedDonation; /** * 累计减免税额 */ + @SalaryFormulaVar(defaultLabel = "累计减免税额", labelId = 105478, dataType = "number", alias = "addUpTaxDeduction") @ElogTransform(name = "累计减免税额") - @SalaryFormulaVar(defaultLabel = "累计减免税额", labelId = 105478, dataType = "number") @Encrypt private String addUpTaxSavings; /** * 累计已预扣预缴税额 */ - @ElogTransform(name = "累计已预扣预缴税额") @SalaryFormulaVar(defaultLabel = "累计已预扣预缴税额", labelId = 86702, dataType = "number") + @ElogTransform(name = "累计已预扣预缴税额") @Encrypt private String addUpAdvanceTax; /** * 实际累计已预扣预缴税额 */ - @ElogTransform(name = "实际累计已预扣预缴税额") @SalaryFormulaVar(defaultLabel = "实际累计已预扣预缴税额", labelId = 233557, dataType = "number") + @ElogTransform(name = "实际累计已预扣预缴税额") @Encrypt private String actualAddUpAdvanceTax; diff --git a/src/com/engine/salary/service/impl/SalarySobAddUpRuleServiceImpl.java b/src/com/engine/salary/service/impl/SalarySobAddUpRuleServiceImpl.java index ead78218b..29d6af22d 100644 --- a/src/com/engine/salary/service/impl/SalarySobAddUpRuleServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalarySobAddUpRuleServiceImpl.java @@ -111,6 +111,10 @@ public class SalarySobAddUpRuleServiceImpl extends Service implements SalarySobA addUpRuleDTO.setCanEdit(true); Long salaryItemId = salarySobAddUpMap.get(incomeCategoryId + "-" + declaredField.getName()); + if(salaryItemId == null){ + //往期累计属性名和项目名不匹配,采用别名 + salaryItemId = salarySobAddUpMap.get(incomeCategoryId + "-" + annotation.alias()); + } SalaryItemPO salaryItem = idKeySalaryItemMap.get(salaryItemId); if (Objects.nonNull(salaryItem)) { Map dataMap = Maps.newHashMap();