liusheng
15 小时以前 6366d3a0e3520e2fd1e81ada00dfa2c8dd1a910c
smartor/src/main/resources/mapper/smartor/SvyTaskTemplateScriptMapper.xml
@@ -45,12 +45,27 @@
        <result property="prompt" column="prompt"/>
        <result property="groupName" column="group_name"/>
        <result property="categoryid" column="categoryid"/>
        <result property="dutyDeptName" column="duty_dept_name"/>
        <result property="dutyDeptCode" column="duty_dept_code"/>
        <result property="reportDeptCode" column="report_dept_name"/>
        <result property="reportDeptName" column="report_dept_code"/>
        <result property="dutyDeptPersonName" column="duty_dept_person_name"/>
        <result property="dutyDeptPersonCode" column="duty_dept_person_code"/>
        <result property="reportDeptPersonCode" column="report_dept_person_name"/>
        <result property="reportDeptPersonName" column="report_dept_person_code"/>
        <result property="isMydException" column="is_myd_exception"/>
        <result property="dimension" column="dimension"/>
    </resultMap>
    <sql id="selectSvyTaskTemplateScriptVo">
        select id,
               sort,
               is_myd_exception,
               dimension,
               duty_dept_name,
               duty_dept_code,
               report_dept_name,
               report_dept_code,
               ishide,
               prompt,
               categoryid,
@@ -66,14 +81,17 @@
               templateID,
               scriptid,
               script_topic, language, categoryName, script_content, is_must, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid, value_type, targetoptions, script_type, targetid, targetvalue, next_scriptno, script_result, otherdata, picture_path
                , duty_dept_person_name, duty_dept_person_code, report_dept_person_name, report_dept_person_code
        from svy_task_template_script
    </sql>
    <select id="selectSvyTaskTemplateScriptList" parameterType="com.smartor.domain.SvyTaskTemplateScript"
            resultMap="SvyTaskTemplateScriptResult">
        <include refid="selectSvyTaskTemplateScriptVo"/>
        where 1=1
        where del_flag=0
            <if test="taskid != null ">and taskid = #{taskid}</if>
            <if test="isMydException != null ">and is_myd_exception = #{isMydException}</if>
            <if test="dimension != null ">and dimension = #{dimension}</if>
            <if test="categoryid != null ">and categoryid = #{categoryid}</if>
            <if test="ishide != null ">and ishide = #{ishide}</if>
            <if test="scriptno != null ">and scriptno = #{scriptno}</if>
@@ -82,6 +100,18 @@
            <if test="scriptDesc != null  and scriptDesc != ''">and script_desc = #{scriptDesc}</if>
            <if test="language != null  and language != ''">and language = #{language}</if>
            <if test="categoryName != null  and categoryName != ''">and categoryName like concat('%', #{categoryName},
                '%')
            </if>
            <if test="dutyDeptName != null  and dutyDeptName != ''">and duty_dept_name like concat('%', #{dutyDeptName},
                '%')
            </if>
            <if test="dutyDeptCode != null  and dutyDeptCode != ''">and duty_dept_code like concat('%', #{dutyDeptCode},
                '%')
            </if>
            <if test="reportDeptName != null  and reportDeptName != ''">and report_dept_name like concat('%', #{reportDeptName},
                '%')
            </if>
            <if test="reportDeptCode != null  and reportDeptCode != ''">and report_dept_code like concat('%', #{reportDeptCode},
                '%')
            </if>
            <if test="scriptContent != null  and scriptContent != ''">and script_content = #{scriptContent}</if>
@@ -109,6 +139,18 @@
            <if test="groupName != null ">and group_name = #{groupName}</if>
            <if test="branchNextscriptno != null  and branchNextscriptno != ''">and branch_nextscriptno =
                #{branchNextscriptno}
            </if>
            <if test="dutyDeptPersonName != null  and dutyDeptPersonName != ''">and duty_dept_person_name like concat('%', #{dutyDeptPersonName},
                '%')
            </if>
            <if test="dutyDeptPersonCode != null  and dutyDeptPersonCode != ''">and duty_dept_person_code like concat('%', #{dutyDeptPersonCode},
                '%')
            </if>
            <if test="reportDeptPersonName != null  and reportDeptPersonName != ''">and report_dept_person_name like concat('%', #{reportDeptPersonName},
                '%')
            </if>
            <if test="reportDeptPersonCode != null  and reportDeptPersonCode != ''">and report_dept_person_code like concat('%', #{reportDeptPersonCode},
                '%')
            </if>
    </select>
