<?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.chinaweal.aiccs.aicepsqy.mapper.datamove.TaskInfoMapper">

    <!-- 插入任务信息 -->
    <insert id="insertTaskInfo" parameterType="com.chinaweal.aiccs.aicepsqy.entity.datamove.TaskInfoModel" useGeneratedKeys="false">
        <![CDATA[
        insert into
            TRTaskInfo(
            TaskInfoId,EntID,EntityNo,TaskType,RegistNo,RegisterDate,
            EntName,AuditContent,AuditDate,AuditState,TaskNo,OrgID,issync,
            entityType,subEntityType
        )
        values
            (
                #{entity.taskInfoId},#{entity.entId}, #{entity.entityNo},#{entity.taskType},
                #{entity.registNo},#{entity.registerDate},#{entity.entName,jdbcType=VARCHAR},
                #{entity.auditContent,jdbcType=VARCHAR},#{entity.auditDate,jdbcType=VARCHAR},
                #{entity.auditState},#{entity.taskNo},#{entity.orgId},'wA',
                #{entity.entityType,jdbcType=VARCHAR},#{entity.subEntityType,jdbcType=VARCHAR}
            )
        ]]>
    </insert>

    <!-- 根据EntId查询任务信息列表 -->
    <select id="selectTaskInfoListByEntId" resultType="com.chinaweal.aiccs.aicepsqy.entity.datamove.TaskInfoModel">
        <![CDATA[
        select
            TaskInfoId,EntID,EntityNo,TaskType,RegistNo,RegisterDate,
            EntName,AuditContent,AuditDate,AuditState,TaskNo,OrgID,issync,
            entityType,subEntityType
        from TRTaskInfo
        where EntID = #{entId}
        ]]>
    </select>

    <!-- 根据EntId删除任务信息 -->
    <delete id="deleteTaskInfoByEntId">
        <![CDATA[
        delete from TRTaskInfo
        where EntID = #{entId}
        ]]>
    </delete>



</mapper>
