bug修复
This commit is contained in:
parent
409587205b
commit
663dd6ef91
@ -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<List<Map<String, Object>>> selectMonitorTypeAlarmCountList(@RequestBody Map<String, Object> map) {
|
||||
public Result<List<MonitorTypeAlarmCountVo>> selectMonitorTypeAlarmCountList(@RequestBody Map<String, Object> map) {
|
||||
return Result.success(deepExcavationMonitorTypeService.selectMonitorTypeAlarmCountList(map));
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
@ -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<DeepExcavati
|
||||
|
||||
List<EntityMap> selectMonitorTypeList(Map<String, Object> map);
|
||||
|
||||
List<Map<String, Object>> selectMonitorTypeAlarmCountList(Map<String, Object> map);
|
||||
List<MonitorTypeAlarmCountVo> selectMonitorTypeAlarmCountList(Map<String, Object> map);
|
||||
}
|
||||
|
||||
@ -63,7 +63,8 @@
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectMonitorTypeAlarmCountList" resultType="java.util.Map">
|
||||
<select id="selectMonitorTypeAlarmCountList"
|
||||
resultType="com.zhgd.xmgl.modules.foundation.entity.vo.MonitorTypeAlarmCountVo">
|
||||
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}
|
||||
|
||||
|
||||
<!-- SELECT a.monitor_type_name monitorTypeName,-->
|
||||
<!-- IFNULL(c.warning_num,0) warningNum,-->
|
||||
<!-- IFNULL(c.alarm_num,0) alarmNum,-->
|
||||
<!-- IFNULL(c.control_num,0) controlNum-->
|
||||
<!-- from deep_excavation_monitor_type a-->
|
||||
<!-- LEFT JOIN (SELECT t2.rela_id,-->
|
||||
<!-- IFNULL(SUM((case when t1.alarm_state=1 then 1 else 0 end)),0) warning_num,-->
|
||||
<!-- IFNULL(SUM((case when t1.alarm_state=2 then 1 else 0 end)),0) alarm_num,-->
|
||||
<!-- IFNULL(SUM((case when t1.alarm_state=3 then 1 else 0 end)),0) control_num-->
|
||||
<!-- from deep_excavation_current_data t1 INNER JOIN deep_excavation_measure_point t2 ON-->
|
||||
<!-- t1.measuring_point_sn=t2.measure_point_number-->
|
||||
<!-- WHERE t1.project_sn=#{projectSn} and t2.deep_excavation_id=#{deepExcavationId}-->
|
||||
<!-- <if test="searchType == '1'.toString()">-->
|
||||
<!-- AND t1.receive_time >=CONCAT(DATE_FORMAT(DATE_ADD(NOW(),INTERVAL -6 DAY),'%Y-%m-%d'),' 00:00:00')-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="searchType == '2'.toString()">-->
|
||||
<!-- AND t1.receive_time >=CONCAT(DATE_FORMAT(DATE_ADD(NOW(),INTERVAL -30 DAY),'%Y-%m-%d'),' 00:00:00')-->
|
||||
<!-- </if>-->
|
||||
<!-- GROUP BY t2.rela_id) c ON a.id=c.monitor_type_id-->
|
||||
<!-- where a.project_sn=#{projectSn} and a.deep_excavation_id=#{deepExcavationId}-->
|
||||
</select>
|
||||
<select id="selectDeepExcavationMonitorPage" resultType="com.zhgd.jeecg.common.mybatis.EntityMap">
|
||||
SELECT demtr.*,
|
||||
|
||||
@ -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<DeepExcavati
|
||||
|
||||
List<EntityMap> selectMonitorTypeList(Map<String, Object> map);
|
||||
|
||||
List<Map<String,Object>> selectMonitorTypeAlarmCountList(Map<String, Object> map);
|
||||
List<MonitorTypeAlarmCountVo> selectMonitorTypeAlarmCountList(Map<String, Object> map);
|
||||
}
|
||||
|
||||
@ -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<DeepExcava
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> selectMonitorTypeAlarmCountList(Map<String, Object> map) {
|
||||
public List<MonitorTypeAlarmCountVo> selectMonitorTypeAlarmCountList(Map<String, Object> map) {
|
||||
return deepExcavationMonitorTypeMapper.selectMonitorTypeAlarmCountList(map);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<mapper namespace="com.zhgd.xmgl.modules.smoke.mapper.SmokeDevMapper">
|
||||
<select id="queryWrapper" resultType="com.zhgd.xmgl.modules.smoke.entity.SmokeDev">
|
||||
select sd.*,ti.team_name dutyTeamInfoName,1 online
|
||||
from smoke_dev sd inner join team_info
|
||||
from smoke_dev sd left join team_info
|
||||
ti on ti.id=sd.duty_team_info_id
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user