liusheng
2024-09-18 907641e56c2085aaa81f267946dc3e3e9fca73e7
smartor/src/main/resources/mapper/smartor/ServiceTaskMapper.xml
@@ -20,6 +20,7 @@
        <result property="type" column="type"/>
        <result property="typename" column="typename"/>
        <result property="deptcode" column="deptcode"/>
        <result property="deptname" column="deptname"/>
        <result property="delFlag" column="del_flag"/>
        <result property="updateBy" column="update_by"/>
        <result property="updateTime" column="update_time"/>
@@ -44,11 +45,18 @@
        <result property="showTimeNoon" column="show_time_noon"/>
        <result property="showTimeNight" column="show_time_night"/>
        <result property="textParam" column="text_param"/>
        <result property="serviceType" column="service_type"/>
        <result property="longTask" column="long_task"/>
        <result property="kcb" column="kcb"/>
        <result property="jsy" column="jsy"/>
        <result property="leavehospitaldistrictcode" column="leavehospitaldistrictcode"/>
        <result property="leavehospitaldistrictname" column="leavehospitaldistrictname"/>
    </resultMap>
    <sql id="selectServiceTaskVo">
        select taskid,
               task_name,
               long_task,
               show_date,
               show_time_morn,
               show_time_noon,
@@ -72,6 +80,7 @@
               hosp_type,
               typename,
               deptcode,
               deptname,
               del_flag,
               update_by,
               update_time,
@@ -85,6 +94,11 @@
               send_type,
               send_state,
               send_time_slot,
               service_type,
               kcb,
               jsy,
               leavehospitaldistrictcode,
               leavehospitaldistrictname,
               orgid
        from service_task
    </sql>
