From 28446c1489c8977d634e7a39dbbc96967e22c6f1 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期一, 11 五月 2026 11:32:31 +0800
Subject: [PATCH] 代码提交
---
smartor/src/main/resources/mapper/smartor/SvyLibTemplateMapper.xml | 70 ++++++++++++++++++++++++++++++----
1 files changed, 61 insertions(+), 9 deletions(-)
diff --git a/smartor/src/main/resources/mapper/smartor/SvyLibTemplateMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyLibTemplateMapper.xml
index c474be4..a70011d 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyLibTemplateMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyLibTemplateMapper.xml
@@ -123,18 +123,70 @@
LEFT JOIN (select outid,GROUP_CONCAT(icd10code) as icd10code,GROUP_CONCAT(icd10name) as icd10name from
icd10_association group by outid) b ON a.del_flag = 0
AND a.svyid = b.outid
- <where>
- a.del_flag=0
- <if test="categoryid != null ">and a.categoryid = #{categoryid}</if>
- <if test="svyid != null ">and a.svyid = #{svyid}</if>
- <if test="longTemp != null ">and a.long_temp = #{longTemp}</if>
- <if test="svyname != null and svyname != ''">and a.svyname like concat('%', #{svyname}, '%')</if>
- <if test="description != null and description != ''">and b.icd10name like concat('%', #{description}, '%')
- </if>
- </where>
+ where 1=1
+ and a.del_flag=0
+ <if test="categoryid != null ">and a.categoryid = #{categoryid}</if>
+ <if test="svyid != null ">and a.svyid = #{svyid}</if>
+ <if test="longTemp != null ">and a.long_temp = #{longTemp}</if>
+ <if test="orgid != null ">and a.orgid = #{orgid}</if>
+ <if test="svyname != null and svyname != ''">and a.svyname like concat('%', #{svyname}, '%')</if>
+ <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">
<include refid="selectSvyLibTemplateVo"/>
where svyid = #{svyid} and del_flag=0
--
Gitblit v1.9.3