限制皮带秤回收率

This commit is contained in:
2024-05-30 10:38:19 +08:00
parent d681128153
commit 1de171cf70

View File

@@ -210,8 +210,8 @@ public class PdcDeviceDataService
tmp5 as (select tmp4.*,
tmp3.diff as ym_diff,
round(case when tmp3.diff is null or tmp3.diff = 0 then 0 else tmp4.diff / tmp3.diff * 100 end,
2) as percent
max(round(case when tmp3.diff is null or tmp3.diff = 0 then 0 else tmp4.diff / tmp3.diff * 100 end,
2), 100) as percent
from tmp4
left join tmp3 on tmp4.tb = tmp3.tb)