| | |
| | | <result property="dutyDeptCode" column="duty_dept_code"/> |
| | | <result property="reportDeptCode" column="report_dept_name"/> |
| | | <result property="reportDeptName" column="report_dept_code"/> |
| | | <result property="isMydException" column="is_myd_exception"/> |
| | | <result property="dimension" column="dimension"/> |
| | | |
| | | </resultMap> |
| | | |
| | | <sql id="selectSvyLibTemplateScriptVo"> |
| | | select id, |
| | | script_type, |
| | | is_myd_exception, |
| | | dimension, |
| | | duty_dept_name, |
| | | duty_dept_code, |
| | | report_dept_name, |
| | |
| | | and del_flag = 0 |
| | | <if test="nextScriptno != null ">and next_scriptno = #{nextScriptno}</if> |
| | | <if test="scriptType != null and scriptType != ''">and script_type = #{scriptType}</if> |
| | | <if test="isMydException != null and isMydException != ''">and is_myd_exception = #{isMydException}</if> |
| | | <if test="dimension != null and dimension != ''">and dimension = #{dimension}</if> |
| | | <if test="scriptno != null and scriptno != ''">and scriptno = #{scriptno}</if> |
| | | <if test="scriptid != null">and scriptid = #{scriptid}</if> |
| | | <if test="scriptDesc != null and scriptDesc != ''">and script_desc = #{scriptDesc}</if> |
| | |
| | | <if test="pageSize != null and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if> |
| | | </select> |
| | | |
| | | <select id="selectSLTScriptListBydimension" parameterType="com.smartor.domain.SvyLibTemplateScriptVO" |
| | | resultMap="SvyLibTemplateScriptResult"> |
| | | <include refid="selectSvyLibTemplateScriptVo"/> |
| | | <where>del_flag=0 |
| | | <if test="dimensionList != null ">and dimension in |
| | | <foreach item="dimension" collection="dimensionList" open="(" separator="," close=")"> |
| | | #{dimension} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSvyLibTemplateScriptByTopicid" parameterType="Long" resultMap="SvyLibTemplateScriptResult"> |
| | | <include refid="selectSvyLibTemplateScriptVo"/> |
| | | where id = #{id} |
| | |
| | | <if test="reportDeptName != null and reportDeptName != ''">report_dept_name,</if> |
| | | <if test="reportDeptCode != null and reportDeptCode != ''">report_dept_code,</if> |
| | | <if test="categoryName != null and categoryName != ''">categoryName,</if> |
| | | <if test="isMydException != null and isMydException != ''">is_myd_exception,</if> |
| | | <if test="dimension != null and dimension != ''">dimension,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="nextScriptno != null">#{nextScriptno},</if> |
| | |
| | | <if test="reportDeptName != null and reportDeptName != ''">#{reportDeptName},</if> |
| | | <if test="reportDeptCode != null and reportDeptCode != ''">#{reportDeptCode},</if> |
| | | <if test="categoryName != null and categoryName != ''">#{categoryName},</if> |
| | | <if test="isMydException != null and isMydException != ''">#{isMydException},</if> |
| | | <if test="dimension != null and dimension != ''">#{dimension},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="reportDeptName != null and reportDeptName != ''">report_dept_name = #{reportDeptName},</if> |
| | | <if test="reportDeptCode != null and reportDeptCode != ''">report_dept_code = #{reportDeptCode},</if> |
| | | <if test="categoryName != null and categoryName != ''">categoryName = #{categoryName},</if> |
| | | <if test="isMydException != null and isMydException != ''">is_myd_exception = #{isMydException},</if> |
| | | <if test="dimension != null and dimension != ''">dimension = #{dimension},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <select id="querySvyLibTemplateIds" resultMap="SvyLibTemplateScriptResult"> |
| | | <select id="querySvyLibTemplateIds" resultMap="SvyLibTemplateScriptResult"> |
| | | <include refid="selectSvyLibTemplateScriptVo"/> |
| | | where del_flag=0 |
| | | <if test="scriptCategoryids != null and scriptCategoryids.size > 0"> |
| | | and categoryid in |
| | | <foreach item="scriptCategoryid" collection="scriptCategoryids" open="(" separator="," close=")"> |
| | | #{scriptCategoryid} |
| | | </foreach> |
| | | and categoryid in |
| | | <foreach item="scriptCategoryid" collection="scriptCategoryids" open="(" separator="," close=")"> |
| | | #{scriptCategoryid} |
| | | </foreach> |
| | | </if> |
| | | </select> |
| | | </mapper> |