sql更新
This commit is contained in:
@@ -1,9 +1,5 @@
|
|||||||
package com.njcn.common.utils;
|
package com.njcn.common.utils;
|
||||||
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
|
|
||||||
import javax.validation.Valid;
|
|
||||||
import javax.validation.constraints.Max;
|
import javax.validation.constraints.Max;
|
||||||
import javax.validation.constraints.Min;
|
import javax.validation.constraints.Min;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|||||||
@@ -158,8 +158,10 @@
|
|||||||
gd.name electricPowerCompany,
|
gd.name electricPowerCompany,
|
||||||
b.IP DeviceIP,
|
b.IP DeviceIP,
|
||||||
b.id deviceId,
|
b.id deviceId,
|
||||||
ifnull(d.flow, (select flow from cld_flow_meal where type = 0 and flag = 1)) + ifnull(d1.flow, 0) flowMeal,
|
-- ifnull(d.flow, (select flow from cld_flow_meal where type = 0 and flag = 1)) + ifnull(d1.flow, 0) flowMeal,
|
||||||
ifnull(convert(m.Actual_Value/1024/1024,decimal(7,2)),0) statisValue
|
-- ifnull(convert(m.Actual_Value/1024/1024,decimal(7,2)),0) statisValue
|
||||||
|
COALESCE(d.flow, (SELECT flow FROM cld_flow_meal WHERE type = 0 AND flag = 1)) + COALESCE(d1.flow, 0) AS flowMeal,
|
||||||
|
COALESCE(CAST(m.Actual_Value / 1024 / 1024 AS DECIMAL(7, 2)), 0) AS statisValue
|
||||||
FROM pq_line a
|
FROM pq_line a
|
||||||
INNER JOIN pq_line sub ON sub.id = a.pid
|
INNER JOIN pq_line sub ON sub.id = a.pid
|
||||||
INNER JOIN pq_line gd ON gd.id = sub.pid
|
INNER JOIN pq_line gd ON gd.id = sub.pid
|
||||||
|
|||||||
Reference in New Issue
Block a user