Commit 3de67164 authored by KeYong's avatar KeYong

修改bug

parent c61d6579
...@@ -435,7 +435,11 @@ public class ConfigureController extends AbstractBaseController { ...@@ -435,7 +435,11 @@ public class ConfigureController extends AbstractBaseController {
if (StringUtils.isNotBlank(systemCode)) { if (StringUtils.isNotBlank(systemCode)) {
hashMap.put("systemCode", systemCode); hashMap.put("systemCode", systemCode);
} }
return CommonResponseUtil.success(iFireFightingSystemService.getSystemName(hashMap)); Map<String, Object> map = iFireFightingSystemService.getSystemName(hashMap);
if (StringUtils.isEmpty(systemCode)) {
map.put("name", "");
}
return CommonResponseUtil.success(map);
} }
@PersonIdentify @PersonIdentify
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
...@@ -459,6 +463,34 @@ public class ConfigureController extends AbstractBaseController { ...@@ -459,6 +463,34 @@ public class ConfigureController extends AbstractBaseController {
} }
return CommonResponseUtil.success(iFireFightingSystemService.getSystemStatus(hashMap)); return CommonResponseUtil.success(iFireFightingSystemService.getSystemStatus(hashMap));
} }
@PersonIdentify
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(value = "获取系统工作状态(根据系统编码查询)")
@GetMapping("/buildSystemStatus")
public ResponseModel buildEquipSystemStatus(@RequestParam(required = false) String systemCode) {
HashMap<String, Object> hashMap = new HashMap<>();
ReginParams reginParams = getSelectedOrgInfo();
ReginParams.PersonIdentity personIdentity = reginParams.getPersonIdentity();
if (!ValidationUtil.isEmpty(personIdentity)) {
String bizOrgCode = personIdentity.getBizOrgCode();
if (StringUtils.isNotBlank(bizOrgCode)) {
hashMap.put("bizOrgCode", bizOrgCode);
}
if (bizOrgCode == null) {
return CommonResponseUtil.success(null);
}
}
if (StringUtils.isNotBlank(systemCode)) {
hashMap.put("systemCode", systemCode);
}
Map<String, Object> map = iFireFightingSystemService.getSystemStatus(hashMap);
if (map.containsKey("labels")) {
map.put("labels", "异常");
}
return CommonResponseUtil.success(map);
}
@PersonIdentify @PersonIdentify
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "获取系统近一月告警设备top5(根据系统编码查询)") @ApiOperation(value = "获取系统近一月告警设备top5(根据系统编码查询)")
......
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