Commit 48541dab authored by zhangsen's avatar zhangsen

分析需求API

parent dc23c3b4
...@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils; import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.boot.module.jxiop.api.entity.StationBasic; import com.yeejoin.amos.boot.module.jxiop.api.entity.StationBasic;
import com.yeejoin.amos.boot.module.jxiop.api.feign.RiskWarningFeign;
import com.yeejoin.amos.boot.module.jxiop.api.mapper.StationBasicMapper; import com.yeejoin.amos.boot.module.jxiop.api.mapper.StationBasicMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.ESDto.ESEquipments; import com.yeejoin.amos.boot.module.jxiop.biz.ESDto.ESEquipments;
import com.yeejoin.amos.boot.module.jxiop.biz.constants.CommonConstans; import com.yeejoin.amos.boot.module.jxiop.biz.constants.CommonConstans;
...@@ -22,6 +23,7 @@ import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanHealthLevelMapper ...@@ -22,6 +23,7 @@ import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanHealthLevelMapper
import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanWarningRecordMapper; import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanWarningRecordMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.CommonServiceImpl; import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.CommonServiceImpl;
import com.yeejoin.amos.boot.module.jxiop.biz.tdmapper.IndicatorDataMapper; import com.yeejoin.amos.boot.module.jxiop.biz.tdmapper.IndicatorDataMapper;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
...@@ -63,6 +65,9 @@ public class BigScreenAnalyseController extends BaseController { ...@@ -63,6 +65,9 @@ public class BigScreenAnalyseController extends BaseController {
@Autowired @Autowired
IndicatorDataMapper indicatorDataMapper; IndicatorDataMapper indicatorDataMapper;
@Autowired
RiskWarningFeign riskWarningFeign;
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "GET", value = "场站设备健康状态指数与趋势 - 仪表盘", notes = "场站设备健康状态指数与趋势 - 仪表盘") @ApiOperation(httpMethod = "GET", value = "场站设备健康状态指数与趋势 - 仪表盘", notes = "场站设备健康状态指数与趋势 - 仪表盘")
@GetMapping(value = "/getHealthScoreInfo") @GetMapping(value = "/getHealthScoreInfo")
...@@ -610,5 +615,26 @@ public class BigScreenAnalyseController extends BaseController { ...@@ -610,5 +615,26 @@ public class BigScreenAnalyseController extends BaseController {
} }
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "风站/光伏 右下诊断分析")
@GetMapping("/getRiskHandleByVarDesc")
public ResponseModel<Map<String, String>> getRiskHandleByVarDesc(@RequestParam(value = "varDesc", required = false) String varDesc) {
FeignClientResult<List<String>> sevenEntityMcb = null;
try {
sevenEntityMcb = riskWarningFeign.getRiskHandleByVarDesc(varDesc);
} catch (Exception e) {
e.printStackTrace();
}
StringBuilder resultString = new StringBuilder();
List<String> result = sevenEntityMcb.getResult();
for (String s : result) {
resultString.append(s);
}
HashMap<String, String> stringStringHashMap = new HashMap<>();
stringStringHashMap.put("content", resultString.toString());
return ResponseHelper.buildResponse(stringStringHashMap);
}
} }
package com.yeejoin.amos.boot.module.jxiop.api.feign;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
import java.util.Map;
@FeignClient(name = "${mcb.warning.name:MCB-SERVER}", path = "risk", configuration = {FeignConfiguration.class})
public interface RiskWarningFeign {
/**
* 根据风险来源查询人员红黄绿吗信息
*/
@GetMapping("/model-risk-handle/getRiskHandleByVarDesc")
FeignClientResult<List<String>> getRiskHandleByVarDesc(@RequestParam(required = false, value = "varDesc") String varDesc);
}
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