| | |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.smartor.mapper.PatHetaskRelevanceMapper"> |
| | | <mapper namespace="com.smartor.mapper.PatTaskRelevanceMapper"> |
| | | |
| | | <resultMap type="com.smartor.domain.PatHetaskRelevance" id="PatHetaskRelevanceResult"> |
| | | <resultMap type="com.smartor.domain.PatTaskRelevance" id="PatTaskRelevanceResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="patid" column="pat_id"/> |
| | | <result property="heTaskId" column="he_task_id"/> |
| | | <result property="taskId" column="task_id"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateTime" column="update_time"/> |
| | |
| | | <result property="sendTime" column="send_time"/> |
| | | <result property="operatePerson" column="operate_person"/> |
| | | <result property="receiveTime" column="receive_time"/> |
| | | <result property="visitTime" column="visit_time"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectPatHetaskRelevanceVo"> |
| | | <sql id="selectPatTaskRelevanceVo"> |
| | | select id, |
| | | pat_id, |
| | | he_task_id, |
| | | task_id, |
| | | del_flag, |
| | | create_time, |
| | | update_time, |
| | |
| | | send_status, |
| | | send_time, |
| | | operate_person, |
| | | visit_time, |
| | | receive_time |
| | | from pat_hetask_relevance |
| | | from pat_task_relevance |
| | | </sql> |
| | | |
| | | <select id="selectPatHetaskRelevanceList" parameterType="com.smartor.domain.PatHetaskRelevance" |
| | | resultMap="PatHetaskRelevanceResult"> |
| | | <include refid="selectPatHetaskRelevanceVo"/> |
| | | <select id="selectPatTaskRelevanceList" parameterType="com.smartor.domain.PatTaskRelevance" |
| | | resultMap="PatTaskRelevanceResult"> |
| | | <include refid="selectPatTaskRelevanceVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | <if test="patid != null ">and pat_id = #{patid}</if> |
| | | <if test="heTaskId != null ">and he_task_id = #{heTaskId}</if> |
| | | <if test="taskId != null ">and task_id = #{taskId}</if> |
| | | <if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if> |
| | | <if test="age != null ">and age = #{age}</if> |
| | | <if test="sex != null ">and sex = #{sex}</if> |
| | |
| | | <if test="icdName != null and icdName != ''">and icd_name like concat('%', #{icdName}, '%')</if> |
| | | <if test="sendStatus != null ">and send_status = #{sendStatus}</if> |
| | | <if test="sendTime != null ">and send_time = #{sendTime}</if> |
| | | <if test="visitTime != null ">and visit_time = #{visitTime}</if> |
| | | <if test="receiveTime != null ">and receive_time = #{receiveTime}</if> |
| | | <if test="operatePerson != null and operatePerson != ''">and operate_person = #{operatePerson}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectPatHetaskRelevanceById" parameterType="Long" resultMap="PatHetaskRelevanceResult"> |
| | | <include refid="selectPatHetaskRelevanceVo"/> |
| | | <select id="selectPatTaskRelevanceById" parameterType="Long" resultMap="PatTaskRelevanceResult"> |
| | | <include refid="selectPatTaskRelevanceVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertPatHetaskRelevance" parameterType="com.smartor.domain.PatHetaskRelevance"> |
| | | insert into pat_hetask_relevance |
| | | <insert id="insertPatTaskRelevance" parameterType="com.smartor.domain.PatTaskRelevance"> |
| | | insert into pat_task_relevance |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="patid != null">pat_id,</if> |
| | | <if test="heTaskId != null">he_task_id,</if> |
| | | <if test="taskId != null">task_id,</if> |
| | | <if test="delFlag != null">del_flag,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | |
| | | <if test="sendStatus != null">send_status,</if> |
| | | <if test="sendTime != null">send_time,</if> |
| | | <if test="receiveTime != null">receive_time,</if> |
| | | <if test="visitTime != null">visit_time,</if> |
| | | <if test="operatePerson != null and operatePerson != ''">operate_person,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="patid != null">#{patid},</if> |
| | | <if test="heTaskId != null">#{heTaskId},</if> |
| | | <if test="taskId != null">#{taskId},</if> |
| | | <if test="delFlag != null">#{delFlag},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | |
| | | <if test="sendStatus != null">#{sendStatus},</if> |
| | | <if test="sendTime != null">#{sendTime},</if> |
| | | <if test="receiveTime != null">#{receiveTime},</if> |
| | | <if test="visitTime != null">#{visitTime},</if> |
| | | <if test="operatePerson != null and operatePerson != ''">#{operatePerson},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updatePatHetaskRelevance" parameterType="com.smartor.domain.PatHetaskRelevance"> |
| | | update pat_hetask_relevance |
| | | <update id="updatePatTaskRelevance" parameterType="com.smartor.domain.PatTaskRelevance"> |
| | | update pat_task_relevance |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="patid != null">pat_id = #{patid},</if> |
| | | <if test="heTaskId != null">he_task_id = #{heTaskId},</if> |
| | | <if test="taskId != null">task_id = #{taskId},</if> |
| | | <if test="delFlag != null">del_flag = #{delFlag},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | |
| | | <if test="sendStatus != null">send_status=#{sendStatus},</if> |
| | | <if test="sendTime != null">send_time=#{sendTime},</if> |
| | | <if test="receiveTime != null">receive_time=#{receiveTime},</if> |
| | | <if test="visitTime != null">visit_time=#{visitTime},</if> |
| | | <if test="operatePerson != null and operatePerson != ''">operate_person=#{operatePerson},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <update id="deletePatHetaskRelevanceById" parameterType="Long"> |
| | | update pat_hetask_relevance |
| | | <update id="deletePatTaskRelevanceById" parameterType="Long"> |
| | | update pat_task_relevance |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="delFlag != null">del_flag =1,</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deletePatHetaskRelevanceByIds" parameterType="String"> |
| | | delete from pat_hetask_relevance where id in |
| | | <delete id="deletePatTaskRelevanceByIds" parameterType="String"> |
| | | delete from pat_task_relevance where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |