From cc74c69a0b48dce77cec5674fa42bee768bb28d7 Mon Sep 17 00:00:00 2001
From: zjh <1084500556@qq.com>
Date: 星期五, 07 三月 2025 10:59:28 +0800
Subject: [PATCH] zjh20250307

---
 ltkj-hosp/src/main/resources/mapper/hosp/TjAdviceMapper.xml |   41 ++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 40 insertions(+), 1 deletions(-)

diff --git a/ltkj-hosp/src/main/resources/mapper/hosp/TjAdviceMapper.xml b/ltkj-hosp/src/main/resources/mapper/hosp/TjAdviceMapper.xml
index 66f9aaf..919cee0 100644
--- a/ltkj-hosp/src/main/resources/mapper/hosp/TjAdviceMapper.xml
+++ b/ltkj-hosp/src/main/resources/mapper/hosp/TjAdviceMapper.xml
@@ -40,6 +40,45 @@
         <include refid="selectTjAdviceVo"/>
         where id = #{id}
     </select>
+    <select id="selectList" resultType="com.ltkj.hosp.domain.TjAdvice">
+        SELECT a.*,p.pro_name as proName,d.dept_name as deptName FROM `tj_advice` a
+          LEFT JOIN tj_project p ON a.pro_id = p.pro_id
+          LEFT JOIN sys_dept d ON a.dept_id = d.dept_id
+        <where>
+            <if test="deptId != null and deptId != ''">
+                and a.dept_id = #{deptId}
+            </if>
+            <if test="proName != null and proName != ''">
+                and p.pro_name like concat('%',#{proName},'%')
+            </if>
+            <if test="bt != null and bt != ''">
+                and a.title like concat('%',#{bt},'%')
+            </if>
+            <if test="nr != null and nr != ''">
+                and a.advice like concat('%',#{nr},'%')
+            </if>
+        </where>
+        LIMIT #{page},#{pageSize}
+    </select>
+
+    <select id="selectListCount" resultType="int">
+        SELECT count(*) FROM `tj_advice` a
+        LEFT JOIN tj_project p ON a.pro_id = p.pro_id
+        <where>
+            <if test="deptId != null">
+                and a.dept_id = #{deptId}
+            </if>
+            <if test="proName != null">
+                and p.pro_name like concat('%',#{proName},'%')
+            </if>
+            <if test="bt != null and bt != ''">
+                and a.title like concat('%',#{bt},'%')
+            </if>
+            <if test="nr != null and nr != ''">
+                and a.advice like concat('%',#{nr},'%')
+            </if>
+        </where>
+    </select>
 
     <insert id="insertTjAdvice" parameterType="TjAdvice" useGeneratedKeys="true" keyProperty="id">
         insert into tj_advice
@@ -92,4 +131,4 @@
             #{id}
         </foreach>
     </delete>
-</mapper>
\ No newline at end of file
+</mapper>

--
Gitblit v1.8.0