Commit 3d0c76b1 authored by zhangsen's avatar zhangsen

警情数量带过滤条件bug

parent 1a0f5c77
...@@ -96,14 +96,15 @@ ...@@ -96,14 +96,15 @@
</select> </select>
<select id="queryAlarmCountByDateAndCode" resultType="java.lang.Integer"> <select id="queryAlarmCountByDateAndCode" resultType="java.lang.Integer">
select count(*) from asf_fire_equipment_signal_log select count(esl.id) from asf_fire_station_info asi
left join asf_fire_equipment_signal_log esl on asi.code = esl.station_code
<where> <where>
1 = 1 1 = 1
<if test="stationCode != null and stationCode != ''"> <if test="stationCode != null and stationCode != ''">
and station_code = #{stationCode,jdbcType=VARCHAR} and esl.station_code = #{stationCode,jdbcType=VARCHAR}
</if> </if>
<if test="date != null and date != ''"> <if test="date != null and date != ''">
and confirm_date like concat(#{date,jdbcType=VARCHAR},'%') and esl.confirm_date like concat(#{date,jdbcType=VARCHAR},'%')
</if> </if>
</where> </where>
</select> </select>
...@@ -112,7 +113,8 @@ ...@@ -112,7 +113,8 @@
select select
(SELECT (SELECT
IFNULL(count(s.id),0) IFNULL(count(s.id),0)
FROM `asf_fire_equipment_signal_log` s FROM asf_fire_station_info asi
LEFT JOIN `asf_fire_equipment_signal_log` s ON asi.code = s.station_code
<where> <where>
<if test="stationCode != null and stationCode != ''"> <if test="stationCode != null and stationCode != ''">
and s.station_code = #{stationCode} and s.station_code = #{stationCode}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment