Compare commits

...

4 Commits

Author SHA1 Message Date
haozq 49e8709898 Merge remote-tracking branch 'origin/master' 2024-04-20 13:16:19 +08:00
haozq 337dd253e6 修改数据查询 2024-04-20 13:16:10 +08:00
haozq e8e5748940 Merge remote-tracking branch 'origin/master' 2024-04-20 12:57:28 +08:00
haozq 7172d287c9 修改数据查询 2024-04-20 12:53:39 +08:00
7 changed files with 74 additions and 6 deletions

View File

@ -45,4 +45,10 @@ public class DeviceValueVo {
* 是否告警
*/
private String isWarn;
/**
* 单位
*/
private String unit;
}

View File

@ -47,7 +47,6 @@ public class ScIndexController {
@ApiOperation(value = "告警提醒")
@GetMapping("alarmReminder")
public AjaxResult alarmReminder(ScreenParamDto dto){
@ -89,4 +88,10 @@ public class ScIndexController {
public AjaxResult getGtList(ScreenParamDto dto){
return service.getGtList(dto);
}
@ApiOperation(value = "工程下拉选集合")
@GetMapping("getProList")
public AjaxResult getProList(ScreenParamDto dto){
return service.getProList(dto);
}
}

View File

@ -1,5 +1,6 @@
package com.securitycontrol.screen.mapper;
import com.securitycontrol.entity.background.vo.GtVo;
import com.securitycontrol.entity.screen.dto.ScreenParamDto;
import com.securitycontrol.entity.screen.vo.ConstrQuality;
import com.securitycontrol.entity.screen.vo.MapRiskVo;
@ -146,4 +147,18 @@ public interface IScIndexMapper {
*/
@MapKey("bidCode")
List<Map<String, Object>> getDangerNum(@Param("orgId") String orgId, @Param("params") ScreenParamDto dto);
/**
* 查询杆塔集合
* @param dto
* @return
*/
List<GtVo> getGtList(ScreenParamDto dto);
/**
* 工程下拉选集合
* @param dto
* @return
*/
List<GtVo> getProList(ScreenParamDto dto);
}

View File

@ -114,4 +114,11 @@ public interface IScIndexService {
* @return
*/
AjaxResult getGtList(ScreenParamDto dto);
/**
* 查询工程下拉选集合
* @param dto
* @return
*/
AjaxResult getProList(ScreenParamDto dto);
}

View File

@ -3,6 +3,7 @@ package com.securitycontrol.screen.service.impl;
import com.securitycontrol.common.core.constant.Constant;
import com.securitycontrol.common.core.utils.aes.DateTimeHelper;
import com.securitycontrol.common.core.web.domain.AjaxResult;
import com.securitycontrol.entity.background.vo.GtVo;
import com.securitycontrol.entity.screen.dto.ScreenParamDto;
import com.securitycontrol.entity.screen.vo.ConstrQuality;
import com.securitycontrol.entity.screen.vo.MapRiskVo;
@ -333,7 +334,29 @@ public class ScIndexServiceImpl implements IScIndexService {
@Override
public AjaxResult getGtList(ScreenParamDto dto) {
try{
List<GtVo> list=mapper.getGtList(dto);
return AjaxResult.success(list);
}catch (Exception e){
log.error(e.toString());
}
return AjaxResult.success(new ArrayList<>());
}
return null;
/**
* 工程下拉选结合
* @param dto
* @return
*/
@Override
public AjaxResult getProList(ScreenParamDto dto) {
try{
List<GtVo> list=mapper.getProList(dto);
return AjaxResult.success(list);
}catch (Exception e){
log.error(e.toString());
}
return AjaxResult.success(new ArrayList<>());
}
}

View File

@ -60,9 +60,10 @@
IFNULL(tdv.is_warn,'0') AS warn
FROM tb_pro_bd tpd
INNER JOIN tb_bd_device tbd ON tpd.id = tbd.bd_id
INNER JOIN sys_dict sd ON sd.dict_code = tbd.devic_type AND sd.del_flag = 0 AND sd.dict_code= #{typeCode}
INNER JOIN sys_dict sd ON sd.dict_code = tbd.devic_type AND sd.del_flag = 0
LEFT JOIN tb_device_detail tdd ON tdd.device_id = tbd.device_id AND tdd.del_flag = 0
LEFT JOIN tb_device_value tdv ON tdd.id = tdv.attribute_id
where tbd.devic_type=1902
</select>
<!--设备状态 目前只查询边带设备-->
<select id="deviceStatus" resultType="java.util.Map">
@ -134,4 +135,15 @@
WHERE jwp.start_date BETWEEN #{params.startTime} AND #{params.endTime} AND jwp.end_date BETWEEN #{params.startTime} AND #{params.endTime}
AND jwp.build_no = #{orgId}
</select>
<select id="getGtList" resultType="com.securitycontrol.entity.background.vo.GtVo">
select gt_name gtName,lat,lon,tp.pro_name proName
from t_pro_gt pg
left join tb_project tp on pg.bid_code=tp.bid_code
where pg.del_flag=0 and pg.bid_code=#{bidCode}
</select>
<select id="getProList" resultType="com.securitycontrol.entity.background.vo.GtVo">
select bid_code bidCode,pro_name proName
from tb_project
where del_flag=0
</select>
</mapper>

View File

@ -9,14 +9,14 @@
</select>
<!--查询环境检测数据-->
<select id="getProJcData" resultType="com.securitycontrol.entity.screen.vo.DeviceValueVo">
select bdd.device_name deviceName,tdd.mode_name modelName,
tdv.val,tdv.is_warn isWarn,tdv.create_time createTime,sd.dict_name deviceType
select bdd.device_name deviceName,tdd.mode_name modelName,tdv.unit,
tdv.val,tdv.is_warn isWarn,tdv.create_time createTime,sd.dict_name deviceType
from tb_pro_bd bd
INNER join tb_bd_device bdd on bdd.bd_id=bd.id and bdd.del_flag=0
LEFT JOIN sys_dict sd on sd.dict_code=bdd.devic_type
left join tb_device_detail tdd on tdd.device_id=bdd.device_id and tdd.del_flag=0
left join tb_device_value tdv on tdd.id=tdv.attribute_id
where tdd.mode_name is not null and sd.dict_code=#{typeCode}
where tdd.mode_name is not null and bdd.devic_type=1902
and bd.bid_code=#{bidCode}
</select>
<select id="getWeekRiskNum" resultType="java.lang.Integer">