|
|
@@ -64,9 +64,11 @@
|
|
|
<select id="selectDeviceCount" parameterType="com.coffee.bus.entity.BusDeviceAlarmEntity" resultType="com.coffee.bus.service.dto.DeviceCountResult">
|
|
|
SELECT
|
|
|
da.device_id,
|
|
|
- COUNT(1) as alarm_count
|
|
|
+ COUNT(1) as alarm_count ,
|
|
|
+ (@i:=@i+1) AS num
|
|
|
FROM
|
|
|
- bus_device_alarm AS da
|
|
|
+ bus_device_alarm AS da,
|
|
|
+ (SELECT @i:=-1) AS itable
|
|
|
WHERE
|
|
|
1=1
|
|
|
<if test="query.alarm != null">
|
|
|
@@ -82,7 +84,6 @@
|
|
|
and da.warn_will_finished = #{query.warnWillFinished}
|
|
|
</if>
|
|
|
|
|
|
-
|
|
|
<if test="query.warnAnalgesicPoor != null">
|
|
|
and da.warn_analgesic_poor = #{query.warnAnalgesicPoor}
|
|
|
</if>
|
|
|
@@ -95,5 +96,4 @@
|
|
|
GROUP BY
|
|
|
da.device_id
|
|
|
</select>
|
|
|
-
|
|
|
</mapper>
|