免税收入附表
This commit is contained in:
parent
8c83e8ed6c
commit
d14ac4bda3
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -44,6 +44,16 @@ public class OtherDeductionParam {
|
|||
// 工号
|
||||
private String jobNum;
|
||||
|
||||
/**
|
||||
* 免税收入
|
||||
*/
|
||||
private String freeIncome;
|
||||
|
||||
/**
|
||||
* 减免税额
|
||||
*/
|
||||
private String derateDeduction;
|
||||
|
||||
// 商业健康保险
|
||||
private String businessHealthyInsurance;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
/**
|
||||
* 其他
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@
|
|||
<result column="delete_type" property="deleteType"/>
|
||||
<result column="tenant_key" property="tenantKey"/>
|
||||
<result column="private_pension" property="privatePension"/>
|
||||
<result column="free_income" property="freeIncome"/>
|
||||
<result column="derate_deduction" property="derateDeduction"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 表字段 -->
|
||||
|
|
@ -36,6 +38,8 @@
|
|||
, t.delete_type
|
||||
, t.tenant_key
|
||||
, t.private_pension
|
||||
, t.free_income
|
||||
, t.derate_deduction
|
||||
</sql>
|
||||
|
||||
<!--批量删除-->
|
||||
|
|
@ -59,8 +63,6 @@
|
|||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
<sql id="otherDeductionColumn">
|
||||
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
|
||||
</sql>
|
||||
|
||||
<sql id="paramSql">
|
||||
|
|
@ -284,7 +288,7 @@
|
|||
<include refid="paramSql"/>
|
||||
<!-- 排序 -->
|
||||
<if test="param.orderRule != null">
|
||||
ORDER BY ${param.orderRule.orderRule} ${param.orderRule.ascOrDesc}
|
||||
ORDER BY ${param.orderRule.orderRule} ${param.orderRule.ascOrDesc}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
|
@ -310,7 +314,7 @@
|
|||
FROM hrsa_other_deduction t
|
||||
WHERE delete_type = 0
|
||||
<if test="param.declareMonth != null">
|
||||
and declare_month = #{param.declareMonth}
|
||||
and declare_month = #{param.declareMonth}
|
||||
</if>
|
||||
<if test="param.employeeIds != null and param.employeeIds.size()>0">
|
||||
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>
|
||||
<insert id="insertData" databaseId="sqlserver">
|
||||
<foreach collection="collection" item="item" separator=";">
|
||||
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 @@
|
|||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="free_income =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.freeIncome!=null">
|
||||
when id=#{item.id} then #{item.freeIncome}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="free_income =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.derateDeduction!=null">
|
||||
when id=#{item.id} then #{item.derateDeduction}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="update_time =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.updateTime!=null">
|
||||
|
|
|
|||
|
|
@ -1,26 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.engine.salary.mapper.OtherDerateDeductionMapper">
|
||||
<resultMap id="BaseResultMap" type="com.engine.salary.entity.OtherDerateDeduction">
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="creator" property="creator" />
|
||||
<result column="delete_type" property="deleteType" />
|
||||
<result column="employee_id" property="employeeId" />
|
||||
<result column="employee_type" property="employeeType" />
|
||||
<result column="file_status" property="fileStatus" />
|
||||
<result column="id" property="id" />
|
||||
<result column="main_id" property="mainId" />
|
||||
<result column="other_deduction" property="otherDeduction" />
|
||||
<result column="remark" property="remark" />
|
||||
<result column="tax_agent_id" property="taxAgentId" />
|
||||
<result column="tax_year_month" property="taxYearMonth" />
|
||||
<result column="tenant_key" property="tenantKey" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
</resultMap>
|
||||
|
||||
<mapper namespace="com.engine.salary.mapper.datacollection.OtherDerateDeductionMapper">
|
||||
<resultMap id="BaseResultMap" type="com.engine.salary.entity.datacollection.po.OtherDerateDeductionPO">
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="creator" property="creator"/>
|
||||
<result column="delete_type" property="deleteType"/>
|
||||
<result column="employee_id" property="employeeId"/>
|
||||
<result column="employee_type" property="employeeType"/>
|
||||
<result column="file_status" property="fileStatus"/>
|
||||
<result column="id" property="id"/>
|
||||
<result column="main_id" property="mainId"/>
|
||||
<result column="other_deduction" property="otherDeduction"/>
|
||||
<result column="remark" property="remark"/>
|
||||
<result column="tax_agent_id" property="taxAgentId"/>
|
||||
<result column="tax_year_month" property="taxYearMonth"/>
|
||||
<result column="tenant_key" property="tenantKey"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 表字段 -->
|
||||
<sql id="baseColumns">
|
||||
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
|
||||
</sql>
|
||||
|
||||
</sql>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="listAll" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="baseColumns" />
|
||||
FROM hrsa_other_derate_deduction t
|
||||
SELECT
|
||||
<include refid="baseColumns"/>
|
||||
FROM hrsa_other_derate_deduction t
|
||||
WHERE delete_type = 0
|
||||
</select>
|
||||
|
||||
<!-- 根据主键获取单条记录 -->
|
||||
</select>
|
||||
|
||||
<!-- 根据主键获取单条记录 -->
|
||||
<select id="getById" resultMap="BaseResultMap" parameterType="Long">
|
||||
SELECT
|
||||
<include refid="baseColumns" />
|
||||
FROM hrsa_other_derate_deduction t
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</select>
|
||||
|
||||
SELECT
|
||||
<include refid="baseColumns"/>
|
||||
FROM hrsa_other_derate_deduction t
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</select>
|
||||
|
||||
<!-- 条件查询 -->
|
||||
<select id="listSome" resultMap="BaseResultMap" parameterType="com.engine.salary.entity.OtherDerateDeduction">
|
||||
SELECT
|
||||
<include refid="baseColumns" />
|
||||
FROM hrsa_other_derate_deduction t
|
||||
WHERE delete_type = 0
|
||||
<if test="createTime != null">
|
||||
AND create_time = #{createTime}
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
AND creator = #{creator}
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
AND delete_type = #{deleteType}
|
||||
</if>
|
||||
<if test="employeeId != null">
|
||||
AND employee_id = #{employeeId}
|
||||
</if>
|
||||
<if test="employeeType != null">
|
||||
AND employee_type = #{employeeType}
|
||||
</if>
|
||||
<if test="fileStatus != null">
|
||||
AND file_status = #{fileStatus}
|
||||
</if>
|
||||
<if test="id != null">
|
||||
AND id = #{id}
|
||||
</if>
|
||||
<if test="mainId != null">
|
||||
AND main_id = #{mainId}
|
||||
</if>
|
||||
<if test="otherDeduction != null">
|
||||
AND other_deduction = #{otherDeduction}
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
AND remark = #{remark}
|
||||
</if>
|
||||
<if test="taxAgentId != null">
|
||||
AND tax_agent_id = #{taxAgentId}
|
||||
</if>
|
||||
<if test="taxYearMonth != null">
|
||||
AND tax_year_month = #{taxYearMonth}
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
AND tenant_key = #{tenantKey}
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
AND update_time = #{updateTime}
|
||||
</if>
|
||||
<if test="ids != null and ids.size()>0">
|
||||
<select id="listSome" resultMap="BaseResultMap"
|
||||
parameterType="com.engine.salary.entity.datacollection.po.OtherDerateDeductionPO">
|
||||
SELECT
|
||||
<include refid="baseColumns"/>
|
||||
FROM hrsa_other_derate_deduction t
|
||||
WHERE delete_type = 0
|
||||
<if test="createTime != null">
|
||||
AND create_time = #{createTime}
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
AND creator = #{creator}
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
AND delete_type = #{deleteType}
|
||||
</if>
|
||||
<if test="employeeId != null">
|
||||
AND employee_id = #{employeeId}
|
||||
</if>
|
||||
<if test="employeeType != null">
|
||||
AND employee_type = #{employeeType}
|
||||
</if>
|
||||
<if test="fileStatus != null">
|
||||
AND file_status = #{fileStatus}
|
||||
</if>
|
||||
<if test="id != null">
|
||||
AND id = #{id}
|
||||
</if>
|
||||
<if test="mainId != null">
|
||||
AND main_id = #{mainId}
|
||||
</if>
|
||||
<if test="otherDeduction != null">
|
||||
AND other_deduction = #{otherDeduction}
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
AND remark = #{remark}
|
||||
</if>
|
||||
<if test="taxAgentId != null">
|
||||
AND tax_agent_id = #{taxAgentId}
|
||||
</if>
|
||||
<if test="taxYearMonth != null">
|
||||
AND tax_year_month = #{taxYearMonth}
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
AND tenant_key = #{tenantKey}
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
AND update_time = #{updateTime}
|
||||
</if>
|
||||
<if test="ids != null and ids.size()>0">
|
||||
AND id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
ORDER BY id DESC
|
||||
</select>
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 插入不为NULL的字段 -->
|
||||
<insert id="insertIgnoreNull" parameterType="com.engine.salary.entity.OtherDerateDeduction">
|
||||
INSERT INTO hrsa_other_derate_deduction
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
creator,
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
delete_type,
|
||||
</if>
|
||||
<if test="employeeId != null">
|
||||
employee_id,
|
||||
</if>
|
||||
<if test="employeeType != null">
|
||||
employee_type,
|
||||
</if>
|
||||
<if test="fileStatus != null">
|
||||
file_status,
|
||||
</if>
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="mainId != null">
|
||||
main_id,
|
||||
</if>
|
||||
<if test="otherDeduction != null">
|
||||
other_deduction,
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark,
|
||||
</if>
|
||||
<if test="taxAgentId != null">
|
||||
tax_agent_id,
|
||||
</if>
|
||||
<if test="taxYearMonth != null">
|
||||
tax_year_month,
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
tenant_key,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||
<if test="createTime != null" >
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="creator != null" >
|
||||
#{creator},
|
||||
</if>
|
||||
<if test="deleteType != null" >
|
||||
#{deleteType},
|
||||
</if>
|
||||
<if test="employeeId != null" >
|
||||
#{employeeId},
|
||||
</if>
|
||||
<if test="employeeType != null" >
|
||||
#{employeeType},
|
||||
</if>
|
||||
<if test="fileStatus != null" >
|
||||
#{fileStatus},
|
||||
</if>
|
||||
<if test="id != null" >
|
||||
#{id},
|
||||
</if>
|
||||
<if test="mainId != null" >
|
||||
#{mainId},
|
||||
</if>
|
||||
<if test="otherDeduction != null" >
|
||||
#{otherDeduction},
|
||||
</if>
|
||||
<if test="remark != null" >
|
||||
#{remark},
|
||||
</if>
|
||||
<if test="taxAgentId != null" >
|
||||
#{taxAgentId},
|
||||
</if>
|
||||
<if test="taxYearMonth != null" >
|
||||
#{taxYearMonth},
|
||||
</if>
|
||||
<if test="tenantKey != null" >
|
||||
#{tenantKey},
|
||||
</if>
|
||||
<if test="updateTime != null" >
|
||||
#{updateTime},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
<insert id="batchInsert">
|
||||
|
||||
<insert id="insertIgnoreNull" parameterType="com.engine.salary.entity.datacollection.po.OtherDerateDeductionPO">
|
||||
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
|
||||
|
||||
<foreach collection="collection" item="item" separator=",">
|
||||
(
|
||||
#{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},
|
||||
)
|
||||
</foreach>
|
||||
|
||||
</insert>
|
||||
|
||||
|
||||
<insert id="batchInsert" databaseId="oracle">
|
||||
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,
|
||||
)
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
||||
<foreach collection="collection" item="item" separator="union all">
|
||||
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
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
|
||||
<insert id="batchInsert" databaseId="sqlserver">
|
||||
<foreach collection="collection" item="item" separator=";">
|
||||
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},
|
||||
)
|
||||
</foreach>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
creator,
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
delete_type,
|
||||
</if>
|
||||
<if test="employeeId != null">
|
||||
employee_id,
|
||||
</if>
|
||||
<if test="employeeType != null">
|
||||
employee_type,
|
||||
</if>
|
||||
<if test="fileStatus != null">
|
||||
file_status,
|
||||
</if>
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="mainId != null">
|
||||
main_id,
|
||||
</if>
|
||||
<if test="otherDeduction != null">
|
||||
other_deduction,
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark,
|
||||
</if>
|
||||
<if test="taxAgentId != null">
|
||||
tax_agent_id,
|
||||
</if>
|
||||
<if test="taxYearMonth != null">
|
||||
tax_year_month,
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
tenant_key,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||
<if test="createTime != null">
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
#{creator},
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
#{deleteType},
|
||||
</if>
|
||||
<if test="employeeId != null">
|
||||
#{employeeId},
|
||||
</if>
|
||||
<if test="employeeType != null">
|
||||
#{employeeType},
|
||||
</if>
|
||||
<if test="fileStatus != null">
|
||||
#{fileStatus},
|
||||
</if>
|
||||
<if test="id != null">
|
||||
#{id},
|
||||
</if>
|
||||
<if test="mainId != null">
|
||||
#{mainId},
|
||||
</if>
|
||||
<if test="otherDeduction != null">
|
||||
#{otherDeduction},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
#{remark},
|
||||
</if>
|
||||
<if test="taxAgentId != null">
|
||||
#{taxAgentId},
|
||||
</if>
|
||||
<if test="taxYearMonth != null">
|
||||
#{taxYearMonth},
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
#{tenantKey},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<!-- 更新,更新全部字段 -->
|
||||
<update id="update" parameterType="com.engine.salary.entity.OtherDerateDeduction">
|
||||
UPDATE hrsa_other_derate_deduction
|
||||
<set>
|
||||
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},
|
||||
</set>
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</update>
|
||||
|
||||
|
||||
<!-- 更新不为NULL的字段 -->
|
||||
<update id="updateIgnoreNull" parameterType="com.engine.salary.entity.OtherDerateDeduction">
|
||||
UPDATE hrsa_other_derate_deduction
|
||||
<set>
|
||||
<if test="createTime != null" >
|
||||
create_time=#{createTime},
|
||||
</if>
|
||||
<if test="creator != null" >
|
||||
creator=#{creator},
|
||||
</if>
|
||||
<if test="deleteType != null" >
|
||||
delete_type=#{deleteType},
|
||||
</if>
|
||||
<if test="employeeId != null" >
|
||||
employee_id=#{employeeId},
|
||||
</if>
|
||||
<if test="employeeType != null" >
|
||||
employee_type=#{employeeType},
|
||||
</if>
|
||||
<if test="fileStatus != null" >
|
||||
file_status=#{fileStatus},
|
||||
</if>
|
||||
<if test="mainId != null" >
|
||||
main_id=#{mainId},
|
||||
</if>
|
||||
<if test="otherDeduction != null" >
|
||||
other_deduction=#{otherDeduction},
|
||||
</if>
|
||||
<if test="remark != null" >
|
||||
remark=#{remark},
|
||||
</if>
|
||||
<if test="taxAgentId != null" >
|
||||
tax_agent_id=#{taxAgentId},
|
||||
</if>
|
||||
<if test="taxYearMonth != null" >
|
||||
tax_year_month=#{taxYearMonth},
|
||||
</if>
|
||||
<if test="tenantKey != null" >
|
||||
tenant_key=#{tenantKey},
|
||||
</if>
|
||||
<if test="updateTime != null" >
|
||||
update_time=#{updateTime},
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
|
||||
<!-- 更新,更新全部字段 -->
|
||||
<update id="update" parameterType="com.engine.salary.entity.datacollection.po.OtherDerateDeductionPO">
|
||||
UPDATE hrsa_other_derate_deduction
|
||||
<set>
|
||||
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},
|
||||
</set>
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</update>
|
||||
|
||||
|
||||
<!-- 根据主键删除记录 -->
|
||||
<delete id="delete">
|
||||
UPDATE hrsa_other_derate_deduction
|
||||
SET delete_type=1
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</delete>
|
||||
|
||||
|
||||
<!-- 更新不为NULL的字段 -->
|
||||
<update id="updateIgnoreNull" parameterType="com.engine.salary.entity.datacollection.po.OtherDerateDeductionPO">
|
||||
UPDATE hrsa_other_derate_deduction
|
||||
<set>
|
||||
<if test="createTime != null">
|
||||
create_time=#{createTime},
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
creator=#{creator},
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
delete_type=#{deleteType},
|
||||
</if>
|
||||
<if test="employeeId != null">
|
||||
employee_id=#{employeeId},
|
||||
</if>
|
||||
<if test="employeeType != null">
|
||||
employee_type=#{employeeType},
|
||||
</if>
|
||||
<if test="fileStatus != null">
|
||||
file_status=#{fileStatus},
|
||||
</if>
|
||||
<if test="mainId != null">
|
||||
main_id=#{mainId},
|
||||
</if>
|
||||
<if test="otherDeduction != null">
|
||||
other_deduction=#{otherDeduction},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark=#{remark},
|
||||
</if>
|
||||
<if test="taxAgentId != null">
|
||||
tax_agent_id=#{taxAgentId},
|
||||
</if>
|
||||
<if test="taxYearMonth != null">
|
||||
tax_year_month=#{taxYearMonth},
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
tenant_key=#{tenantKey},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time=#{updateTime},
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</update>
|
||||
|
||||
|
||||
<!-- 根据主键删除记录 -->
|
||||
<delete id="delete">
|
||||
UPDATE hrsa_other_derate_deduction
|
||||
SET delete_type=1
|
||||
WHERE id = #{id}
|
||||
AND delete_type = 0
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByIds">
|
||||
UPDATE hrsa_other_derate_deduction
|
||||
SET delete_type = 1
|
||||
WHERE delete_type = 0
|
||||
WHERE delete_type = 0
|
||||
AND id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
|
|
@ -413,5 +297,4 @@
|
|||
</delete>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -257,7 +257,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
List<Long> employeeSameIds = new ArrayList<>();
|
||||
|
||||
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
|
||||
List<DataCollectionEmployee> emps = getSalaryEmployeeService(user).matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, idNo,null);
|
||||
List<DataCollectionEmployee> 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<List<Object>> getExcelRowList(OtherDeductionQueryParam param, boolean hasData) {
|
||||
long employeeId = user.getUID();
|
||||
//excel标题
|
||||
List<Object> title = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "入职日期", "商业健康保险", "税延养老保险", "其他", "准予扣除的捐赠额", "个人养老金");
|
||||
List<Object> title = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "入职日期", "免税收入", "减免税额", "商业健康保险", "税延养老保险", "其他", "准予扣除的捐赠额", "个人养老金");
|
||||
List<List<Object>> 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<List<Object>> getExcelRowDetailList(OtherDeductionQueryParam param) {
|
||||
//excel标题
|
||||
List<Object> title = Arrays.asList("姓名", "申报月份", "个税扣缴义务人", "部门", "手机号", "工号", "商业健康保险", "税延养老保险", "其他", "准予扣除的捐赠额", "个人养老金");
|
||||
List<Object> 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<OtherDeductionPO> 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);
|
||||
|
|
|
|||
|
|
@ -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()));
|
||||
|
|
|
|||
Loading…
Reference in New Issue