✨ feat: 每日数据显示顺序,名称,单位
(1)港口按顺序排序(青岛港、日照港、烟台港、渤海湾港) (2)设备编号字段改成 设备名称(name) (3)单位
This commit is contained in:
parent
8d5ffae076
commit
73f15098f0
|
@ -169,9 +169,11 @@
|
|||
<select id="dailyReportDataOverview" parameterType="map" resultType="map">
|
||||
SELECT TO_CHAR(d.report_time, 'YYYY-MM-DD') AS day,
|
||||
d.sn,
|
||||
td.name,
|
||||
p.dept_name as "p",
|
||||
pp.dept_name as "pp",
|
||||
ppp.dept_name as "ppp",
|
||||
ppp.dept_id as "ppp_id",
|
||||
ROUND(AVG(TO_NUMBER(d.ds)), 8) AS avg_ds
|
||||
FROM th_device_report d
|
||||
LEFT JOIN th_device td ON d.sn = td.sn
|
||||
|
@ -180,8 +182,8 @@
|
|||
LEFT JOIN sys_dept ppp ON pp.parent_id = ppp.dept_id
|
||||
WHERE d.sn IN (SELECT d.sn FROM th_device d)
|
||||
AND TO_CHAR(d.report_time, 'YYYY-MM-DD') = #{day}
|
||||
GROUP BY TO_CHAR(d.report_time, 'YYYY-MM-DD'), ppp.dept_name, pp.dept_name, p.dept_name, d.sn
|
||||
ORDER BY ppp.dept_name, pp.dept_name, p.dept_name
|
||||
GROUP BY TO_CHAR(d.report_time, 'YYYY-MM-DD'), ppp.dept_name, pp.dept_name, p.dept_name, d.sn, ppp.dept_id, td.name
|
||||
ORDER BY ppp.dept_id ASC
|
||||
</select>
|
||||
<!-- 选择日期范围内 某个部门id下的所有子部门的所有设备的报警每日数量;统计(d.zt = '一级报警' OR d.zt = '二级报警')的alarm_count, 统计当天全部的数量count -->
|
||||
<select id="selectAlarmCountByDeptIdAndDateRange" parameterType="map" resultType="map">
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<div style="display: flex; gap: 10px">
|
||||
<el-tag>港区数: {{ getChildCount(row, "ppp", "pp") }}</el-tag>
|
||||
<el-tag type="warning"
|
||||
>平均值: {{ calculateChildAvg(row, "ppp") }}</el-tag
|
||||
>平均值: {{ calculateChildAvg(row, "ppp") }} mg/m³</el-tag
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -50,7 +50,7 @@
|
|||
<div style="display: flex; gap: 10px">
|
||||
<el-tag>企业数: {{ getChildCount(row, "pp", "p") }}</el-tag>
|
||||
<el-tag type="warning"
|
||||
>平均值: {{ calculateChildAvg(row, "pp") }}</el-tag
|
||||
>平均值: {{ calculateChildAvg(row, "pp") }} mg/m³</el-tag
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -62,19 +62,23 @@
|
|||
<div style="display: flex; gap: 10px">
|
||||
<el-tag>设备数: {{ getChildCount(row, "p", "sn") }}</el-tag>
|
||||
<el-tag type="warning"
|
||||
>平均值: {{ calculateChildAvg(row, "p") }}</el-tag
|
||||
>平均值: {{ calculateChildAvg(row, "p") }} mg/m³</el-tag
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="sn" label="设备编号"></el-table-column>
|
||||
<el-table-column prop="name" label="设备名称"></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="avgDs"
|
||||
label="当日均值"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
>
|
||||
<template slot-scope="{ row }">
|
||||
<div>{{ row.avgDs }} mg/m³</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue