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