@@ -92,11 +106,14 @@
    <select id="selectServiceTaskList" parameterType="com.smartor.domain.ServiceTask" resultMap="ServiceTaskResult">
        <include refid="selectServiceTaskVo"/>
        <where>
            del_flag=0
            <if test="taskName != null  and taskName != ''">and task_name like concat('%', #{taskName}, '%')</if>
            <if test="sendTimeSlot != null  and sendTimeSlot != ''">and send_time_slot like concat('%', #{sendTimeSlot},
                '%')
            </if>
            <if test="templateid != null  and templateid != ''">and templateid = #{templateid}</if>
            <if test="longTask != null  and longTask != ''">and long_task = #{longTask}</if>
            <if test="serviceType != null  and serviceType != ''">and service_type = #{serviceType}</if>
            <if test="templatename != null  and templatename != ''">and templatename like concat('%', #{templatename},
                '%')
            </if>
@@ -112,12 +129,13 @@
            <if test="checktime != null ">and checktime = #{checktime}</if>
            <if test="type != null  and type != ''">and type = #{type}</if>
            <if test="typename != null  and typename != ''">and typename like concat('%', #{typename}, '%')</if>
            <if test="bgeinTime != null ">and date_format(update_time,'%y%m%d') &gt;= date_format(#{endTime},'%y%m%d')
            <if test="beginTime != null ">and date_format(update_time,'%y%m%d') &gt;= date_format(#{beginTime},'%y%m%d')
            </if>
            <if test="endTime != null ">and date_format(update_time,'%y%m%d') &lt;= date_format(#{endTime},'%y%m%d')
            </if>
            <if test="deptcode != null  and deptcode != ''">and deptcode = #{deptcode}</if>
            <if test="deptname != null  and deptname != ''">and deptname = #{deptname}</if>
            <if test="isupload != null ">and isupload = #{isupload}</if>
            <if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
            <if test="orgid != null  and orgid != ''">and orgid = #{orgid}</if>
@@ -126,6 +144,8 @@
            <if test="libtemplatename != null  and libtemplatename != ''">and libtemplatename = #{libtemplatename}</if>
            <if test="createBy != null  and createBy != ''">and create_by = #{createBy}</if>
            <if test="sendState != null  ">and send_state = #{sendState}</if>
            <if test="leavehospitaldistrictname != null  ">and leavehospitaldistrictname = #{leavehospitaldistrictname}</if>
            <if test="leavehospitaldistrictcode != null  ">and leavehospitaldistrictcode = #{leavehospitaldistrictcode}</if>
        </where>
        order by update_time desc,taskid desc
    </select>
@@ -153,6 +173,7 @@
            <if test="type != null">type,</if>
            <if test="typename != null">typename,</if>
            <if test="deptcode != null">deptcode,</if>
            <if test="deptname != null">deptname,</if>
            <if test="delFlag != null and delFlag != ''">del_flag,</if>
            <if test="updateBy != null">update_by,</if>
            <if test="updateTime != null">update_time,</if>
@@ -167,7 +188,6 @@
            <if test="sendType != null">send_type,</if>
            <if test="sendState != null">send_state,</if>
            <if test="hospType != null  and hospType != ''">hosp_type,</if>
            <if test="taskDesc != null  and taskDesc != ''">task_desc,</if>
            <if test="libtemplateid != null ">libtemplateid,</if>
            <if test="libtemplatename != null  and libtemplatename != ''">libtemplatename,</if>
@@ -178,6 +198,12 @@
            <if test="showTimeNoon != null and showTimeNoon != ''">show_time_noon,</if>
            <if test="showTimeMorn != null and showTimeMorn != ''">show_time_morn,</if>
            <if test="textParam != null and textParam != ''">text_param,</if>
            <if test="serviceType != null  and serviceType != ''">service_type,</if>
            <if test="longTask != null  and longTask != ''">long_task,</if>
            <if test="kcb != null  and kcb != ''">kcb,</if>
            <if test="jsy != null  and jsy != ''">jsy,</if>
            <if test="leavehospitaldistrictname != null  ">leavehospitaldistrictname,</if>
            <if test="leavehospitaldistrictcode != null  ">leavehospitaldistrictcode,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="taskName != null">#{taskName},</if>
@@ -194,6 +220,7 @@
            <if test="type != null">#{type},</if>
            <if test="typename != null">#{typename},</if>
            <if test="deptcode != null">#{deptcode},</if>
            <if test="deptname != null">#{deptname},</if>
            <if test="delFlag != null and delFlag != ''">#{delFlag},</if>
            <if test="updateBy != null">#{updateBy},</if>
            <if test="updateTime != null">#{updateTime},</if>
@@ -218,6 +245,12 @@
            <if test="showTimeNoon != null and showTimeNoon != ''">#{showTimeNoon},</if>
            <if test="showTimeMorn != null and showTimeMorn != ''">#{showTimeMorn},</if>
            <if test="textParam != null and textParam != ''">#{textParam},</if>
            <if test="serviceType != null  and serviceType != ''">#{serviceType},</if>
            <if test="longTask != null  and longTask != ''">#{longTask},</if>
            <if test="kcb != null  and kcb != ''">#{kcb},</if>
            <if test="jsy != null  and jsy != ''">#{jsy},</if>
            <if test="leavehospitaldistrictname != null  ">#{leavehospitaldistrictname},</if>
            <if test="leavehospitaldistrictcode != null  ">#{leavehospitaldistrictcode},</if>
        </trim>
    </insert>
@@ -238,6 +271,7 @@
            <if test="type != null">type = #{type},</if>
            <if test="typename != null">typename = #{typename},</if>
            <if test="deptcode != null">deptcode = #{deptcode},</if>
            <if test="deptname != null">deptname = #{deptname},</if>
            <if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
            <if test="updateBy != null">update_by = #{updateBy},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
@@ -262,6 +296,12 @@
            <if test="showTimeNoon != null and showTimeNoon != ''">show_time_noon=#{showTimeNoon},</if>
            <if test="showTimeMorn != null and showTimeMorn != ''">show_time_morn=#{showTimeMorn},</if>
            <if test="textParam != null and textParam != ''">text_param=#{textParam},</if>
            <if test="serviceType != null  and serviceType != ''">service_type = #{serviceType},</if>
            <if test="longTask != null  and longTask != ''">long_task = #{longTask},</if>
            <if test="kcb != null  and kcb != ''">kcb = #{kcb},</if>
            <if test="jsy != null  and jsy != ''">kcb = #{jsy},</if>
            <if test="leavehospitaldistrictname != null  ">leavehospitaldistrictname = #{leavehospitaldistrictname},</if>
            <if test="leavehospitaldistrictcode != null  ">leavehospitaldistrictcode = #{leavehospitaldistrictcode},</if>
        </trim>
        where taskid = #{taskid}
    </update>