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;
......
...@@ -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