liusheng
2024-09-18 907641e56c2085aaa81f267946dc3e3e9fca73e7
smartor/src/main/resources/mapper/smartor/SvyTaskSingleMapper.xml
@@ -69,11 +69,13 @@
        <result property="admindate" column="admindate"/>
        <result property="roomno" column="roomno"/>
        <result property="bedno" column="bedno"/>
        <result property="patid" column="patid"/>
    </resultMap>
    <sql id="selectSvyTaskSingleVo">
        select id,
               sendname,
               patid,
               phone,
               sex,
               age,
@@ -190,7 +192,7 @@
            <if test="medicalRecordNo != null  and medicalRecordNo != ''">and medical_record_no = #{medicalRecordNo}
            </if>
            <if test="preachcontent != null  and preachcontent != ''">and preachcontent = #{preachcontent}</if>
            <if test="sendType != null  and sendType != ''">and send_type = #{sendType}</if>
            <if test="sendType != null ">and send_type = #{sendType}</if>
            <if test="sendTimeSlot != null  and sendTimeSlot != ''">and send_time_slot = #{sendTimeSlot}</if>
            <if test="taskName != null  and taskName != ''">and task_name like concat('%', #{taskName}, '%')</if>
            <if test="taskDesc != null  and taskDesc != ''">and task_desc = #{taskDesc}</if>
@@ -204,6 +206,7 @@
            <if test="admindate != null ">and admindate = #{admindate}</if>
            <if test="roomno != null  and roomno != ''">and roomno = #{roomno}</if>
            <if test="bedno != null  and bedno != ''">and bedno = #{bedno}</if>
            <if test="patid != null ">and patid = #{patid}</if>
        </where>
    </select>
@@ -279,6 +282,7 @@
            <if test="admindate != null">admindate,</if>
            <if test="roomno != null">roomno,</if>
            <if test="bedno != null">bedno,</if>
            <if test="patid != null">patid,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="sendname != null">#{sendname},</if>
@@ -344,6 +348,7 @@
            <if test="admindate != null">#{admindate},</if>
            <if test="roomno != null">#{roomno},</if>
            <if test="bedno != null">#{bedno},</if>
            <if test="patid != null">#{patid},</if>
        </trim>
    </insert>
@@ -413,8 +418,9 @@
            <if test="admindate != null">admindate = #{admindate},</if>
            <if test="roomno != null">roomno = #{roomno},</if>
            <if test="bedno != null">bedno = #{bedno},</if>
            <if test="patid != null">patid = #{patid},</if>
        </trim>
        where id = #{id}
        where  patid = #{patid} and taskid = #{taskid}
    </update>
    <delete id="deleteSvyTaskSingleById" parameterType="Long">
@@ -429,4 +435,12 @@
            #{id}
        </foreach>
    </delete>
    <update id="deleteSvyTaskcallByCondition" >
        update svy_task_single
        <trim prefix="SET" suffixOverrides=",">
            del_flag =1
        </trim>
        where patid = #{patid} and taskid = #{taskid}
    </update>
</mapper>