Commit 3d0c76b1 authored by zhangsen's avatar zhangsen

警情数量带过滤条件bug

parent 1a0f5c77
......@@ -96,14 +96,15 @@
</select>
<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>
1 = 1
<if test="stationCode != null and stationCode != ''">
and station_code = #{stationCode,jdbcType=VARCHAR}
and esl.station_code = #{stationCode,jdbcType=VARCHAR}
</if>
<if test="date != null and date != ''">
and confirm_date like concat(#{date,jdbcType=VARCHAR},'%')
and esl.confirm_date like concat(#{date,jdbcType=VARCHAR},'%')
</if>
</where>
</select>
......@@ -112,7 +113,8 @@
select
(SELECT
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>
<if test="stationCode != null and 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