|
|
@@ -26,19 +26,19 @@ |
|
|
|
|
|
|
|
<!-- 单河流水质数据统计 --> |
|
|
|
<select id="getDriverWaterAlarmInfo" parameterType="java.util.Map" resultType="java.util.Map"> |
|
|
|
SELECT i.`name`, count(i.`name`) AS `value` FROM tauv_water_alarm_info AS i |
|
|
|
SELECT i.`code`, count(i.`code`) AS `value` FROM tauv_water_alarm_info AS i |
|
|
|
INNER JOIN tauv_water_alarm AS a ON a.id=i.water_alarm_id |
|
|
|
WHERE i.mark=1 AND a.mark=1 AND a.driver_id=#{param.driverId} AND i.`name`=concat('',#{param.name},'') AND a.create_time BETWEEN #{param.startTime} and #{param.endTime} |
|
|
|
GROUP BY i.`name` |
|
|
|
WHERE i.mark=1 AND a.mark=1 AND a.driver_id=#{param.driverId} AND i.`code`=concat('',#{param.name},'') AND a.create_time BETWEEN #{param.startTime} and #{param.endTime} |
|
|
|
GROUP BY i.`code` |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 多河流水质数据统计 --> |
|
|
|
<select id="getMultiDriverWaterAlarmInfo" parameterType="java.util.Map" resultType="java.util.Map"> |
|
|
|
SELECT d.`name`, count(i.`name`) AS `value` FROM tauv_water_alarm_info AS i |
|
|
|
SELECT d.`name`, count(i.`code`) AS `value` FROM tauv_water_alarm_info AS i |
|
|
|
INNER JOIN tauv_water_alarm AS a ON a.id=i.water_alarm_id |
|
|
|
INNER JOIN tauv_driver AS d ON d.id=a.driver_id |
|
|
|
WHERE i.mark=1 AND a.mark=1 AND i.`name`=concat('',#{param.name},'') AND a.driver_id=#{param.driverId} AND a.create_time BETWEEN #{param.startTime} and #{param.endTime} |
|
|
|
GROUP BY i.`name` |
|
|
|
WHERE i.mark=1 AND a.mark=1 AND i.`code`=concat('',#{param.name},'') AND a.driver_id=#{param.driverId} AND a.create_time BETWEEN #{param.startTime} and #{param.endTime} |
|
|
|
GROUP BY i.`code` |
|
|
|
</select> |
|
|
|
|
|
|
|
</mapper> |