From d14ac4bda356a43160f1f989028079167d092e28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Tue, 17 Dec 2024 14:05:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=8D=E7=A8=8E=E6=94=B6=E5=85=A5=E9=99=84?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/OtherDeductionListDTO.java | 26 +- .../dto/OtherDeductionRecordDTO.java | 12 + .../param/OtherDeductionParam.java | 10 + .../datacollection/po/OtherDeductionPO.java | 14 +- .../po/OtherDerateDeductionPO.java | 5 +- .../datacollection/OtherDeductionMapper.xml | 70 +- .../OtherDerateDeductionMapper.xml | 625 +++++++----------- .../impl/OtherDeductionServiceImpl.java | 25 +- .../impl/SalarySysConfServiceImpl.java | 4 + 9 files changed, 381 insertions(+), 410 deletions(-) diff --git a/src/com/engine/salary/entity/datacollection/dto/OtherDeductionListDTO.java b/src/com/engine/salary/entity/datacollection/dto/OtherDeductionListDTO.java index 94f3580d0..abfffc82f 100644 --- a/src/com/engine/salary/entity/datacollection/dto/OtherDeductionListDTO.java +++ b/src/com/engine/salary/entity/datacollection/dto/OtherDeductionListDTO.java @@ -82,35 +82,51 @@ public class OtherDeductionListDTO { @TableTitle(title = "入职日期", dataIndex = "hiredate", key = "hiredate") private String hiredate; - //商业健康保险 + /** + * 免税收入 + */ @ExcelProperty(index = 7) + @SalaryTableColumn(text = "免税收入", width = "10%", column = "freeIncome") + @TableTitle(title = "免税收入", dataIndex = "freeIncome", key = "freeIncome") + private String freeIncome; + + /** + * 减免税额 + */ + @ExcelProperty(index = 8) + @SalaryTableColumn(text = "入职日期", width = "10%", column = "derateDeduction") + @TableTitle(title = "减免税额", dataIndex = "derateDeduction", key = "derateDeduction") + private String derateDeduction; + + //商业健康保险 + @ExcelProperty(index = 9) @SalaryTableColumn(text = "商业健康保险", width = "10%", column = "businessHealthyInsurance") @TableTitle(title = "商业健康保险", dataIndex = "businessHealthyInsurance", key = "businessHealthyInsurance") @Encrypt private String businessHealthyInsurance; //税延养老保险 - @ExcelProperty(index = 8) + @ExcelProperty(index = 10) @SalaryTableColumn(text = "税延养老保险", width = "10%", column = "taxDelayEndowmentInsurance") @TableTitle(title = "税延养老保险", dataIndex = "taxDelayEndowmentInsurance", key = "taxDelayEndowmentInsurance") @Encrypt private String taxDelayEndowmentInsurance; //其他 - @ExcelProperty(index = 9) + @ExcelProperty(index = 11) @SalaryTableColumn(text = "其他", width = "10%", column = "otherDeduction") @TableTitle(title = "其他", dataIndex = "otherDeduction", key = "otherDeduction") @Encrypt private String otherDeduction; //准予扣除的捐赠额 - @ExcelProperty(index = 10) + @ExcelProperty(index = 12) @SalaryTableColumn(text = "准予扣除的捐赠额", width = "10%", column = "deductionAllowedDonation") @TableTitle(title = "准予扣除的捐赠额", dataIndex = "deductionAllowedDonation", key = "deductionAllowedDonation") @Encrypt private String deductionAllowedDonation; - @ExcelProperty(index = 11) + @ExcelProperty(index = 13) @SalaryTableColumn(text = "个人养老金", width = "10%", column = "privatePension") @TableTitle(title = "个人养老金", dataIndex = "privatePension", key = "privatePension") @Encrypt diff --git a/src/com/engine/salary/entity/datacollection/dto/OtherDeductionRecordDTO.java b/src/com/engine/salary/entity/datacollection/dto/OtherDeductionRecordDTO.java index 4bb115d7a..7f5290520 100644 --- a/src/com/engine/salary/entity/datacollection/dto/OtherDeductionRecordDTO.java +++ b/src/com/engine/salary/entity/datacollection/dto/OtherDeductionRecordDTO.java @@ -71,6 +71,18 @@ public class OtherDeductionRecordDTO { @TableTitle(title = "工号", dataIndex = "jobNum", key = "jobNum") private String jobNum; + //免税收入 + @SalaryTableColumn(text = "免税收入", width = "10%", column = "freeIncome") + @TableTitle(title = "免税收入", dataIndex = "freeIncome", key = "freeIncome") + @Encrypt + private String freeIncome; + + //减免税额 + @SalaryTableColumn(text = "减免税额", width = "10%", column = "derateDeduction") + @TableTitle(title = "减免税额", dataIndex = "derateDeduction", key = "derateDeduction") + @Encrypt + private String derateDeduction; + //商业健康保险 @SalaryTableColumn(text = "商业健康保险", width = "10%", column = "businessHealthyInsurance") @TableTitle(title = "商业健康保险", dataIndex = "businessHealthyInsurance", key = "businessHealthyInsurance") diff --git a/src/com/engine/salary/entity/datacollection/param/OtherDeductionParam.java b/src/com/engine/salary/entity/datacollection/param/OtherDeductionParam.java index 06311ed20..d615856f7 100644 --- a/src/com/engine/salary/entity/datacollection/param/OtherDeductionParam.java +++ b/src/com/engine/salary/entity/datacollection/param/OtherDeductionParam.java @@ -44,6 +44,16 @@ public class OtherDeductionParam { // 工号 private String jobNum; + /** + * 免税收入 + */ + private String freeIncome; + + /** + * 减免税额 + */ + private String derateDeduction; + // 商业健康保险 private String businessHealthyInsurance; diff --git a/src/com/engine/salary/entity/datacollection/po/OtherDeductionPO.java b/src/com/engine/salary/entity/datacollection/po/OtherDeductionPO.java index a3af82274..072f078fe 100644 --- a/src/com/engine/salary/entity/datacollection/po/OtherDeductionPO.java +++ b/src/com/engine/salary/entity/datacollection/po/OtherDeductionPO.java @@ -54,6 +54,13 @@ public class OtherDeductionPO { @Encrypt private String freeIncome; + /** + * 减免税额 + */ + @ElogTransform(name = "减免税额") + @SalaryFormulaVar(defaultLabel = "减免税额", labelId = 102810, dataType = "number") + @Encrypt + private String derateDeduction; /** * 商业健康保险 @@ -71,13 +78,6 @@ public class OtherDeductionPO { @Encrypt private String taxDelayEndowmentInsurance; - /** - * 减免税额 - */ - @ElogTransform(name = "减免税额") - @SalaryFormulaVar(defaultLabel = "减免税额", labelId = 102810, dataType = "number") - @Encrypt - private String derateDeduction; /** * 其他 diff --git a/src/com/engine/salary/entity/datacollection/po/OtherDerateDeductionPO.java b/src/com/engine/salary/entity/datacollection/po/OtherDerateDeductionPO.java index 0dbcd99e6..c9f86d3c6 100644 --- a/src/com/engine/salary/entity/datacollection/po/OtherDerateDeductionPO.java +++ b/src/com/engine/salary/entity/datacollection/po/OtherDerateDeductionPO.java @@ -7,7 +7,6 @@ import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import java.time.LocalDateTime; import java.util.Date; /** @@ -58,10 +57,10 @@ public class OtherDerateDeductionPO { private Integer employeeType; @ElogTransform(name = "创建时间", ignore = true) - private LocalDateTime createTime; + private Date createTime; @ElogTransform(name = "更新时间", ignore = true) - private LocalDateTime updateTime; + private Date updateTime; @ElogTransform(name = "创建人", ignore = true) private Long creator; diff --git a/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.xml b/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.xml index f21fed4a1..03c20d1bb 100644 --- a/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.xml @@ -16,6 +16,8 @@ + + @@ -36,6 +38,8 @@ , t.delete_type , t.tenant_key , t.private_pension + , t.free_income + , t.derate_deduction @@ -59,8 +63,6 @@ - - t1 . @@ -80,7 +82,9 @@ t1.tax_delay_endowment_insurance, t1.other_deduction, t1.deduction_allowed_donation, - t1.private_pension + t1.private_pension, + t1.free_income, + t1.derate_deduction @@ -284,7 +288,7 @@ - ORDER BY ${param.orderRule.orderRule} ${param.orderRule.ascOrDesc} + ORDER BY ${param.orderRule.orderRule} ${param.orderRule.ascOrDesc} @@ -310,7 +314,7 @@ FROM hrsa_other_deduction t WHERE delete_type = 0 - and declare_month = #{param.declareMonth} + and declare_month = #{param.declareMonth} AND t.employee_id IN @@ -336,6 +340,8 @@ other_deduction, deduction_allowed_donation, private_pension, + free_income, + derate_deduction, create_time, update_time, creator, @@ -352,6 +358,8 @@ #{item.otherDeduction}, #{item.deductionAllowedDonation}, #{item.privatePension}, + #{item.freeIncome}, + #{item.derateDeduction}, #{item.createTime}, #{item.updateTime}, #{item.creator}, @@ -369,6 +377,8 @@ other_deduction, deduction_allowed_donation, private_pension, + free_income, + derate_deduction, create_time, update_time, creator, @@ -385,6 +395,8 @@ #{item.otherDeduction,jdbcType=VARCHAR}, #{item.deductionAllowedDonation,jdbcType=VARCHAR}, #{item.privatePension,jdbcType=VARCHAR}, + #{item.freeIncome,jdbcType=VARCHAR}, + #{item.derateDeduction,jdbcType=VARCHAR}, #{item.createTime,jdbcType=DATE}, #{item.updateTime,jdbcType=DATE}, #{item.creator,jdbcType=DOUBLE}, @@ -394,21 +406,23 @@ - INSERT INTO hrsa_other_deduction( - employee_id, - tax_agent_id, - declare_month, - business_healthy_insurance, - tax_delay_endowment_insurance, - other_deduction, - deduction_allowed_donation, - private_pension, - create_time, - update_time, - creator, - tenant_key - ) - VALUES + INSERT INTO hrsa_other_deduction( + employee_id, + tax_agent_id, + declare_month, + business_healthy_insurance, + tax_delay_endowment_insurance, + other_deduction, + deduction_allowed_donation, + private_pension, + free_income, + derate_deduction, + create_time, + update_time, + creator, + tenant_key + ) + VALUES ( #{item.employeeId}, #{item.taxAgentId}, @@ -418,6 +432,8 @@ #{item.otherDeduction}, #{item.deductionAllowedDonation}, #{item.privatePension}, + #{item.freeIncome}, + #{item.derateDeduction}, #{item.createTime}, #{item.updateTime}, #{item.creator}, @@ -464,6 +480,20 @@ + + + + when id=#{item.id} then #{item.freeIncome} + + + + + + + when id=#{item.id} then #{item.derateDeduction} + + + diff --git a/src/com/engine/salary/mapper/datacollection/OtherDerateDeductionMapper.xml b/src/com/engine/salary/mapper/datacollection/OtherDerateDeductionMapper.xml index 1d7b0e0be..25c8ca88c 100644 --- a/src/com/engine/salary/mapper/datacollection/OtherDerateDeductionMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/OtherDerateDeductionMapper.xml @@ -1,26 +1,28 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - t.create_time + t + . + create_time , t.creator , t.delete_type , t.employee_id @@ -34,378 +36,260 @@ , t.tax_year_month , t.tenant_key , t.update_time - - + + - - + + + - + SELECT + + FROM hrsa_other_derate_deduction t + WHERE id = #{id} AND delete_type = 0 + + - + SELECT + + FROM hrsa_other_derate_deduction t + WHERE delete_type = 0 + + AND create_time = #{createTime} + + + AND creator = #{creator} + + + AND delete_type = #{deleteType} + + + AND employee_id = #{employeeId} + + + AND employee_type = #{employeeType} + + + AND file_status = #{fileStatus} + + + AND id = #{id} + + + AND main_id = #{mainId} + + + AND other_deduction = #{otherDeduction} + + + AND remark = #{remark} + + + AND tax_agent_id = #{taxAgentId} + + + AND tax_year_month = #{taxYearMonth} + + + AND tenant_key = #{tenantKey} + + + AND update_time = #{updateTime} + + AND id IN #{id} ORDER BY id DESC - - - + + + - - INSERT INTO hrsa_other_derate_deduction - - - - create_time, - - - creator, - - - delete_type, - - - employee_id, - - - employee_type, - - - file_status, - - - id, - - - main_id, - - - other_deduction, - - - remark, - - - tax_agent_id, - - - tax_year_month, - - - tenant_key, - - - update_time, - - - - - #{createTime}, - - - #{creator}, - - - #{deleteType}, - - - #{employeeId}, - - - #{employeeType}, - - - #{fileStatus}, - - - #{id}, - - - #{mainId}, - - - #{otherDeduction}, - - - #{remark}, - - - #{taxAgentId}, - - - #{taxYearMonth}, - - - #{tenantKey}, - - - #{updateTime}, - - - - - - - + INSERT INTO hrsa_other_derate_deduction - ( - create_time, - creator, - delete_type, - employee_id, - employee_type, - file_status, - id, - main_id, - other_deduction, - remark, - tax_agent_id, - tax_year_month, - tenant_key, - update_time, - ) - VALUES - - - ( - #{item.createTime}, - #{item.creator}, - #{item.deleteType}, - #{item.employeeId}, - #{item.employeeType}, - #{item.fileStatus}, - #{item.id}, - #{item.mainId}, - #{item.otherDeduction}, - #{item.remark}, - #{item.taxAgentId}, - #{item.taxYearMonth}, - #{item.tenantKey}, - #{item.updateTime}, - ) - - - - - - - INSERT INTO hrsa_other_derate_deduction ( - create_time, - creator, - delete_type, - employee_id, - employee_type, - file_status, - id, - main_id, - other_deduction, - remark, - tax_agent_id, - tax_year_month, - tenant_key, - update_time, - ) + - - select - #{item.createTime,jdbcType=DOUBLE、DATE、VARCHAR、INTEGER}, - #{item.creator,jdbcType=DOUBLE、DATE、VARCHAR、INTEGER}, - #{item.deleteType,jdbcType=DOUBLE、DATE、VARCHAR、INTEGER}, - #{item.employeeId,jdbcType=DOUBLE、DATE、VARCHAR、INTEGER}, - #{item.employeeType,jdbcType=DOUBLE、DATE、VARCHAR、INTEGER}, - #{item.fileStatus,jdbcType=DOUBLE、DATE、VARCHAR、INTEGER}, - #{item.id,jdbcType=DOUBLE、DATE、VARCHAR、INTEGER}, - #{item.mainId,jdbcType=DOUBLE、DATE、VARCHAR、INTEGER}, - #{item.otherDeduction,jdbcType=DOUBLE、DATE、VARCHAR、INTEGER}, - #{item.remark,jdbcType=DOUBLE、DATE、VARCHAR、INTEGER}, - #{item.taxAgentId,jdbcType=DOUBLE、DATE、VARCHAR、INTEGER}, - #{item.taxYearMonth,jdbcType=DOUBLE、DATE、VARCHAR、INTEGER}, - #{item.tenantKey,jdbcType=DOUBLE、DATE、VARCHAR、INTEGER}, - #{item.updateTime,jdbcType=DOUBLE、DATE、VARCHAR、INTEGER}, - from dual - - - - - - - INSERT INTO hrsa_other_derate_deduction ( - create_time, - creator, - delete_type, - employee_id, - employee_type, - file_status, - id, - main_id, - other_deduction, - remark, - tax_agent_id, - tax_year_month, - tenant_key, - update_time, - ) - VALUES - ( - #{item.createTime}, - #{item.creator}, - #{item.deleteType}, - #{item.employeeId}, - #{item.employeeType}, - #{item.fileStatus}, - #{item.id}, - #{item.mainId}, - #{item.otherDeduction}, - #{item.remark}, - #{item.taxAgentId}, - #{item.taxYearMonth}, - #{item.tenantKey}, - #{item.updateTime}, - ) - + + create_time, + + + creator, + + + delete_type, + + + employee_id, + + + employee_type, + + + file_status, + + + id, + + + main_id, + + + other_deduction, + + + remark, + + + tax_agent_id, + + + tax_year_month, + + + tenant_key, + + + update_time, + + + + + #{createTime}, + + + #{creator}, + + + #{deleteType}, + + + #{employeeId}, + + + #{employeeType}, + + + #{fileStatus}, + + + #{id}, + + + #{mainId}, + + + #{otherDeduction}, + + + #{remark}, + + + #{taxAgentId}, + + + #{taxYearMonth}, + + + #{tenantKey}, + + + #{updateTime}, + + - - - UPDATE hrsa_other_derate_deduction - - create_time=#{createTime}, - creator=#{creator}, - delete_type=#{deleteType}, - employee_id=#{employeeId}, - employee_type=#{employeeType}, - file_status=#{fileStatus}, - main_id=#{mainId}, - other_deduction=#{otherDeduction}, - remark=#{remark}, - tax_agent_id=#{taxAgentId}, - tax_year_month=#{taxYearMonth}, - tenant_key=#{tenantKey}, - update_time=#{updateTime}, - - WHERE id = #{id} AND delete_type = 0 - - - - - - UPDATE hrsa_other_derate_deduction - - - create_time=#{createTime}, - - - creator=#{creator}, - - - delete_type=#{deleteType}, - - - employee_id=#{employeeId}, - - - employee_type=#{employeeType}, - - - file_status=#{fileStatus}, - - - main_id=#{mainId}, - - - other_deduction=#{otherDeduction}, - - - remark=#{remark}, - - - tax_agent_id=#{taxAgentId}, - - - tax_year_month=#{taxYearMonth}, - - - tenant_key=#{tenantKey}, - - - update_time=#{updateTime}, - - - WHERE id = #{id} AND delete_type = 0 + + + + UPDATE hrsa_other_derate_deduction + + create_time=#{createTime}, + creator=#{creator}, + delete_type=#{deleteType}, + employee_id=#{employeeId}, + employee_type=#{employeeType}, + file_status=#{fileStatus}, + main_id=#{mainId}, + other_deduction=#{otherDeduction}, + remark=#{remark}, + tax_agent_id=#{taxAgentId}, + tax_year_month=#{taxYearMonth}, + tenant_key=#{tenantKey}, + update_time=#{updateTime}, + + WHERE id = #{id} AND delete_type = 0 - - - - UPDATE hrsa_other_derate_deduction - SET delete_type=1 - WHERE id = #{id} AND delete_type = 0 - - + + + + UPDATE hrsa_other_derate_deduction + + + create_time=#{createTime}, + + + creator=#{creator}, + + + delete_type=#{deleteType}, + + + employee_id=#{employeeId}, + + + employee_type=#{employeeType}, + + + file_status=#{fileStatus}, + + + main_id=#{mainId}, + + + other_deduction=#{otherDeduction}, + + + remark=#{remark}, + + + tax_agent_id=#{taxAgentId}, + + + tax_year_month=#{taxYearMonth}, + + + tenant_key=#{tenantKey}, + + + update_time=#{updateTime}, + + + WHERE id = #{id} AND delete_type = 0 + + + + + + UPDATE hrsa_other_derate_deduction + SET delete_type=1 + WHERE id = #{id} + AND delete_type = 0 + + UPDATE hrsa_other_derate_deduction SET delete_type = 1 - WHERE delete_type = 0 + WHERE delete_type = 0 AND id IN #{id} @@ -413,5 +297,4 @@ - \ No newline at end of file diff --git a/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java b/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java index 8347f1045..44c9f7148 100644 --- a/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java @@ -257,7 +257,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction List employeeSameIds = new ArrayList<>(); //筛选导入人员信息可以在人力资源池中匹配到的人员信息 - List emps = getSalaryEmployeeService(user).matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, idNo,null); + List emps = getSalaryEmployeeService(user).matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, idNo, null); //含在职和离职,选在职数据 if (CollectionUtils.isNotEmpty(emps) && emps.size() > 1) { employeeSameIds = emps.stream() @@ -327,6 +327,12 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction } } + //免税收入 + String freeIncome = dto.getFreeIncome(); + po.setFreeIncome(freeIncome); + //减免税额 + String derateDeduction = dto.getDerateDeduction(); + po.setDerateDeduction(derateDeduction); //商业健康保险 String businessHealthyInsurance = dto.getBusinessHealthyInsurance(); po.setBusinessHealthyInsurance(businessHealthyInsurance); @@ -504,7 +510,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction private List> getExcelRowList(OtherDeductionQueryParam param, boolean hasData) { long employeeId = user.getUID(); //excel标题 - List title = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "入职日期", "商业健康保险", "税延养老保险", "其他", "准予扣除的捐赠额", "个人养老金"); + List title = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "入职日期", "免税收入", "减免税额", "商业健康保险", "税延养老保险", "其他", "准予扣除的捐赠额", "个人养老金"); List> rowList = new ArrayList<>(); rowList.add(title); @@ -536,6 +542,8 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction cellList.add(Util.null2String(dto.getJobNum())); cellList.add(Util.null2String(dto.getIdNo())); cellList.add(Util.null2String(dto.getHiredate())); + cellList.add(NumberUtil.isNumber(dto.getFreeIncome()) ? new BigDecimal(dto.getFreeIncome()) : Util.null2String(dto.getFreeIncome())); + cellList.add(NumberUtil.isNumber(dto.getDerateDeduction()) ? new BigDecimal(dto.getDerateDeduction()) : Util.null2String(dto.getDerateDeduction())); cellList.add(NumberUtil.isNumber(dto.getBusinessHealthyInsurance()) ? new BigDecimal(dto.getBusinessHealthyInsurance()) : Util.null2String(dto.getBusinessHealthyInsurance())); cellList.add(NumberUtil.isNumber(dto.getTaxDelayEndowmentInsurance()) ? new BigDecimal(dto.getTaxDelayEndowmentInsurance()) : Util.null2String(dto.getTaxDelayEndowmentInsurance())); cellList.add(NumberUtil.isNumber(dto.getOtherDeduction()) ? new BigDecimal(dto.getOtherDeduction()) : Util.null2String(dto.getOtherDeduction())); @@ -603,7 +611,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction */ private List> getExcelRowDetailList(OtherDeductionQueryParam param) { //excel标题 - List title = Arrays.asList("姓名", "申报月份", "个税扣缴义务人", "部门", "手机号", "工号", "商业健康保险", "税延养老保险", "其他", "准予扣除的捐赠额", "个人养老金"); + List title = Arrays.asList("姓名", "申报月份", "个税扣缴义务人", "部门", "手机号", "工号", "免税收入", "减免税额", "商业健康保险", "税延养老保险", "其他", "准予扣除的捐赠额", "个人养老金"); SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM"); //查询详细信息 @@ -619,6 +627,8 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction cellList.add(Util.null2String(dto.getDepartmentName())); cellList.add(Util.null2String(dto.getMobile())); cellList.add(Util.null2String(dto.getJobNum())); + cellList.add(NumberUtil.isNumber(dto.getFreeIncome()) ? new BigDecimal(dto.getFreeIncome()) : Util.null2String(dto.getFreeIncome())); + cellList.add(NumberUtil.isNumber(dto.getDerateDeduction()) ? new BigDecimal(dto.getDerateDeduction()) : Util.null2String(dto.getDerateDeduction())); cellList.add(NumberUtil.isNumber(dto.getBusinessHealthyInsurance()) ? new BigDecimal(dto.getBusinessHealthyInsurance()) : Util.null2String(dto.getBusinessHealthyInsurance())); cellList.add(NumberUtil.isNumber(dto.getTaxDelayEndowmentInsurance()) ? new BigDecimal(dto.getTaxDelayEndowmentInsurance()) : Util.null2String(dto.getTaxDelayEndowmentInsurance())); cellList.add(NumberUtil.isNumber(dto.getOtherDeduction()) ? new BigDecimal(dto.getOtherDeduction()) : Util.null2String(dto.getOtherDeduction())); @@ -674,6 +684,8 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction ArrayList updateList = new ArrayList<>(); OtherDeductionPO build = OtherDeductionPO.builder() .id(otherDeductionParam.getId()) + .freeIncome(otherDeductionParam.getFreeIncome()) + .derateDeduction(otherDeductionParam.getDerateDeduction()) .businessHealthyInsurance(otherDeductionParam.getBusinessHealthyInsurance()) .taxDelayEndowmentInsurance(otherDeductionParam.getTaxDelayEndowmentInsurance()) .otherDeduction(otherDeductionParam.getOtherDeduction()) @@ -753,7 +765,12 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction throw new SalaryRunTimeException("个税扣缴义务人不存在或不在权限范围内"); } } - + //免税收入 + String freeIncome = otherDeductionParam.getFreeIncome(); + po.setFreeIncome(freeIncome); + //减免税额 + String derateDeduction = otherDeductionParam.getDerateDeduction(); + po.setDerateDeduction(derateDeduction); //商业健康保险 String businessHealthyInsurance = otherDeductionParam.getBusinessHealthyInsurance(); po.setBusinessHealthyInsurance(businessHealthyInsurance); diff --git a/src/com/engine/salary/sys/service/impl/SalarySysConfServiceImpl.java b/src/com/engine/salary/sys/service/impl/SalarySysConfServiceImpl.java index 145a8a72b..e517b6c06 100644 --- a/src/com/engine/salary/sys/service/impl/SalarySysConfServiceImpl.java +++ b/src/com/engine/salary/sys/service/impl/SalarySysConfServiceImpl.java @@ -1060,12 +1060,16 @@ public class SalarySysConfServiceImpl extends Service implements SalarySysConfSe if (CollectionUtils.isNotEmpty(otherDeductionPos)) { otherDeductionPos.forEach(po -> { if (OpenEnum.OFF.getValue().equals(isOpenEncrypt)) { + po.setFreeIncome(AESEncryptUtil.closeEncryptSetting(po.getFreeIncome(), sysConfPo)); + po.setDerateDeduction(AESEncryptUtil.closeEncryptSetting(po.getDerateDeduction(), sysConfPo)); po.setBusinessHealthyInsurance(AESEncryptUtil.closeEncryptSetting(po.getBusinessHealthyInsurance(), sysConfPo)); po.setTaxDelayEndowmentInsurance(AESEncryptUtil.closeEncryptSetting(po.getTaxDelayEndowmentInsurance(), sysConfPo)); po.setOtherDeduction(AESEncryptUtil.closeEncryptSetting(po.getOtherDeduction(), sysConfPo)); po.setDeductionAllowedDonation(AESEncryptUtil.closeEncryptSetting(po.getDeductionAllowedDonation(), sysConfPo)); po.setPrivatePension(AESEncryptUtil.closeEncryptSetting(po.getPrivatePension(), sysConfPo)); } else { + po.setFreeIncome(AESEncryptUtil.encrypt(po.getFreeIncome())); + po.setDerateDeduction(AESEncryptUtil.encrypt(po.getDerateDeduction())); po.setBusinessHealthyInsurance(AESEncryptUtil.encrypt(po.getBusinessHealthyInsurance())); po.setTaxDelayEndowmentInsurance(AESEncryptUtil.encrypt(po.getTaxDelayEndowmentInsurance())); po.setOtherDeduction(AESEncryptUtil.encrypt(po.getOtherDeduction()));