Commit d920761f authored by caotao's avatar caotao

1.告警数据回溯接口调整优化。

parent db66972c
package com.yeejoin.amos.boot.module.jxiop.biz.constants;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import java.util.HashMap;
public class CommonConstans {
......@@ -100,7 +103,7 @@ public class CommonConstans {
public static final String Fourdecimalplaces = "%.4f";
public static final String QueryStringFrontMoudleNotKeyWord = "frontModule";
public static final HashMap<String, String> waringPeriodS = new HashMap<String, String>() {
public static final HashMap<String, String> waringPeriodStatus = new HashMap<String, String>() {
{
put("按时刻", "按10分钟周期");
......@@ -108,4 +111,13 @@ public class CommonConstans {
put("按天", "按1天周期");
}
};
public static final HashMap<String, String> waringPeriodDateFormate = new HashMap<String, String>() {
{
put("按时刻", DatePattern.NORM_DATETIME_PATTERN);
put("按小时", DatePattern.NORM_DATETIME_PATTERN);
put("按天", DatePattern.NORM_DATE_PATTERN);
}
};
}
......@@ -235,14 +235,14 @@ public class AnalyseController extends BaseController {
return ResponseHelper.buildResponse(commonServiceImpl.getInfluxdbDataByConditon(stationType,pointId,startTime, endTime)) ;
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "post", value = "预警详情信息-风机", notes = "预警详情信息-风机")
@PostMapping(value = "/getAlramInfoDetailOfFan")
@ApiOperation(httpMethod = "GET", value = "预警详情信息-风机", notes = "预警详情信息-风机")
@GetMapping(value = "/getAlramInfoDetailOfFan")
public ResponseModel<Map<String, Object>> getAlramInfoDetailOfFan(@RequestParam(required = true) String id){
return ResponseHelper.buildResponse(iAlarmInfoDetailService.getAlramInfoDetailOfFan(id));
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "post", value = "预警详情信息-光伏", notes = "预警详情信息-光伏")
@PostMapping(value = "/getAlramInfoDetailOfPv")
@ApiOperation(httpMethod = "GET", value = "预警详情信息-光伏", notes = "预警详情信息-光伏")
@GetMapping(value = "/getAlramInfoDetailOfPv")
public ResponseModel<Map<String, Object>> getAlramInfoDetailOfPv(@RequestParam(required = true) String id){
return ResponseHelper.buildResponse(iAlarmInfoDetailService.getAlramInfoDetailOfPv(id));
}
......
......@@ -138,5 +138,15 @@ public class IdxBizFanPointVarCorrelation{
*/
@TableField("EQUIPMENT_NAME")
private String equipmentName;
/**
* 分析变量名称
*/
@TableField("ANALYSIS_POINT_NAME")
private String analysisPointName;
/**
* 工况变量名称
*/
@TableField("PROCESS_POINT_NAME")
private String processPointName;
}
......@@ -139,4 +139,16 @@ public class IdxBizPvPointVarCorrelation{
@TableField("EQUIPMENT_NAME")
private String equipmentName;
/**
* 分析变量名称
*/
@TableField("ANALYSIS_POINT_NAME")
private String analysisPointName;
/**
* 工况变量名称
*/
@TableField("PROCESS_POINT_NAME")
private String processPointName;
}
......@@ -49,5 +49,7 @@ public interface IndicatorDataMapper extends BaseMapper<IndicatorData> {
@Select("select `value`,`value_f`, address, gateway_id from iot_data.indicator_data where ts > NOW()-10m and gateway_id = #{gatewayId}")
List<IndicatorData> selectDataByGatewayIdAndAddress(@Param("gatewayId") String gatewayId);
@Select("select created_time,`value`,`value_f`, address, gateway_id from iot_data.indicator_data where gateway_id = #{gatewayId} and `address` in ( ${addresses} ) and ts >= #{startTime} and ts <= #{endTime}")
List<IndicatorData> selectDataByGatewayIdAndAddressForAlarmInfoDetail(@Param("gatewayId") String gatewayId,@Param("addresses") String addresses,@Param("startTime") String startTime, @Param("endTime") String endTime);
}
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