liusheng
2024-08-28 bedd0a1cef215538df64470df6b8d4a022189136
smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
@@ -54,11 +54,15 @@
        <result property="patid" column="patid"/>
        <result property="libtemplatename" column="libtemplatename"/>
        <result property="libtemplateid" column="libtemplateid"/>
        <result property="openid" column="openid"/>
        <result property="longSendTime" column="long_send_time"/>
    </resultMap>
    <sql id="selectServiceSubtaskVo">
        select id,
               hosp_type,
               long_send_time,
               openid,
               libtemplateid,
               libtemplatename,
               hospno,
@@ -110,7 +114,8 @@
        from service_subtask
    </sql>
    <select id="selectServiceSubtaskList" parameterType="com.smartor.domain.ServiceSubtask" resultMap="ServiceSubtaskResult">
    <select id="selectServiceSubtaskList" parameterType="com.smartor.domain.ServiceSubtask"
            resultMap="ServiceSubtaskResult">
        <include refid="selectServiceSubtaskVo"/>
        <where>
            del_flag=0
@@ -150,8 +155,11 @@
            <if test="operatorNo != null  and operatorNo != ''">and operator_no = #{operatorNo}</if>
            <if test="wechat != null  and wechat != ''">and wechat = #{wechat}</if>
            <if test="hospType != null  and hospType != ''">and hosp_type = #{hospType}</if>
            <if test="libtemplateid != null ">and libtemplateid = #{libtemplateid},</if>
            <if test="libtemplatename != null ">and libtemplatename = #{libtemplatename},</if>
            <if test="libtemplateid != null ">and libtemplateid = #{libtemplateid}</if>
            <if test="libtemplatename != null ">and libtemplatename = #{libtemplatename}</if>
            <if test="openid != null ">and openid = #{openid}</if>
            <if test="longSendTime != null ">and long_send_time = #{longSendTime}</if>
            <if test="sendstate != null ">and sendstate = #{sendstate}</if>
        </where>
        order by update_time desc,id desc
    </select>
@@ -213,6 +221,9 @@
            <if test="libtemplateid != null ">libtemplateid,</if>
            <if test="libtemplatename != null ">libtemplatename,</if>
            <if test="patid != null ">patid,</if>
            <if test="openid != null ">openid,</if>
            <if test="longSendTime != null ">long_send_time,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="sendname != null">#{sendname},</if>
@@ -263,6 +274,9 @@
            <if test="libtemplateid != null ">#{libtemplateid},</if>
            <if test="libtemplatename != null ">#{libtemplatename},</if>
            <if test="patid != null ">#{patid},</if>
            <if test="openid != null ">#{openid},</if>
            <if test="longSendTime != null ">#{longSendTime},</if>
        </trim>
    </insert>
@@ -317,6 +331,9 @@
            <if test="libtemplateid != null ">libtemplateid = #{libtemplateid},</if>
            <if test="libtemplatename != null ">libtemplatename = #{libtemplatename},</if>
            <if test="patid != null ">patid = #{patid},</if>
            <if test="openid != null ">openid = #{openid},</if>
            <if test="longSendTime != null ">long_send_time = #{longSendTime},</if>
            <if test="sendstate != null ">sendstate = #{sendstate},</if>
        </trim>
        where id = #{id}
    </update>
@@ -372,6 +389,8 @@
            <if test="libtemplateid != null ">libtemplateid = #{libtemplateid},</if>
            <if test="libtemplatename != null ">libtemplatename = #{libtemplatename},</if>
            <if test="patid != null ">patid = #{patid},</if>
            <if test="openid != null ">openid = #{openid},</if>
            <if test="longSendTime != null ">long_send_time = #{longSendTime},</if>
        </trim>
        where patid = #{patid} and taskid = #{taskid}
    </update>
@@ -384,7 +403,7 @@
        where id = #{id}
    </update>
    <update id="deleteServiceSubtaskByCondition" >
    <update id="deleteServiceSubtaskByCondition">
        update service_subtask
        <trim prefix="SET" suffixOverrides=",">
            del_flag =1
@@ -396,9 +415,11 @@
        select id,
               sendname,
               long_send_time,
               phone,
               sex,
               age,
               openid,
               sfzh,
               addr,
               senderdetail,