From 663dd6ef91a00f1fe0d0e08534d4fd3a6f0b9e92 Mon Sep 17 00:00:00 2001 From: guo Date: Fri, 26 Jan 2024 14:35:05 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DeepExcavationMonitorTypeController.java | 3 ++- .../entity/vo/MonitorTypeAlarmCountVo.java | 16 +++++++++++ .../DeepExcavationMonitorTypeMapper.java | 3 ++- .../xml/DeepExcavationMonitorTypeMapper.xml | 27 +++---------------- .../IDeepExcavationMonitorTypeService.java | 3 ++- .../DeepExcavationMonitorTypeServiceImpl.java | 3 ++- .../smoke/mapper/xml/SmokeDevMapper.xml | 2 +- 7 files changed, 28 insertions(+), 29 deletions(-) create mode 100644 src/main/java/com/zhgd/xmgl/modules/foundation/entity/vo/MonitorTypeAlarmCountVo.java diff --git a/src/main/java/com/zhgd/xmgl/modules/foundation/controller/DeepExcavationMonitorTypeController.java b/src/main/java/com/zhgd/xmgl/modules/foundation/controller/DeepExcavationMonitorTypeController.java index 6bb081ad0..731c1be01 100644 --- a/src/main/java/com/zhgd/xmgl/modules/foundation/controller/DeepExcavationMonitorTypeController.java +++ b/src/main/java/com/zhgd/xmgl/modules/foundation/controller/DeepExcavationMonitorTypeController.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.zhgd.jeecg.common.api.vo.Result; import com.zhgd.jeecg.common.mybatis.EntityMap; import com.zhgd.xmgl.modules.foundation.entity.DeepExcavationMonitorType; +import com.zhgd.xmgl.modules.foundation.entity.vo.MonitorTypeAlarmCountVo; import com.zhgd.xmgl.modules.foundation.service.IDeepExcavationMonitorTypeService; import com.zhgd.xmgl.util.MessageUtil; import io.swagger.annotations.Api; @@ -125,7 +126,7 @@ public class DeepExcavationMonitorTypeController { @ApiImplicitParam(name = "searchType", value = "类型,1查询近7天,2查询30天", paramType = "body", required = true, dataType = "String"), }) @PostMapping(value = "/selectMonitorTypeAlarmCountList") - public Result>> selectMonitorTypeAlarmCountList(@RequestBody Map map) { + public Result> selectMonitorTypeAlarmCountList(@RequestBody Map map) { return Result.success(deepExcavationMonitorTypeService.selectMonitorTypeAlarmCountList(map)); } } diff --git a/src/main/java/com/zhgd/xmgl/modules/foundation/entity/vo/MonitorTypeAlarmCountVo.java b/src/main/java/com/zhgd/xmgl/modules/foundation/entity/vo/MonitorTypeAlarmCountVo.java new file mode 100644 index 000000000..8428b560b --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/foundation/entity/vo/MonitorTypeAlarmCountVo.java @@ -0,0 +1,16 @@ +package com.zhgd.xmgl.modules.foundation.entity.vo; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +@Data +public class MonitorTypeAlarmCountVo { + @JsonProperty("rateAlarmNumber") + private Integer rateAlarmNumber; + @JsonProperty("monitorTypeName") + private String monitorTypeName; + @JsonProperty("normalNumber") + private Integer normalNumber; + @JsonProperty("superAlarmNumber") + private Integer superAlarmNumber; +} diff --git a/src/main/java/com/zhgd/xmgl/modules/foundation/mapper/DeepExcavationMonitorTypeMapper.java b/src/main/java/com/zhgd/xmgl/modules/foundation/mapper/DeepExcavationMonitorTypeMapper.java index 2787e3b57..bb54fb2a3 100644 --- a/src/main/java/com/zhgd/xmgl/modules/foundation/mapper/DeepExcavationMonitorTypeMapper.java +++ b/src/main/java/com/zhgd/xmgl/modules/foundation/mapper/DeepExcavationMonitorTypeMapper.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.zhgd.jeecg.common.mybatis.EntityMap; import com.zhgd.xmgl.modules.foundation.entity.DeepExcavationMonitorType; +import com.zhgd.xmgl.modules.foundation.entity.vo.MonitorTypeAlarmCountVo; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -27,5 +28,5 @@ public interface DeepExcavationMonitorTypeMapper extends BaseMapper selectMonitorTypeList(Map map); - List> selectMonitorTypeAlarmCountList(Map map); + List selectMonitorTypeAlarmCountList(Map map); } diff --git a/src/main/java/com/zhgd/xmgl/modules/foundation/mapper/xml/DeepExcavationMonitorTypeMapper.xml b/src/main/java/com/zhgd/xmgl/modules/foundation/mapper/xml/DeepExcavationMonitorTypeMapper.xml index 86af4df76..b24abc116 100644 --- a/src/main/java/com/zhgd/xmgl/modules/foundation/mapper/xml/DeepExcavationMonitorTypeMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/foundation/mapper/xml/DeepExcavationMonitorTypeMapper.xml @@ -63,7 +63,8 @@ - SELECT demt.monitor_type_name monitorTypeName, IFNULL(c.normal_number, 0) normalNumber, IFNULL(c.super_alarm_number, 0) superAlarmNumber, @@ -95,28 +96,6 @@ GROUP BY t2.rela_id) c ON demtr.id = c.rela_id inner join deep_excavation_monitor_type demt on demtr.monitor_type_id = demt.id where demtr.deep_excavation_id = #{deepExcavationId} - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + diff --git a/src/main/java/com/zhgd/xmgl/modules/foundation/service/IDeepExcavationMonitorTypeService.java b/src/main/java/com/zhgd/xmgl/modules/foundation/service/IDeepExcavationMonitorTypeService.java index 68aa1bd60..afa6969c4 100644 --- a/src/main/java/com/zhgd/xmgl/modules/foundation/service/IDeepExcavationMonitorTypeService.java +++ b/src/main/java/com/zhgd/xmgl/modules/foundation/service/IDeepExcavationMonitorTypeService.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.IService; import com.zhgd.jeecg.common.mybatis.EntityMap; import com.zhgd.xmgl.modules.foundation.entity.DeepExcavationMonitorType; +import com.zhgd.xmgl.modules.foundation.entity.vo.MonitorTypeAlarmCountVo; import java.util.List; import java.util.Map; @@ -24,5 +25,5 @@ public interface IDeepExcavationMonitorTypeService extends IService selectMonitorTypeList(Map map); - List> selectMonitorTypeAlarmCountList(Map map); + List selectMonitorTypeAlarmCountList(Map map); } diff --git a/src/main/java/com/zhgd/xmgl/modules/foundation/service/impl/DeepExcavationMonitorTypeServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/foundation/service/impl/DeepExcavationMonitorTypeServiceImpl.java index e6def2871..6216fc32a 100644 --- a/src/main/java/com/zhgd/xmgl/modules/foundation/service/impl/DeepExcavationMonitorTypeServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/foundation/service/impl/DeepExcavationMonitorTypeServiceImpl.java @@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.zhgd.jeecg.common.mybatis.EntityMap; import com.zhgd.xmgl.modules.foundation.entity.DeepExcavationMonitorType; +import com.zhgd.xmgl.modules.foundation.entity.vo.MonitorTypeAlarmCountVo; import com.zhgd.xmgl.modules.foundation.mapper.DeepExcavationMonitorTypeMapper; import com.zhgd.xmgl.modules.foundation.service.IDeepExcavationMonitorTypeService; import org.apache.commons.collections.MapUtils; @@ -66,7 +67,7 @@ public class DeepExcavationMonitorTypeServiceImpl extends ServiceImpl> selectMonitorTypeAlarmCountList(Map map) { + public List selectMonitorTypeAlarmCountList(Map map) { return deepExcavationMonitorTypeMapper.selectMonitorTypeAlarmCountList(map); } } diff --git a/src/main/java/com/zhgd/xmgl/modules/smoke/mapper/xml/SmokeDevMapper.xml b/src/main/java/com/zhgd/xmgl/modules/smoke/mapper/xml/SmokeDevMapper.xml index cc89d54a0..4ae9a8a11 100644 --- a/src/main/java/com/zhgd/xmgl/modules/smoke/mapper/xml/SmokeDevMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/smoke/mapper/xml/SmokeDevMapper.xml @@ -3,7 +3,7 @@