From 72e4dcf19aef74cf7cbb8dd66bdff14c76d3ffbe Mon Sep 17 00:00:00 2001 From: 15036302109 Date: Mon, 25 Mar 2024 17:40:18 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9A=90=E6=82=A3=E6=95=B0=E6=8D=AE=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E5=88=86=E6=9E=90=EF=BC=9A=E5=B9=B4=E5=BA=A6=E9=9A=90?= =?UTF-8?q?=E6=82=A3=E6=95=B0=E6=8D=AE=E7=BB=9F=E8=AE=A1=E5=88=86=E6=9E=90?= =?UTF-8?q?=E6=9F=B1=E5=BD=A2=E5=9B=BE=E4=B8=8D=E6=98=BE=E7=A4=BAbug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D,=E9=9A=90=E6=82=A3=E6=95=B0=E9=87=8F?= =?UTF-8?q?=E4=B8=8D=E6=AD=A3=E7=A1=AE=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/ehs/EhsIndexStatisticsMapper.xml | 2 +- ruoyi-ui/src/views/ehs/ehsExamples/index.vue | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ruoyi-system/src/main/resources/mapper/ehs/EhsIndexStatisticsMapper.xml b/ruoyi-system/src/main/resources/mapper/ehs/EhsIndexStatisticsMapper.xml index d0f2247..8499f6f 100644 --- a/ruoyi-system/src/main/resources/mapper/ehs/EhsIndexStatisticsMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/ehs/EhsIndexStatisticsMapper.xml @@ -325,7 +325,7 @@ SELECT SELECT DATE_FORMAT( r.check_time, '%Y-%m' ) date_time, r.hidden_danger_grade, - sum( CASE WHEN r.hidden_danger_id IS NOT NULL THEN 1 ELSE 0 END ) 'value' + IFNULL(SUM(r.hd_count),0) 'value' FROM ehs_hidden_danger r diff --git a/ruoyi-ui/src/views/ehs/ehsExamples/index.vue b/ruoyi-ui/src/views/ehs/ehsExamples/index.vue index 8a0ba69..01a2347 100644 --- a/ruoyi-ui/src/views/ehs/ehsExamples/index.vue +++ b/ruoyi-ui/src/views/ehs/ehsExamples/index.vue @@ -215,6 +215,7 @@ export default { console.log(tab, event); }, async leftCenterinit() { + this.year = new Date().getFullYear(); let res = await getDangerList(this.year); let temp = res.data; let legendData = [];