From 3c2f72b9691824a4de53c6424b01d8d84955504c Mon Sep 17 00:00:00 2001 From: 15036302109 Date: Thu, 18 Jul 2024 11:03:43 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9A=90=E6=82=A3=E4=BF=A1=E6=81=AF=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=BB=9F=E8=AE=A1=E5=88=86=E6=9E=90=EF=BC=8C=E5=8F=AF?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=8C=87=E5=AE=9A=E6=9C=88=E4=BB=BD=E7=9A=84?= =?UTF-8?q?=E9=9A=90=E6=82=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/controller/ehs/EhsIndexStatisticsController.java | 7 ++++++- .../main/resources/mapper/ehs/EhsIndexStatisticsMapper.xml | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsIndexStatisticsController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsIndexStatisticsController.java index 96796b2..c9f9f21 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsIndexStatisticsController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsIndexStatisticsController.java @@ -125,6 +125,7 @@ public class EhsIndexStatisticsController extends BaseController { { DateTime dateTime = null; if (targetTime != null) { + targetTime = targetTime + "-01 00:00:00"; dateTime = DateUtil.parse(targetTime, "yyyy-MM-dd HH:mm:ss"); } if (targetTime == null) { @@ -142,6 +143,7 @@ public class EhsIndexStatisticsController extends BaseController { { DateTime dateTime = null; if (targetTime != null) { + targetTime = targetTime + "-01 00:00:00"; dateTime = DateUtil.parse(targetTime, "yyyy-MM-dd HH:mm:ss"); } if (targetTime == null) { @@ -159,6 +161,7 @@ public class EhsIndexStatisticsController extends BaseController { { DateTime dateTime = null; if (targetTime != null) { + targetTime = targetTime + "-01 00:00:00"; dateTime = DateUtil.parse(targetTime, "yyyy-MM-dd HH:mm:ss"); } if (targetTime == null) { @@ -176,6 +179,7 @@ public class EhsIndexStatisticsController extends BaseController { { DateTime dateTime = null; if (targetTime != null) { + targetTime = targetTime + "-01 00:00:00"; dateTime = DateUtil.parse(targetTime, "yyyy-MM-dd HH:mm:ss"); } if (targetTime == null) { @@ -226,7 +230,7 @@ public class EhsIndexStatisticsController extends BaseController { return AjaxResult.success(row); } /** - * 隐患类型分析统计 + * 隐患整改进度分析统计 */ @ApiOperation("隐患整改进度分析统计") @GetMapping("/getHiddenDangerStatusMapList") @@ -234,6 +238,7 @@ public class EhsIndexStatisticsController extends BaseController { { DateTime dateTime = null; if (targetTime != null) { + targetTime = targetTime + "-01 00:00:00"; dateTime = DateUtil.parse(targetTime, "yyyy-MM-dd HH:mm:ss"); } if (targetTime == null) { diff --git a/ruoyi-system/src/main/resources/mapper/ehs/EhsIndexStatisticsMapper.xml b/ruoyi-system/src/main/resources/mapper/ehs/EhsIndexStatisticsMapper.xml index ccf6c4f..a2daadf 100644 --- a/ruoyi-system/src/main/resources/mapper/ehs/EhsIndexStatisticsMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/ehs/EhsIndexStatisticsMapper.xml @@ -168,6 +168,8 @@ SELECT ehs_hidden_danger WHERE DATE_FORMAT( #{targetTime}, '%Y-%m' ) = DATE_FORMAT( check_time, '%Y-%m' )) r ON r.dept_id = d.dept_id + WHERE + d.del_flag = 0 GROUP BY d.dept_id, d.dept_name