diff --git a/RuoYi-Vue-Oracle/src/main/resources/mybatis/oil/ThDeviceReportMapper.xml b/RuoYi-Vue-Oracle/src/main/resources/mybatis/oil/ThDeviceReportMapper.xml index 96a9f66..3121264 100644 --- a/RuoYi-Vue-Oracle/src/main/resources/mybatis/oil/ThDeviceReportMapper.xml +++ b/RuoYi-Vue-Oracle/src/main/resources/mybatis/oil/ThDeviceReportMapper.xml @@ -169,9 +169,11 @@ 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 diff --git a/ruoyi-ui/src/views/dataStatistics/daily/index.vue b/ruoyi-ui/src/views/dataStatistics/daily/index.vue index 1f4acd3..c43c517 100644 --- a/ruoyi-ui/src/views/dataStatistics/daily/index.vue +++ b/ruoyi-ui/src/views/dataStatistics/daily/index.vue @@ -38,7 +38,7 @@ 港区数: {{ getChildCount(row, "ppp", "pp") }} 平均值: {{ calculateChildAvg(row, "ppp") }}平均值: {{ calculateChildAvg(row, "ppp") }} mg/m³ @@ -50,7 +50,7 @@ 企业数: {{ getChildCount(row, "pp", "p") }} 平均值: {{ calculateChildAvg(row, "pp") }}平均值: {{ calculateChildAvg(row, "pp") }} mg/m³ @@ -62,19 +62,23 @@ 设备数: {{ getChildCount(row, "p", "sn") }} 平均值: {{ calculateChildAvg(row, "p") }}平均值: {{ calculateChildAvg(row, "p") }} mg/m³ - + + > + + {{ row.avgDs }} mg/m³ + +