From 5aac1d3b69111db2536280d0603d7c850d961551 Mon Sep 17 00:00:00 2001
From: whycxzp <glperry@163.com>
Date: 星期一, 16 六月 2025 16:39:31 +0800
Subject: [PATCH] 领导层首页-电池时间品牌统计

---
 src/main/resources/mapper/BattInfMapper.xml |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mapper/BattInfMapper.xml b/src/main/resources/mapper/BattInfMapper.xml
index 1b9658a..b28e4a1 100644
--- a/src/main/resources/mapper/BattInfMapper.xml
+++ b/src/main/resources/mapper/BattInfMapper.xml
@@ -426,6 +426,20 @@
             and bu.uid = #{userId}
         )
     </select>
+    <select id="getListByCondition" resultType="com.whyc.pojo.db_station.BattInf">
+        select * from db_station.tb_batt_inf where
+        <if test="product!=null">
+            and product=#{product}
+        </if>
+        <if test="inuseTime!=null">
+            and inuse_time >= #{inuseTime}
+        </if>
+        and battgroup_id in(
+        select distinct battgroup_id from db_user.tb_baojigroup_usr bu,db_user.tb_baojigroup_power bp,db_station.tb_batt_inf bi
+        where bu.baoji_group_id = bp.baoji_group_id
+        and bp.station_id = bi.station_id
+        and bu.uid = #{userId}
+    </select>
 
     <select id="getBattByUid" resultType="com.whyc.pojo.db_station.BattInf">
         select distinct * from db_station.tb_batt_inf,db_station.tb_station_inf

--
Gitblit v1.9.1