From 4e4b96ef73db8d36d1cc7e2ec87d38d397c96078 Mon Sep 17 00:00:00 2001
From: Your Name <you@example.com>
Date: 星期四, 26 一月 2023 16:26:48 +0800
Subject: [PATCH] 优化审核代码
---
java110-db/src/main/resources/mapper/common/CarInoutV1ServiceDaoImplMapper.xml | 23 ++++++++++++++++++-----
1 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/java110-db/src/main/resources/mapper/common/CarInoutV1ServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/common/CarInoutV1ServiceDaoImplMapper.xml
index 56ab42d..1a31e0f 100644
--- a/java110-db/src/main/resources/mapper/common/CarInoutV1ServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/common/CarInoutV1ServiceDaoImplMapper.xml
@@ -19,10 +19,12 @@
<select id="getCarInoutInfo" parameterType="Map" resultType="Map">
select t.in_time,t.in_time inTime,t.inout_id,t.inout_id inoutId,t.pa_id,t.pa_id paId,t.car_num,t.car_num
carNum,t.status_cd,t.status_cd statusCd,t.state,t.community_id,t.community_id communityId,t.out_time,t.out_time
- outTime,td.`name` stateName,max(cid.car_type) carType
+ outTime,td.`name` stateName,pa.num areaNum,tcfc.fee_name feeName,tcfc.config_id configId,max(cid.car_type) carType,max(cid.car_type_name) carTypeName
from car_inout t
LEFT JOIN car_inout_detail cid on t.inout_id = cid.inout_id and cid.status_cd = '0' and cid.state in ('100300','100400','100600')
left join t_dict td on t.state = td.status_cd and td.table_columns='state' and td.table_name = 'car_inout'
+ left join parking_area pa on t.pa_id = pa.pa_id and pa.status_cd = '0'
+ left join temp_car_fee_config tcfc on pa.pa_id = tcfc.pa_id and tcfc.status_cd = '0'
where 1 =1
<if test="inTime !=null and inTime != ''">
and t.in_time= #{inTime}
@@ -40,7 +42,7 @@
</foreach>
</if>
<if test="carNum !=null and carNum != ''">
- and t.car_num= #{carNum}
+ and t.car_num like concat('%',#{carNum},'%')
</if>
<if test="carType !=null and carType != ''">
and cid.car_type= #{carType}
@@ -63,12 +65,17 @@
<if test="outTime !=null and outTime != ''">
and t.out_time= #{outTime}
</if>
- group by t.in_time,t.inout_id,t.pa_id,t.car_num,t.status_cd,t.state,t.community_id,t.out_time,td.`name`
+ <if test="startTime !=null and startTime != ''">
+ and t.in_time > #{startTime}
+ </if>
+ <if test="endTime !=null and endTime != ''">
+ and t.in_time < #{endTime}
+ </if>
+ group by t.in_time,t.inout_id,t.pa_id,t.car_num,t.status_cd,t.state,t.community_id,t.out_time,td.`name`,pa.num,tcfc.fee_name,tcfc.config_id,t.create_time
order by t.create_time desc
<if test="page != -1 and page != null ">
limit #{page}, #{row}
</if>
-
</select>
@@ -124,7 +131,7 @@
</foreach>
</if>
<if test="carNum !=null and carNum != ''">
- and t.car_num= #{carNum}
+ and t.car_num like concat('%',#{carNum},'%')
</if>
<if test="statusCd !=null and statusCd != ''">
and t.status_cd= #{statusCd}
@@ -144,6 +151,12 @@
<if test="outTime !=null and outTime != ''">
and t.out_time= #{outTime}
</if>
+ <if test="startTime !=null and startTime != ''">
+ and t.in_time > #{startTime}
+ </if>
+ <if test="endTime !=null and endTime != ''">
+ and t.in_time < #{endTime}
+ </if>
</select>
--
Gitblit v1.8.0