sql更新

This commit is contained in:
xy
2025-02-26 11:17:01 +08:00
parent 9da41273e5
commit 9a65c1b133
4 changed files with 6 additions and 8 deletions

View File

@@ -31,7 +31,7 @@ import java.util.Map;
path = "/line",
fallbackFactory = LineFeignClientFallbackFactory.class,
contextId = "line")
public interface LineFeignClient {
public interface LineFeignClient {
/**
* 获取终端状态信息

View File

@@ -158,8 +158,10 @@
gd.name electricPowerCompany,
b.IP DeviceIP,
b.id deviceId,
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(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
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
INNER JOIN pq_line sub ON sub.id = a.pid
INNER JOIN pq_line gd ON gd.id = sub.pid