Commit 3605580e authored by wujiang's avatar wujiang

添加调用算法日志

parent 6a462d9c
...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jxiop.biz.amosprojectmapper; ...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jxiop.biz.amosprojectmapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.amosprojectentity.StdUserEmpower; import com.yeejoin.amos.boot.module.jxiop.biz.amosprojectentity.StdUserEmpower;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;
import java.util.Map; import java.util.Map;
......
...@@ -19,23 +19,23 @@ import javax.sql.DataSource; ...@@ -19,23 +19,23 @@ import javax.sql.DataSource;
import java.util.Properties; import java.util.Properties;
@Configuration @Configuration
@MapperScan(basePackages = "com.yeejoin.amos.boot.module.jxiop.api.amosprojectmapper", sqlSessionFactoryRef = "amosProjectSqlSessionFactory") @MapperScan(basePackages = "com.yeejoin.amos.boot.module.jxiop.biz.amosprojectmapper", sqlSessionFactoryRef = "amosProjectSqlSessionFactory")
public class AmosProjectDbConfig { public class AmosProjectDbConfig {
private Logger logger = LoggerFactory.getLogger(AmosProjectDbConfig.class); private Logger logger = LoggerFactory.getLogger(AmosProjectDbConfig.class);
// 精确到 master 目录,以便跟其他数据源隔离 // 精确到 master 目录,以便跟其他数据源隔离
private static final String MAPPER_LOCATION = "classpath*:mapper/amosproject/*.xml"; private static final String MAPPER_LOCATION = "classpath*:mapper/amosproject/*.xml";
@Value("${spring.db5.datasource.url}") @Value("${spring.db6.datasource.url}")
private String dbUrl; private String dbUrl;
@Value("${spring.db5.datasource.username}") @Value("${spring.db6.datasource.username}")
private String username; private String username;
@Value("${spring.db5.datasource.password}") @Value("${spring.db6.datasource.password}")
private String password; private String password;
@Value("${spring.db5.datasource.driver-class-name}") @Value("${spring.db6.datasource.driver-class-name}")
private String driverClassName; private String driverClassName;
......
...@@ -29,6 +29,8 @@ import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndex; ...@@ -29,6 +29,8 @@ import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndex;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.PvHealthIndex; import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.PvHealthIndex;
import com.yeejoin.amos.boot.module.jxiop.biz.tdmapper.IndicatorDataMapper; import com.yeejoin.amos.boot.module.jxiop.biz.tdmapper.IndicatorDataMapper;
import javafx.scene.control.Tab; import javafx.scene.control.Tab;
import lombok.extern.slf4j.Slf4j;
import org.elasticsearch.index.query.BoolQueryBuilder; import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.QueryBuilder; import org.elasticsearch.index.query.QueryBuilder;
import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.index.query.QueryBuilders;
...@@ -66,6 +68,7 @@ import java.util.stream.Collectors; ...@@ -66,6 +68,7 @@ import java.util.stream.Collectors;
@Service("commonServiceImpl") @Service("commonServiceImpl")
@Configuration @Configuration
@Slf4j
public class CommonServiceImpl { public class CommonServiceImpl {
//utc时间格式 //utc时间格式
public static final String FORMAT_UTC = "yyyy-MM-dd'T'HH:mm:ss'Z'"; public static final String FORMAT_UTC = "yyyy-MM-dd'T'HH:mm:ss'Z'";
...@@ -278,6 +281,8 @@ public class CommonServiceImpl { ...@@ -278,6 +281,8 @@ public class CommonServiceImpl {
logger.info("------------------------------------------风机::开始调用工况变量区间划分算法----------------------------------------"); logger.info("------------------------------------------风机::开始调用工况变量区间划分算法----------------------------------------");
HashMap<String, Object> realParams = new HashMap<>(); HashMap<String, Object> realParams = new HashMap<>();
realParams.put(gkqjhfkey, params); realParams.put(gkqjhfkey, params);
logger.info("------------------------------------------调用地址:"+baseUrl + gkqjhfurlfan);
logger.info("------------------------------------------调用参数:"+JSON.toJSONString(JSON.toJSONString(realParams)));
String response = HttpUtil.createPost(baseUrl + gkqjhfurlfan).body(JSON.toJSONString(realParams)).execute().body(); String response = HttpUtil.createPost(baseUrl + gkqjhfurlfan).body(JSON.toJSONString(realParams)).execute().body();
if (response.contains("\"status\":200") && response.contains("rows") && response.contains("rows")) { if (response.contains("\"status\":200") && response.contains("rows") && response.contains("rows")) {
JSONObject jsonObject = JSONObject.parseObject(response); JSONObject jsonObject = JSONObject.parseObject(response);
...@@ -325,6 +330,8 @@ public class CommonServiceImpl { ...@@ -325,6 +330,8 @@ public class CommonServiceImpl {
logger.info("------------------------------------------光伏::开始调用工况变量区间划分算法----------------------------------------"); logger.info("------------------------------------------光伏::开始调用工况变量区间划分算法----------------------------------------");
HashMap<String, Object> realParams = new HashMap<>(); HashMap<String, Object> realParams = new HashMap<>();
realParams.put(gkqjhfkey, params); realParams.put(gkqjhfkey, params);
logger.info("------------------------------------------调用地址:"+baseUrl + gkqjhfurlpv);
logger.info("------------------------------------------调用参数:"+JSON.toJSONString(JSON.toJSONString(realParams)));
String response = HttpUtil.createPost(baseUrl + gkqjhfurlpv).body(JSON.toJSONString(realParams)).execute().body(); String response = HttpUtil.createPost(baseUrl + gkqjhfurlpv).body(JSON.toJSONString(realParams)).execute().body();
if (response.contains("\"status\":200") && response.contains("rows")) { if (response.contains("\"status\":200") && response.contains("rows")) {
JSONObject jsonObject = JSONObject.parseObject(response); JSONObject jsonObject = JSONObject.parseObject(response);
...@@ -484,7 +491,8 @@ public class CommonServiceImpl { ...@@ -484,7 +491,8 @@ public class CommonServiceImpl {
logger.info("------------------------------风机相关性------------分析变量与工况变量相关性分析算法开始----------------------------------------"); logger.info("------------------------------风机相关性------------分析变量与工况变量相关性分析算法开始----------------------------------------");
HashMap<String, Object> realParams = new HashMap<>(); HashMap<String, Object> realParams = new HashMap<>();
realParams.put(gkxgxfxkey, requestParams); realParams.put(gkxgxfxkey, requestParams);
logger.info("------------------------------风机相关性------------分析变量与工况变量相关性分析算参数---------------------------------------" + JSON.toJSONString(realParams)); logger.info("------------------------------------------调用地址:"+baseUrl + gkxgxfxurlfan);
logger.info("------------------------------------------调用参数:"+JSON.toJSONString(JSON.toJSONString(realParams)));
String response = HttpUtil.createPost(baseUrl + gkxgxfxurlfan).body(JSON.toJSONString(realParams)).execute().body(); String response = HttpUtil.createPost(baseUrl + gkxgxfxurlfan).body(JSON.toJSONString(realParams)).execute().body();
if (response.contains("\"status\":200") && response.contains("rows")) { if (response.contains("\"status\":200") && response.contains("rows")) {
JSONObject jsonObject = JSONObject.parseObject(response); JSONObject jsonObject = JSONObject.parseObject(response);
...@@ -543,6 +551,8 @@ public class CommonServiceImpl { ...@@ -543,6 +551,8 @@ public class CommonServiceImpl {
logger.info("---------------------------------光伏相关性---------分析变量与工况变量相关性分析算法开始----------------------------------------"); logger.info("---------------------------------光伏相关性---------分析变量与工况变量相关性分析算法开始----------------------------------------");
HashMap<String, Object> realParams = new HashMap<>(); HashMap<String, Object> realParams = new HashMap<>();
realParams.put(gkxgxfxkey, requestParams); realParams.put(gkxgxfxkey, requestParams);
logger.info("------------------------------------------调用地址:"+baseUrl + gkxgxfxurlpv);
logger.info("------------------------------------------调用参数:"+JSON.toJSONString(JSON.toJSONString(realParams)));
String response = HttpUtil.createPost(baseUrl + gkxgxfxurlpv).body(JSON.toJSONString(realParams)).execute().body(); String response = HttpUtil.createPost(baseUrl + gkxgxfxurlpv).body(JSON.toJSONString(realParams)).execute().body();
if (response.contains("\"status\":200") && response.contains("rows")) { if (response.contains("\"status\":200") && response.contains("rows")) {
JSONObject jsonObject = JSONObject.parseObject(response); JSONObject jsonObject = JSONObject.parseObject(response);
...@@ -762,7 +772,8 @@ public class CommonServiceImpl { ...@@ -762,7 +772,8 @@ public class CommonServiceImpl {
HashMap<String, Object> realParams = new HashMap<>(); HashMap<String, Object> realParams = new HashMap<>();
realParams.put(gkzxzjskey1, values); realParams.put(gkzxzjskey1, values);
realParams.put(gkzxzjskey2, requestParams); realParams.put(gkzxzjskey2, requestParams);
logger.info("------------------------------风机中心值------请求参数---------------------------------------" + JSON.toJSONString(realParams)); logger.info("------------------------------------------调用地址:"+baseUrl + gkzxzjsurlfan);
logger.info("------------------------------------------调用参数:"+JSON.toJSONString(JSON.toJSONString(realParams)));
String response = HttpUtil.createPost(baseUrl + gkzxzjsurlfan).body(JSON.toJSONString(realParams)).execute().body(); String response = HttpUtil.createPost(baseUrl + gkzxzjsurlfan).body(JSON.toJSONString(realParams)).execute().body();
if (response.contains("\"status\":200") && response.contains("rows")) { if (response.contains("\"status\":200") && response.contains("rows")) {
JSONObject jsonObject = JSONObject.parseObject(response); JSONObject jsonObject = JSONObject.parseObject(response);
...@@ -911,6 +922,8 @@ public class CommonServiceImpl { ...@@ -911,6 +922,8 @@ public class CommonServiceImpl {
HashMap<String, Object> realParams = new HashMap<>(); HashMap<String, Object> realParams = new HashMap<>();
realParams.put(gkzxzjskey1, values); realParams.put(gkzxzjskey1, values);
realParams.put(gkzxzjskey2, requestParams); realParams.put(gkzxzjskey2, requestParams);
logger.info("------------------------------------------调用地址:"+baseUrl + gkzxzjsurlpv);
logger.info("------------------------------------------调用参数:"+JSON.toJSONString(JSON.toJSONString(realParams)));
String response = HttpUtil.createPost(baseUrl + gkzxzjsurlpv).body(JSON.toJSONString(realParams)).execute().body(); String response = HttpUtil.createPost(baseUrl + gkzxzjsurlpv).body(JSON.toJSONString(realParams)).execute().body();
if (response.contains("\"status\":200") && response.contains("rows")) { if (response.contains("\"status\":200") && response.contains("rows")) {
JSONObject jsonObject = JSONObject.parseObject(response); JSONObject jsonObject = JSONObject.parseObject(response);
...@@ -1106,6 +1119,8 @@ public class CommonServiceImpl { ...@@ -1106,6 +1119,8 @@ public class CommonServiceImpl {
logger.info("------------------------------------------开始调用健康指数计算算法开始----------------------------------------"); logger.info("------------------------------------------开始调用健康指数计算算法开始----------------------------------------");
HashMap<String, Object> realParams = new HashMap<>(); HashMap<String, Object> realParams = new HashMap<>();
realParams.put(gkzxzjskey1, values); realParams.put(gkzxzjskey1, values);
logger.info("------------------------------------------调用地址:"+baseUrl + jkzsjsfjurl);
logger.info("------------------------------------------调用参数:"+JSON.toJSONString(JSON.toJSONString(realParams)));
String response = HttpUtil.createPost(baseUrl + jkzsjsfjurl).body(JSON.toJSONString(realParams)).execute().body(); String response = HttpUtil.createPost(baseUrl + jkzsjsfjurl).body(JSON.toJSONString(realParams)).execute().body();
JSONObject result = JSON.parseObject(response).getJSONObject("result"); JSONObject result = JSON.parseObject(response).getJSONObject("result");
if (null != result) { if (null != result) {
...@@ -1233,6 +1248,8 @@ public class CommonServiceImpl { ...@@ -1233,6 +1248,8 @@ public class CommonServiceImpl {
logger.info("------------------------------------------开始调用健康指数计算算法开始----------------------------------------"); logger.info("------------------------------------------开始调用健康指数计算算法开始----------------------------------------");
HashMap<String, Object> realParams = new HashMap<>(); HashMap<String, Object> realParams = new HashMap<>();
realParams.put(gkzxzjskey1, values); realParams.put(gkzxzjskey1, values);
logger.info("------------------------------------------调用地址:"+baseUrl + jkzsgfurl);
logger.info("------------------------------------------调用参数:"+JSON.toJSONString(JSON.toJSONString(realParams)));
String response = HttpUtil.createPost(baseUrl + jkzsgfurl).body(JSON.toJSONString(realParams)).execute().body(); String response = HttpUtil.createPost(baseUrl + jkzsgfurl).body(JSON.toJSONString(realParams)).execute().body();
JSONObject result = JSON.parseObject(response).getJSONObject("result"); JSONObject result = JSON.parseObject(response).getJSONObject("result");
if (null != result) { if (null != result) {
...@@ -1362,7 +1379,8 @@ public class CommonServiceImpl { ...@@ -1362,7 +1379,8 @@ public class CommonServiceImpl {
map1.put("data2", data2); map1.put("data2", data2);
if (!map1.isEmpty()) { if (!map1.isEmpty()) {
logger.info("------------------------------风机相关性------------分析变量与工况变量相关性分析算法开始----------------------------------------"); logger.info("------------------------------风机相关性------------分析变量与工况变量相关性分析算法开始----------------------------------------");
logger.info("------------------------------风机相关性------------分析变量与工况变量相关性分析算参数---------------------------------------" + JSON.toJSONString(map1)); logger.info("------------------------------------------调用地址:"+baseUrlXGX);
logger.info("------------------------------------------调用参数:"+JSON.toJSONString(JSON.toJSONString(map1)));
String response = HttpUtil.createPost(baseUrlXGX).body(JSON.toJSONString(map1)).execute().body(); String response = HttpUtil.createPost(baseUrlXGX).body(JSON.toJSONString(map1)).execute().body();
if (response.contains("correlation")) { if (response.contains("correlation")) {
JSONObject jsonObject = JSONObject.parseObject(response); JSONObject jsonObject = JSONObject.parseObject(response);
...@@ -1431,7 +1449,8 @@ public class CommonServiceImpl { ...@@ -1431,7 +1449,8 @@ public class CommonServiceImpl {
map1.put("data2", data2); map1.put("data2", data2);
if (!map1.isEmpty()) { if (!map1.isEmpty()) {
logger.info("------------------------------风机相关性------------分析变量与工况变量相关性分析算法开始----------------------------------------"); logger.info("------------------------------风机相关性------------分析变量与工况变量相关性分析算法开始----------------------------------------");
logger.info("------------------------------风机相关性------------分析变量与工况变量相关性分析算参数---------------------------------------" + JSON.toJSONString(map1)); logger.info("------------------------------------------调用地址:"+baseUrlXGX);
logger.info("------------------------------------------调用参数:"+JSON.toJSONString(JSON.toJSONString(map1)));
String response = HttpUtil.createPost(baseUrlXGX).body(JSON.toJSONString(map1)).execute().body(); String response = HttpUtil.createPost(baseUrlXGX).body(JSON.toJSONString(map1)).execute().body();
if (response.contains("correlation")) { if (response.contains("correlation")) {
JSONObject jsonObject = JSONObject.parseObject(response); JSONObject jsonObject = JSONObject.parseObject(response);
...@@ -1531,6 +1550,8 @@ public class CommonServiceImpl { ...@@ -1531,6 +1550,8 @@ public class CommonServiceImpl {
Map<String, Float> indicatorDataListAllMap = indicatorDataListAll.stream().collect(Collectors.toMap(indicatorData -> indicatorData.getAddress() + "_" + indicatorData.getGatewayId(), IndicatorData::getValueF)); Map<String, Float> indicatorDataListAllMap = indicatorDataListAll.stream().collect(Collectors.toMap(indicatorData -> indicatorData.getAddress() + "_" + indicatorData.getGatewayId(), IndicatorData::getValueF));
//将测点id与值处理成map //将测点id与值处理成map
HashMap<String, Double> idxBizFanPointProcessVariableClassificationDtoIdValueMap = new HashMap<>(); HashMap<String, Double> idxBizFanPointProcessVariableClassificationDtoIdValueMap = new HashMap<>();
log.info("indicatorDataListAllMap"+JSONObject.toJSONString(indicatorDataListAllMap));
log.info("data"+JSONObject.toJSONString(data));
for (IdxBizFanPointProcessVariableClassificationDto datum : data) { for (IdxBizFanPointProcessVariableClassificationDto datum : data) {
Double currentValue = Double.valueOf(indicatorDataListAllMap.get(datum.getIndexAddress() + "_" + datum.getGatewayId())); Double currentValue = Double.valueOf(indicatorDataListAllMap.get(datum.getIndexAddress() + "_" + datum.getGatewayId()));
if (!ObjectUtils.isEmpty(currentValue)) { if (!ObjectUtils.isEmpty(currentValue)) {
...@@ -1646,7 +1667,8 @@ public class CommonServiceImpl { ...@@ -1646,7 +1667,8 @@ public class CommonServiceImpl {
Table healthData = Table.create("healthData"); Table healthData = Table.create("healthData");
healthData.addColumns(DoubleColumn.create("analysisVariable", analysisVariable), DoubleColumn.create("stdDev", stdDev), DoubleColumn.create("centerValue", centerValue), StringColumn.create("ProcessPoint1Id", ProcessPoint1Id), DoubleColumn.create("ProcessPoint1", ProcessPoint1), StringColumn.create("ProcessPoint2Id", ProcessPoint2Id), DoubleColumn.create("ProcessPoint2", ProcessPoint2), StringColumn.create("ProcessPoint3Id", ProcessPoint3Id), DoubleColumn.create("ProcessPoint3", ProcessPoint3), StringColumn.create("analysisVariableId", analysisVariableIds)); healthData.addColumns(DoubleColumn.create("analysisVariable", analysisVariable), DoubleColumn.create("stdDev", stdDev), DoubleColumn.create("centerValue", centerValue), StringColumn.create("ProcessPoint1Id", ProcessPoint1Id), DoubleColumn.create("ProcessPoint1", ProcessPoint1), StringColumn.create("ProcessPoint2Id", ProcessPoint2Id), DoubleColumn.create("ProcessPoint2", ProcessPoint2), StringColumn.create("ProcessPoint3Id", ProcessPoint3Id), DoubleColumn.create("ProcessPoint3", ProcessPoint3), StringColumn.create("analysisVariableId", analysisVariableIds));
logger.info("------------------------------------------开始调用健康指数计算算法开始----------------------------------------"); logger.info("------------------------------------------开始调用健康指数计算算法开始----------------------------------------");
logger.info("------------------------------------------调用地址:"+baseUrlZSFX);
logger.info("------------------------------------------调用参数:"+JSON.toJSONString(requestMap));
String response = HttpUtil.createPost(baseUrlZSFX).body(JSON.toJSONString(requestMap)).execute().body(); String response = HttpUtil.createPost(baseUrlZSFX).body(JSON.toJSONString(requestMap)).execute().body();
JSONObject jsonObject = JSON.parseObject(response); JSONObject jsonObject = JSON.parseObject(response);
...@@ -1928,6 +1950,8 @@ public class CommonServiceImpl { ...@@ -1928,6 +1950,8 @@ public class CommonServiceImpl {
Table healthData = Table.create("healthData"); Table healthData = Table.create("healthData");
healthData.addColumns(DoubleColumn.create("analysisVariable", analysisVariable), DoubleColumn.create("stdDev", stdDev), DoubleColumn.create("centerValue", centerValue), StringColumn.create("ProcessPoint1Id", ProcessPoint1Id), DoubleColumn.create("ProcessPoint1", ProcessPoint1), StringColumn.create("ProcessPoint2Id", ProcessPoint2Id), DoubleColumn.create("ProcessPoint2", ProcessPoint2), StringColumn.create("ProcessPoint3Id", ProcessPoint3Id), DoubleColumn.create("ProcessPoint3", ProcessPoint3), StringColumn.create("analysisVariableId", analysisVariableIds)); healthData.addColumns(DoubleColumn.create("analysisVariable", analysisVariable), DoubleColumn.create("stdDev", stdDev), DoubleColumn.create("centerValue", centerValue), StringColumn.create("ProcessPoint1Id", ProcessPoint1Id), DoubleColumn.create("ProcessPoint1", ProcessPoint1), StringColumn.create("ProcessPoint2Id", ProcessPoint2Id), DoubleColumn.create("ProcessPoint2", ProcessPoint2), StringColumn.create("ProcessPoint3Id", ProcessPoint3Id), DoubleColumn.create("ProcessPoint3", ProcessPoint3), StringColumn.create("analysisVariableId", analysisVariableIds));
logger.info("------------------------------------------开始调用健康指数计算算法开始----------------------------------------"); logger.info("------------------------------------------开始调用健康指数计算算法开始----------------------------------------");
logger.info("------------------------------------------调用地址:"+baseUrlZSFX);
logger.info("------------------------------------------调用参数:"+JSON.toJSONString(requestMap));
String response = HttpUtil.createPost(baseUrlZSFX).body(JSON.toJSONString(requestMap)).execute().body(); String response = HttpUtil.createPost(baseUrlZSFX).body(JSON.toJSONString(requestMap)).execute().body();
JSONObject jsonObject = JSON.parseObject(response); JSONObject jsonObject = JSON.parseObject(response);
if (jsonObject.containsKey("indexValue")) { if (jsonObject.containsKey("indexValue")) {
......
...@@ -14,6 +14,7 @@ import com.yeejoin.amos.boot.module.jxiop.biz.amosprojectmapper.UserEmpowerMappe ...@@ -14,6 +14,7 @@ import com.yeejoin.amos.boot.module.jxiop.biz.amosprojectmapper.UserEmpowerMappe
import com.yeejoin.amos.boot.module.jxiop.biz.service.IPermissionService; import com.yeejoin.amos.boot.module.jxiop.biz.service.IPermissionService;
import org.apache.kafka.common.metrics.Stat; import org.apache.kafka.common.metrics.Stat;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.core.foundation.context.RequestContext; import org.typroject.tyboot.core.foundation.context.RequestContext;
...@@ -22,21 +23,24 @@ import java.util.HashMap; ...@@ -22,21 +23,24 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@Service
public class IPermissionServiceImpl implements IPermissionService { public class IPermissionServiceImpl implements IPermissionService {
@Autowired
private RedisUtils redisUtils; private RedisUtils redisUtils;
@Autowired
private UserEmpowerMapper userEmpowerMapper; private UserEmpowerMapper userEmpowerMapper;
@Autowired
private StationBasicMapper stationBasicMapper; private StationBasicMapper stationBasicMapper;
@Autowired // @Autowired
public IPermissionServiceImpl(RedisUtils redisUtils, UserEmpowerMapper userEmpowerMapper, StationBasicMapper stationBasicMapper) { // public IPermissionServiceImpl(RedisUtils redisUtils, UserEmpowerMapper userEmpowerMapper, StationBasicMapper stationBasicMapper) {
this.redisUtils = redisUtils; // this.redisUtils = redisUtils;
this.userEmpowerMapper = userEmpowerMapper; // this.userEmpowerMapper = userEmpowerMapper;
this.stationBasicMapper = stationBasicMapper; // this.stationBasicMapper = stationBasicMapper;
} // }
@Override @Override
public List<String> getCurrentUserPermissions() { public List<String> getCurrentUserPermissions() {
......
...@@ -26,15 +26,15 @@ spring.db6.datasource.password=Yeejoin@2020 ...@@ -26,15 +26,15 @@ spring.db6.datasource.password=Yeejoin@2020
spring.db6.datasource.driver-class-name: com.mysql.cj.jdbc.Driver spring.db6.datasource.driver-class-name: com.mysql.cj.jdbc.Driver
## eureka properties: ## eureka properties:
eureka.instance.hostname=172.16.10.220 eureka.instance.hostname=139.9.173.44
eureka.client.serviceUrl.defaultZone=http://admin:a1234560@${eureka.instance.hostname}:10001/eureka/ eureka.client.serviceUrl.defaultZone=http://admin:a1234560@${eureka.instance.hostname}:10001/eureka/
## redis properties: ## redis properties:
spring.redis.database=1 spring.redis.database=1
spring.redis.host=172.16.10.220 spring.redis.host=139.9.173.44
spring.redis.port=6379 spring.redis.port=6379
spring.redis.password=yeejoin@2020 spring.redis.password=yeejoin@2020
openHealth=true
spring.cache.type=GENERIC spring.cache.type=GENERIC
j2cache.open-spring-cache=true j2cache.open-spring-cache=true
j2cache.cache-clean-mode=passive j2cache.cache-clean-mode=passive
...@@ -66,10 +66,10 @@ lettuce.timeout=10000 ...@@ -66,10 +66,10 @@ lettuce.timeout=10000
emqx.clean-session=true emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]} emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://172.16.10.220:1883 emqx.broker=tcp://139.9.173.44:2883
emqx.user-name=admin emqx.user-name=admin
emqx.password=public emqx.password=public
mqtt.scene.host=mqtt://172.16.10.220:8083/mqtt mqtt.scene.host=mqtt://139.9.173.44:8083/mqtt
mqtt.client.product.id=mqtt mqtt.client.product.id=mqtt
mqtt.topic=topic_mqtt mqtt.topic=topic_mqtt
spring.mqtt.completionTimeout=3000 spring.mqtt.completionTimeout=3000
...@@ -84,7 +84,7 @@ password: taosdata ...@@ -84,7 +84,7 @@ password: taosdata
#spring.db3.datasource.type: com.alibaba.druid.pool.DruidDataSource #spring.db3.datasource.type: com.alibaba.druid.pool.DruidDataSource
spring.db3.datasource.url=jdbc:TAOS-RS://139.9.170.47:6041/iot_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true spring.db3.datasource.url=jdbc:TAOS-RS://10.20.0.203:6041/iot_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true
spring.db3.datasource.username=root spring.db3.datasource.username=root
spring.db3.datasource.password=taosdata spring.db3.datasource.password=taosdata
spring.db3.datasource.driver-class-name: com.taosdata.jdbc.rs.RestfulDriver spring.db3.datasource.driver-class-name: com.taosdata.jdbc.rs.RestfulDriver
...@@ -92,7 +92,7 @@ spring.db3.datasource.driver-class-name: com.taosdata.jdbc.rs.RestfulDriver ...@@ -92,7 +92,7 @@ spring.db3.datasource.driver-class-name: com.taosdata.jdbc.rs.RestfulDriver
# 分析专用td数据库 analyse_data # 分析专用td数据库 analyse_data
#spring.db4.datasource.type: com.alibaba.druid.pool.DruidDataSource #spring.db4.datasource.type: com.alibaba.druid.pool.DruidDataSource
spring.db4.datasource.url=jdbc:TAOS-RS://139.9.170.47:6041/analysis_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true spring.db4.datasource.url=jdbc:TAOS-RS://10.20.0.203:6041/analysis_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true
spring.db4.datasource.username=root spring.db4.datasource.username=root
spring.db4.datasource.password=taosdata spring.db4.datasource.password=taosdata
spring.db4.datasource.driver-class-name: com.taosdata.jdbc.rs.RestfulDriver spring.db4.datasource.driver-class-name: com.taosdata.jdbc.rs.RestfulDriver
...@@ -149,7 +149,7 @@ amos.secret.key=qaz ...@@ -149,7 +149,7 @@ amos.secret.key=qaz
#eureka.instance.ip-address=172.16.3.122 #eureka.instance.ip-address=172.16.3.122
spring.activemq.broker-url=tcp://172.16.10.220:61616 spring.activemq.broker-url=tcp://139.9.173.44:61616
spring.activemq.user=admin spring.activemq.user=admin
spring.activemq.password=admin spring.activemq.password=admin
spring.jms.pub-sub-domain=false spring.jms.pub-sub-domain=false
......
...@@ -91,12 +91,16 @@ public class EquipAlarmEventServiceImpl extends BaseService<EquipAlarmEventDto, ...@@ -91,12 +91,16 @@ public class EquipAlarmEventServiceImpl extends BaseService<EquipAlarmEventDto,
// } else if ("false".equals(i.getValue())) { // } else if ("false".equals(i.getValue())) {
// i.setValue("分"); // i.setValue("分");
// } // }
long mills = i.getCreatedTime() / 1000000; long mills = i.getCreatedTime() ;
car.setTimeInMillis(mills); car.setTimeInMillis(mills);
// System.out.println(sdf.format(car.getTime())); // System.out.println(sdf.format(car.getTime()));
i.setTime(sdf.format(car.getTime())); String time = sdf.format(car.getTime());
// car.add(Calendar.HOUR, 12); if (time.contains("1970")) {
// System.out.println(sdf.format(car.getTime())); mills = i.getCreatedTime()/ 1000000;
car.setTimeInMillis(mills);
time = sdf.format(car.getTime());
}
i.setTime(time);
}); });
PageInfo<EquipAlarmEvent> page = new PageInfo(alarmEventList); PageInfo<EquipAlarmEvent> page = new PageInfo(alarmEventList);
......
...@@ -166,10 +166,16 @@ public class AlarmEventServiceImpl extends BaseService<AlarmEventDto, AlarmEvent ...@@ -166,10 +166,16 @@ public class AlarmEventServiceImpl extends BaseService<AlarmEventDto, AlarmEvent
i.setValue("分"); i.setValue("分");
} }
i.setStationName("升压站"); i.setStationName("升压站");
long mills = i.getCreatedTime() / 1000000; long mills = i.getCreatedTime() ;
car.setTimeInMillis(mills); car.setTimeInMillis(mills);
// System.out.println(sdf.format(car.getTime())); // System.out.println(sdf.format(car.getTime()));
i.setTime(sdf.format(car.getTime())); String time = sdf.format(car.getTime());
if (time.contains("1970")) {
mills = i.getCreatedTime()/ 1000000;
car.setTimeInMillis(mills);
time = sdf.format(car.getTime());
}
i.setTime(time);
}); });
PageInfo<EquipAlarmEvent> page = new PageInfo(alarmEventList); PageInfo<EquipAlarmEvent> page = new PageInfo(alarmEventList);
// 构建平台数据 // 构建平台数据
......
...@@ -69,7 +69,7 @@ public class EquipAlarmEventServiceImpl ...@@ -69,7 +69,7 @@ public class EquipAlarmEventServiceImpl
// System.out.println(sdf.format(car.getTime())); // System.out.println(sdf.format(car.getTime()));
String time = sdf.format(car.getTime()); String time = sdf.format(car.getTime());
if (time.contains("1970")) { if (time.contains("1970")) {
mills = i.getCreatedTime()/ 1000000;; mills = i.getCreatedTime()/ 1000000;
car.setTimeInMillis(mills); car.setTimeInMillis(mills);
time = sdf.format(car.getTime()); time = sdf.format(car.getTime());
} }
......
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