From 2683772d398e33c1a151ff473376e7df0e40d036 Mon Sep 17 00:00:00 2001
From: yupeng <roc__yu@163.com>
Date: 星期四, 03 四月 2025 11:59:46 +0800
Subject: [PATCH] feat: 更新统计SQL,单独账单新增合同列表查询接口

---
 ruoyi-system/src/main/resources/mapper/system/TContractMapper.xml |   31 +++++++++++++++++++++++++++++++
 1 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/ruoyi-system/src/main/resources/mapper/system/TContractMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TContractMapper.xml
index 0404766..422e1d3 100644
--- a/ruoyi-system/src/main/resources/mapper/system/TContractMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/TContractMapper.xml
@@ -142,4 +142,35 @@
         )
     </select>
 
+    <select id="page" resultType="com.ruoyi.system.model.TContract">
+        select * from t_contract
+        <where>
+            <if test="query.partyTwoName != null and query.partyTwoName != ''">
+                and party_two_name like concat('%',#{query.partyTwoName},'%')
+            </if>
+            <if test="query.contractNumber != null and query.contractNumber != ''">
+                and contract_number like concat('%',#{query.contractNumber},'%')
+            </if>
+            <if test="query.contractName != null and query.contractName != ''">
+                and contract_name like concat('%',#{query.contractName},'%')
+            </if>
+            <if test="query.status != null">
+                and status = #{query.status}
+            </if>
+            <if test="query.tenantId != null">
+                and tenant_id = #{query.tenantId}
+            </if>
+            <if test="query.statuses != null and query.statuses.size()>0">
+                and status in
+                <foreach collection="query.statuses" item="item" open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
+            <if test='query.businessDeptId!=null and query.businessDeptId !="" and query.businessDeptId != "0"'>
+                and business_dept_id = #{query.businessDeptId}
+            </if>
+            AND disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
+        </where>
+        order by create_time desc
+    </select>
 </mapper>

--
Gitblit v1.7.1