Commit 34675325 authored by chenzhao's avatar chenzhao

增加 健康计算开关 及预警监测测点页面折线图

parent 07e79ebb
......@@ -252,6 +252,23 @@ public class IdxBizFanHealthIndexController extends BaseController {
return ResponseHelper.buildResponse(null);
}
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@ApiOperation(httpMethod = "GET",value = "预警监测测点层左侧列表", notes = "预警监测风机层左侧列表")
@GetMapping(value = "/selectPointByANALYSISTYPE")
public ResponseModel<Map<String,Object>> selectPointByANALYSISTYPE(@RequestParam(required = false) String STATION, @RequestParam(required = false)String HEALTHLEVEL,@RequestParam(required = false) String EQUIPMENTNAME,@RequestParam(required = false)String POINTNAME,Integer current,Integer size) {
List<Map<String, Object>> maps = idxBizFanHealthIndexServiceImpl.selectPointByANALYSISTYPE(STATION, HEALTHLEVEL, EQUIPMENTNAME, POINTNAME);
Map<String,Object> result = new HashMap<>();
List<Object> seriesData = new ArrayList<>();
List<Object> axisData = new ArrayList<>();
for (Map<String, Object> map : maps) {
seriesData.add(map.get("value"));
axisData.add(map.get("REC_DATE"));
}
result.put("seriesData",seriesData);
result.put("axisData",axisData);
return ResponseHelper.buildResponse(result);
}
}
......@@ -111,12 +111,12 @@ public interface IdxBizFanHealthIndexMapper extends BaseMapper<IdxBizFanHealthIn
List<Map<String,Object>> queryForLeftTableListByPoint(String STATION, String HEALTHLEVEL,String EQUIPMENTNAME,String POINTNAME,Integer current,Integer size);
List<Map<String,Object>> selectPointByANALYSISTYPE(String STATION, String HEALTHLEVEL,String EQUIPMENTNAME,String POINTNAME);
int queryForLeftTableListByPointCount(String STATION, String HEALTHLEVEL,String EQUIPMENTNAME,String POINTNAME);
Map<String,Object> queryForLeftTableListByPointNum(String STATION, String HEALTHLEVEL,String EQUIPMENTNAME,String POINTNAME);
List<IdxBizFanWarningRecord> warningData(String STATION, String SUBARRAY, String EQUIPMENTNAME);
Integer pointNum(String STATION, String SUBARRAY, String EQUIPMENTNAME);
......
......@@ -95,7 +95,8 @@ public class CommonServiceImpl {
@Value("${jkzsjs.url:a9a404d4-6ead-440e-9fcb-b95d5a239b10}")
String jkzsgfurl;
@Value("${openHealth}")
Boolean openHealth;
// {"tableName": "idx_biz_fan_point_process_variable_classification"} 风机工况变量划分
// {"tableName": "idx_biz_pv_point_process_variable_classification"} 光伏工况变量画分
// {"tableName": "idx_biz_fan_point_var_correlation"} 风机相关性
......@@ -1462,6 +1463,9 @@ public class CommonServiceImpl {
@Scheduled(cron = "0 0/10 * * * ?")
@Async("async")
public void healthWarningMinuteByFan() {
if (!openHealth){
return;
}
Date time = new Date();
Calendar calendar = Calendar.getInstance();
List<IdxBizFanPointProcessVariableClassificationDto> data = idxBizFanPointProcessVariableClassificationMapper.getInfluxDBData();
......@@ -1623,6 +1627,9 @@ public class CommonServiceImpl {
@Scheduled(cron = "0 0/10 * * * ?")
@Async("async")
public void healthWarningMinuteByPv() {
if (!openHealth){
return;
}
Calendar calendar = Calendar.getInstance();
Date time = new Date();
List<IdxBizPvPointProcessVariableClassificationDto> data = idxBizPvPointProcessVariableClassificationMapper.getInfluxDBData();
......
......@@ -84,7 +84,8 @@ public class HealthStatusIndicatorServiceImpl {
@Autowired
EmqKeeper emqKeeper;
@Value("${openHealth}")
boolean openHealth;
/**
* 夏造风电分析index_key
*/
......@@ -115,6 +116,9 @@ public class HealthStatusIndicatorServiceImpl {
// @Scheduled(cron = "0 0 */1 * * ?")
@Async("async")
public void healthWarningMinuteGF(Calendar calendar,Date time ) {
if (!openHealth){
return;
}
// Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.HOUR_OF_DAY,calendar.get(Calendar.HOUR_OF_DAY)-1);
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm");
......@@ -255,6 +259,9 @@ public class HealthStatusIndicatorServiceImpl {
@Scheduled(cron = "0 0 0/1 * * ?")
@Async("async")
public void healthWarningHourGF() {
if (!openHealth){
return;
}
Date time = new Date();
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.HOUR_OF_DAY,calendar.get(Calendar.HOUR_OF_DAY)-5);
......@@ -397,6 +404,9 @@ public class HealthStatusIndicatorServiceImpl {
@Scheduled(cron = "0 0 0 0/1 * ? ")
@Async("async")
public void healthWarningDayGF() {
if (!openHealth){
return;
}
Calendar calendar = Calendar.getInstance();
Date time = new Date();
calendar.set(Calendar.DAY_OF_MONTH,calendar.get(Calendar.DAY_OF_MONTH)-3);
......@@ -530,6 +540,9 @@ public class HealthStatusIndicatorServiceImpl {
// @Scheduled(cron = "0 0 */1 * * ?")
@Async("async")
public void healthWarningMinute(Calendar calendar ,Date time) {
if (!openHealth){
return;
}
// Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.HOUR_OF_DAY,calendar.get(Calendar.HOUR_OF_DAY)-1);
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm");
......@@ -675,6 +688,9 @@ public class HealthStatusIndicatorServiceImpl {
@Scheduled(cron = "0 0 0/1 * * ?")
@Async("async")
public void healthWarningHour() {
if (!openHealth){
return;
}
Date time = new Date();
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.HOUR_OF_DAY,calendar.get(Calendar.HOUR_OF_DAY)-5);
......@@ -813,6 +829,9 @@ public class HealthStatusIndicatorServiceImpl {
@Scheduled(cron = "0 0 0 0/1 * ? ")
@Async("async")
public void healthWarningDay() {
if (!openHealth){
return;
}
Date time = new Date();
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.DAY_OF_MONTH,calendar.get(Calendar.DAY_OF_MONTH)-3);
......
......@@ -181,6 +181,12 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
return this.getBaseMapper().queryForLeftTableListByPoint(STATION,HEALTHLEVEL,EQUIPMENTNAME,POINTNAME,current,size);
}
public List<Map<String,Object>> selectPointByANALYSISTYPE(String STATION, String HEALTHLEVEL,String EQUIPMENTNAME,String POINTNAME){
return this.getBaseMapper().selectPointByANALYSISTYPE(STATION,HEALTHLEVEL,EQUIPMENTNAME,POINTNAME);
};
public int queryForLeftTableListByPointCount(String STATION, String HEALTHLEVEL, String EQUIPMENTNAME,String POINTNAME){
return this.getBaseMapper().queryForLeftTableListByPointCount(STATION,HEALTHLEVEL,EQUIPMENTNAME,POINTNAME);
}
......
......@@ -87,4 +87,7 @@ healthValue_Notice=79
healthValue_DayCount=3
healthValue_HourCount=6
healthValue_MinCount=5
\ No newline at end of file
healthValue_MinCount=5
##是否打开健康计算计算 true 打开 false 关闭
openHealth = false
\ No newline at end of file
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