liusheng
3 天以前 c462811cd33e81a80bc089e3677975c069d9cda5
smartor/src/main/resources/mapper/smartor/SvyLibTemplateMapper.xml
@@ -133,6 +133,58 @@
            <if test="description != null  and description != ''">and b.icd10name like concat('%', #{description}, '%')
            </if>
        order by a.create_time desc
    </select>
    <select id="selectSvyLibTemplateListByDeptCode" parameterType="com.smartor.domain.TemplateDeptVO"
            resultMap="SvyLibTemplateResult">
        SELECT
        a.svyid,
        a.long_temp,
        a.conclusion,
        a.instruction,
        a.prologue,
        a.categoryid,
        a.svycode,
        a.svyname,
        a.description,
        a.introduce,
        a.submitprompt,
        a.templateid,
        a.version,
        a.centerlibrarycode,
        a.centerlibraryid,
        a.islocal,
        a.isenable,
        a.orgid,
        a.del_flag,
        a.create_by,
        a.create_time,
        a.update_by,
        a.update_time,
        a.isupload,
        a.upload_time,
        a.dept_names,
        a.value_type,
        a.reply,
        a.campus,
        a.suitway,
        a.script_score,
        a.score_type,
        a.otherdata,
        a.guid
        FROM
        svy_lib_template a
        LEFT JOIN template_dept b ON a.del_flag = 0
        AND a.svyid = b.tempid
        where a.del_flag=0
          and b.del_flag=0
        <if test="deptCode != null ">and b.dept_code = #{deptCode}</if>
        <if test="deptType != null ">and b.dept_type = #{deptType}</if>
        <if test="type != null">and b.type=#{type}</if>
        <if test="tempid != null">and a.svyid=#{tempid}</if>
        order by a.create_time desc
        <if test="pageSize != null  and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if>
    </select>
    <select id="selectSvyLibTemplateBySvyid" parameterType="Long" resultMap="SvyLibTemplateResult">