|
|
|
@@ -88,8 +88,10 @@ |
|
|
|
) temp |
|
|
|
where |
|
|
|
create_time = temp.maxTime |
|
|
|
and meter_id = temp.maxMeterId |
|
|
|
group by `meter_id` |
|
|
|
<if test=" null != meterId "> |
|
|
|
and meter_id = temp.maxMeterId |
|
|
|
</if> |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
@@ -181,7 +183,7 @@ |
|
|
|
sum(used_power) as usedPower |
|
|
|
FROM kw_meter_data |
|
|
|
<include refid="dynamicWhereConditionsVo"/> |
|
|
|
group by reportTime,meter_id |
|
|
|
group by reportTime,meter_id,box_id |
|
|
|
) as temp join kw_meter on id = temp.meter_id |
|
|
|
<if test=" null != status "> |
|
|
|
and `status` = #{status} |
|
|
|
@@ -223,7 +225,13 @@ |
|
|
|
<if test=" null != endTime and null != endTime"> |
|
|
|
sum(used_power) as usedPower, |
|
|
|
</if> |
|
|
|
tenant_id,box_id,meter_id |
|
|
|
<if test=" null != meterId "> |
|
|
|
meter_id, |
|
|
|
</if> |
|
|
|
<if test=" null != boxId "> |
|
|
|
box_id, |
|
|
|
</if> |
|
|
|
tenant_id |
|
|
|
FROM kw_meter_data |
|
|
|
where 1 = 1 |
|
|
|
<if test=" null != tenantId "> |
|
|
|
@@ -267,6 +275,9 @@ |
|
|
|
</if> |
|
|
|
|
|
|
|
group by reportTime |
|
|
|
<if test=" null != boxId "> |
|
|
|
,box_id |
|
|
|
</if> |
|
|
|
<if test=" null != meterId "> |
|
|
|
,meter_id |
|
|
|
</if> |
|
|
|
|