Commit 114f26b5 authored by caotao's avatar caotao

Merge branch 'developer' of http://39.98.45.134:8090/moa/amos-boot-biz into developer

parents c50da944 6ae54dac
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
</parent> </parent>
<artifactId>amos-boot-module-hygf-biz</artifactId> <artifactId>amos-boot-module-hygf-biz</artifactId>
<version>1.0.0</version> <version>1.0.0</version>
<name>amos-boot-module-jxiop-hygf</name> <name>amos-boot-module-hygf-biz</name>
<url>http://maven.apache.org</url> <url>http://maven.apache.org</url>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
......
...@@ -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);
}
} }
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
FROM FROM
( (
SELECT SELECT
IFNULL( AVG( HEALTH_INDEX ), 0 ) AS avgHealthIndex IFNULL( AVG( HEALTH_INDEX ), 100 ) AS avgHealthIndex
FROM FROM
idx_biz_fan_health_index idx_biz_fan_health_index
<where>ANALYSIS_TYPE = '按天' <where>ANALYSIS_TYPE = '按天'
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
UNION ALL UNION ALL
( (
SELECT SELECT
IFNULL( AVG( HEALTH_INDEX ), 0 ) AS avgHealthIndex IFNULL( AVG( HEALTH_INDEX ), 100 ) AS avgHealthIndex
FROM FROM
idx_biz_pv_health_index idx_biz_pv_health_index
<where> <where>
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
<select id="getHealthListInfo" resultType="java.util.Map"> <select id="getHealthListInfo" resultType="java.util.Map">
SELECT SELECT
IFNULL( AVG( HEALTH_INDEX ), 0 ) AS avgHealthIndex, IFNULL( AVG( HEALTH_INDEX ), 100 ) AS avgHealthIndex,
a.date a.date
FROM FROM
( (
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
FROM FROM
( (
SELECT SELECT
IFNULL( AVG( HEALTH_INDEX ), 0 ) AS avgHealthIndex, IFNULL( AVG( HEALTH_INDEX ), 100 ) AS avgHealthIndex,
ARAE ARAE
FROM FROM
idx_biz_fan_health_index idx_biz_fan_health_index
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
ARAE UNION ALL ARAE UNION ALL
( (
SELECT SELECT
IFNULL( AVG( HEALTH_INDEX ), 0 ) AS avgHealthIndex, IFNULL( AVG( HEALTH_INDEX ), 100 ) AS avgHealthIndex,
ARAE ARAE
FROM FROM
idx_biz_pv_health_index idx_biz_pv_health_index
...@@ -180,7 +180,7 @@ ...@@ -180,7 +180,7 @@
FROM FROM
( (
SELECT SELECT
IFNULL( AVG( HEALTH_INDEX ), 0 ) AS avgHealthIndex, IFNULL( AVG( HEALTH_INDEX ), 100 ) AS avgHealthIndex,
STATION STATION
FROM FROM
idx_biz_fan_health_index idx_biz_fan_health_index
...@@ -197,7 +197,7 @@ ...@@ -197,7 +197,7 @@
STATION UNION ALL STATION UNION ALL
( (
SELECT SELECT
IFNULL( AVG( HEALTH_INDEX ), 0 ) AS avgHealthIndex, IFNULL( AVG( HEALTH_INDEX ), 100 ) AS avgHealthIndex,
STATION STATION
FROM FROM
idx_biz_pv_health_index idx_biz_pv_health_index
...@@ -307,7 +307,7 @@ ...@@ -307,7 +307,7 @@
<select id="getSubSystemInfo" resultType="java.util.Map"> <select id="getSubSystemInfo" resultType="java.util.Map">
SELECT SELECT
IFNULL( HEALTH_INDEX, 0 ) AS healthIndex, IFNULL( HEALTH_INDEX, 100 ) AS healthIndex,
SUB_SYSTEM AS subSystem SUB_SYSTEM AS subSystem
FROM FROM
idx_biz_fan_health_index idx_biz_fan_health_index
...@@ -317,7 +317,7 @@ ...@@ -317,7 +317,7 @@
AND ANALYSIS_TYPE = '按天' AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = CURRENT_DATE AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = CURRENT_DATE
<if test="equipmentName != null and equipmentName != ''"> <if test="equipmentName != null and equipmentName != ''">
AND EQUIPMENT_NAME = #{equipmentName} AND EQUIPMENT_NAME like concat( '%', #{equipmentName} '风机系统')
</if> </if>
<if test="gatewayId != null and gatewayId != ''"> <if test="gatewayId != null and gatewayId != ''">
AND GATEWAY_ID = #{gatewayId} AND GATEWAY_ID = #{gatewayId}
...@@ -346,7 +346,7 @@ ...@@ -346,7 +346,7 @@
<select id="getFanHealthInfoList" resultType="java.util.Map"> <select id="getFanHealthInfoList" resultType="java.util.Map">
SELECT SELECT
IFNULL( AVG( HEALTH_INDEX ), 0 ) AS avgHealthIndex, IFNULL( AVG( HEALTH_INDEX ), 100 ) AS avgHealthIndex,
EQUIPMENT_NAME as equipmentName EQUIPMENT_NAME as equipmentName
FROM FROM
idx_biz_fan_health_index idx_biz_fan_health_index
...@@ -371,7 +371,7 @@ ...@@ -371,7 +371,7 @@
idx_biz_fan_point_process_variable_classification idx_biz_fan_point_process_variable_classification
<where> <where>
<if test="equipmentName != null and equipmentName != ''"> <if test="equipmentName != null and equipmentName != ''">
AND EQUIPMENT_NAME = #{equipmentName} AND EQUIPMENT_NAME like concat( '%', #{equipmentName} '风机系统')
</if> </if>
<if test="gatewayId != null and gatewayId != ''"> <if test="gatewayId != null and gatewayId != ''">
AND GATEWAY_ID = #{gatewayId} AND GATEWAY_ID = #{gatewayId}
...@@ -401,7 +401,7 @@ ...@@ -401,7 +401,7 @@
<select id="getHealthInfoBySubSystem" resultType="java.util.Map"> <select id="getHealthInfoBySubSystem" resultType="java.util.Map">
SELECT SELECT
IFNULL( avg( HEALTH_INDEX ), 0 ) AS healthIndex, IFNULL( avg( HEALTH_INDEX ), 100 ) AS healthIndex,
POINT_NAME AS pointName POINT_NAME AS pointName
FROM FROM
idx_biz_fan_health_index idx_biz_fan_health_index
...@@ -547,7 +547,8 @@ ...@@ -547,7 +547,8 @@
<select id="getPvPointNameListBySumSystem" resultType="java.util.Map"> <select id="getPvPointNameListBySumSystem" resultType="java.util.Map">
SELECT SELECT
POINT_NAME as pointName POINT_NAME as pointName,
INDEX_ADDRESS as indexAddress
FROM FROM
idx_biz_pv_point_process_variable_classification idx_biz_pv_point_process_variable_classification
<where> <where>
......
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