@@ -160,6 +202,16 @@
            <if test="groupName != null ">group_name,</if>
            <if test="ishide != null ">ishide,</if>
            <if test="categoryid != null ">categoryid,</if>
            <if test="dutyDeptName != null  and dutyDeptName != ''">duty_dept_name,</if>
            <if test="dutyDeptCode != null  and dutyDeptCode != ''">duty_dept_code,</if>
            <if test="reportDeptName != null  and reportDeptName != ''">report_dept_name,</if>
            <if test="reportDeptCode != null  and reportDeptCode != ''"> report_dept_code,</if>
            <if test="isMydException != null ">is_myd_exception,</if>
            <if test="dimension != null ">dimension,</if>
            <if test="dutyDeptPersonName != null  and dutyDeptPersonName != ''">duty_dept_person_name,</if>
            <if test="dutyDeptPersonCode != null  and dutyDeptPersonCode != ''">duty_dept_person_code,</if>
            <if test="reportDeptPersonName != null  and reportDeptPersonName != ''">report_dept_person_name,</if>
            <if test="reportDeptPersonCode != null  and reportDeptPersonCode != ''">report_dept_person_code,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="taskid != null">#{taskid},</if>
@@ -201,6 +253,16 @@
            <if test="groupName != null ">#{groupName},</if>
            <if test="ishide != null ">#{ishide},</if>
            <if test="categoryid != null ">#{categoryid},</if>
            <if test="dutyDeptName != null  and dutyDeptName != ''">#{dutyDeptName},</if>
            <if test="dutyDeptCode != null  and dutyDeptCode != ''">#{dutyDeptCode},</if>
            <if test="reportDeptName != null  and reportDeptName != ''">#{reportDeptName},</if>
            <if test="reportDeptCode != null  and reportDeptCode != ''">#{reportDeptCode},</if>
            <if test="isMydException != null ">#{isMydException},</if>
            <if test="dimension != null ">#{dimension},</if>
            <if test="dutyDeptPersonName != null  and dutyDeptPersonName != ''">#{dutyDeptPersonName},</if>
            <if test="dutyDeptPersonCode != null  and dutyDeptPersonCode != ''">#{dutyDeptPersonCode},</if>
            <if test="reportDeptPersonName != null  and reportDeptPersonName != ''">#{reportDeptPersonName},</if>
            <if test="reportDeptPersonCode != null  and reportDeptPersonCode != ''">#{reportDeptPersonCode},</if>
        </trim>
    </insert>
@@ -248,6 +310,16 @@
            <if test="groupName != null ">group_name = #{groupName},</if>
            <if test="ishide != null ">ishide = #{ishide},</if>
            <if test="categoryid != null ">categoryid = #{categoryid},</if>
            <if test="dutyDeptName != null  and dutyDeptName != ''">duty_dept_name = #{dutyDeptName},</if>
            <if test="dutyDeptCode != null  and dutyDeptCode != ''"> duty_dept_code = #{dutyDeptCode},</if>
            <if test="reportDeptName != null  and reportDeptName != ''">report_dept_name = #{reportDeptName},</if>
            <if test="reportDeptCode != null  and reportDeptCode != ''">report_dept_code = #{reportDeptCode},</if>
            <if test="isMydException != null ">is_myd_exception = #{isMydException},</if>
            <if test="dimension != null ">dimension = #{dimension},</if>
            <if test="dutyDeptPersonName != null  and dutyDeptPersonName != ''">duty_dept_person_name = #{dutyDeptPersonName},</if>
            <if test="dutyDeptPersonCode != null  and dutyDeptPersonCode != ''">duty_dept_person_code = #{dutyDeptPersonCode},</if>
            <if test="reportDeptPersonName != null  and reportDeptPersonName != ''">report_dept_person_name = #{reportDeptPersonName},</if>
            <if test="reportDeptPersonCode != null  and reportDeptPersonCode != ''">report_dept_person_code = #{reportDeptPersonCode},</if>
        </trim>
        where id = #{d}
    </update>