liusheng
2025-05-16 0c621621889c90a119e2ff9e41c4f5528f395f7e
smartor/src/main/resources/mapper/smartor/ServiceTaskMapper.xml
@@ -58,11 +58,13 @@
        <result property="nexttaskid" column="nexttaskid"/>
        <result property="nexttaskname" column="nexttaskname"/>
        <result property="appltype" column="appltype"/>
        <result property="patCycle" column="pat_cycle"/>
    </resultMap>
    <sql id="selectServiceTaskVo">
        select taskid,
               task_name,
               pat_cycle,
               appltype,
               send_day,
               long_task,
@@ -248,18 +250,18 @@
        service_task.orgid from service_task
        <where>
            service_task.del_flag=0
<!--            and taskid in (-->
<!--            select task_id from service_taskdept-->
<!--            <where>-->
<!--                <if test="leaveldeptcodes != null and leaveldeptcodes.size()>0">-->
<!--                    dept_code in-->
<!--                    <foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator=","-->
<!--                             close=")">-->
<!--                        #{leaveldeptcode}-->
<!--                    </foreach>-->
<!--                </if>-->
<!--            </where>-->
<!--            )-->
            <!--            and taskid in (-->
            <!--            select task_id from service_taskdept-->
            <!--            <where>-->
            <!--                <if test="leaveldeptcodes != null and leaveldeptcodes.size()>0">-->
            <!--                    dept_code in-->
            <!--                    <foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator=","-->
            <!--                             close=")">-->
            <!--                        #{leaveldeptcode}-->
            <!--                    </foreach>-->
            <!--                </if>-->
            <!--            </where>-->
            <!--            )-->
            <if test="taskName != null  and taskName != ''">and service_task.task_name like concat('%', #{taskName},
                '%')
            </if>
@@ -330,7 +332,7 @@
    <select id="selectServiceTaskByTaskid" parameterType="Long" resultMap="ServiceTaskResult">
        <include refid="selectServiceTaskVo"/>
        where taskid = #{taskid}
        where taskid = #{taskid} and del_flag=0
    </select>
    <insert id="insertServiceTask" parameterType="com.smartor.domain.ServiceTask" useGeneratedKeys="true"
@@ -385,6 +387,7 @@
            <if test="compensateDate != null  and compensateDate != ''">compensate_date,</if>
            <if test="sendDay != null  ">send_day,</if>
            <if test="appltype != null  ">appltype,</if>
            <if test="patCycle != null  ">pat_cycle,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="taskName != null">#{taskName},</if>
@@ -438,6 +441,7 @@
            <if test="compensateDate != null  and compensateDate != ''">#{compensateDate}</if>
            <if test="sendDay != null  ">#{sendDay},</if>
            <if test="appltype != null  ">#{appltype},</if>
            <if test="patCycle != null  ">#{patCycle},</if>
        </trim>
    </insert>
@@ -494,9 +498,10 @@
            </if>
            <if test="leavehospitaldistrictcode != null  ">leavehospitaldistrictcode = #{leavehospitaldistrictcode},
            </if>
            <if test="compensateDate != null  and compensateDate != ''">compensate_date = #{compensateDate}</if>
            <if test="sendDay != null  ">send_day = #{sendDay}</if>
            <if test="appltype != null  ">appltype = #{appltype}</if>
            <if test="compensateDate != null  and compensateDate != ''">compensate_date = #{compensateDate},</if>
            <if test="sendDay != null  ">send_day = #{sendDay},</if>
            <if test="appltype != null  ">appltype = #{appltype},</if>
            <if test="patCycle != null  ">pat_cycle = #{patCycle},</if>
        </trim>
        where taskid = #{taskid}
    </update>