liusheng
2024-01-30 7ae67ba965ea680407ae21fedbd035d43ce8c313
smartor/src/main/resources/mapper/smartor/PatHetaskRelevanceMapper.xml
@@ -6,7 +6,7 @@
    <resultMap type="com.smartor.domain.PatHetaskRelevance" id="PatHetaskRelevanceResult">
        <result property="id" column="id"/>
        <result property="patId" column="pat_id"/>
        <result property="patid" column="pat_id"/>
        <result property="heTaskId" column="he_task_id"/>
        <result property="delFlag" column="del_flag"/>
        <result property="createTime" column="create_time"/>
@@ -15,11 +15,15 @@
        <result property="name" column="name"/>
        <result property="age" column="age"/>
        <result property="sex" column="sex"/>
        <result property="badNo" column="bad_no"/>
        <result property="bedno" column="bed_no"/>
        <result property="dept" column="dept"/>
        <result property="icdName" column="icd_name"/>
        <result property="phone" column="phone"/>
        <result property="medicalRecordNo" column="medical_record_no"/>
        <result property="sendStatus" column="send_status"/>
        <result property="sendTime" column="send_time"/>
        <result property="operatePerson" column="operate_person"/>
        <result property="receiveTime" column="receive_time"/>
    </resultMap>
    <sql id="selectPatHetaskRelevanceVo">
@@ -33,11 +37,15 @@
               name,
               age,
               sex,
               bad_no,
               bed_no,
               dept,
               icd_name,
               phone,
               medical_record_no
               medical_record_no,
               send_status,
               send_time,
               operate_person,
               receive_time
        from pat_hetask_relevance
    </sql>
@@ -46,17 +54,21 @@
        <include refid="selectPatHetaskRelevanceVo"/>
        <where>
            del_flag=0
            <if test="patId != null ">and pat_id = #{patId}</if>
            <if test="patid != null ">and pat_id = #{patid}</if>
            <if test="heTaskId != null ">and he_task_id = #{heTaskId}</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="badNo != null ">and bad_no = #{badNo}</if>
            <if test="bedno != null ">and bed_no = #{bedno}</if>
            <if test="dept != null  and dept != ''">and dept = #{dept}</if>
            <if test="phone != null  and phone != ''">and phone = #{phone}</if>
            <if test="medicalRecordNo != null  and medicalRecordNo != ''">and medical_record_no = #{medicalRecordNo}
            </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="receiveTime != null ">and receive_time = #{receiveTime}</if>
            <if test="operatePerson != null   and operatePerson != ''">and operate_person = #{operatePerson}</if>
        </where>
    </select>
@@ -68,7 +80,7 @@
    <insert id="insertPatHetaskRelevance" parameterType="com.smartor.domain.PatHetaskRelevance">
        insert into pat_hetask_relevance
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="patId != null">pat_id,</if>
            <if test="patid != null">pat_id,</if>
            <if test="heTaskId != null">he_task_id,</if>
            <if test="delFlag != null">del_flag,</if>
            <if test="createTime != null">create_time,</if>
@@ -77,14 +89,18 @@
            <if test="name != null">name,</if>
            <if test="age != null">age,</if>
            <if test="sex != null">sex,</if>
            <if test="badNo != null">bad_no,</if>
            <if test="bedno != null">bed_no,</if>
            <if test="dept != null">dept,</if>
            <if test="icdName != null">icd_name,</if>
            <if test="phone != null">phone,</if>
            <if test="medicalRecordNo != null">medical_record_no,</if>
            <if test="sendStatus != null">send_status,</if>
            <if test="sendTime != null">send_time,</if>
            <if test="receiveTime != null">receive_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="patid != null">#{patid},</if>
            <if test="heTaskId != null">#{heTaskId},</if>
            <if test="delFlag != null">#{delFlag},</if>
            <if test="createTime != null">#{createTime},</if>
@@ -93,18 +109,22 @@
            <if test="name != null">#{name},</if>
            <if test="age != null">#{age},</if>
            <if test="sex != null">#{sex},</if>
            <if test="badNo != null">#{badNo},</if>
            <if test="bedno != null">#{bedno},</if>
            <if test="dept != null">#{dept},</if>
            <if test="icdName != null">#{icdName},</if>
            <if test="phone != null">#{phone},</if>
            <if test="medicalRecordNo != null">#{medicalRecordNo},</if>
            <if test="sendStatus != null">#{sendStatus},</if>
            <if test="sendTime != null">#{sendTime},</if>
            <if test="receiveTime != null">#{receiveTime},</if>
            <if test="operatePerson != null and operatePerson != ''">#{operatePerson},</if>
        </trim>
    </insert>
    <update id="updatePatHetaskRelevance" parameterType="com.smartor.domain.PatHetaskRelevance">
        update pat_hetask_relevance
        <trim prefix="SET" suffixOverrides=",">
            <if test="patId != null">pat_id = #{patId},</if>
            <if test="patid != null">pat_id = #{patid},</if>
            <if test="heTaskId != null">he_task_id = #{heTaskId},</if>
            <if test="delFlag != null">del_flag = #{delFlag},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
@@ -113,11 +133,15 @@
            <if test="name != null">name = #{name},</if>
            <if test="age != null">age = #{age},</if>
            <if test="sex != null">sex = #{sex},</if>
            <if test="badNo != null">bad_no = #{badNo},</if>
            <if test="bedno != null">bed_no = #{bedno},</if>
            <if test="dept != null">dept = #{dept},</if>
            <if test="icdName != null">icd_name = #{icdName},</if>
            <if test="phone != null">phone = #{phone},</if>
            <if test="medicalRecordNo != null">medical_record_no = #{medicalRecordNo},</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="operatePerson != null and operatePerson != ''">operate_person=#{operatePerson},</if>
        </trim>
        where id = #{id}
    </update>