Commit 9e872afd authored by chenzhao's avatar chenzhao

修改bug

parent 3423fc85
...@@ -19,6 +19,7 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledObjsDto; ...@@ -19,6 +19,7 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledObjsDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.ESAlertCalledDto; import com.yeejoin.amos.boot.module.jcs.api.dto.ESAlertCalledDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.ESAlertCalledRequestDto; import com.yeejoin.amos.boot.module.jcs.api.dto.ESAlertCalledRequestDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled; import com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue;
import com.yeejoin.amos.boot.module.jcs.api.enums.AlertStatusEnum; import com.yeejoin.amos.boot.module.jcs.api.enums.AlertStatusEnum;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertCalledServiceImpl; import com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertCalledServiceImpl;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertFormValueServiceImpl; import com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertFormValueServiceImpl;
...@@ -55,7 +56,6 @@ import java.util.stream.Collectors; ...@@ -55,7 +56,6 @@ import java.util.stream.Collectors;
import java.util.stream.Stream; import java.util.stream.Stream;
/** /**
* 警情接警记录 * 警情接警记录
* *
...@@ -85,6 +85,10 @@ public class AlertCalledController extends BaseController { ...@@ -85,6 +85,10 @@ public class AlertCalledController extends BaseController {
OrgUsrServiceImpl iOrgUsrService; OrgUsrServiceImpl iOrgUsrService;
@Value("${redis.cache.failure.time}") @Value("${redis.cache.failure.time}")
private long time; private long time;
private static String ALETR_TYPE_AID = "1214";
private static String ALETR_TYPE_AID_STATUS = "patientStatus";
/** /**
* 新增警情接警记录 * 新增警情接警记录
* *
...@@ -94,19 +98,41 @@ public class AlertCalledController extends BaseController { ...@@ -94,19 +98,41 @@ public class AlertCalledController extends BaseController {
@PostMapping(value = "/save") @PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增警情接警记录", notes = "新增警情接警记录") @ApiOperation(httpMethod = "POST", value = "新增警情接警记录", notes = "新增警情接警记录")
@Transactional @Transactional
public ResponseModel<AlertCalled> saveAlertCalled(@RequestBody AlertCalledObjsDto alertCalledObjsDto) throws Exception{ public ResponseModel<AlertCalled> saveAlertCalled(@RequestBody AlertCalledObjsDto alertCalledObjsDto) throws Exception {
if (ValidationUtil.isEmpty(alertCalledObjsDto) if (ValidationUtil.isEmpty(alertCalledObjsDto)
|| ValidationUtil.isEmpty(alertCalledObjsDto.getAlertCalled())) || ValidationUtil.isEmpty(alertCalledObjsDto.getAlertCalled()))
throw new BadRequest("参数校验失败."); throw new BadRequest("参数校验失败.");
ReginParams reginParams =getSelectedOrgInfo(); ReginParams reginParams = getSelectedOrgInfo();
//获取当前登录人公司 //获取当前登录人公司
String name= reginParams.getCompany().getCompanyName(); String name = reginParams.getCompany().getCompanyName();
AlertCalled alertCalled = alertCalledObjsDto.getAlertCalled(); AlertCalled alertCalled = alertCalledObjsDto.getAlertCalled();
alertCalled.setCompanyName(name); alertCalled.setCompanyName(name);
alertCalledObjsDto.setAlertCalled(alertCalled); if (alertCalled.getAlertTypeCode().equals(ALETR_TYPE_AID)) {
alertCalledObjsDto =iAlertCalledService.createAlertCalled(alertCalledObjsDto); List<AlertFormValue> alertFormValue = alertCalledObjsDto.getAlertFormValue();
return ResponseHelper.buildResponse(alertCalledObjsDto.getAlertCalled()); alertFormValue.forEach(e -> {
if (e.getFieldCode().equals(ALETR_TYPE_AID_STATUS)) {
if (e.getFieldValueCode() != null) {
if (e.getFieldValueCode().contains(",")) {
String[] split = e.getFieldValueCode().split(",");
StringBuilder stringBuilder = new StringBuilder();
for (int i = 0; i < split.length; i++) {
DataDictionary hzxz = dataDictionaryService.getByCode(split[i], "HZXZ");
stringBuilder.append(hzxz.getName() + " ");
e.setFieldValue(stringBuilder.toString());
}
} else {
DataDictionary hzxz = dataDictionaryService.getByCode(e.getFieldValueCode(), "HZXZ");
e.setFieldValue(hzxz.getName());
}
}
}
});
alertCalledObjsDto.setAlertFormValue(alertFormValue);
}
alertCalledObjsDto.setAlertCalled(alertCalled);
alertCalledObjsDto = iAlertCalledService.createAlertCalled(alertCalledObjsDto);
return ResponseHelper.buildResponse(alertCalledObjsDto.getAlertCalled());
} }
/** /**
...@@ -145,7 +171,7 @@ public class AlertCalledController extends BaseController { ...@@ -145,7 +171,7 @@ public class AlertCalledController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "根据id查询", notes = "根据id查询") @ApiOperation(httpMethod = "GET", value = "根据id查询", notes = "根据id查询")
public ResponseModel<Object> selectById(@PathVariable Long id) { public ResponseModel<Object> selectById(@PathVariable Long id) {
return ResponseHelper.buildResponse(iAlertCalledService.selectAlertCalledById(id)); return ResponseHelper.buildResponse(iAlertCalledService.selectAlertCalledById(id));
} }
...@@ -161,7 +187,7 @@ public class AlertCalledController extends BaseController { ...@@ -161,7 +187,7 @@ public class AlertCalledController extends BaseController {
String alertTypeCode, String alertTypeCode,
String alertSourceCode, String alertSourceCode,
String callTimeStart, String callTimeStart,
String callTimeEnd){ String callTimeEnd) {
/* Page<AlertCalled> pageBean; /* Page<AlertCalled> pageBean;
IPage<AlertCalled> page; IPage<AlertCalled> page;
QueryWrapper<AlertCalled> alertCalledQueryWrapper = new QueryWrapper<>(); QueryWrapper<AlertCalled> alertCalledQueryWrapper = new QueryWrapper<>();
...@@ -175,7 +201,7 @@ public class AlertCalledController extends BaseController { ...@@ -175,7 +201,7 @@ public class AlertCalledController extends BaseController {
page.setCurrent(0L); page.setCurrent(0L);
page.setSize(Long.MAX_VALUE); page.setSize(Long.MAX_VALUE);
} else { } else {
page.setCurrent( (Long.parseLong(pageNum) - 1) * Long.parseLong(pageSize)); page.setCurrent((Long.parseLong(pageNum) - 1) * Long.parseLong(pageSize));
page.setSize(Long.parseLong(pageSize)); page.setSize(Long.parseLong(pageSize));
} }
/*分页存在问题 修改分页参数 陈召 2021-09-22 结束*/ /*分页存在问题 修改分页参数 陈召 2021-09-22 结束*/
...@@ -184,10 +210,10 @@ public class AlertCalledController extends BaseController { ...@@ -184,10 +210,10 @@ public class AlertCalledController extends BaseController {
/* bug2408 筛选参数解析异常 修改筛选条件方法 修改入参分离筛选条件 /* bug2408 筛选参数解析异常 修改筛选条件方法 修改入参分离筛选条件
alertStatus 警情状态 alertTypeCode 报警类型code alertSourceCode 警情来源code alertStatus 警情状态 alertTypeCode 报警类型code alertSourceCode 警情来源code
陈召 2021-08-21 开始*/ 陈召 2021-08-21 开始*/
IPage<AlertCalled> alertCalledIPage = iAlertCalledService.queryForCalledList(page, alertStatus,alertTypeCode, alertSourceCode, callTimeStart, callTimeEnd,sort); IPage<AlertCalled> alertCalledIPage = iAlertCalledService.queryForCalledList(page, alertStatus, alertTypeCode, alertSourceCode, callTimeStart, callTimeEnd, sort);
/* bug 2406 接警记录,列表缺少警情状态字段 by litw start*/ /* bug 2406 接警记录,列表缺少警情状态字段 by litw start*/
alertCalledIPage.getRecords().stream().forEach(e->{ alertCalledIPage.getRecords().stream().forEach(e -> {
if(e.getAlertStatus()) { if (e.getAlertStatus()) {
e.setAlertStatusStr(AlertStatusEnum.CLOSED.getName()); e.setAlertStatusStr(AlertStatusEnum.CLOSED.getName());
} else { } else {
e.setAlertStatusStr(AlertStatusEnum.UNCLOSED.getName()); e.setAlertStatusStr(AlertStatusEnum.UNCLOSED.getName());
...@@ -200,12 +226,11 @@ public class AlertCalledController extends BaseController { ...@@ -200,12 +226,11 @@ public class AlertCalledController extends BaseController {
} }
/** /**
*
* <pre> * <pre>
* 相似警情分页查询 * 相似警情分页查询
* </pre> * </pre>
* *
* @param * @param
* @param current * @param current
* @param size * @param size
* @return * @return
...@@ -215,7 +240,7 @@ public class AlertCalledController extends BaseController { ...@@ -215,7 +240,7 @@ public class AlertCalledController extends BaseController {
@ApiOperation(value = "相似警情分页查询") @ApiOperation(value = "相似警情分页查询")
@PostMapping(value = "/page/similar") @PostMapping(value = "/page/similar")
public ResponseModel<Page<ESAlertCalledDto>> pageBySimilar( public ResponseModel<Page<ESAlertCalledDto>> pageBySimilar(
@RequestBody ESAlertCalledRequestDto alertCalledVo, @RequestBody ESAlertCalledRequestDto alertCalledVo,
@RequestParam(value = "current") int current, @RequestParam(value = "current") int current,
@RequestParam(value = "size") int size) throws Exception { @RequestParam(value = "size") int size) throws Exception {
/*bug 3090 警情填报,相似警情中响应级别错误显示为code 2021-10-13 chenzhao */ /*bug 3090 警情填报,相似警情中响应级别错误显示为code 2021-10-13 chenzhao */
...@@ -223,8 +248,8 @@ public class AlertCalledController extends BaseController { ...@@ -223,8 +248,8 @@ public class AlertCalledController extends BaseController {
List<ESAlertCalledDto> records = esAlertCalledDtoPage.getRecords(); List<ESAlertCalledDto> records = esAlertCalledDtoPage.getRecords();
for (ESAlertCalledDto record : records) { for (ESAlertCalledDto record : records) {
if (record.getResponseLevelCode() != null){ if (record.getResponseLevelCode() != null) {
DataDictionary byCode = dataDictionaryService.getByCode(record.getResponseLevelCode(),"XYJBR"); DataDictionary byCode = dataDictionaryService.getByCode(record.getResponseLevelCode(), "XYJBR");
record.setResponseLevel(byCode.getName()); record.setResponseLevel(byCode.getName());
} }
} }
...@@ -233,7 +258,6 @@ public class AlertCalledController extends BaseController { ...@@ -233,7 +258,6 @@ public class AlertCalledController extends BaseController {
} }
/** /**
*
* <pre> * <pre>
* 初始化ES * 初始化ES
* </pre> * </pre>
...@@ -257,24 +281,24 @@ public class AlertCalledController extends BaseController { ...@@ -257,24 +281,24 @@ public class AlertCalledController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "列表无分页查询", notes = "列表无分页查询") @ApiOperation(httpMethod = "GET", value = "列表无分页查询", notes = "列表无分页查询")
public ResponseModel<List<AlertCalled>> list(AlertCalled alertCalled) { public ResponseModel<List<AlertCalled>> list(AlertCalled alertCalled) {
QueryWrapper<AlertCalled> alertCalledQueryWrapper = new QueryWrapper<>(); QueryWrapper<AlertCalled> alertCalledQueryWrapper = new QueryWrapper<>();
setQueryWrapper(alertCalledQueryWrapper, alertCalled,null); setQueryWrapper(alertCalledQueryWrapper, alertCalled, null);
List<AlertCalled> list = iAlertCalledService.list(alertCalledQueryWrapper); List<AlertCalled> list = iAlertCalledService.list(alertCalledQueryWrapper);
return ResponseHelper.buildResponse(list); return ResponseHelper.buildResponse(list);
} }
private QueryWrapper<AlertCalled> setQueryWrapper(QueryWrapper<AlertCalled> queryWrapper, AlertCalled alertCalled,String sort){ private QueryWrapper<AlertCalled> setQueryWrapper(QueryWrapper<AlertCalled> queryWrapper, AlertCalled alertCalled, String sort) {
Class<? extends AlertCalled> aClass = alertCalled.getClass(); Class<? extends AlertCalled> aClass = alertCalled.getClass();
queryWrapper.eq("is_delete", 0); queryWrapper.eq("is_delete", 0);
if(sort!=null) { if (sort != null) {
String[] date= sort.split(","); String[] date = sort.split(",");
if(date[1].equals("ascend")) { if (date[1].equals("ascend")) {
queryWrapper.orderByAsc(RedisKey.humpToLine(date[0])); queryWrapper.orderByAsc(RedisKey.humpToLine(date[0]));
}else { } else {
queryWrapper.orderByDesc(RedisKey.humpToLine(date[0])); queryWrapper.orderByDesc(RedisKey.humpToLine(date[0]));
} }
}else { } else {
queryWrapper.orderByDesc("call_time"); queryWrapper.orderByDesc("call_time");
} }
if (alertCalled.getCallTimeStart() != null && alertCalled.getCallTimeEnd() != null) { if (alertCalled.getCallTimeStart() != null && alertCalled.getCallTimeEnd() != null) {
...@@ -283,7 +307,7 @@ public class AlertCalledController extends BaseController { ...@@ -283,7 +307,7 @@ public class AlertCalledController extends BaseController {
if (alertCalled.getIsFatherAlert()) { // 0:接警;1:处警 if (alertCalled.getIsFatherAlert()) { // 0:接警;1:处警
queryWrapper.isNull("father_alert"); queryWrapper.isNull("father_alert");
} }
if (!ValidationUtil.isEmpty(alertCalled.getAlertSourceCodeStr())){ if (!ValidationUtil.isEmpty(alertCalled.getAlertSourceCodeStr())) {
String[] arr = alertCalled.getAlertSourceCodeStr().split(","); String[] arr = alertCalled.getAlertSourceCodeStr().split(",");
List<String> collect = Arrays.stream(arr).collect(Collectors.toList()); List<String> collect = Arrays.stream(arr).collect(Collectors.toList());
queryWrapper.in("alert_source_code", collect); queryWrapper.in("alert_source_code", collect);
...@@ -308,8 +332,8 @@ public class AlertCalledController extends BaseController { ...@@ -308,8 +332,8 @@ public class AlertCalledController extends BaseController {
} else if (type.equals(Boolean.class)) { } else if (type.equals(Boolean.class)) {
Boolean fileValue = (Boolean) field.get(alertCalled); Boolean fileValue = (Boolean) field.get(alertCalled);
queryWrapper.eq(name, fileValue); queryWrapper.eq(name, fileValue);
}else if (type.equals(Long.class) || "long".equals(type.toString())) { } else if (type.equals(Long.class) || "long".equals(type.toString())) {
Long fileValue = (Long) field.get(alertCalled); Long fileValue = (Long) field.get(alertCalled);
queryWrapper.eq(name, fileValue); queryWrapper.eq(name, fileValue);
} }
} }
...@@ -330,12 +354,11 @@ public class AlertCalledController extends BaseController { ...@@ -330,12 +354,11 @@ public class AlertCalledController extends BaseController {
@GetMapping(value = "/dateRange/list") @GetMapping(value = "/dateRange/list")
@ApiOperation(httpMethod = "GET", value = "查询指定日期内警情列表", notes = "查询指定日期内警情列表") @ApiOperation(httpMethod = "GET", value = "查询指定日期内警情列表", notes = "查询指定日期内警情列表")
public ResponseModel<Map<String, Object>> listByDateRange(@RequestParam(value = "beginDate", required = false) String beginDate, public ResponseModel<Map<String, Object>> listByDateRange(@RequestParam(value = "beginDate", required = false) String beginDate,
@RequestParam("endDate") String endDate) { @RequestParam("endDate") String endDate) {
return ResponseHelper.buildResponse(iAlertCalledService.getAlertInfoList(beginDate, endDate)); return ResponseHelper.buildResponse(iAlertCalledService.getAlertInfoList(beginDate, endDate));
} }
/** /**
*
* <pre> * <pre>
* 设备联动紧急响应 * 设备联动紧急响应
* 启动所有消防队伍的警铃、广播,并自动开启所有车库门 * 启动所有消防队伍的警铃、广播,并自动开启所有车库门
...@@ -349,9 +372,9 @@ public class AlertCalledController extends BaseController { ...@@ -349,9 +372,9 @@ public class AlertCalledController extends BaseController {
@ApiOperation(httpMethod = "POST", value = "设备联动紧急响应", notes = "启动所有消防队伍的警铃、广播,并自动开启所有车库门") @ApiOperation(httpMethod = "POST", value = "设备联动紧急响应", notes = "启动所有消防队伍的警铃、广播,并自动开启所有车库门")
@Transactional @Transactional
@RestEventTrigger(value = "opreateLogEventHandler") @RestEventTrigger(value = "opreateLogEventHandler")
public ResponseModel<Boolean> controlEquip() throws Exception{ public ResponseModel<Boolean> controlEquip() throws Exception {
return ResponseHelper.buildResponse(iAlertCalledService.controlEquip()); return ResponseHelper.buildResponse(iAlertCalledService.controlEquip());
} }
/** /**
...@@ -363,10 +386,11 @@ public class AlertCalledController extends BaseController { ...@@ -363,10 +386,11 @@ public class AlertCalledController extends BaseController {
@PutMapping(value = "/reLocate") @PutMapping(value = "/reLocate")
@ApiOperation(httpMethod = "PUT", value = "警情重新定位", notes = "警情重新定位") @ApiOperation(httpMethod = "PUT", value = "警情重新定位", notes = "警情重新定位")
public ResponseModel<Boolean> reLocateById(@RequestParam String alertCalled, @RequestParam String longitude, public ResponseModel<Boolean> reLocateById(@RequestParam String alertCalled, @RequestParam String longitude,
@RequestParam String latitude) { @RequestParam String latitude) {
return ResponseHelper.buildResponse(iAlertCalledService.reLocate(alertCalled, longitude, latitude)); return ResponseHelper.buildResponse(iAlertCalledService.reLocate(alertCalled, longitude, latitude));
} }
/*2304 地址 联系人模糊查询缺失 陈召 2021-09-23 开始*/ /*2304 地址 联系人模糊查询缺失 陈召 2021-09-23 开始*/
/** /**
* 警情填报联系人模糊查询 * 警情填报联系人模糊查询
* *
...@@ -376,14 +400,14 @@ public class AlertCalledController extends BaseController { ...@@ -376,14 +400,14 @@ public class AlertCalledController extends BaseController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/getAmosId", method = RequestMethod.GET) @RequestMapping(value = "/getAmosId", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "警情填报联系人模糊查询", notes = "警情填报联系人模糊查询") @ApiOperation(httpMethod = "GET", value = "警情填报联系人模糊查询", notes = "警情填报联系人模糊查询")
public ResponseModel< Object> getContact ( ) { public ResponseModel<Object> getContact() {
if (redisUtils.hasKey(RedisKey.CONTACT_USER)) { if (redisUtils.hasKey(RedisKey.CONTACT_USER)) {
Object obj = redisUtils.get(RedisKey.CONTACT_USER); Object obj = redisUtils.get(RedisKey.CONTACT_USER);
return ResponseHelper.buildResponse(obj); return ResponseHelper.buildResponse(obj);
} else { } else {
List<Map<String, String>> contactName = iAlertCalledService.getContactName(); List<Map<String, String>> contactName = iAlertCalledService.getContactName();
redisUtils.set(RedisKey.CONTACT_USER , contactName, time); redisUtils.set(RedisKey.CONTACT_USER, contactName, time);
return ResponseHelper.buildResponse(contactName); return ResponseHelper.buildResponse(contactName);
} }
} }
...@@ -397,7 +421,7 @@ public class AlertCalledController extends BaseController { ...@@ -397,7 +421,7 @@ public class AlertCalledController extends BaseController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/getAddress", method = RequestMethod.GET) @RequestMapping(value = "/getAddress", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "警情填报地址模糊查询", notes = "警情填报地址模糊查询") @ApiOperation(httpMethod = "GET", value = "警情填报地址模糊查询", notes = "警情填报地址模糊查询")
public ResponseModel<List<String>> getAddress () { public ResponseModel<List<String>> getAddress() {
return ResponseHelper.buildResponse(iAlertCalledService.getCalledAddress()); return ResponseHelper.buildResponse(iAlertCalledService.getCalledAddress());
} }
...@@ -412,45 +436,45 @@ public class AlertCalledController extends BaseController { ...@@ -412,45 +436,45 @@ public class AlertCalledController extends BaseController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/getAlarmGiveStatistics", method = RequestMethod.GET) @RequestMapping(value = "/getAlarmGiveStatistics", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "app领导统计", notes = "app领导统计") @ApiOperation(httpMethod = "GET", value = "app领导统计", notes = "app领导统计")
public ResponseModel<AlarmGiveStatisticsDto> getAlarmGiveStatistics () { public ResponseModel<AlarmGiveStatisticsDto> getAlarmGiveStatistics() {
AlarmGiveStatisticsDto dto = new AlarmGiveStatisticsDto(); AlarmGiveStatisticsDto dto = new AlarmGiveStatisticsDto();
LambdaQueryWrapper<AlertCalled> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<AlertCalled> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.isNull(AlertCalled::getFatherAlert); queryWrapper.isNull(AlertCalled::getFatherAlert);
queryWrapper.eq(AlertCalled::getAlertStatus,true); queryWrapper.eq(AlertCalled::getAlertStatus, true);
queryWrapper.eq(AlertCalled::getIsDelete,false); queryWrapper.eq(AlertCalled::getIsDelete, false);
Integer alertNum = iAlertCalledService.getBaseMapper().selectCount(queryWrapper); Integer alertNum = iAlertCalledService.getBaseMapper().selectCount(queryWrapper);
dto.setAlarmNum(alertNum); dto.setAlarmNum(alertNum);
ResponseModel<Map<String, Object>> fireAlarm = equipFeignClient.getFireAlarm(); ResponseModel<Map<String, Object>> fireAlarm = equipFeignClient.getFireAlarm();
Map<String, Object> map = fireAlarm.getResult(); Map<String, Object> map = fireAlarm.getResult();
int fireAlarmNum = !ValidationUtil.isEmpty(map.get("FireAlarmNum")) ? Integer.valueOf(map.get("FireAlarmNum").toString()) : 0; int fireAlarmNum = !ValidationUtil.isEmpty(map.get("FireAlarmNum")) ? Integer.valueOf(map.get("FireAlarmNum").toString()) : 0;
ResponseModel<Map<String, Object>> faultAlarm = equipFeignClient.getFaultAlarm(); ResponseModel<Map<String, Object>> faultAlarm = equipFeignClient.getFaultAlarm();
map = faultAlarm.getResult(); map = faultAlarm.getResult();
int faultAlarmNum = !ValidationUtil.isEmpty(map.get("FaultAlarmNum")) ? Integer.valueOf(map.get("FaultAlarmNum").toString()) : 0; int faultAlarmNum = !ValidationUtil.isEmpty(map.get("FaultAlarmNum")) ? Integer.valueOf(map.get("FaultAlarmNum").toString()) : 0;
ResponseModel<Map<String, Object>> monitorEvent = equipFeignClient.getMonitorEvent(); ResponseModel<Map<String, Object>> monitorEvent = equipFeignClient.getMonitorEvent();
map = monitorEvent.getResult(); map = monitorEvent.getResult();
int monitorEventNum = !ValidationUtil.isEmpty(map.get("monitorEventNum")) ? Integer.valueOf(map.get("monitorEventNum").toString()) : 0; int monitorEventNum = !ValidationUtil.isEmpty(map.get("monitorEventNum")) ? Integer.valueOf(map.get("monitorEventNum").toString()) : 0;
dto.setIotDetection(fireAlarmNum+faultAlarmNum+monitorEventNum); dto.setIotDetection(fireAlarmNum + faultAlarmNum + monitorEventNum);
ResponseModel<Object> currentHiddenDanger = latentDangerFeignClient.getUnFinishedDangerCount(); ResponseModel<Object> currentHiddenDanger = latentDangerFeignClient.getUnFinishedDangerCount();
Integer currentHiddenDangerNum = (Integer) currentHiddenDanger.getResult(); Integer currentHiddenDangerNum = (Integer) currentHiddenDanger.getResult();
dto.setCurrentHiddenDanger(currentHiddenDangerNum); dto.setCurrentHiddenDanger(currentHiddenDangerNum);
dto.setAllNum(dto.getAlarmNum()+dto.getIotDetection()+currentHiddenDangerNum); dto.setAllNum(dto.getAlarmNum() + dto.getIotDetection() + currentHiddenDangerNum);
return ResponseHelper.buildResponse(dto); return ResponseHelper.buildResponse(dto);
} }
/** /**
* 获取坐席情况 * 获取坐席情况
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getLocation") @GetMapping(value = "/getLocation")
@ApiOperation(httpMethod = "GET", value = "模糊获取地址的方法", notes = "模糊获取地址的方法") @ApiOperation(httpMethod = "GET", value = "模糊获取地址的方法", notes = "模糊获取地址的方法")
public ResponseModel<Object> getLocationLike(@RequestParam(required = false) String locationt) { public ResponseModel<Object> getLocationLike(@RequestParam(required = false) String locationt) {
return ResponseHelper.buildResponse(iAlertCalledService.getLocationLike(locationt)); return ResponseHelper.buildResponse(iAlertCalledService.getLocationLike(locationt));
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment