Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
2cc86a72
Commit
2cc86a72
authored
Aug 10, 2023
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.新增智能分析业务后端服务
parent
ab8d018b
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
731 additions
and
0 deletions
+731
-0
pom.xml
...t-system-jxiop/amos-boot-module-jxiop-analyse-biz/pom.xml
+44
-0
AmosJxiopAnalyseApplication.java
...in/java/com/yeejoin/amos/AmosJxiopAnalyseApplication.java
+67
-0
ClusterDbConfig.java
...in/amos/boot/module/jxiop/biz/config/ClusterDbConfig.java
+75
-0
MasterDbConfig.java
...oin/amos/boot/module/jxiop/biz/config/MasterDbConfig.java
+94
-0
DemoController.java
...amos/boot/module/jxiop/biz/controller/DemoController.java
+202
-0
application-dev.properties
...analyse-biz/src/main/resources/application-dev.properties
+126
-0
application.properties
...iop-analyse-biz/src/main/resources/application.properties
+77
-0
logback-dev.xml
...dule-jxiop-analyse-biz/src/main/resources/logback-dev.xml
+45
-0
pom.xml
amos-boot-system-jxiop/pom.xml
+1
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/pom.xml
0 → 100644
View file @
2cc86a72
<?xml version="1.0"?>
<project
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<groupId>
com.amosframework.boot
</groupId>
<artifactId>
amos-boot-system-jxiop
</artifactId>
<version>
1.0.0
</version>
</parent>
<artifactId>
amos-boot-module-jxiop-analyse-biz
</artifactId>
<version>
1.0.0
</version>
<name>
amos-boot-module-jxiop-analyse-biz
</name>
<url>
http://maven.apache.org
</url>
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>
com.amosframework.boot
</groupId>
<artifactId>
amos-boot-module-common-biz
</artifactId>
<version>
${amos-biz-boot.version}
</version>
</dependency>
<dependency>
<groupId>
com.amosframework.boot
</groupId>
<artifactId>
amos-boot-biz-common
</artifactId>
<version>
1.0.0
</version>
</dependency>
<dependency>
<groupId>
com.yeejoin
</groupId>
<artifactId>
amos-component-influxdb
</artifactId>
<version>
1.8.5-SNAPSHOT
</version>
<scope>
compile
</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
</plugin>
</plugins>
</build>
</project>
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/AmosJxiopAnalyseApplication.java
0 → 100644
View file @
2cc86a72
package
com
.
yeejoin
.
amos
;
import
com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
;
import
com.yeejoin.amos.boot.biz.common.utils.oConvertUtils
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
;
import
org.springframework.boot.context.properties.ConfigurationPropertiesScan
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.boot.web.servlet.ServletComponentScan
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.core.env.Environment
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
java.net.InetAddress
;
/**
* <pre>
* 智信能源科技服务启动类
* </pre>
*
* @author DELL
*/
@EnableTransactionManagement
@EnableConfigurationProperties
@ServletComponentScan
@EnableDiscoveryClient
@EnableFeignClients
@EnableAsync
@EnableEurekaClient
@EnableScheduling
@MapperScan
({
"org.typroject.tyboot.demo.face.orm.dao*"
,
"org.typroject.tyboot.face.*.orm.dao*"
,
"org.typroject.tyboot.core.auth.face.orm.dao*"
,
"org.typroject.tyboot.component.*.face.orm.dao*"
,
"com.yeejoin.amos.boot.module.**.api.mapper"
,
"com.yeejoin.amos.boot.biz.common.dao.mapper"
,
"com.yeejoin.amos.boot.module.common.biz.*"
,
"com.yeejoin.amos.boot.module.jxiop.api.mapper"
})
@ComponentScan
(
basePackages
=
{
"org.typroject"
,
"com.yeejoin.amos"
})
@SpringBootApplication
(
exclude
=
{
DataSourceAutoConfiguration
.
class
,
DruidDataSourceAutoConfigure
.
class
})
//@SpringBootApplication
public
class
AmosJxiopAnalyseApplication
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
AmosJxiopAnalyseApplication
.
class
);
public
static
void
main
(
String
[]
args
)
throws
Exception
{
ConfigurableApplicationContext
context
=
SpringApplication
.
run
(
AmosJxiopAnalyseApplication
.
class
,
args
);
Environment
env
=
context
.
getEnvironment
();
String
ip
=
InetAddress
.
getLocalHost
().
getHostAddress
();
String
port
=
env
.
getProperty
(
"server.port"
);
String
path
=
oConvertUtils
.
getString
(
env
.
getProperty
(
"server.servlet.context-path"
));
logger
.
info
(
"\n----------------------------------------------------------\n\t"
+
"Application Amos-Biz-Boot-Jxiop-Montior is running! Access URLs:\n\t"
+
"Swagger文档: \thttp://"
+
ip
+
":"
+
port
+
path
+
"/doc.html\n"
+
"----------------------------------------------------------"
);
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/config/ClusterDbConfig.java
0 → 100644
View file @
2cc86a72
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
config
;
import
com.alibaba.druid.pool.DruidDataSource
;
import
com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean
;
import
org.apache.ibatis.session.SqlSessionFactory
;
import
org.mybatis.spring.SqlSessionFactoryBean
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.core.io.support.PathMatchingResourcePatternResolver
;
import
org.springframework.jdbc.datasource.DataSourceTransactionManager
;
import
javax.sql.DataSource
;
import
java.sql.SQLException
;
/**
* 从数据源配置
* 若需要配置更多数据源 , 直接在yml中添加数据源配置再增加相应的新的数据源配置类即可
*/
@Configuration
@MapperScan
(
basePackages
=
"com.yeejoin.amos.boot.module.jxiop.biz.mapper2"
,
sqlSessionFactoryRef
=
"clusterSqlSessionFactory"
)
public
class
ClusterDbConfig
{
private
Logger
logger
=
LoggerFactory
.
getLogger
(
ClusterDbConfig
.
class
);
// 精确到 cluster 目录,以便跟其他数据源隔离
private
static
final
String
MAPPER_LOCATION
=
"classpath*:mapper/cluster/*.xml"
;
@Value
(
"${spring.db2.datasource.url}"
)
private
String
dbUrl
;
@Value
(
"${spring.db2.datasource.username}"
)
private
String
username
;
@Value
(
"${spring.db2.datasource.password}"
)
private
String
password
;
@Value
(
"${spring.db2.datasource.driver-class-name}"
)
private
String
driverClassName
;
@Bean
(
name
=
"clusterDataSource2"
)
//声明其为Bean实例
public
DataSource
clusterDataSource
()
{
DruidDataSource
datasource
=
new
DruidDataSource
();
datasource
.
setUrl
(
this
.
dbUrl
);
datasource
.
setUsername
(
username
);
datasource
.
setPassword
(
password
);
datasource
.
setDriverClassName
(
driverClassName
);
return
datasource
;
}
@Bean
(
name
=
"clusterTransactionManager"
)
public
DataSourceTransactionManager
clusterTransactionManager
()
{
return
new
DataSourceTransactionManager
(
clusterDataSource
());
}
@Bean
(
name
=
"clusterSqlSessionFactory"
)
public
SqlSessionFactory
clusterSqlSessionFactory
(
@Qualifier
(
"clusterDataSource2"
)
DataSource
culsterDataSource
)
throws
Exception
{
final
MybatisSqlSessionFactoryBean
sessionFactory
=
new
MybatisSqlSessionFactoryBean
();
sessionFactory
.
setDataSource
(
culsterDataSource
);
sessionFactory
.
setMapperLocations
(
new
PathMatchingResourcePatternResolver
()
.
getResources
(
ClusterDbConfig
.
MAPPER_LOCATION
));
sessionFactory
.
setTypeAliasesPackage
(
"com.yeejoin.amos.boot.module.jxiop.biz.entity"
);
//mybatis 数据库字段与实体类属性驼峰映射配置
sessionFactory
.
getObject
().
getConfiguration
().
setMapUnderscoreToCamelCase
(
true
);
return
sessionFactory
.
getObject
();
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/config/MasterDbConfig.java
0 → 100644
View file @
2cc86a72
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
config
;
import
com.alibaba.druid.pool.DruidDataSource
;
import
com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean
;
import
com.github.pagehelper.PageInterceptor
;
import
org.apache.ibatis.plugin.Interceptor
;
import
org.apache.ibatis.session.SqlSessionFactory
;
import
org.mybatis.spring.SqlSessionFactoryBean
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Primary
;
import
org.springframework.core.io.support.PathMatchingResourcePatternResolver
;
import
org.springframework.jdbc.datasource.DataSourceTransactionManager
;
import
javax.sql.DataSource
;
import
java.sql.SQLException
;
import
java.util.Properties
;
@Configuration
@MapperScan
(
basePackages
=
"com.yeejoin.amos.boot.module.jxiop.api.mapper"
,
sqlSessionFactoryRef
=
"masterSqlSessionFactory1"
)
public
class
MasterDbConfig
{
private
Logger
logger
=
LoggerFactory
.
getLogger
(
MasterDbConfig
.
class
);
// 精确到 master 目录,以便跟其他数据源隔离
private
static
final
String
MAPPER_LOCATION
=
"classpath*:mapper/*.xml"
;
@Value
(
"${spring.db1.datasource.url}"
)
private
String
dbUrl
;
@Value
(
"${spring.db1.datasource.username}"
)
private
String
username
;
@Value
(
"${spring.db1.datasource.password}"
)
private
String
password
;
@Value
(
"${spring.db1.datasource.driver-class-name}"
)
private
String
driverClassName
;
@Bean
(
name
=
"masterDataSource"
)
//声明其为Bean实例
@Primary
//在同样的DataSource中,首先使用被标注的DataSource
public
DataSource
masterDataSource
()
{
DruidDataSource
datasource
=
new
DruidDataSource
();
datasource
.
setUrl
(
this
.
dbUrl
);
datasource
.
setUsername
(
username
);
datasource
.
setPassword
(
password
);
datasource
.
setDriverClassName
(
driverClassName
);
return
datasource
;
}
@Bean
(
name
=
"masterTransactionManager"
)
@Primary
public
DataSourceTransactionManager
masterTransactionManager
()
{
return
new
DataSourceTransactionManager
(
masterDataSource
());
}
@Bean
(
name
=
"masterSqlSessionFactory1"
)
@Primary
public
SqlSessionFactory
masterSqlSessionFactory
(
@Qualifier
(
"masterDataSource"
)
DataSource
masterDataSource
)
throws
Exception
{
final
MybatisSqlSessionFactoryBean
sessionFactory
=
new
MybatisSqlSessionFactoryBean
();
sessionFactory
.
setDataSource
(
masterDataSource
);
sessionFactory
.
setMapperLocations
(
new
PathMatchingResourcePatternResolver
()
.
getResources
(
MasterDbConfig
.
MAPPER_LOCATION
));
sessionFactory
.
setTypeAliasesPackage
(
"com.yeejoin.amos.boot.module.jxiop.api.entity"
);
//mybatis 数据库字段与实体类属性驼峰映射配置
sessionFactory
.
getObject
().
getConfiguration
().
setMapUnderscoreToCamelCase
(
true
);
//分页插件
Interceptor
interceptor
=
new
PageInterceptor
();
Properties
properties
=
new
Properties
();
properties
.
setProperty
(
"helperDialect"
,
"mysql"
);
properties
.
setProperty
(
"offsetAsPageNum"
,
"true"
);
properties
.
setProperty
(
"rowBoundsWithCount"
,
"true"
);
properties
.
setProperty
(
"reasonable"
,
"true"
);
properties
.
setProperty
(
"supportMethodsArguments"
,
"true"
);
properties
.
setProperty
(
"params"
,
"pageNum=pageNum;pageSize=pageSize"
+
""
+
";"
);
interceptor
.
setProperties
(
properties
);
sessionFactory
.
setPlugins
(
new
Interceptor
[]
{
interceptor
});
return
sessionFactory
.
getObject
();
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/DemoController.java
0 → 100644
View file @
2cc86a72
//package com.yeejoin.amos.boot.module.jxiop.biz.controller;
//
//
//import com.alibaba.fastjson.JSON;
//import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
//import com.yeejoin.amos.boot.biz.common.controller.BaseController;
//import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
//import com.yeejoin.amos.boot.module.jxiop.api.entity.MonitorFanIndicator;
//import com.yeejoin.amos.boot.module.jxiop.api.entity.StationBasic;
//import com.yeejoin.amos.boot.module.jxiop.api.mapper.MonitorFanIndicatorMapper;
//import com.yeejoin.amos.boot.module.jxiop.api.mapper.StationBasicMapper;
//import com.yeejoin.amos.boot.module.jxiop.biz.dto.IndicatorsDto;
//import com.yeejoin.amos.boot.module.jxiop.biz.entity.Test;
//import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.StationBasicServiceImpl;
//import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.TestServiceImpl;
//import com.yeejoin.amos.boot.module.jxiop.biz.utils.InfluxDButils;
//import com.yeejoin.amos.component.influxdb.InfluxDbConnection;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.*;
//import org.typroject.tyboot.component.emq.EmqKeeper;
//import org.typroject.tyboot.core.foundation.enumeration.UserType;
//import org.typroject.tyboot.core.restful.doc.TycloudOperation;
//import org.typroject.tyboot.core.restful.utils.ResponseHelper;
//import org.typroject.tyboot.core.restful.utils.ResponseModel;
//
//import java.util.*;
//import java.util.concurrent.TimeUnit;
//
//
//@RestController
//@Api(tags = "Demo-test")
//@RequestMapping(value = "/demo")
//public class DemoController extends BaseController {
// Logger logger = LoggerFactory.getLogger(DemoController.class);
//
// @Autowired
// StationBasicServiceImpl stationBasicServiceimpl;
// @Autowired
// TestServiceImpl testServiceimpl;
//
// @Autowired
// InfluxDbConnection influxDbConnection;
//
// @Autowired
// InfluxDButils influxDButils;
//
// @Autowired
// EmqKeeper emqKeeper;
//
// @Autowired
// private MonitorFanIndicatorMapper monitorFanIndicatorregionMapper;
//
// @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
// @ApiOperation(value = "demo测试prodcutcion 库")
// @GetMapping("/test")
// public StationBasic demoTest() {
// return stationBasicServiceimpl.getById(1660231556607774721L);
// }
//
// @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
// @ApiOperation(value = "demo测试中间库")
// @GetMapping("/test1")
// public List<Test> demoTest1() {
// return testServiceimpl.getList();
// }
//
// @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
// @ApiOperation(value = "demo测试influxdb")
// @GetMapping("/test3")
// public void demoTest2() {
// String sql = "SELECT * FROM indicators_1668801435891929089";
// String sql1 = "SELECT * FROM indicators_1668801570352926721";
// List<IndicatorsDto> list = influxDButils.getListData(sql, IndicatorsDto.class);
// List<IndicatorsDto> list2 = influxDButils.getListData(sql1, IndicatorsDto.class);
// System.out.println(list.size());
// System.out.println(list2.size());
// }
//
// @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
// @ApiOperation(value = "初始化influxdb-风电、光伏、升压站")
// @GetMapping("/test4")
// public void demoTest3() {
// //数据说明 夏造风电、泰和光伏、夏造升压站、泰和升压站
// String [] strings = {"1668801435891929089","1669524885619085313"};
//// String [] strings = {"1669524885619085313"};
//// Object o=this.monitorFanIndicatorImpl.getIndicatoralueAvage("1668801435891929089","60秒平均风速");
//// System.out.println(o.toString());
// for (int i = 0; i < strings.length; i++) {
// QueryWrapper<MonitorFanIndicator> QueryWrapper = new QueryWrapper<>();
//// 夏造风电
//// QueryWrapper.eq("gateway", "1668801435891929089");
//// 泰和光伏
// QueryWrapper.eq("gateway", strings[i]);
// long DATE = new Date().getTime();
// System.out.println(DATE);
// List<MonitorFanIndicator> list = monitorFanIndicatorregionMapper.selectList(QueryWrapper);
//
// for (MonitorFanIndicator monitorFanIndicator : list) {
// Map<String, String> tag = new HashMap<>();
// Map<String, Object> maps2 = new HashMap<>();
//
// maps2.put("address", monitorFanIndicator.getIndexAddress());
// maps2.put("dataType", monitorFanIndicator.getDataType());
// maps2.put("equipmentSpecificName", monitorFanIndicator.getFanCode());
// tag.put("equipmentsIdx", monitorFanIndicator.getAddressGateway());
// maps2.put("gatewayId", monitorFanIndicator.getGateway());
// maps2.put("isAlarm", monitorFanIndicator.getIsAlarm());
// maps2.put("createdTime", "2023-07-05 18:30:26");
// maps2.put("unit", monitorFanIndicator.getUnit());
// maps2.put("value", "");
// maps2.put("valueLabel","" );
// maps2.put("traceId", "");
// maps2.put("equipmentIndexName", monitorFanIndicator.getIndicator());
// maps2.put("equipmentNumber", monitorFanIndicator.getEquipmentNumber());
// maps2.put("frontModule", monitorFanIndicator.getFrontModule());
// maps2.put("systemType", monitorFanIndicator.getSystemType());
// maps2.put("pictureName", monitorFanIndicator.getPictureName());
// //升压站的字段显示名称
// maps2.put("displayName", "");
// influxDbConnection.insert("indicators_" + monitorFanIndicator.getGateway(), tag, maps2, 1688558007051L, TimeUnit.MILLISECONDS);
// }
// }
//
// }
//
// @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
// @ApiOperation(value = "测试消息发送")
// @GetMapping("/test5")
// public void demoTest4() {
// HashMap<String, String> hashMap = new HashMap<>();
// hashMap.put("test", String.valueOf(Math.random() * 1000));
// hashMap.put("test1", String.valueOf(Math.random() * 100));
// try {
// emqKeeper.getMqttClient().publish("test_topic", JSON.toJSON(hashMap).toString().getBytes("UTF-8"), 1, true);
// emqKeeper.getMqttClient().publish("test_topic1", JSON.toJSON(hashMap).toString().getBytes("UTF-8"), 1, true);
// logger.info("++++++++++++++++++++++++++++++++++发送消息成功++++++++++++++++++++++++++++++++++++++");
// } catch (Exception exception) {
// logger.error("============================================================发送消息报错");
// }
// }
//
// @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
// @ApiOperation(value = "初始化升压站")
// @GetMapping("/test6")
// public void demoTest5() {
// //数据说明 夏造风电、泰和光伏、夏造升压站、泰和升压站
// String [] strings = {"1668801570352926721","1669525017559306241"};
//// String [] strings = {"1669525017559306241"};
//// Object o=this.monitorFanIndicatorImpl.getIndicatoralueAvage("1668801435891929089","60秒平均风速");
//// System.out.println(o.toString());
// for (int i = 0; i < strings.length; i++) {
// QueryWrapper<MonitorFanIndicator> QueryWrapper = new QueryWrapper<>();
//// 夏造风电
//// QueryWrapper.eq("gateway", "1668801435891929089");
//// 泰和光伏
// QueryWrapper.eq("gateway", strings[i]);
// long DATE = new Date().getTime();
// System.out.println(DATE);
// List<MonitorFanIndicator> list = monitorFanIndicatorregionMapper.selectList(QueryWrapper);
//
// for (MonitorFanIndicator monitorFanIndicator : list) {
// Map<String, String> tag = new HashMap<>();
// Map<String, Object> maps2 = new HashMap<>();
//
// maps2.put("address", monitorFanIndicator.getIndexAddress());
// maps2.put("dataType", monitorFanIndicator.getDataType());
// maps2.put("equipmentSpecificName", monitorFanIndicator.getFanCode());
// tag.put("equipmentsIdx", monitorFanIndicator.getAddressGateway());
// maps2.put("gatewayId", monitorFanIndicator.getGateway());
// maps2.put("isAlarm", monitorFanIndicator.getIsAlarm());
// maps2.put("createdTime", "2023-07-05 18:30:26");
// maps2.put("unit", monitorFanIndicator.getUnit());
// maps2.put("value", "");
// maps2.put("valueLabel","" );
// maps2.put("traceId", "");
// maps2.put("equipmentIndexName", monitorFanIndicator.getIndicator());
// maps2.put("equipmentNumber", monitorFanIndicator.getEquipmentNumber());
// maps2.put("frontModule", monitorFanIndicator.getFrontModule());
// maps2.put("systemType", monitorFanIndicator.getSystemType());
// maps2.put("pictureName", monitorFanIndicator.getPictureName());
// //升压站的字段显示名称
// maps2.put("displayName", monitorFanIndicator.getEquipmentNumber());
// influxDbConnection.insert("indicators_" + monitorFanIndicator.getGateway(), tag, maps2, 1688558007051L, TimeUnit.MILLISECONDS);
// }
// }
// }
//
// @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
// @ApiOperation(value = "测试动态图片")
// @GetMapping("/test7")
// public ResponseModel<HashMap<String, String>> demoTest6() {
// HashMap<String, String> hashMap = new HashMap<>();
// hashMap.put("url", "upload/jxiop/amos_studio/758F6F4BC695B777899485DB0C7E5D3.gif");
// return ResponseHelper.buildResponse(hashMap);
// }
//
//}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/application-dev.properties
0 → 100644
View file @
2cc86a72
## DB properties:
## db1-production database
spring.db1.datasource.type
:
com.alibaba.druid.pool.DruidDataSource
spring.db1.datasource.url
=
jdbc:mysql://39.98.223.23:3306/production?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.db1.datasource.username
=
root
spring.db1.datasource.password
=
Yeejoin@2020
spring.db1.datasource.driver-class-name
:
com.mysql.cj.jdbc.Driver
## db2-sync_data
spring.db2.datasource.type
:
com.alibaba.druid.pool.DruidDataSource
spring.db2.datasource.url
=
jdbc:mysql://39.98.223.23:3306/jxiop_sync_data?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.db2.datasource.username
=
root
spring.db2.datasource.password
=
Yeejoin@2020
spring.db2.datasource.driver-class-name
:
com.mysql.cj.jdbc.Driver
## eureka properties:
eureka.instance.hostname
=
172.16.10.220
eureka.client.serviceUrl.defaultZone
=
http://admin:a1234560@${eureka.instance.hostname}:10001/eureka/
## redis properties:
spring.redis.database
=
1
spring.redis.host
=
172.16.10.220
spring.redis.port
=
6379
spring.redis.password
=
yeejoin@2020
spring.cache.type
=
GENERIC
j2cache.open-spring-cache
=
true
j2cache.cache-clean-mode
=
passive
j2cache.allow-null-values
=
true
j2cache.redis-client
=
lettuce
j2cache.l2-cache-open
=
true
j2cache.broadcast
=
net.oschina.j2cache.cache.support.redis.SpringRedisPubSubPolicy
j2cache.L1.provider_class
=
caffeine
j2cache.L2.provider_class
=
net.oschina.j2cache.cache.support.redis.SpringRedisProvider
j2cache.L2.config_section
=
lettuce
j2cache.sync_ttl_to_redis
=
true
j2cache.default_cache_null_object
=
false
j2cache.serialization
=
fst
caffeine.properties
=
/caffeine.properties
lettuce.mode
=
single
lettuce.namespace
=
lettuce.storage
=
generic
lettuce.channel
=
j2cache
lettuce.scheme
=
redis
lettuce.hosts
=
${spring.redis.host}:${spring.redis.port}
lettuce.password
=
${spring.redis.password}
lettuce.database
=
${spring.redis.database}
lettuce.sentinelMasterId
=
lettuce.maxTotal
=
100
lettuce.maxIdle
=
10
lettuce.minIdle
=
10
lettuce.timeout
=
10000
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}
emqx.broker
=
tcp://172.16.10.220:1883
emqx.user-name
=
admin
emqx.password
=
public
mqtt.scene.host
=
mqtt://172.16.10.220:8083/mqtt
mqtt.client.product.id
=
mqtt
mqtt.topic
=
topic_mqtt
spring.mqtt.completionTimeout
=
3000
emqx.max-inflight
=
1000
## influxDB
#spring.influx.url= http://172.16.3.155:18186
#spring.influx.password=Yeejoin@2020
#spring.influx.user=root
#spring.influx.database=iot_platform
#spring.influx.retention_policy=default
#spring.influx.retention_policy_time=30d
#spring.influx.actions=10000
#spring.influx.bufferLimit=20000
## influxDB
#spring.influx.url= http://139.9.171.247:8086
#spring.influx.password=Yeejoin@2023
#spring.influx.user=admin
#spring.influx.database=iot_platform
#spring.influx.retention_policy=default
#spring.influx.retention_policy_time=30d
#spring.influx.actions=10000
#spring.influx.bufferLimit=20000
spring.influx.url
=
http://172.16.10.253:8086
spring.influx.password
=
Yeejoin@2020
spring.influx.user
=
root
spring.influx.database
=
iot_platform
spring.influx.retention_policy
=
default
spring.influx.retention_policy_time
=
30d
spring.influx.actions
=
10000
spring.influx.bufferLimit
=
20000
knife4j.production
=
false
knife4j.enable
=
true
knife4j.basic.enable
=
true
knife4j.basic.username
=
admin
knife4j.basic.password
=
a1234560
management.security.enabled
=
true
spring.security.user.name
=
admin
spring.security.user.password
=
a1234560
fire-rescue
=
123
mybatis-plus.global-config.db-config.update-strategy
=
ignored
# user-amos setting : This value is the secretkey for person manage moudle accout password encryption.please don't change it!!!
amos.secret.key
=
qaz
# if your service can't be access ,you can use this setting , you need change ip as your.
#eureka.instance.prefer-ip-address=true
#eureka.instance.ip-address=172.16.3.122
spring.activemq.broker-url
=
tcp://39.98.223.23:61616
spring.activemq.user
=
admin
spring.activemq.password
=
admin
spring.jms.pub-sub-domain
=
false
myqueue
=
amos.privilege.v1.JXIOP.AQSC_FDGL.userBusiness
# ?????????
fan.statuts.stattuspath
=
upload/jxiop/device_status
pictureUrl
=
upload/jxiop/syz/
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/application.properties
0 → 100644
View file @
2cc86a72
spring.application.name
=
AMOS-JXIOP-ANALYSE
server.servlet.context-path
=
/jxiop-analyse
server.port
=
33400
server.uri-encoding
=
UTF-8
spring.profiles.active
=
dev
spring.jackson.time-zone
=
GMT+8
spring.jackson.date-format
=
yyyy-MM-dd HH:mm:ss
logging.config
=
classpath:logback-${spring.profiles.active}.xml
## mybatis-plus配置控制台打印完整带参数SQL语句
mybatis-plus.configuration.log-impl
=
org.apache.ibatis.logging.stdout.StdOutImpl
### DB properties:
#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
#spring.datasource.type=com.zaxxer.hikari.HikariDataSource
#spring.datasource.hikari.minimum-idle=10
#spring.datasource.hikari.maximum-pool-size=25
#spring.datasource.hikari.auto-commit=true
#spring.datasource.hikari.idle-timeout=30000
#spring.datasource.hikari.pool-name=DatebookHikariCP
#spring.datasource.hikari.max-lifetime=120000
#spring.datasource.hikari.connection-timeout=30000
#spring.datasource.hikari.connection-test-query=SELECT 1
#JPA Configuration:
spring.jpa.show-sql
=
false
spring.jpa.open-in-view
=
true
#spring.jpa.hibernate.ddl-auto=update
spring.jpa.hibernate.naming.implicit-strategy
=
org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyJpaImpl
spring.jpa.hibernate.naming.physical-strategy
=
org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
##liquibase
spring.liquibase.change-log
=
classpath:/db/changelog/changelog-master.xml
spring.liquibase.enabled
=
false
## eureka properties:
#eureka.instance.prefer-ip-address=true
#eureka.instance.ip-address=172.16.3.41
eureka.client.registry-fetch-interval-seconds
=
5
eureka.instance.health-check-url-path
=
/actuator/health
eureka.instance.lease-expiration-duration-in-seconds
=
10
eureka.instance.lease-renewal-interval-in-seconds
=
5
eureka.instance.metadata-map.management.context-path
=
${server.servlet.context-path}/actuator
eureka.instance.status-page-url-path
=
/actuator/info
eureka.instance.metadata-map.management.api-docs
=
http://localhost:${server.port}${server.servlet.context-path}/doc.html
## redis properties:
spring.redis.lettuce.pool.max-active
=
200
spring.redis.lettuce.pool.max-wait
=
-1
spring.redis.lettuce.pool.max-idle
=
10
spring.redis.lettuce.pool.min-idle
=
0
## redis失效时间
redis.cache.failure.time
=
10800
spring.servlet.multipart.maxFileSize
=
100MB
spring.servlet.multipart.maxRequestSize
=
100MB
spring.main.allow-bean-definition-overriding
=
true
spring.http.encoding.charset
=
utf-8
spring.http.encoding.enabled
=
true
spring.http.encoding.force
=
true
privilege.fegin.name
=
AMOS-API-PRIVILEGE
feign.client.config.default.connect-timeout
=
20000
feign.client.config.default.read-timeout
=
20000
#场站实时数据
station.task.cron
=
* * */10 * * ?
#是否切片
station.isok
=
false
#风机更新数据切片量
station.section
=
10
gl.sum.column
=
日发电量,月发电量,年发电量
gl.avg.column
=
有功功率,日利用小时,瞬时风速
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/logback-dev.xml
0 → 100644
View file @
2cc86a72
<?xml version="1.0" encoding="UTF-8"?>
<configuration
debug=
"false"
>
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
<property
name=
"LOG_HOME"
value=
"log"
/>
<property
name=
"LOG_PATTERN"
value=
"%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %-50.50logger{50} - %msg [%file:%line] %n"
/>
<!-- 按照每天生成日志文件 -->
<appender
name=
"FILE"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!--日志文件输出的文件名-->
<FileNamePattern>
${LOG_HOME}/ccs.log.%d{yyyy-MM-dd}.log
</FileNamePattern>
<!--日志文件保留天数-->
<MaxHistory>
7
</MaxHistory>
</rollingPolicy>
<encoder
class=
"ch.qos.logback.classic.encoder.PatternLayoutEncoder"
>
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<pattern>
${LOG_PATTERN}
</pattern>
</encoder>
<!--日志文件最大的大小-->
<triggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"
>
<MaxFileSize>
30mb
</MaxFileSize>
</triggeringPolicy>
</appender>
<!-- 控制台输出 -->
<appender
name=
"STDOUT"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<encoder
class=
"ch.qos.logback.classic.encoder.PatternLayoutEncoder"
>
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<pattern>
${LOG_PATTERN}
</pattern>
</encoder>
</appender>
<!--myibatis log configure-->
<logger
name=
"com.apache.ibatis"
level=
"DEBUG"
/>
<logger
name=
"java.sql.Connection"
level=
"DEBUG"
/>
<logger
name=
"java.sql.Statement"
level=
"DEBUG"
/>
<logger
name=
"java.sql.PreparedStatement"
level=
"DEBUG"
/>
<logger
name=
"com.baomidou.mybatisplus"
level=
"DEBUG"
/>
<logger
name=
"org.springframework"
level=
"DEBUG"
/>
<logger
name=
"org.typroject"
level=
"DEBUG"
/>
<logger
name=
"com.yeejoin"
level=
"DEBUG"
/>
<!-- 日志输出级别 -->
<root
level=
"INFO"
>
<appender-ref
ref=
"FILE"
/>
<appender-ref
ref=
"STDOUT"
/>
</root>
</configuration>
amos-boot-system-jxiop/pom.xml
View file @
2cc86a72
...
...
@@ -17,6 +17,7 @@
<module>
amos-boot-module-hygf-biz
</module>
<module>
amos-boot-module-jxiop-monitor-biz
</module>
<module>
amos-boot-module-jxiop-bigscreen-biz
</module>
<module>
amos-boot-module-jxiop-analyse-biz
</module>
</modules>
<dependencies>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment