Commit 146dcbe1 authored by yangyang's avatar yangyang

Merge remote-tracking branch 'origin/developer' into developer

parents 01fcc8cd d6fd2670
...@@ -105,7 +105,6 @@ public class BigScreenAnalyseController extends BaseController { ...@@ -105,7 +105,6 @@ public class BigScreenAnalyseController extends BaseController {
return ResponseHelper.buildResponse(stringBigDecimalHashMap); return ResponseHelper.buildResponse(stringBigDecimalHashMap);
} }
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "GET", value = "场站设备健康状态指数与趋势 - 折线图", notes = "场站设备健康状态指数与趋势 - 折线图") @ApiOperation(httpMethod = "GET", value = "场站设备健康状态指数与趋势 - 折线图", notes = "场站设备健康状态指数与趋势 - 折线图")
@GetMapping(value = "/getHealthListInfo") @GetMapping(value = "/getHealthListInfo")
......
...@@ -130,6 +130,23 @@ public class TDBigScreenAnalyseController extends BaseController { ...@@ -130,6 +130,23 @@ public class TDBigScreenAnalyseController extends BaseController {
} }
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "GET", value = "场站设备健康状态指数与趋势 - 仪表盘-10分钟", notes = "场站设备健康状态指数与趋势 - 仪表盘-10分钟")
@GetMapping(value = "/getHealthScoreInfoByMinute")
public ResponseModel<Map<String, Object>> getHealthScoreInfoByMinute(@RequestParam(required = false) String areaCode,
@RequestParam(required = false) String stationCode,
@RequestParam (required = false) String tableName) {
HashMap<String, Object> stringBigDecimalHashMap = new HashMap<>();
if (CharSequenceUtil.isNotEmpty(stationCode)) {
StationBasic stationBasic = stationBasicMapper.selectById(stationCode);
stationCode = stationBasic.getFanGatewayId();
stringBigDecimalHashMap.put("value", idxBizFanHealthIndexMapper.getHealthScoreInfoByStationByMinute(stationCode, tableName));
return ResponseHelper.buildResponse(stringBigDecimalHashMap);
}
stringBigDecimalHashMap.put("value",
idxBizFanHealthIndexMapper.getHealthScoreInfoByLatest(areaCode, stationCode));
return ResponseHelper.buildResponse(stringBigDecimalHashMap);
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "GET", value = "场站设备健康状态指数与趋势 - 折线图", notes = "场站设备健康状态指数与趋势 - 折线图") @ApiOperation(httpMethod = "GET", value = "场站设备健康状态指数与趋势 - 折线图", notes = "场站设备健康状态指数与趋势 - 折线图")
@GetMapping(value = "/getHealthListInfo") @GetMapping(value = "/getHealthListInfo")
public ResponseModel<Map<String, Object>> getHealthListInfo(@RequestParam(required = false) String areaCode, public ResponseModel<Map<String, Object>> getHealthListInfo(@RequestParam(required = false) String areaCode,
......
...@@ -22,12 +22,13 @@ import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWarningRecord; ...@@ -22,12 +22,13 @@ import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWarningRecord;
public interface IdxBizFanHealthIndexMapper extends BaseMapper<IdxBizFanHealthIndex> { public interface IdxBizFanHealthIndexMapper extends BaseMapper<IdxBizFanHealthIndex> {
BigDecimal getHealthScoreInfo(@Param("areaCode") String areaCode, @Param("stationCode") String stationCode); BigDecimal getHealthScoreInfo(@Param("areaCode") String areaCode, @Param("stationCode") String stationCode);
BigDecimal getHealthScoreInfoByLatest(@Param("areaCode") String areaCode, @Param("stationCode") String stationCode); BigDecimal getHealthScoreInfoByLatest(@Param("areaCode") String areaCode, @Param("stationCode") String stationCode);
BigDecimal getHealthScoreInfoByStation(@Param("stationCode") String stationCode, BigDecimal getHealthScoreInfoByStation(@Param("stationCode") String stationCode,
@Param("tableName") String tableName); @Param("tableName") String tableName);
BigDecimal getHealthScoreInfoByStationByMinute(@Param("stationCode") String stationCode,
@Param("tableName") String tableName);
BigDecimal getHealthScoreInfoByParam(@Param("areaCode") String areaCode, @Param("stationCode") String stationCode, BigDecimal getHealthScoreInfoByParam(@Param("areaCode") String areaCode, @Param("stationCode") String stationCode,
@Param("analysisType") String analysisType); @Param("analysisType") String analysisType);
......
...@@ -131,7 +131,7 @@ ...@@ -131,7 +131,7 @@
<where> <where>
ANALYSIS_TYPE = '按天' ANALYSIS_TYPE = '按天'
<!-- AND DATE_ADD(DATE_FORMAT( REC_DATE, '%Y-%m-%d' ),INTERVAL 1 DAY) = CURRENT_DATE--> <!-- AND DATE_ADD(DATE_FORMAT( REC_DATE, '%Y-%m-%d' ),INTERVAL 1 DAY) = CURRENT_DATE-->
AND CURRENT_DATE = get_time_add(1,'DAY') AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = get_time_sub(1,'DAY')
<if test="stationCode != null and stationCode != ''"> <if test="stationCode != null and stationCode != ''">
AND GATEWAY_ID = #{stationCode} AND GATEWAY_ID = #{stationCode}
AND ANALYSIS_OBJ_TYPE = '场站' AND ANALYSIS_OBJ_TYPE = '场站'
...@@ -139,6 +139,21 @@ ...@@ -139,6 +139,21 @@
</where> </where>
limit 1 limit 1
</select> </select>
<select id="getHealthScoreInfoByStationByMinute" resultType="java.math.BigDecimal">
SELECT
round(IFNULL( HEALTH_INDEX , 100 ), 1) AS healthIndex
FROM
${tableName}
<where>
ANALYSIS_TYPE = '按10分钟'
<if test="stationCode != null and stationCode != ''">
AND GATEWAY_ID = #{stationCode}
AND ANALYSIS_OBJ_TYPE = '场站'
</if>
</where>
order by REC_DATE DESC
limit 1
</select>
<select id="getHealthListInfo" resultType="java.util.Map"> <select id="getHealthListInfo" resultType="java.util.Map">
SELECT SELECT
CEILING(IFNULL( AVG( HEALTH_INDEX ), 100 )) AS avgHealthIndex, CEILING(IFNULL( AVG( HEALTH_INDEX ), 100 )) AS avgHealthIndex,
......
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