人员管控添加是否告警图标
This commit is contained in:
parent
ac7e7c9811
commit
77cfc700f6
|
|
@ -236,4 +236,16 @@ public class ConsControlController extends BaseController {
|
|||
public AjaxResult getPhotosById(@RequestBody BraceletParamsDto dto) {
|
||||
return service.getPhotosById(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断人员管控是否有告警
|
||||
* @param dto
|
||||
* @return AjaxResult
|
||||
* @author cwchen
|
||||
* @date 2024/9/29 15:16
|
||||
*/
|
||||
@GetMapping("getPersonControlIsWarn")
|
||||
public AjaxResult getPersonControlIsWarn(BraceletParamsDto dto) {
|
||||
return service.getPersonControlIsWarn(dto);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -179,4 +179,13 @@ public interface IConsControlService {
|
|||
* @date 2024/8/22 10:01
|
||||
*/
|
||||
AjaxResult getPhotosById(BraceletParamsDto dto);
|
||||
|
||||
/**
|
||||
* 判断人员管控是否有告警
|
||||
* @param dto
|
||||
* @return AjaxResult
|
||||
* @author cwchen
|
||||
* @date 2024/9/29 15:17
|
||||
*/
|
||||
AjaxResult getPersonControlIsWarn(BraceletParamsDto dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -672,6 +672,28 @@ public class ConsControlServiceImpl implements IConsControlService {
|
|||
return AjaxResult.success(base64List);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getPersonControlIsWarn(BraceletParamsDto dto) {
|
||||
Integer isWarn = 0;
|
||||
try {
|
||||
List<PersonTreeVo> list = new ArrayList<>();
|
||||
list = mapper.getPersonsTree(dto);
|
||||
for (PersonTreeVo item : list) {
|
||||
if (Objects.equals(item.getLevel(), BusinessConstants.LEVEL)) {
|
||||
// 判断施工人员是否预警
|
||||
isWarn = beyondTheScopeOfConstruction(dto, item.getDevId(), item.getGtId());
|
||||
if(Objects.equals(isWarn,BusinessConstants.WARN)){
|
||||
isWarn = 1;
|
||||
return AjaxResult.success(isWarn);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString());
|
||||
}
|
||||
return AjaxResult.success(isWarn);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取文件
|
||||
*
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</if>
|
||||
AND tp.depart_id IS NOT NULL
|
||||
ORDER BY tw.create_time DESC
|
||||
LIMIT 54
|
||||
</select>
|
||||
<!--预警信息-->
|
||||
<select id="getWarnLists" resultType="com.bonus.common.entity.bracelet.vo.WarnInfoVo">
|
||||
|
|
|
|||
Loading…
Reference in New Issue