|
@@ -20,8 +20,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
SUBSTR(qt.directory, 1, INSTR(qt.directory, '.') - 1) as directorySubStr,
|
|
|
ct.name as chapter_name
|
|
|
from t_questionnaire_template qt
|
|
|
- left join t_chapter_template ct
|
|
|
- on qt.chapter_id=ct.id
|
|
|
+ left join t_chapter_template ct on qt.chapter_id=ct.id
|
|
|
+ left join sys_dept d on d.dept_id = qt.dept_id
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectTQuestionnaireTemplateList" parameterType="TQuestionnaireTemplate" resultMap="TQuestionnaireTemplateResult">
|
|
@@ -33,6 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="code != null "> and qt.code = #{code}</if>
|
|
|
<if test="name != null and name != ''"> and qt.name like concat('%', #{name}, '%')</if>
|
|
|
<if test="deptId != null and deptId != ''"> and qt.dept_id = #{deptId}</if>
|
|
|
+ ${params.dataScope}
|
|
|
</where>
|
|
|
order by (SUBSTR(qt.directory, 1, INSTR(qt.directory, '.') - 1) + 0) asc, qt.directory asc, qt.code asc
|
|
|
</select>
|