2023-08-14 20:07:29 +08:00
|
|
|
<?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.taxdeclaration.TaxDeclarationValueMapper">
|
|
|
|
|
<resultMap id="BaseResultMap" type="com.engine.salary.entity.taxdeclaration.po.TaxDeclarationValuePO">
|
|
|
|
|
<result column="id" property="id"/>
|
|
|
|
|
<result column="create_time" property="createTime"/>
|
|
|
|
|
<result column="update_time" property="updateTime"/>
|
|
|
|
|
<result column="creator" property="creator"/>
|
|
|
|
|
<result column="delete_type" property="deleteType"/>
|
|
|
|
|
<result column="tenant_key" property="tenantKey"/>
|
|
|
|
|
<result column="tax_declare_record_id" property="taxDeclareRecordId"/>
|
|
|
|
|
<result column="tax_declaration_id" property="taxDeclarationId"/>
|
|
|
|
|
<result column="employee_type" property="employeeType"/>
|
|
|
|
|
<result column="employee_id" property="employeeId"/>
|
|
|
|
|
<result column="result_value_json" property="resultValueJson"/>
|
2023-12-28 09:39:09 +08:00
|
|
|
<result column="source" property="source"/>
|
2023-08-14 20:07:29 +08:00
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<!-- 表字段 -->
|
|
|
|
|
<sql id="baseColumns">
|
|
|
|
|
t
|
|
|
|
|
.
|
|
|
|
|
id
|
|
|
|
|
, t.create_time
|
|
|
|
|
, t.update_time
|
|
|
|
|
, t.creator
|
|
|
|
|
, t.delete_type
|
|
|
|
|
, t.tenant_key
|
|
|
|
|
, t.tax_declare_record_id
|
|
|
|
|
, t.tax_declaration_id
|
|
|
|
|
, t.employee_type
|
|
|
|
|
, t.employee_id
|
|
|
|
|
, t.result_value_json
|
2023-12-28 09:39:09 +08:00
|
|
|
, t.source
|
2023-08-14 20:07:29 +08:00
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<!-- 查询全部 -->
|
|
|
|
|
<select id="listAll" resultMap="BaseResultMap">
|
|
|
|
|
SELECT
|
|
|
|
|
<include refid="baseColumns"/>
|
|
|
|
|
FROM hrsa_tax_declaration_value t
|
|
|
|
|
WHERE delete_type = 0
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<!-- 根据主键获取单条记录 -->
|
|
|
|
|
<select id="getById" resultMap="BaseResultMap" parameterType="Long">
|
|
|
|
|
SELECT
|
|
|
|
|
<include refid="baseColumns"/>
|
|
|
|
|
FROM hrsa_tax_declaration_value t
|
|
|
|
|
WHERE id = #{id} AND delete_type = 0
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<!-- 条件查询 -->
|
|
|
|
|
<select id="listSome" resultMap="BaseResultMap"
|
|
|
|
|
parameterType="com.engine.salary.entity.taxdeclaration.po.TaxDeclarationValuePO">
|
|
|
|
|
SELECT
|
|
|
|
|
<include refid="baseColumns"/>
|
|
|
|
|
FROM hrsa_tax_declaration_value t
|
|
|
|
|
WHERE delete_type = 0
|
|
|
|
|
<if test="id != null">
|
|
|
|
|
AND id = #{id}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="createTime != null">
|
|
|
|
|
AND create_time = #{createTime}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updateTime != null">
|
|
|
|
|
AND update_time = #{updateTime}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="creator != null">
|
|
|
|
|
AND creator = #{creator}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="deleteType != null">
|
|
|
|
|
AND delete_type = #{deleteType}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="tenantKey != null">
|
|
|
|
|
AND tenant_key = #{tenantKey}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="taxDeclareRecordId != null">
|
|
|
|
|
AND tax_declare_record_id = #{taxDeclareRecordId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="taxDeclarationId != null">
|
|
|
|
|
AND tax_declaration_id = #{taxDeclarationId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="employeeType != null">
|
|
|
|
|
AND employee_type = #{employeeType}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="employeeId != null">
|
|
|
|
|
AND employee_id = #{employeeId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="resultValueJson != null">
|
|
|
|
|
AND result_value_json = #{resultValueJson}
|
|
|
|
|
</if>
|
2023-12-28 09:39:09 +08:00
|
|
|
<if test="source != null">
|
|
|
|
|
AND source = #{source}
|
|
|
|
|
</if>
|
2023-08-14 20:07:29 +08:00
|
|
|
<if test="ids != null and ids.size()>0">
|
|
|
|
|
AND id IN
|
|
|
|
|
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
|
|
|
|
#{id}
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
2023-08-21 19:35:14 +08:00
|
|
|
<if test="taxDeclarationIds != null and taxDeclarationIds.size()>0">
|
|
|
|
|
AND tax_declaration_id IN
|
|
|
|
|
<foreach collection="taxDeclarationIds" open="(" item="taxDeclarationId" separator="," close=")">
|
|
|
|
|
#{taxDeclarationId}
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
2023-08-14 20:07:29 +08:00
|
|
|
ORDER BY id DESC
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 插入不为NULL的字段 -->
|
|
|
|
|
<insert id="insertIgnoreNull" parameterType="com.engine.salary.entity.taxdeclaration.po.TaxDeclarationValuePO">
|
|
|
|
|
INSERT INTO hrsa_tax_declaration_value
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
|
|
|
|
|
<if test="id != null">
|
|
|
|
|
id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="createTime != null">
|
|
|
|
|
create_time,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updateTime != null">
|
|
|
|
|
update_time,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="creator != null">
|
|
|
|
|
creator,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="deleteType != null">
|
|
|
|
|
delete_type,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="tenantKey != null">
|
|
|
|
|
tenant_key,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="taxDeclareRecordId != null">
|
|
|
|
|
tax_declare_record_id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="taxDeclarationId != null">
|
|
|
|
|
tax_declaration_id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="employeeType != null">
|
|
|
|
|
employee_type,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="employeeId != null">
|
|
|
|
|
employee_id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="resultValueJson != null">
|
|
|
|
|
result_value_json,
|
|
|
|
|
</if>
|
2023-12-28 09:39:09 +08:00
|
|
|
<if test="source != null">
|
|
|
|
|
source,
|
|
|
|
|
</if>
|
2023-08-14 20:07:29 +08:00
|
|
|
</trim>
|
|
|
|
|
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="id != null">
|
|
|
|
|
#{id},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="createTime != null">
|
|
|
|
|
#{createTime},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updateTime != null">
|
|
|
|
|
#{updateTime},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="creator != null">
|
|
|
|
|
#{creator},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="deleteType != null">
|
|
|
|
|
#{deleteType},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="tenantKey != null">
|
|
|
|
|
#{tenantKey},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="taxDeclareRecordId != null">
|
|
|
|
|
#{taxDeclareRecordId},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="taxDeclarationId != null">
|
|
|
|
|
#{taxDeclarationId},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="employeeType != null">
|
|
|
|
|
#{employeeType},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="employeeId != null">
|
|
|
|
|
#{employeeId},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="resultValueJson != null">
|
|
|
|
|
#{resultValueJson},
|
|
|
|
|
</if>
|
2023-12-28 09:39:09 +08:00
|
|
|
<if test="source != null">
|
|
|
|
|
#{source},
|
|
|
|
|
</if>
|
2023-08-14 20:07:29 +08:00
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="batchInsert">
|
|
|
|
|
|
|
|
|
|
INSERT INTO hrsa_tax_declaration_value
|
|
|
|
|
(
|
|
|
|
|
id,
|
|
|
|
|
create_time,
|
|
|
|
|
update_time,
|
|
|
|
|
creator,
|
|
|
|
|
delete_type,
|
|
|
|
|
tenant_key,
|
|
|
|
|
tax_declare_record_id,
|
|
|
|
|
tax_declaration_id,
|
|
|
|
|
employee_type,
|
|
|
|
|
employee_id,
|
2023-12-28 09:39:09 +08:00
|
|
|
result_value_json,
|
|
|
|
|
source
|
2023-08-14 20:07:29 +08:00
|
|
|
)
|
|
|
|
|
VALUES
|
|
|
|
|
(
|
|
|
|
|
<foreach collection="collection" item="item" separator=",">
|
|
|
|
|
#{item.id},
|
|
|
|
|
#{item.createTime},
|
|
|
|
|
#{item.updateTime},
|
|
|
|
|
#{item.creator},
|
|
|
|
|
#{item.deleteType},
|
|
|
|
|
#{item.tenantKey},
|
|
|
|
|
#{item.taxDeclareRecordId},
|
|
|
|
|
#{item.taxDeclarationId},
|
|
|
|
|
#{item.employeeType},
|
|
|
|
|
#{item.employeeId},
|
2023-12-28 09:39:09 +08:00
|
|
|
#{item.resultValueJson},
|
|
|
|
|
#{item.source}
|
2023-08-14 20:07:29 +08:00
|
|
|
</foreach>
|
|
|
|
|
)
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="batchInsert" databaseId="oracle">
|
|
|
|
|
INSERT INTO hrsa_tax_declaration_value (
|
|
|
|
|
id,
|
|
|
|
|
create_time,
|
|
|
|
|
update_time,
|
|
|
|
|
creator,
|
|
|
|
|
delete_type,
|
|
|
|
|
tenant_key,
|
|
|
|
|
tax_declare_record_id,
|
|
|
|
|
tax_declaration_id,
|
|
|
|
|
employee_type,
|
|
|
|
|
employee_id,
|
2023-12-28 09:39:09 +08:00
|
|
|
result_value_json,
|
|
|
|
|
source
|
2023-08-14 20:07:29 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
<foreach collection="collection" item="item" separator="union all">
|
|
|
|
|
select
|
2023-08-15 20:48:09 +08:00
|
|
|
#{item.id,jdbcType=DOUBLE},
|
|
|
|
|
#{item.createTime,jdbcType=DATE},
|
|
|
|
|
#{item.updateTime,jdbcType=DATE},
|
|
|
|
|
#{item.creator,jdbcType=DOUBLE},
|
|
|
|
|
#{item.deleteType,jdbcType=INTEGER},
|
|
|
|
|
#{item.tenantKey,jdbcType=VARCHAR},
|
|
|
|
|
#{item.taxDeclareRecordId,jdbcType=DOUBLE},
|
|
|
|
|
#{item.taxDeclarationId,jdbcType=DOUBLE},
|
|
|
|
|
#{item.employeeType,jdbcType=INTEGER},
|
|
|
|
|
#{item.employeeId,jdbcType=DOUBLE},
|
2023-12-28 09:39:09 +08:00
|
|
|
#{item.resultValueJson,jdbcType=VARCHAR},
|
|
|
|
|
#{item.source,jdbcType=INTEGER}
|
2023-08-14 20:07:29 +08:00
|
|
|
from dual
|
|
|
|
|
</foreach>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="batchInsert" databaseId="sqlserver">
|
|
|
|
|
<foreach collection="collection" item="item" separator=";">
|
|
|
|
|
INSERT INTO hrsa_tax_declaration_value (
|
|
|
|
|
id,
|
|
|
|
|
create_time,
|
|
|
|
|
update_time,
|
|
|
|
|
creator,
|
|
|
|
|
delete_type,
|
|
|
|
|
tenant_key,
|
|
|
|
|
tax_declare_record_id,
|
|
|
|
|
tax_declaration_id,
|
|
|
|
|
employee_type,
|
|
|
|
|
employee_id,
|
2023-12-28 09:39:09 +08:00
|
|
|
result_value_json,
|
|
|
|
|
source
|
2023-08-14 20:07:29 +08:00
|
|
|
)
|
|
|
|
|
VALUES
|
|
|
|
|
(
|
|
|
|
|
#{item.id},
|
|
|
|
|
#{item.createTime},
|
|
|
|
|
#{item.updateTime},
|
|
|
|
|
#{item.creator},
|
|
|
|
|
#{item.deleteType},
|
|
|
|
|
#{item.tenantKey},
|
|
|
|
|
#{item.taxDeclareRecordId},
|
|
|
|
|
#{item.taxDeclarationId},
|
|
|
|
|
#{item.employeeType},
|
|
|
|
|
#{item.employeeId},
|
2023-12-28 09:39:09 +08:00
|
|
|
#{item.resultValueJson},
|
|
|
|
|
#{item.source}
|
2023-08-14 20:07:29 +08:00
|
|
|
)
|
|
|
|
|
</foreach>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
<!-- 更新,更新全部字段 -->
|
|
|
|
|
<update id="update" parameterType="com.engine.salary.entity.taxdeclaration.po.TaxDeclarationValuePO">
|
|
|
|
|
UPDATE hrsa_tax_declaration_value
|
|
|
|
|
<set>
|
|
|
|
|
create_time=#{createTime},
|
|
|
|
|
update_time=#{updateTime},
|
|
|
|
|
creator=#{creator},
|
|
|
|
|
delete_type=#{deleteType},
|
|
|
|
|
tenant_key=#{tenantKey},
|
|
|
|
|
tax_declare_record_id=#{taxDeclareRecordId},
|
|
|
|
|
tax_declaration_id=#{taxDeclarationId},
|
|
|
|
|
employee_type=#{employeeType},
|
|
|
|
|
employee_id=#{employeeId},
|
|
|
|
|
result_value_json=#{resultValueJson},
|
2023-12-28 09:39:09 +08:00
|
|
|
source=#{source},
|
2023-08-14 20:07:29 +08:00
|
|
|
</set>
|
|
|
|
|
WHERE id = #{id} AND delete_type = 0
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 更新不为NULL的字段 -->
|
|
|
|
|
<update id="updateIgnoreNull" parameterType="com.engine.salary.entity.taxdeclaration.po.TaxDeclarationValuePO">
|
|
|
|
|
UPDATE hrsa_tax_declaration_value
|
|
|
|
|
<set>
|
|
|
|
|
<if test="createTime != null">
|
|
|
|
|
create_time=#{createTime},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updateTime != null">
|
|
|
|
|
update_time=#{updateTime},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="creator != null">
|
|
|
|
|
creator=#{creator},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="deleteType != null">
|
|
|
|
|
delete_type=#{deleteType},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="tenantKey != null">
|
|
|
|
|
tenant_key=#{tenantKey},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="taxDeclareRecordId != null">
|
|
|
|
|
tax_declare_record_id=#{taxDeclareRecordId},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="taxDeclarationId != null">
|
|
|
|
|
tax_declaration_id=#{taxDeclarationId},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="employeeType != null">
|
|
|
|
|
employee_type=#{employeeType},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="employeeId != null">
|
|
|
|
|
employee_id=#{employeeId},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="resultValueJson != null">
|
|
|
|
|
result_value_json=#{resultValueJson},
|
|
|
|
|
</if>
|
2023-12-28 09:39:09 +08:00
|
|
|
<if test="source != null">
|
|
|
|
|
source=#{source},
|
|
|
|
|
</if>
|
2023-08-14 20:07:29 +08:00
|
|
|
</set>
|
|
|
|
|
WHERE id = #{id} AND delete_type = 0
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 根据主键删除记录 -->
|
|
|
|
|
<delete id="delete">
|
|
|
|
|
UPDATE hrsa_tax_declaration_value
|
|
|
|
|
SET delete_type=1
|
|
|
|
|
WHERE id = #{id}
|
|
|
|
|
AND delete_type = 0
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteByIds">
|
|
|
|
|
UPDATE hrsa_tax_declaration_value
|
|
|
|
|
SET delete_type = 1
|
|
|
|
|
WHERE delete_type = 0
|
|
|
|
|
AND id IN
|
|
|
|
|
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
|
|
|
|
#{id}
|
|
|
|
|
</foreach>
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteBytaxDeclareRecordIds">
|
|
|
|
|
UPDATE hrsa_tax_declaration_value
|
|
|
|
|
SET delete_type = 1
|
|
|
|
|
WHERE delete_type = 0
|
|
|
|
|
AND tax_declare_record_id IN
|
|
|
|
|
<foreach collection="taxDeclareRecordIds" open="(" item="taxDeclareRecordId" separator="," close=")">
|
|
|
|
|
#{taxDeclareRecordId}
|
|
|
|
|
</foreach>
|
|
|
|
|
</delete>
|
|
|
|
|
|
2023-08-20 14:03:43 +08:00
|
|
|
<resultMap id="TaxDeclareEmployeeMap" type="com.engine.salary.entity.taxdeclaration.po.TaxDeclareEmployeePO">
|
|
|
|
|
<result column="employee_id" property="employeeId"/>
|
|
|
|
|
<result column="employee_type" property="employeeType"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="TaxDeclareEmployeeSql">
|
2023-08-21 19:35:14 +08:00
|
|
|
employee_id
|
|
|
|
|
, employee_type
|
2023-08-20 14:03:43 +08:00
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<sql id="NotDeclareSql">
|
|
|
|
|
SELECT DISTINCT
|
|
|
|
|
<include refid="TaxDeclareEmployeeSql"/>
|
|
|
|
|
FROM hrsa_tax_declaration_value
|
|
|
|
|
WHERE delete_type = 0
|
|
|
|
|
AND tax_declare_record_id = #{param.taxDeclareRecordId}
|
|
|
|
|
AND employee_id NOT IN (
|
|
|
|
|
SELECT employee_id
|
|
|
|
|
FROM hrsa_employee_declare hed
|
|
|
|
|
WHERE hed.delete_type = 0
|
|
|
|
|
AND hed.tax_agent_id = #{param.taxAgentId}
|
|
|
|
|
AND hed.tax_cycle = #{param.taxCycle}
|
|
|
|
|
AND hed.successfully_declared = 1
|
2026-02-02 15:17:38 +08:00
|
|
|
AND (hed.dismiss_date is null OR hed.dismiss_date <![CDATA[ >= ]]> #{param.taxCycle} OR hed.reissue_tax_cycle = #{param.taxCycle})
|
2023-08-20 14:03:43 +08:00
|
|
|
AND hed.declare_status IN (4)
|
|
|
|
|
)
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="listPage4NotDeclareByParam" resultMap="TaxDeclareEmployeeMap">
|
|
|
|
|
<include refid="NotDeclareSql"/>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="list4NotDeclareByParam" resultMap="TaxDeclareEmployeeMap">
|
|
|
|
|
<include refid="NotDeclareSql"/>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<sql id="NoValueSql">
|
|
|
|
|
SELECT
|
|
|
|
|
<include refid="TaxDeclareEmployeeSql"/>
|
|
|
|
|
FROM hrsa_employee_declare
|
2023-08-21 19:35:14 +08:00
|
|
|
WHERE delete_type = 0
|
2023-08-20 14:03:43 +08:00
|
|
|
AND tax_agent_id = #{param.taxAgentId}
|
|
|
|
|
AND tax_cycle = #{param.taxCycle}
|
|
|
|
|
AND successfully_declared = 1
|
2026-02-02 15:17:38 +08:00
|
|
|
AND (dismiss_date is null OR dismiss_date <![CDATA[ >= ]]> #{param.taxCycle} OR reissue_tax_cycle = #{param.taxCycle})
|
2023-08-20 14:03:43 +08:00
|
|
|
AND employee_id NOT IN (
|
|
|
|
|
SELECT employee_id
|
|
|
|
|
FROM hrsa_tax_declaration_value htdv
|
|
|
|
|
WHERE htdv.delete_type = 0
|
|
|
|
|
AND htdv.tax_declare_record_id = #{param.taxDeclareRecordId}
|
|
|
|
|
)
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="listPage4NoValueByParam" resultMap="TaxDeclareEmployeeMap">
|
|
|
|
|
<include refid="NoValueSql"/>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="list4NoValueByParam" resultMap="TaxDeclareEmployeeMap">
|
|
|
|
|
<include refid="NoValueSql"/>
|
|
|
|
|
</select>
|
2023-08-14 20:07:29 +08:00
|
|
|
|
2023-12-27 17:33:53 +08:00
|
|
|
<select id="queryNotWagesEmpIds" resultType="Long">
|
|
|
|
|
select b.employee_id
|
|
|
|
|
from hrsa_tax_declaration a
|
|
|
|
|
left join hrsa_tax_declaration_value b on a.id = b.tax_declaration_id
|
|
|
|
|
where a.delete_type = 0
|
|
|
|
|
and b.delete_type = 0
|
2023-12-28 09:39:09 +08:00
|
|
|
and a.income_category = 2
|
2023-12-27 17:33:53 +08:00
|
|
|
and a.tax_declare_record_id = #{taxDeclareRecordId}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="queryWagesEmpIds" resultType="Long">
|
|
|
|
|
select b.employee_id
|
|
|
|
|
from hrsa_tax_declaration a
|
|
|
|
|
left join hrsa_tax_declaration_value b on a.id = b.tax_declaration_id
|
|
|
|
|
where a.delete_type = 0
|
|
|
|
|
and b.delete_type = 0
|
|
|
|
|
and a.income_category = 1
|
|
|
|
|
and a.tax_declare_record_id = #{taxDeclareRecordId}
|
|
|
|
|
</select>
|
|
|
|
|
|
2023-08-14 20:07:29 +08:00
|
|
|
</mapper>
|