Commit cb5f03fa authored by zhangsen's avatar zhangsen

分析需求API

parent c113fe8a
......@@ -43,8 +43,10 @@ public class BigScreenAnalyseController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "GET", value = "场站设备健康状态指数与趋势 - 仪表盘", notes = "场站设备健康状态指数与趋势 - 仪表盘")
@GetMapping(value = "/getHealthScoreInfo")
public ResponseModel<BigDecimal> getHealthScoreInfo(@RequestParam(required = false) String areaCode, @RequestParam(required = false) String stationCode) {
return ResponseHelper.buildResponse(idxBizFanHealthIndexMapper.getHealthScoreInfo(areaCode, stationCode));
public ResponseModel<Map<String, BigDecimal>> getHealthScoreInfo(@RequestParam(required = false) String areaCode, @RequestParam(required = false) String stationCode) {
HashMap<String, BigDecimal> stringBigDecimalHashMap = new HashMap<>();
stringBigDecimalHashMap.put("value", idxBizFanHealthIndexMapper.getHealthScoreInfo(areaCode, stationCode));
return ResponseHelper.buildResponse(stringBigDecimalHashMap);
}
......@@ -143,9 +145,10 @@ public class BigScreenAnalyseController extends BaseController {
@RequestParam(value = "station", required = false) String station,
@RequestParam(value = "stationType", required = false) String stationType,
@RequestParam(value = "current", required = false) Integer current,
@RequestParam(value = "size", required = false) Integer size) {
@RequestParam(value = "size", required = false) Integer size,
@RequestParam(value = "warningName", required = false) String warningName) {
Integer count = idxBizFanWarningRecordMapper.getEquipWarningInfoByPageCount(arae, station, stationType);
List<IdxBizFanWarningRecord> idxBizFanWarningRecordIPage = idxBizFanWarningRecordMapper.getEquipWarningInfoByPage(arae, station, stationType, current, size);
List<IdxBizFanWarningRecord> idxBizFanWarningRecordIPage = idxBizFanWarningRecordMapper.getEquipWarningInfoByPage(arae, station, stationType, current, size, warningName);
Page<IdxBizFanWarningRecord> idxBizFanWarningRecordPage = new Page<>(current, size);
idxBizFanWarningRecordPage.setRecords(idxBizFanWarningRecordIPage);
idxBizFanWarningRecordPage.setTotal(count);
......
......@@ -18,7 +18,8 @@ public interface IdxBizFanWarningRecordMapper extends BaseMapper<IdxBizFanWarnin
@Param("station") String station,
@Param("stationType") String stationType,
@Param("current") Integer current,
@Param("size") Integer size);
@Param("size") Integer size,
@Param("warningName") String warningName);
Integer getEquipWarningInfoByPageCount(@Param("arae") String arae,
@Param("station") String station,
@Param("stationType") String stationType);
......
......@@ -41,6 +41,9 @@
<if test="stationType != '' and stationType != null">
AND a.stationType = #{stationType}
</if>
<if test="warningName != '' and warningName != null">
AND a.WARNING_NAME = #{warningName}
</if>
</where>
limit #{current}, #{size}
</select>
......@@ -83,6 +86,9 @@
<if test="stationType != '' and stationType != null">
AND a.stationType = #{stationType}
</if>
<if test="warningName != '' and warningName != null">
AND a.WARNING_NAME = #{warningName}
</if>
</where>
</select>
</mapper>
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