|
|
|
@ -392,7 +392,7 @@
|
|
|
|
|
t.time_stamp as timeStamp,
|
|
|
|
|
CAST(t.${subType} AS decimal(20, 4)) as val
|
|
|
|
|
FROM busi_cable_circulation t
|
|
|
|
|
WHERE t.sub_equipment_id = #{dto.mainTreeId}
|
|
|
|
|
WHERE t.main_tree_id = #{dto.mainTreeId}
|
|
|
|
|
<if test="dto.sensorCode != null and dto.sensorCode != ''">
|
|
|
|
|
AND t.sensor_id = #{dto.sensorCode}
|
|
|
|
|
</if>
|
|
|
|
@ -408,19 +408,19 @@
|
|
|
|
|
count(*) as count
|
|
|
|
|
FROM busi_cable_circulation t
|
|
|
|
|
WHERE t.time_stamp >= #{startTime} and t.time_stamp < #{endTime}
|
|
|
|
|
GROUP BY t.sensor_id, t.sub_equipment_id
|
|
|
|
|
GROUP BY t.sensor_id, t.main_tree_id
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="getDaylyPointStatistics" resultType="com.huatek.busi.dto.curve.PointItemDto">
|
|
|
|
|
SELECT
|
|
|
|
|
t.sub_equipment_id AS mainTreeId,
|
|
|
|
|
t.main_tree_id AS mainTreeId,
|
|
|
|
|
t.sensor_id AS sensorCode,
|
|
|
|
|
COUNT(*) AS count,
|
|
|
|
|
CAST(SUM(t.${subType}) AS decimal(20, 4)) AS total,
|
|
|
|
|
MAX(CAST(t.${subType} AS decimal(20, 4))) AS max,
|
|
|
|
|
MIN(CAST(t.${subType} AS decimal(20, 4))) AS min
|
|
|
|
|
FROM busi_cable_circulation t
|
|
|
|
|
WHERE t.sub_equipment_id = #{mainTreeId}
|
|
|
|
|
WHERE t.main_tree_id = #{mainTreeId}
|
|
|
|
|
<if test="sensorCode != null and sensorCode != ''">
|
|
|
|
|
AND t.sensor_id = #{sensorCode}
|
|
|
|
|
</if>
|
|
|
|
|