Browse Source

更新

master
牧羊人 4 years ago
parent
commit
7226931731
2 changed files with 7 additions and 7 deletions
  1. +1
    -1
      src/main/java/com/taauav/front/mapper/UserWaterAlarmInfoMapper.xml
  2. +6
    -6
      src/main/java/com/taauav/front/mapper/UserWaterAlarmMapper.xml

+ 1
- 1
src/main/java/com/taauav/front/mapper/UserWaterAlarmInfoMapper.xml View File

@@ -4,7 +4,7 @@

<!-- 获取水质警告分类统计 -->
<select id="getWaterAlarmCategoryList" resultType="java.util.Map">
SELECT `name`,count(id) AS totalNum FROM tauv_water_alarm_info WHERE mark=1 GROUP BY `name` ORDER BY totalNum DESC;
SELECT `code`,count(id) AS totalNum FROM tauv_water_alarm_info WHERE mark=1 GROUP BY `code` ORDER BY totalNum DESC;
</select>

</mapper>

+ 6
- 6
src/main/java/com/taauav/front/mapper/UserWaterAlarmMapper.xml View File

@@ -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>

Loading…
Cancel
Save