Commit ee6dc2b6 authored by caotao's avatar caotao

1.增加状态常量。

2.增加本地是否触发健康指数计算的开关,默认关闭。
parent 53bda818
......@@ -9,6 +9,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
......@@ -56,7 +57,9 @@ import java.net.InetAddress;
public class AmosJxiopAnalyseApplication {
@Autowired
private EmqKeeper emqKeeper;
//本地是否执行健康指数算法开关
@Value("${openHealth:true}")
Boolean openHealth;
@Autowired
private SyncESDataToTdengineMqttListener syncESDataToTdengineMqttListener;
......@@ -76,7 +79,9 @@ public class AmosJxiopAnalyseApplication {
@Bean
public void initMqtt() throws Exception {
//订阅固化周期性数据成功的消息
emqKeeper.subscript("sync_esdata_to_tdengine_notice", 1,syncESDataToTdengineMqttListener );
if (!openHealth) {
//订阅固化周期性数据成功的消息
emqKeeper.subscript("sync_esdata_to_tdengine_notice", 1, syncESDataToTdengineMqttListener);
}
}
}
......@@ -99,4 +99,13 @@ public class CommonConstans {
public static final String Twodecimalplaces= "%.2f";
public static final String Fourdecimalplaces = "%.4f";
public static final String QueryStringFrontMoudleNotKeyWord = "frontModule";
public static final HashMap<String, String> waringPeriodS = new HashMap<String, String>() {
{
put("按时刻", "按10分钟周期");
put("按小时", "按1小时周期");
put("按天", "按1天周期");
}
};
}
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