From 0c1f76c4a9c34a2adb05a94da4b20f3560374a29 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期五, 19 四月 2024 15:52:27 +0800
Subject: [PATCH] 考核模板

---
 ycl-server/src/main/resources/mapper/zgyw/CheckTemplateMapper.xml |   32 +++++++++++++++++++++++++++++---
 1 files changed, 29 insertions(+), 3 deletions(-)

diff --git a/ycl-server/src/main/resources/mapper/zgyw/CheckTemplateMapper.xml b/ycl-server/src/main/resources/mapper/zgyw/CheckTemplateMapper.xml
index d7db920..0ee96f4 100644
--- a/ycl-server/src/main/resources/mapper/zgyw/CheckTemplateMapper.xml
+++ b/ycl-server/src/main/resources/mapper/zgyw/CheckTemplateMapper.xml
@@ -10,8 +10,13 @@
         <result property="adjustCoefficient"    column="adjust_coefficient"    />
         <result property="adjustWay"    column="adjust_way"    />
         <result property="examineCategory"    column="examine_category"    />
+        <result property="examineTag"    column="examine_tag"    />
+        <result property="jobId"    column="job_id"    />
         <result property="status"    column="status"    />
         <result property="deptId"    column="dept_id"    />
+        <result property="frequency"    column="frequency"    />
+        <result property="alarmScore"    column="alarm_score"    />
+        <result property="description"    column="description"    />
         <result property="createTime"    column="create_time"    />
         <result property="updateTime"    column="update_time"    />
         <result property="createUser"    column="create_user"    />
@@ -22,16 +27,20 @@
     </resultMap>
 
     <sql id="selectCheckTemplateVo">
-        select id, template_name, adjust_coefficient, adjust_way, examine_category, status, dept_id, create_time, update_time, create_user, create_user_name, update_user, update_user_name, deleted from t_check_template
+        select id, template_name, adjust_coefficient, adjust_way, examine_category,examine_tag, status, dept_id, create_time, update_time, create_user, create_user_name, update_user, update_user_name,
+               description,frequency,alarm_score,job_id,deleted from t_check_template
     </sql>
 
     <select id="selectCheckTemplateList" resultMap="CheckTemplateResult">
         <include refid="selectCheckTemplateVo"/>
-        <where>  
+        <where>
+            deleted =0
             <if test="templateName != null  and templateName != ''"> and template_name like concat('%', #{templateName}, '%')</if>
             <if test="examineCategory != null "> and examine_category = #{examineCategory}</if>
+            <if test="examineTag != null "> and examine_tag = #{examineTag}</if>
             <if test="status != null  and status != ''"> and status = #{status}</if>
         </where>
+        order by examine_tag DESC, examine_category , create_time
     </select>
     
     <select id="selectCheckTemplateById" resultMap="CheckTemplateResult">
@@ -46,8 +55,13 @@
             <if test="adjustCoefficient != null">adjust_coefficient,</if>
             <if test="adjustWay != null and adjustWay != ''">adjust_way,</if>
             <if test="examineCategory != null">examine_category,</if>
+            <if test="examineTag != null">examine_tag,</if>
             <if test="status != null">status,</if>
             <if test="deptId != null">dept_id,</if>
+            <if test="frequency != null">frequency,</if>
+            <if test="alarmScore != null">alarm_score,</if>
+            <if test="description != null">description,</if>
+            <if test="jobId != null">job_id,</if>
             <if test="createTime != null">create_time,</if>
             <if test="updateTime != null">update_time,</if>
             <if test="createUser != null">create_user,</if>
@@ -61,8 +75,13 @@
             <if test="adjustCoefficient != null">#{adjustCoefficient},</if>
             <if test="adjustWay != null and adjustWay != ''">#{adjustWay},</if>
             <if test="examineCategory != null">#{examineCategory},</if>
+            <if test="examineTag != null">#{examineTag},</if>
             <if test="status != null">#{status},</if>
             <if test="deptId != null">#{deptId},</if>
+            <if test="frequency != null">#{frequency},</if>
+            <if test="alarmScore != null">#{alarmScore},</if>
+            <if test="description != null">#{description},</if>
+            <if test="jobId != null">#{jobId},</if>
             <if test="createTime != null">#{createTime},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="createUser != null">#{createUser},</if>
@@ -80,8 +99,13 @@
             <if test="adjustCoefficient != null">adjust_coefficient = #{adjustCoefficient},</if>
             <if test="adjustWay != null and adjustWay != ''">adjust_way = #{adjustWay},</if>
             <if test="examineCategory != null">examine_category = #{examineCategory},</if>
+            <if test="examineTag != null">examine_tag = #{examineTag},</if>
             <if test="status != null">status = #{status},</if>
             <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="jobId != null">job_id = #{jobId},</if>
+            <if test="frequency != null">frequency = #{frequency},</if>
+            <if test="alarmScore != null">alarm_score = #{alarmScore},</if>
+            <if test="description != null">description = #{description},</if>
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
             <if test="createUser != null">create_user = #{createUser},</if>
@@ -98,9 +122,11 @@
     </delete>
 
     <delete id="deleteCheckTemplateByIds" parameterType="String">
-        delete from t_check_template where id in 
+        delete from t_check_template where id in
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}
         </foreach>
     </delete>
+
+
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0