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
dcad5e76
Commit
dcad5e76
authored
Aug 11, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
31f39145
b55520ab
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
46 changed files
with
1881 additions
and
45 deletions
+1881
-45
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
IdxBizC80cController.java
...oot/module/jxiop/biz/controller/IdxBizC80cController.java
+115
-0
IdxBizHjevController.java
...oot/module/jxiop/biz/controller/IdxBizHjevController.java
+115
-0
TestController.java
...amos/boot/module/jxiop/biz/controller/TestController.java
+51
-0
IdxBizC80cDto.java
...yeejoin/amos/boot/module/jxiop/biz/dto/IdxBizC80cDto.java
+96
-0
IdxBizHjevDto.java
...yeejoin/amos/boot/module/jxiop/biz/dto/IdxBizHjevDto.java
+93
-0
IdxBizC80c.java
...yeejoin/amos/boot/module/jxiop/biz/entity/IdxBizC80c.java
+156
-0
IdxBizHjev.java
...yeejoin/amos/boot/module/jxiop/biz/entity/IdxBizHjev.java
+137
-0
IdxBizC80cMapper.java
.../amos/boot/module/jxiop/biz/mapper2/IdxBizC80cMapper.java
+14
-0
IdxBizHjevMapper.java
.../amos/boot/module/jxiop/biz/mapper2/IdxBizHjevMapper.java
+14
-0
IIdxBizC80cService.java
...mos/boot/module/jxiop/biz/service/IIdxBizC80cService.java
+12
-0
IIdxBizHjevService.java
...mos/boot/module/jxiop/biz/service/IIdxBizHjevService.java
+12
-0
CommonServiceImpl.java
...boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
+31
-0
IdxBizC80cServiceImpl.java
.../module/jxiop/biz/service/impl/IdxBizC80cServiceImpl.java
+35
-0
IdxBizHjevServiceImpl.java
.../module/jxiop/biz/service/impl/IdxBizHjevServiceImpl.java
+35
-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
IdxBizC80cMapper.xml
...iz/src/main/resources/mapper/cluster/IdxBizC80cMapper.xml
+5
-0
IdxBizHjevMapper.xml
...iz/src/main/resources/mapper/cluster/IdxBizHjevMapper.xml
+4
-0
StationType.java
.../yeejoin/amos/boot/module/jxiop/api/Enum/StationType.java
+30
-0
StationInfoDto.java
...eejoin/amos/boot/module/jxiop/api/dto/StationInfoDto.java
+2
-0
StationRecordInfo.java
...oin/amos/boot/module/jxiop/api/dto/StationRecordInfo.java
+4
-0
StationBasicMapper.xml
...xiop-api/src/main/resources/mapper/StationBasicMapper.xml
+1
-0
MonitorFanIdxController.java
.../module/jxiop/biz/controller/MonitorFanIdxController.java
+0
-0
TemporaryDataMapper.java
...os/boot/module/jxiop/biz/mapper2/TemporaryDataMapper.java
+2
-1
CommonServiceImpl.java
...boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
+91
-0
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+44
-15
application-dev.properties
...gscreen-biz/src/main/resources/application-dev.properties
+9
-9
application.properties
...p-bigscreen-biz/src/main/resources/application.properties
+7
-2
overview.json
...jxiop-bigscreen-biz/src/main/resources/json/overview.json
+51
-0
overviewGF.json
...iop-bigscreen-biz/src/main/resources/json/overviewGF.json
+61
-0
StationBasicServiceImpl.java
...odule/jxiop/biz/service/impl/StationBasicServiceImpl.java
+2
-1
ESWindSpeed.java
...yeejoin/amos/boot/module/jxiop/biz/ESDto/ESWindSpeed.java
+28
-0
DemoController.java
...amos/boot/module/jxiop/biz/controller/DemoController.java
+18
-2
MonitorFanIdxController.java
.../module/jxiop/biz/controller/MonitorFanIdxController.java
+10
-11
TemporaryDataMapper.java
...os/boot/module/jxiop/biz/mapper2/TemporaryDataMapper.java
+2
-1
ESWindSpeedRepository.java
...ot/module/jxiop/biz/repository/ESWindSpeedRepository.java
+16
-0
WindSpeedScheduled.java
...s/boot/module/jxiop/biz/scheduled/WindSpeedScheduled.java
+34
-0
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+0
-2
application.properties
...iop-monitor-biz/src/main/resources/application.properties
+2
-1
TemporaryDataMapper.xml
...src/main/resources/mapper/cluster/TemporaryDataMapper.xml
+13
-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 @
dcad5e76
<?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 @
dcad5e76
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 @
dcad5e76
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 @
dcad5e76
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/IdxBizC80cController.java
0 → 100644
View file @
dcad5e76
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
controller
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.dto.IdxBizC80cDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizC80cServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
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
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
/**
*
*
* @author system_generator
* @date 2023-08-11
*/
@RestController
@Api
(
tags
=
"风电监测变量"
)
@RequestMapping
(
value
=
"/idx-biz-c80-c"
)
public
class
IdxBizC80cController
extends
BaseController
{
@Autowired
IdxBizC80cServiceImpl
idxBizC80cServiceImpl
;
/**
* 新增
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增"
,
notes
=
"新增"
)
public
ResponseModel
<
IdxBizC80cDto
>
save
(
@RequestBody
IdxBizC80cDto
model
)
{
model
=
idxBizC80cServiceImpl
.
createWithModel
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新"
,
notes
=
"根据sequenceNbr更新"
)
public
ResponseModel
<
IdxBizC80cDto
>
updateBySequenceNbrIdxBizC80c
(
@RequestBody
IdxBizC80cDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
String
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
idxBizC80cServiceImpl
.
updateWithModel
(
model
));
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除"
,
notes
=
"根据sequenceNbr删除"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
){
return
ResponseHelper
.
buildResponse
(
idxBizC80cServiceImpl
.
removeById
(
sequenceNbr
));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个"
,
notes
=
"根据sequenceNbr查询单个"
)
public
ResponseModel
<
IdxBizC80cDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
idxBizC80cServiceImpl
.
queryBySeq
(
sequenceNbr
));
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询"
,
notes
=
"分页查询"
)
public
ResponseModel
<
Page
<
IdxBizC80cDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
IdxBizC80cDto
>
page
=
new
Page
<
IdxBizC80cDto
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
idxBizC80cServiceImpl
.
queryForIdxBizC80cPage
(
page
));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表全部数据查询"
,
notes
=
"列表全部数据查询"
)
@GetMapping
(
value
=
"/list"
)
public
ResponseModel
<
List
<
IdxBizC80cDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
idxBizC80cServiceImpl
.
queryForIdxBizC80cList
());
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/IdxBizHjevController.java
0 → 100644
View file @
dcad5e76
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
controller
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.dto.IdxBizHjevDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizHjevServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
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
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
/**
*
*
* @author system_generator
* @date 2023-08-11
*/
@RestController
@Api
(
tags
=
"光伏监测变量"
)
@RequestMapping
(
value
=
"/idx-biz-hjev"
)
public
class
IdxBizHjevController
extends
BaseController
{
@Autowired
IdxBizHjevServiceImpl
idxBizHjevServiceImpl
;
/**
* 新增
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增"
,
notes
=
"新增"
)
public
ResponseModel
<
IdxBizHjevDto
>
save
(
@RequestBody
IdxBizHjevDto
model
)
{
model
=
idxBizHjevServiceImpl
.
createWithModel
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新"
,
notes
=
"根据sequenceNbr更新"
)
public
ResponseModel
<
IdxBizHjevDto
>
updateBySequenceNbrIdxBizHjev
(
@RequestBody
IdxBizHjevDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
String
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
idxBizHjevServiceImpl
.
updateWithModel
(
model
));
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除"
,
notes
=
"根据sequenceNbr删除"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
){
return
ResponseHelper
.
buildResponse
(
idxBizHjevServiceImpl
.
removeById
(
sequenceNbr
));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个"
,
notes
=
"根据sequenceNbr查询单个"
)
public
ResponseModel
<
IdxBizHjevDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
idxBizHjevServiceImpl
.
queryBySeq
(
sequenceNbr
));
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询"
,
notes
=
"分页查询"
)
public
ResponseModel
<
Page
<
IdxBizHjevDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
IdxBizHjevDto
>
page
=
new
Page
<
IdxBizHjevDto
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
idxBizHjevServiceImpl
.
queryForIdxBizHjevPage
(
page
));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表全部数据查询"
,
notes
=
"列表全部数据查询"
)
@GetMapping
(
value
=
"/list"
)
public
ResponseModel
<
List
<
IdxBizHjevDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
idxBizHjevServiceImpl
.
queryForIdxBizHjevList
());
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/TestController.java
0 → 100644
View file @
dcad5e76
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
controller
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizC80c
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizHjev
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.CommonServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
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.List
;
/**
*
*
* @author system_generator
* @date 2023-08-11
*/
@RestController
@Api
(
tags
=
"工况测点测试"
)
@RequestMapping
(
value
=
"/test"
)
public
class
TestController
extends
BaseController
{
@Autowired
CommonServiceImpl
commonServiceImpl
;
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表全部数据查询-风电"
,
notes
=
"列表全部数据查询"
)
@GetMapping
(
value
=
"/listfan"
)
public
ResponseModel
<
List
<
IdxBizC80c
>>
selectForListFan
()
{
return
ResponseHelper
.
buildResponse
(
commonServiceImpl
.
getAllFanstationTestPoint
().
subList
(
0
,
20
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表全部数据查询-光伏"
,
notes
=
"列表全部数据查询"
)
@GetMapping
(
value
=
"/listpv"
)
public
ResponseModel
<
List
<
IdxBizHjev
>>
selectForListPV
()
{
return
ResponseHelper
.
buildResponse
(
commonServiceImpl
.
getAllPVstationTestPoint
().
subList
(
0
,
20
));
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/IdxBizC80cDto.java
0 → 100644
View file @
dcad5e76
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
dto
.
dto
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.time.LocalDateTime
;
/**
*
*
* @author system_generator
* @date 2023-08-11
*/
@Data
@ApiModel
(
value
=
"IdxBizC80cDto"
,
description
=
""
)
public
class
IdxBizC80cDto
{
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
"SEQUENCE_NBR"
)
private
String
sequenceNbr
;
@TableField
(
"RECORD"
)
private
String
record
;
@TableField
(
"REC_DATE"
)
private
LocalDateTime
recDate
;
@TableField
(
"REC_USER_ID"
)
private
String
recUserId
;
@TableField
(
"INSTANCE_ID"
)
private
String
instanceId
;
@TableField
(
"STATUS"
)
private
String
status
;
@TableField
(
"CORRELATION_COEFFICIENT"
)
private
Double
correlationCoefficient
;
@TableField
(
"ANALYSIS_POINT_ID"
)
private
Integer
analysisPointId
;
@TableField
(
"PROCESS_POINT_ID"
)
private
Integer
processPointId
;
@ApiModelProperty
(
value
=
"片区"
)
@TableField
(
"ARAE"
)
private
String
arae
;
@ApiModelProperty
(
value
=
"场站"
)
@TableField
(
"STATION"
)
private
String
station
;
@ApiModelProperty
(
value
=
"子系统"
)
@TableField
(
"SUB_SYSTEM"
)
private
String
subSystem
;
@ApiModelProperty
(
value
=
"型号"
)
@TableField
(
"NUMBER"
)
private
String
number
;
@ApiModelProperty
(
value
=
"设备类型"
)
@TableField
(
"DEVICE_TYPE"
)
private
String
deviceType
;
@TableField
(
"ANALYSIS_GATEWAY_ID"
)
private
String
analysisGatewayId
;
@TableField
(
"ANALYSIS_INDEX_ADDRESS"
)
private
String
analysisIndexAddress
;
@ApiModelProperty
(
value
=
"网关ID"
)
@TableField
(
"PROCESS_GATEWAY_ID"
)
private
String
processGatewayId
;
@TableField
(
"PROCESS_INDEX_ADDRESS"
)
private
String
processIndexAddress
;
@ApiModelProperty
(
value
=
"设备名称"
)
@TableField
(
"EQUIPMENT_NAME"
)
private
String
equipmentName
;
private
String
fxPointName
;
private
String
gkPointName
;
private
String
functionNum
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/IdxBizHjevDto.java
0 → 100644
View file @
dcad5e76
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
dto
.
dto
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.time.LocalDateTime
;
/**
*
*
* @author system_generator
* @date 2023-08-11
*/
@Data
@ApiModel
(
value
=
"IdxBizHjevDto"
,
description
=
""
)
public
class
IdxBizHjevDto
{
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
"SEQUENCE_NBR"
)
private
String
sequenceNbr
;
@TableField
(
"RECORD"
)
private
String
record
;
@TableField
(
"REC_DATE"
)
private
LocalDateTime
recDate
;
@TableField
(
"REC_USER_ID"
)
private
String
recUserId
;
@TableField
(
"INSTANCE_ID"
)
private
String
instanceId
;
@TableField
(
"STATUS"
)
private
String
status
;
@TableField
(
"CORRELATION_COEFFICIENT"
)
private
Double
correlationCoefficient
;
@TableField
(
"ANALYSIS_POINT_ID"
)
private
Integer
analysisPointId
;
@TableField
(
"PROCESS_POINT_ID"
)
private
Integer
processPointId
;
@ApiModelProperty
(
value
=
"片区"
)
@TableField
(
"ARAE"
)
private
String
arae
;
@ApiModelProperty
(
value
=
"场站"
)
@TableField
(
"STATION"
)
private
String
station
;
@ApiModelProperty
(
value
=
"设备名称"
)
@TableField
(
"RQUIPMENT_NAME"
)
private
String
rquipmentName
;
@ApiModelProperty
(
value
=
"子阵"
)
@TableField
(
"SUBARRAY"
)
private
String
subarray
;
@ApiModelProperty
(
value
=
"厂商"
)
@TableField
(
"MANUFACTURER"
)
private
String
manufacturer
;
@ApiModelProperty
(
value
=
"设备类型"
)
@TableField
(
"DEVICE_TYPE"
)
private
String
deviceType
;
@ApiModelProperty
(
value
=
"网关ID"
)
@TableField
(
"ANALYSIS_GATEWAY_ID"
)
private
String
analysisGatewayId
;
@ApiModelProperty
(
value
=
"点表地址"
)
@TableField
(
"ANALYSIS_INDEX_ADDRESS"
)
private
Integer
analysisIndexAddress
;
@ApiModelProperty
(
value
=
"网关ID"
)
@TableField
(
"PROCESS_GATEWAY_ID"
)
private
String
processGatewayId
;
@ApiModelProperty
(
value
=
"点表地址"
)
@TableField
(
"PROCESS_INDEX_ADDRESS"
)
private
Integer
processIndexAddress
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/entity/IdxBizC80c.java
0 → 100644
View file @
dcad5e76
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
org.joda.time.LocalDateTime
;
/**
*
*
* @author system_generator
* @date 2023-08-11
*/
@Data
@Accessors
(
chain
=
true
)
@TableName
(
"idx_biz_c80c"
)
public
class
IdxBizC80c
{
private
static
final
long
serialVersionUID
=
1L
;
/**
*
*/
@TableField
(
"SEQUENCE_NBR"
)
private
String
sequenceNbr
;
/**
*
*/
@TableField
(
"RECORD"
)
private
String
record
;
/**
*
*/
@TableField
(
"REC_DATE"
)
private
LocalDateTime
recDate
;
/**
*
*/
@TableField
(
"REC_USER_ID"
)
private
String
recUserId
;
/**
*
*/
@TableField
(
"INSTANCE_ID"
)
private
String
instanceId
;
/**
*
*/
@TableField
(
"STATUS"
)
private
String
status
;
/**
*
*/
@TableField
(
"CORRELATION_COEFFICIENT"
)
private
Double
correlationCoefficient
;
/**
*
*/
@TableField
(
"ANALYSIS_POINT_ID"
)
private
Integer
analysisPointId
;
/**
*
*/
@TableField
(
"PROCESS_POINT_ID"
)
private
Integer
processPointId
;
/**
* 片区
*/
@TableField
(
"ARAE"
)
private
String
arae
;
/**
* 场站
*/
@TableField
(
"STATION"
)
private
String
station
;
/**
* 子系统
*/
@TableField
(
"SUB_SYSTEM"
)
private
String
subSystem
;
/**
* 型号
*/
@TableField
(
"NUMBER"
)
private
String
number
;
/**
* 设备类型
*/
@TableField
(
"DEVICE_TYPE"
)
private
String
deviceType
;
/**
*
*/
@TableField
(
"ANALYSIS_GATEWAY_ID"
)
private
String
analysisGatewayId
;
/**
*
*/
@TableField
(
"ANALYSIS_INDEX_ADDRESS"
)
private
String
analysisIndexAddress
;
/**
* 网关ID
*/
@TableField
(
"PROCESS_GATEWAY_ID"
)
private
String
processGatewayId
;
/**
*
*/
@TableField
(
"PROCESS_INDEX_ADDRESS"
)
private
String
processIndexAddress
;
/**
* 设备名称
*/
@TableField
(
"EQUIPMENT_NAME"
)
private
String
equipmentName
;
/**
*
*/
@TableField
(
"fx_point_name"
)
private
String
fxPointName
;
/**
*
*/
@TableField
(
"gk_point_name"
)
private
String
gkPointName
;
/**
*
*/
@TableField
(
"function_num"
)
private
String
functionNum
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/entity/IdxBizHjev.java
0 → 100644
View file @
dcad5e76
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
org.joda.time.LocalDateTime
;
/**
*
*
* @author system_generator
* @date 2023-08-11
*/
@Data
@Accessors
(
chain
=
true
)
@TableName
(
"idx_biz_hjev"
)
public
class
IdxBizHjev
{
private
static
final
long
serialVersionUID
=
1L
;
/**
*
*/
@TableField
(
"SEQUENCE_NBR"
)
private
String
sequenceNbr
;
/**
*
*/
@TableField
(
"RECORD"
)
private
String
record
;
/**
*
*/
@TableField
(
"REC_DATE"
)
private
LocalDateTime
recDate
;
/**
*
*/
@TableField
(
"REC_USER_ID"
)
private
String
recUserId
;
/**
*
*/
@TableField
(
"INSTANCE_ID"
)
private
String
instanceId
;
/**
*
*/
@TableField
(
"STATUS"
)
private
String
status
;
/**
*
*/
@TableField
(
"CORRELATION_COEFFICIENT"
)
private
Double
correlationCoefficient
;
/**
*
*/
@TableField
(
"ANALYSIS_POINT_ID"
)
private
Integer
analysisPointId
;
/**
*
*/
@TableField
(
"PROCESS_POINT_ID"
)
private
Integer
processPointId
;
/**
* 片区
*/
@TableField
(
"ARAE"
)
private
String
arae
;
/**
* 场站
*/
@TableField
(
"STATION"
)
private
String
station
;
/**
* 设备名称
*/
@TableField
(
"RQUIPMENT_NAME"
)
private
String
rquipmentName
;
/**
* 子阵
*/
@TableField
(
"SUBARRAY"
)
private
String
subarray
;
/**
* 厂商
*/
@TableField
(
"MANUFACTURER"
)
private
String
manufacturer
;
/**
* 设备类型
*/
@TableField
(
"DEVICE_TYPE"
)
private
String
deviceType
;
/**
* 网关ID
*/
@TableField
(
"ANALYSIS_GATEWAY_ID"
)
private
String
analysisGatewayId
;
/**
* 点表地址
*/
@TableField
(
"ANALYSIS_INDEX_ADDRESS"
)
private
Integer
analysisIndexAddress
;
/**
* 网关ID
*/
@TableField
(
"PROCESS_GATEWAY_ID"
)
private
String
processGatewayId
;
/**
* 点表地址
*/
@TableField
(
"PROCESS_INDEX_ADDRESS"
)
private
Integer
processIndexAddress
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/IdxBizC80cMapper.java
0 → 100644
View file @
dcad5e76
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
mapper2
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizC80c
;
/**
* Mapper 接口
*
* @author system_generator
* @date 2023-08-11
*/
public
interface
IdxBizC80cMapper
extends
BaseMapper
<
IdxBizC80c
>
{
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/IdxBizHjevMapper.java
0 → 100644
View file @
dcad5e76
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
mapper2
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizHjev
;
/**
* Mapper 接口
*
* @author system_generator
* @date 2023-08-11
*/
public
interface
IdxBizHjevMapper
extends
BaseMapper
<
IdxBizHjev
>
{
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/IIdxBizC80cService.java
0 → 100644
View file @
dcad5e76
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
service
;
/**
* 接口类
*
* @author system_generator
* @date 2023-08-11
*/
public
interface
IIdxBizC80cService
{
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/IIdxBizHjevService.java
0 → 100644
View file @
dcad5e76
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
service
;
/**
* 接口类
*
* @author system_generator
* @date 2023-08-11
*/
public
interface
IIdxBizHjevService
{
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
0 → 100644
View file @
dcad5e76
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizC80c
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizHjev
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizC80cMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizHjevMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
@Service
public
class
CommonServiceImpl
{
@Autowired
private
IdxBizC80cMapper
idxBizC80cMapper
;
@Autowired
private
IdxBizHjevMapper
idxBizHjevMapper
;
public
List
<
IdxBizC80c
>
getAllFanstationTestPoint
(){
List
<
IdxBizC80c
>
idxBizC80cList
=
new
ArrayList
<>();
idxBizC80cList
=
idxBizC80cMapper
.
selectList
(
new
QueryWrapper
<
IdxBizC80c
>().
isNotNull
(
"SEQUENCE_NBR"
));
return
idxBizC80cList
;
}
public
List
<
IdxBizHjev
>
getAllPVstationTestPoint
(){
List
<
IdxBizHjev
>
idxBizC80cList
=
new
ArrayList
<>();
idxBizC80cList
=
idxBizHjevMapper
.
selectList
(
new
QueryWrapper
<
IdxBizHjev
>().
isNotNull
(
"SEQUENCE_NBR"
));
return
idxBizC80cList
;
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/IdxBizC80cServiceImpl.java
0 → 100644
View file @
dcad5e76
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.dto.IdxBizC80cDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizC80c
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizC80cMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.IIdxBizC80cService
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.List
;
/**
* 服务实现类
*
* @author system_generator
* @date 2023-08-11
*/
@Service
public
class
IdxBizC80cServiceImpl
extends
BaseService
<
IdxBizC80cDto
,
IdxBizC80c
,
IdxBizC80cMapper
>
implements
IIdxBizC80cService
{
/**
* 分页查询
*/
public
Page
<
IdxBizC80cDto
>
queryForIdxBizC80cPage
(
Page
<
IdxBizC80cDto
>
page
)
{
return
this
.
queryForPage
(
page
,
null
,
false
);
}
/**
* 列表查询 示例
*/
public
List
<
IdxBizC80cDto
>
queryForIdxBizC80cList
()
{
return
this
.
queryForList
(
""
,
false
);
}
}
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/IdxBizHjevServiceImpl.java
0 → 100644
View file @
dcad5e76
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.dto.IdxBizHjevDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizHjev
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizHjevMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.IIdxBizHjevService
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.List
;
/**
* 服务实现类
*
* @author system_generator
* @date 2023-08-11
*/
@Service
public
class
IdxBizHjevServiceImpl
extends
BaseService
<
IdxBizHjevDto
,
IdxBizHjev
,
IdxBizHjevMapper
>
implements
IIdxBizHjevService
{
/**
* 分页查询
*/
public
Page
<
IdxBizHjevDto
>
queryForIdxBizHjevPage
(
Page
<
IdxBizHjevDto
>
page
)
{
return
this
.
queryForPage
(
page
,
null
,
false
);
}
/**
* 列表查询 示例
*/
public
List
<
IdxBizHjevDto
>
queryForIdxBizHjevList
()
{
return
this
.
queryForList
(
""
,
false
);
}
}
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/application-dev.properties
0 → 100644
View file @
dcad5e76
## 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://172.16.10.220:3306/yeeamos_amos_idx_biz?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 @
dcad5e76
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 @
dcad5e76
<?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/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/cluster/IdxBizC80cMapper.xml
0 → 100644
View file @
dcad5e76
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizC80c"
>
</mapper>
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/cluster/IdxBizHjevMapper.xml
0 → 100644
View file @
dcad5e76
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizHjev"
>
</mapper>
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/Enum/StationType.java
0 → 100644
View file @
dcad5e76
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
api
.
Enum
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
@Getter
@AllArgsConstructor
public
enum
StationType
{
FJC
(
"风电场"
,
"FJC"
),
JZGFC
(
"集中光伏场"
,
"JZGFC"
),
FBSGFC
(
"分布式光伏场"
,
"FBSGFC"
);
private
String
name
;
private
String
code
;
public
static
String
getCode
(
String
name
)
{
for
(
StationType
stationType
:
StationType
.
values
())
{
if
(
stationType
.
getName
().
equals
(
name
))
{
return
stationType
.
getCode
();
}
}
return
null
;
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/dto/StationInfoDto.java
View file @
dcad5e76
...
...
@@ -33,6 +33,8 @@ public class StationInfoDto {
@ApiModelProperty
(
value
=
"场站名称"
)
private
String
stationName
;
@ApiModelProperty
(
value
=
"场站code"
)
private
String
stationCode
;
@ApiModelProperty
(
value
=
"场站类型"
)
private
String
type
;
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/dto/StationRecordInfo.java
View file @
dcad5e76
...
...
@@ -43,4 +43,8 @@ public class StationRecordInfo {
@ApiModelProperty
(
value
=
"场站坐标偏移量"
)
private
String
titlePos
;
@ApiModelProperty
(
value
=
"场站code"
)
private
String
stationCode
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/resources/mapper/StationBasicMapper.xml
View file @
dcad5e76
...
...
@@ -113,6 +113,7 @@
station_basic.station_type stationType,
station_basic.station_flag stationFlag,
station_basic.area_code areaCode,
station_basic.project_org_code stationCode,
station_basic.jump_path,
station_basic.title_pos titlePos,
station_basic.risk_level riskLevel,
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/MonitorFanIdxController.java
View file @
dcad5e76
This diff is collapsed.
Click to expand it.
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/TemporaryDataMapper.java
View file @
dcad5e76
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
mapper2
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.ESDto.ESWindSpeed
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.TemporaryData
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
java.util.List
;
...
...
@@ -18,4 +18,5 @@ public interface TemporaryDataMapper extends BaseMapper<TemporaryData> {
@RequestParam
(
value
=
"equipmentIndexName"
)
String
equipmentIndexName
);
List
<
ESWindSpeed
>
getAllData
();
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
View file @
dcad5e76
...
...
@@ -3,18 +3,38 @@ package com.yeejoin.amos.boot.module.jxiop.biz.service.impl;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.StationBasic
;
import
com.yeejoin.amos.boot.module.jxiop.biz.ESDto.ESEquipments
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.IndicatorsDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.QueryDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.SocialContributionDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.StationCacheInfoDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.initdata.StationCacheDataInit
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.SjglZsjZsbtzMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.utils.InfluxDButils
;
import
com.yeejoin.amos.component.influxdb.InfluxdbUtil
;
import
org.elasticsearch.index.query.BoolQueryBuilder
;
import
org.elasticsearch.index.query.QueryBuilders
;
import
org.elasticsearch.search.aggregations.Aggregation
;
import
org.elasticsearch.search.aggregations.AggregationBuilders
;
import
org.elasticsearch.search.aggregations.Aggregations
;
import
org.elasticsearch.search.aggregations.bucket.terms.ParsedStringTerms
;
import
org.elasticsearch.search.aggregations.bucket.terms.Terms
;
import
org.elasticsearch.search.aggregations.bucket.terms.TermsAggregationBuilder
;
import
org.elasticsearch.search.aggregations.metrics.SumAggregationBuilder
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.PageRequest
;
import
org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate
;
import
org.springframework.data.elasticsearch.core.SearchHits
;
import
org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilder
;
import
org.springframework.data.elasticsearch.core.query.Query
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.concurrent.atomic.AtomicReference
;
import
java.util.stream.Collectors
;
...
...
@@ -28,6 +48,15 @@ public class CommonServiceImpl {
@Autowired
SjglZsjZsbtzMapper
sjglZsjZsbtzMapper
;
@Autowired
private
RedisTemplate
redisTemplate
;
@Autowired
private
StationCacheDataInit
stationCacheDataInit
;
@Autowired
private
ElasticsearchRestTemplate
elasticsearchTemplate
;
/**
* @deprecated 获取指标值总和
* @param gatewayId 网关id 用于拼接sql语句
...
...
@@ -119,4 +148,66 @@ public class CommonServiceImpl {
socialContributionDtoPage
.
setCurrent
(
1
);
return
socialContributionDtoPage
;
}
public
List
<
StationCacheInfoDto
>
getListStationCacheInfoDto
(){
List
<
StationCacheInfoDto
>
stationCacheInfoDtoList
=
redisTemplate
.
opsForList
().
range
(
"station_info_cache"
,
0
,-
1
);
if
(
ObjectUtils
.
isEmpty
(
stationCacheInfoDtoList
)){
try
{
stationCacheDataInit
.
run
();
stationCacheInfoDtoList
=
redisTemplate
.
opsForList
().
range
(
"station_info_cache"
,
0
,-
1
);
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
}
}
return
stationCacheInfoDtoList
;
}
/*
*分组求和
**/
public
List
<?
extends
Terms
.
Bucket
>
getgroupsum
(
Map
<
String
,
List
<
String
>>
value
,
String
keyavg
,
String
groupKey
,
Class
clas
){
List
<?
extends
Terms
.
Bucket
>
listdata
=
null
;
BoolQueryBuilder
queryBuilder
=
QueryBuilders
.
boolQuery
();
for
(
String
key:
value
.
keySet
()){
List
<
String
>
va
=
value
.
get
(
key
);
queryBuilder
.
must
(
QueryBuilders
.
termsQuery
(
key
,
va
));
}
TermsAggregationBuilder
tb1
=
AggregationBuilders
.
terms
(
"groupKey"
).
field
(
groupKey
);
SumAggregationBuilder
buyCountSum
=
AggregationBuilders
.
sum
(
"buyCountSum"
).
field
(
keyavg
);
tb1
.
subAggregation
(
buyCountSum
);
// 通过typeId字段分组统计总数
Query
query
=
new
NativeSearchQueryBuilder
()
.
withQuery
(
queryBuilder
)
.
addAggregation
(
tb1
)
.
withPageable
(
PageRequest
.
of
(
0
,
1
))
.
build
();
query
.
setTrackTotalHits
(
true
);
SearchHits
search
=
elasticsearchTemplate
.
search
(
query
,
ESEquipments
.
class
);
if
(
search
.
hasAggregations
())
{
Aggregations
aggregations
=
search
.
getAggregations
();
if
(
Objects
.
nonNull
(
aggregations
))
{
List
<
Aggregation
>
list
=
aggregations
.
asList
();
listdata
=
list
!=
null
&&!
list
.
isEmpty
()?((
ParsedStringTerms
)
list
.
get
(
0
)).
getBuckets
():
null
;
}
}
return
listdata
;
}
public
Integer
getCount
(
List
<
QueryDto
>
queryDto
,
String
keysum
,
Class
clas
){
BoolQueryBuilder
queryBuilder
=
QueryBuilders
.
boolQuery
();
for
(
QueryDto
dto
:
queryDto
)
{
queryBuilder
.
must
(
QueryBuilders
.
matchPhraseQuery
(
dto
.
getKey
(),
dto
.
getValue
()));
}
Query
query
=
new
NativeSearchQueryBuilder
()
.
withQuery
(
queryBuilder
)
.
withPageable
(
PageRequest
.
of
(
0
,
10000
))
.
build
();
query
.
setTrackTotalHits
(
true
);
SearchHits
search
=
elasticsearchTemplate
.
search
(
query
,
clas
);
return
search
.
getSearchHits
().
size
();
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
View file @
dcad5e76
...
...
@@ -103,6 +103,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
@Autowired
EmqKeeper
emqKeeper
;
@Autowired
CommonServiceImpl
commonServiceImpl
;
@Value
(
"${pictureUrl}"
)
String
pictureUrl
;
...
...
@@ -613,7 +616,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
@Scheduled
(
cron
=
"0 */5 * * * ?"
)
//
@Scheduled(cron = "0 */5 * * * ?")
private
void
schedTaskData
(){
LambdaQueryWrapper
<
StationBasic
>
wrapper
=
new
LambdaQueryWrapper
<>();
...
...
@@ -629,7 +632,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
}
}
@Scheduled
(
cron
=
"0 59 23 * * ?"
)
//
@Scheduled(cron = "0 59 23 * * ?")
private
void
deleteSchedData
(){
QueryWrapper
<
TemporaryData
>
wrapper
=
new
QueryWrapper
<>();
temporaryDataMapper
.
delete
(
wrapper
);
...
...
@@ -640,7 +643,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
}
@Scheduled
(
cron
=
"0 */5 * * * ?"
)
//
@Scheduled(cron = "0 */5 * * * ?")
private
void
schedAlarmEventData
(){
LambdaQueryWrapper
<
StationBasic
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
BaseEntity:
:
getIsDelete
,
false
);
...
...
@@ -1745,22 +1748,32 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
}
public
void
sendMqttByRanking
(
List
<
Map
<
String
,
Object
>>
list
,
String
code
,
String
topic
){
list
.
stream
().
sorted
((
o1
,
o2
)->{
double
o1Num
=
Double
.
parseDouble
(
o1
.
get
(
"value"
).
toString
());
double
o2Num
=
Double
.
parseDouble
(
o2
.
get
(
"value"
).
toString
());
if
((
o1Num
-
o2Num
)<
0
){
return
-
1
;
}
else
if
((
o1Num
-
o2Num
)>
0
){
return
1
;
}
else
{
return
0
;
//先发送区域消息
List
<
StationCacheInfoDto
>
listStationCacheInfoDto
=
commonServiceImpl
.
getListStationCacheInfoDto
();
Map
<
String
,
List
<
StationCacheInfoDto
>>
belongAreaList
=
listStationCacheInfoDto
.
stream
().
collect
(
Collectors
.
groupingBy
(
StationCacheInfoDto:
:
getBelongArea
));
for
(
String
s
:
belongAreaList
.
keySet
())
{
List
<
String
>
ids
=
belongAreaList
.
get
(
s
).
stream
().
map
(
StationCacheInfoDto:
:
getFanGatewayId
).
collect
(
Collectors
.
toList
());
String
idStrings
=
String
.
join
(
","
,
ids
);
List
<
Map
<
String
,
Object
>>
dataList
=
list
.
stream
().
filter
(
e
->
idStrings
.
contains
(
e
.
get
(
"gateWayId"
).
toString
())).
collect
(
Collectors
.
toList
());
List
<
Map
<
String
,
Object
>>
resultList
=
mapListToSort
(
dataList
).
stream
().
limit
(
5
).
collect
(
Collectors
.
toList
());
IPage
<
Map
<
String
,
Object
>>
result
=
new
Page
<>();
result
.
setRecords
(
resultList
);
result
.
setCurrent
(
1
);
result
.
setTotal
(
resultList
.
size
());
try
{
emqKeeper
.
getMqttClient
().
publish
(
s
+
"/"
+
topic
+
"/"
+
code
,
JSON
.
toJSONString
(
result
).
getBytes
(),
0
,
false
);
}
catch
(
MqttException
e
)
{
e
.
printStackTrace
();
}
}
);
}
//发送全国数据消息
List
<
Map
<
String
,
Object
>>
maps
=
mapListToSort
(
list
);
List
<
Map
<
String
,
Object
>>
resultList
=
maps
.
stream
().
limit
(
5
).
collect
(
Collectors
.
toList
());
IPage
<
Map
<
String
,
Object
>>
result
=
new
Page
<>();
result
.
setRecords
(
l
ist
);
result
.
setRecords
(
resultL
ist
);
result
.
setCurrent
(
1
);
result
.
setTotal
(
l
ist
.
size
());
result
.
setTotal
(
resultL
ist
.
size
());
try
{
emqKeeper
.
getMqttClient
().
publish
(
topic
+
"/"
+
code
,
JSON
.
toJSONString
(
result
).
getBytes
(),
0
,
false
);
}
catch
(
MqttException
e
)
{
...
...
@@ -1769,6 +1782,22 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
}
List
<
Map
<
String
,
Object
>>
mapListToSort
(
List
<
Map
<
String
,
Object
>>
list
){
list
.
stream
().
sorted
((
o1
,
o2
)->{
double
o1Num
=
Double
.
parseDouble
(
o1
.
get
(
"value"
).
toString
());
double
o2Num
=
Double
.
parseDouble
(
o2
.
get
(
"value"
).
toString
());
if
((
o1Num
-
o2Num
)<
0
){
return
-
1
;
}
else
if
((
o1Num
-
o2Num
)>
0
){
return
1
;
}
else
{
return
0
;
}
});
return
list
;
}
public
Map
<
String
,
Object
>
generatingCapacity
(
String
gatewayId
,
String
query
){
String
querySql
=
" SELECT * FROM indicators_"
+
gatewayId
+
" WHERE equipmentIndexName='日发电量' or equipmentIndexName='月发电量' or equipmentIndexName='年发电量'"
;
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/resources/application-dev.properties
View file @
dcad5e76
## DB properties:
## db1-production database
spring.db1.datasource.type
:
com.alibaba.druid.pool.DruidDataSource
spring.db1.datasource.url
=
jdbc:mysql://
139.9.173.44
:3306/production?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.db1.datasource.url
=
jdbc:mysql://
39.98.224.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://
139.9.173.44
:3306/jxiop_sync_data?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.db2.datasource.url
=
jdbc:mysql://
39.98.224.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.2
20
eureka.instance.hostname
=
172.16.10.2
53
eureka.client.serviceUrl.defaultZone
=
http://admin:a1234560@${eureka.instance.hostname}:10001/eureka/
## redis properties:
spring.redis.database
=
1
spring.redis.host
=
172.16.10.2
20
spring.redis.host
=
172.16.10.2
53
spring.redis.port
=
6379
spring.redis.password
=
yeejoin@2020
...
...
@@ -53,10 +53,10 @@ lettuce.timeout=10000
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}
emqx.broker
=
tcp://172.16.10.2
20
:1883
emqx.broker
=
tcp://172.16.10.2
53
:1883
emqx.user-name
=
admin
emqx.password
=
public
mqtt.scene.host
=
mqtt://172.16.10.2
20
:8083/mqtt
mqtt.scene.host
=
mqtt://172.16.10.2
53
:8083/mqtt
mqtt.client.product.id
=
mqtt
mqtt.topic
=
topic_mqtt
spring.mqtt.completionTimeout
=
3000
...
...
@@ -84,9 +84,9 @@ emqx.max-inflight=1000
#spring.influx.bufferLimit=20000
spring.influx.url
=
http://1
39.9.173.44:1
8086
spring.influx.url
=
http://1
72.16.10.220:
8086
spring.influx.password
=
Yeejoin@2020
spring.influx.user
=
root
spring.influx.user
=
Yeejoin@2020
spring.influx.database
=
iot_platform
spring.influx.retention_policy
=
default
spring.influx.retention_policy_time
=
30d
...
...
@@ -114,7 +114,7 @@ amos.secret.key=qaz
#eureka.instance.ip-address=172.16.3.122
spring.activemq.broker-url
=
tcp://1
39.9.173.44
:61616
spring.activemq.broker-url
=
tcp://1
72.16.10.253
:61616
spring.activemq.user
=
admin
spring.activemq.password
=
admin
spring.jms.pub-sub-domain
=
false
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/resources/application.properties
View file @
dcad5e76
...
...
@@ -73,4 +73,10 @@ station.isok=false
station.section
=
10
gl.sum.column
=
日发电量,月发电量,年发电量
gl.avg.column
=
有功功率,日利用小时,瞬时风速
\ No newline at end of file
gl.avg.column
=
有功功率,日利用小时,瞬时风速
spring.elasticsearch.rest.uris
=
http://39.98.224.23:9200
spring.elasticsearch.rest.connection-timeout
=
30000
spring.elasticsearch.rest.username
=
elastic
spring.elasticsearch.rest.password
=
123456
spring.elasticsearch.rest.read-timeout
=
30000
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/resources/json/overview.json
0 → 100644
View file @
dcad5e76
[
{
"titie"
:
"装机容量"
,
"title1"
:
"装机容量(MW)"
,
"url"
:
"upload/jxiop/amos_studio/2F378EF430F788CA71E876359B46C4E.png"
},
{
"titie"
:
"日发电量"
,
"title1"
:
"日发电量(万kWh)"
,
"url"
:
"upload/jxiop/amos_studio/E07C6C41715033585F69934AF08A3431.png"
},
{
"titie"
:
"风机台数"
,
"title1"
:
"风机台数(台)"
,
"action"
:
"*.replace(
\"
.0
\"
,
\"\"
)"
,
"url"
:
"upload/jxiop/amos_studio/EA3572E1BD31DC1E7D8DA162F09ECB.png"
},
{
"titie"
:
"月发电量"
,
"title1"
:
"月发电量(万kWh)"
,
"url"
:
"upload/jxiop/amos_studio/6CE2792ABEEAE816CB798649A6796.png"
},
{
"titie"
:
"瞬时风速"
,
"title1"
:
"平均风速(m/s)"
,
"url"
:
"upload/jxiop/amos_studio/3B66742AAB2FEB0F5CEC10DA50156F.png"
},
{
"titie"
:
"年发电量"
,
"title1"
:
"年发电量(万kWh)"
,
"url"
:
"upload/jxiop/amos_studio/12D321E29727689B334E3E625383EB7C.png"
},
{
"titie"
:
"有功功率"
,
"title1"
:
"有功功率(MW)"
,
"action"
:
"String.format(
\"
%.2f
\"
,Double.parseDouble(*)/1000)"
,
"url"
:
"upload/jxiop/amos_studio/C46B483E51ACAC137CBEB5156F6F377.png"
},
{
"titie"
:
"日利用小时"
,
"title1"
:
"日利用小时"
,
"action"
:
"String.format(
\"
%.2f
\"
,Double.parseDouble(columnMap.get(
\"
*
\"
).toString())/ (Double.parseDouble(columnMap.get(
\"
-
\"
).toString())*1000))"
,
"url"
:
"upload/jxiop/amos_studio/C46B483E51ACAC137CBEB5156F6F377.png"
},
{
"titie"
:
"上网电量"
,
"title1"
:
"上网电量(万kWh)"
,
"url"
:
"upload/jxiop/amos_studio/1660C5DDA22ACFADC89A60DEDB82FA39.png"
}
]
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/resources/json/overviewGF.json
0 → 100644
View file @
dcad5e76
[
{
"titie"
:
"逆变器台数"
,
"title1"
:
"逆变器台数(台)"
,
"action"
:
"*.replace(
\"
.0
\"
,
\"\"
)"
,
"url"
:
"upload/jxiop/amos_studio/EA3572E1BD31DC1E7D8DA162F09ECB.png"
},
{
"titie"
:
"装机容量"
,
"title1"
:
"装机容量(MW)"
,
"url"
:
"upload/jxiop/amos_studio/2F378EF430F788CA71E876359B46C4E.png"
},
{
"titie"
:
"有功功率"
,
"title1"
:
"有功功率(MW)"
,
"action"
:
"String.format(
\"
%.2f
\"
,Double.parseDouble(*)/1000)"
,
"url"
:
"upload/jxiop/amos_studio/C46B483E51ACAC137CBEB5156F6F377.png"
},
{
"url"
:
"upload/jxiop/amos_studio/F9A5F9E6EB7C825CA869063E817E281.png"
,
"title1"
:
"综合效率(%)"
,
"title2"
:
"综合效率"
},
{
"url"
:
"upload/jxiop/amos_studio/DD1CE8BAF5A7C3AC5E6E2C0D46C3EEC.png"
,
"title1"
:
"辐照强度(W/㎡)"
,
"title"
:
"总辐射"
},
{
"url"
:
"upload/jxiop/amos_studio/22639FDFF29B20B681DF55F1252876B3.png"
,
"title1"
:
"总辐射日累计(Mb/㎡)"
,
"title2"
:
"总辐射累计"
},
{
"titie"
:
"日发电量"
,
"title1"
:
"日发电量(万kWh)"
,
"url"
:
"upload/jxiop/amos_studio/E07C6C41715033585F69934AF08A3431.png"
},
{
"titie"
:
"月发电量"
,
"title1"
:
"月发电量(万kWh)"
,
"url"
:
"upload/jxiop/amos_studio/6CE2792ABEEAE816CB798649A6796.png"
},
{
"titie"
:
"年发电量"
,
"title1"
:
"年发电量(万kWh)"
,
"url"
:
"upload/jxiop/amos_studio/12D321E29727689B334E3E625383EB7C.png"
},
{
"titie"
:
"上网电量"
,
"title1"
:
"上网电量(万kWh)"
,
"url"
:
"upload/jxiop/amos_studio/1660C5DDA22ACFADC89A60DEDB82FA39.png"
},
{
"titie"
:
"年利用小时"
,
"title1"
:
"年利用小时"
,
"action"
:
"String.format(
\"
%.2f
\"
,Double.parseDouble(columnMap.get(
\"
*
\"
).toString())/ (Double.parseDouble(columnMap.get(
\"
-
\"
).toString())*1000))"
,
"url"
:
"upload/jxiop/amos_studio/C46B483E51ACAC137CBEB5156F6F377.png"
}
]
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-jxiop-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/StationBasicServiceImpl.java
View file @
dcad5e76
...
...
@@ -311,7 +311,7 @@ public class StationBasicServiceImpl extends BaseService<StationBasicDto, Statio
list
.
addAll
(
stationBasicMapper
.
getStationList
(
null
));
}
List
<
StationRecordInfo
>
stationRecordInfoList
=
list
.
stream
().
filter
(
stationRecordInfo
->
!
org
.
springframework
.
util
.
ObjectUtils
.
isEmpty
(
stationRecordInfo
.
getTitlePos
())).
collect
(
Collectors
.
toList
());
//
便利
返回给地图的数据并对数据进行处理
//
遍历
返回给地图的数据并对数据进行处理
stationRecordInfoList
.
forEach
(
stationRecordInfo
->
{
StationInfoDto
stationInfoDto
=
new
StationInfoDto
();
stationInfoDto
.
setStationId
(
stationRecordInfo
.
getStationId
());
...
...
@@ -330,6 +330,7 @@ public class StationBasicServiceImpl extends BaseService<StationBasicDto, Statio
for
(
String
s
:
original
)
{
doubleList
.
add
(
Double
.
parseDouble
(
s
));
}
stationInfoDto
.
setStationCode
(
stationRecordInfo
.
getStationCode
());
stationInfoDto
.
setTitlePos
(
doubleList
);
stationInfoDto
.
setIndicatorData
(
indicatorList
);
stationInfoDto
.
setRiskLevel
(
stationRecordInfo
.
getRiskLevel
());
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/ESDto/ESWindSpeed.java
0 → 100644
View file @
dcad5e76
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
ESDto
;
import
io.github.classgraph.json.Id
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
org.springframework.data.elasticsearch.annotations.Document
;
import
org.springframework.data.elasticsearch.annotations.Field
;
import
org.springframework.data.elasticsearch.annotations.FieldType
;
@Data
@Accessors
(
chain
=
true
)
@Document
(
indexName
=
"wind_speed"
)
public
class
ESWindSpeed
{
@Id
private
Long
id
;
@Field
(
type
=
FieldType
.
Text
,
index
=
false
)
private
String
createdTime
;
@Field
(
type
=
FieldType
.
Text
,
index
=
false
)
private
String
equipmentIndexName
;
@Field
(
type
=
FieldType
.
Text
,
index
=
false
)
private
String
equipmentNumber
;
@Field
(
type
=
FieldType
.
Text
,
index
=
false
)
private
String
gatewayId
;
@Field
(
type
=
FieldType
.
Double
,
index
=
false
)
private
Double
value
;
@Field
(
type
=
FieldType
.
Text
,
index
=
false
)
private
String
batchNo
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/DemoController.java
View file @
dcad5e76
...
...
@@ -18,6 +18,7 @@ import com.yeejoin.amos.boot.module.jxiop.biz.dto.IndicatorsDto;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.QueryDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.StationCacheInfoDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.Test
;
import
com.yeejoin.amos.boot.module.jxiop.biz.initdata.StationCacheDataInit
;
import
com.yeejoin.amos.boot.module.jxiop.biz.repository.ESEquipmentsRepository
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.*
;
import
com.yeejoin.amos.boot.module.jxiop.biz.utils.InfluxDButils
;
...
...
@@ -98,8 +99,11 @@ public class DemoController extends BaseController {
@Autowired
ESEquipmentsRepository
equipmentsRepository
;
@Autowired
CommonServiceImpl
commonServiceImpl
;
@Autowired
CommonServiceImpl
commonServiceImpl
;
@Autowired
PowerGenerationImpl
powerGenerationImpl
;
@Autowired
StationCacheDataInit
stationCacheDataInit
;
@Autowired
LargeScreenImpl
largeScreenImpl
;
...
...
@@ -122,7 +126,19 @@ public class DemoController extends BaseController {
private
final
String
yearType
=
"year"
;
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"手动更新场站缓存信息接口"
)
@GetMapping
(
"/updateStationCacheInfo"
)
public
String
updateStationCacheInfo
()
{
String
updateResult
=
"更新场站信息缓存成功"
;
try
{
stationCacheDataInit
.
run
();
}
catch
(
Exception
e
)
{
updateResult
=
"更新场站信息缓存成功"
;
throw
new
RuntimeException
(
e
);
}
return
updateResult
;
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/MonitorFanIdxController.java
View file @
dcad5e76
...
...
@@ -255,12 +255,15 @@ public class MonitorFanIdxController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"概览-全站功率曲线"
)
@GetMapping
(
"/overviewWindSpeed"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getOverviewWindSpeed
(
@RequestParam
(
value
=
"stationId"
,
required
=
true
)
String
stationId
,
@RequestParam
(
value
=
"type"
,
required
=
false
)
String
type
)
{
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
String
gatewayId
=
stationBasic
.
getBoosterGatewayId
();
if
(
null
==
type
){
gatewayId
=
stationBasic
.
getFanGatewayId
();
}
public
ResponseModel
<
Map
<
String
,
Object
>>
getOverviewWindSpeed
(
@RequestParam
(
value
=
"stationId"
,
required
=
false
)
String
stationId
,
@RequestParam
(
value
=
"type"
,
required
=
false
)
String
type
)
{
String
gatewayId
=
""
;
if
(
null
!=
stationId
){
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
gatewayId
=
stationBasic
.
getBoosterGatewayId
();
if
(
null
==
type
){
gatewayId
=
stationBasic
.
getFanGatewayId
();
}
}
Map
<
String
,
Object
>
detailsWindSpeed
=
monitorFanIndicator
.
getDetailsWindSpeedAll
(
gatewayId
);
return
ResponseHelper
.
buildResponse
(
detailsWindSpeed
);
...
...
@@ -595,7 +598,7 @@ public class MonitorFanIdxController extends BaseController {
}
for
(
String
column
:
columnLists
)
{
Double
result
=
commonService
.
get
Avgvalue
ByIndicatior
(
gatewayId
,
column
);
Double
result
=
commonService
.
get
Total
ByIndicatior
(
gatewayId
,
column
);
columnMap
.
put
(
column
,
String
.
format
(
"%.2f"
,
result
));
}
...
...
@@ -854,8 +857,4 @@ public class MonitorFanIdxController extends BaseController {
return
CommonResponseUtil
.
success
();
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/TemporaryDataMapper.java
View file @
dcad5e76
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
mapper2
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.ESDto.ESWindSpeed
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.TemporaryData
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.springframework.web.bind.annotation.RequestParam
;
...
...
@@ -17,5 +18,5 @@ public interface TemporaryDataMapper extends BaseMapper<TemporaryData> {
Map
<
String
,
String
>
getStatisticsInfo
(
@RequestParam
(
value
=
"gatewayId"
)
String
gatewayId
,
@RequestParam
(
value
=
"equipmentIndexName"
)
String
equipmentIndexName
);
List
<
ESWindSpeed
>
getAllData
();
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/repository/ESWindSpeedRepository.java
0 → 100644
View file @
dcad5e76
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
repository
;
import
com.yeejoin.amos.boot.module.jxiop.biz.ESDto.ESEquipments
;
import
com.yeejoin.amos.boot.module.jxiop.biz.ESDto.ESWindSpeed
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.TemporaryData
;
import
org.springframework.data.repository.PagingAndSortingRepository
;
import
org.springframework.stereotype.Repository
;
/**
* @description:
* @author: tw
* @createDate: 2023/8/8
*/
@Repository
public
interface
ESWindSpeedRepository
extends
PagingAndSortingRepository
<
ESWindSpeed
,
Long
>
{
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/scheduled/WindSpeedScheduled.java
0 → 100644
View file @
dcad5e76
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
scheduled
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.StationBasic
;
import
com.yeejoin.amos.boot.module.jxiop.biz.ESDto.ESWindSpeed
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.TemporaryData
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.TemporaryDataMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.repository.ESWindSpeedRepository
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
java.util.ArrayList
;
import
java.util.List
;
@EnableScheduling
public
class
WindSpeedScheduled
{
@Autowired
TemporaryDataMapper
temporaryDataMapper
;
@Autowired
ESWindSpeedRepository
esWindSpeedRepository
;
@Scheduled
(
cron
=
"${windSpeed.cron}"
)
private
void
initData
(){
esWindSpeedRepository
.
saveAll
(
temporaryDataMapper
.
getAllData
());
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
View file @
dcad5e76
...
...
@@ -777,7 +777,6 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
TemporaryData
temporaryData
=
new
TemporaryData
();
temporaryData
.
setBatchNo
(
timeInMillis
);
temporaryData
.
setCreatedTime
(
time
.
split
(
" "
)[
1
]);
temporaryData
.
setEquipmentIndexName
(
indicatorsDto
.
getDisplayName
());
temporaryData
.
setGatewayId
(
indicatorsDto
.
getGatewayId
());
temporaryData
.
setValue
(
Float
.
valueOf
(
indicatorsDto
.
getValue
()));
temporaryData
.
setEquipmentNumber
(
indicatorsDto
.
getEquipmentNumber
());
...
...
@@ -791,7 +790,6 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
TemporaryData
temporaryData
=
new
TemporaryData
();
temporaryData
.
setBatchNo
(
timeInMillis
);
temporaryData
.
setCreatedTime
(
time
.
split
(
" "
)[
1
]);
temporaryData
.
setEquipmentIndexName
(
indicatorsDto
.
getDisplayName
());
temporaryData
.
setGatewayId
(
indicatorsDto
.
getGatewayId
());
temporaryData
.
setValue
(
Float
.
valueOf
(
indicatorsDto
.
getValue
()));
temporaryData
.
setEquipmentNumber
(
indicatorsDto
.
getEquipmentNumber
());
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/resources/application.properties
View file @
dcad5e76
...
...
@@ -77,7 +77,8 @@ gl.avg.column=有功功率,日利用小时,瞬时风速
#ES 曲线图定时 0 57 23 * * ?
windSpeed.cron
=
0 25 9 * * ?
spring.elasticsearch.rest.uris
=
http://39.98.224.23:9200
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/resources/mapper/cluster/TemporaryDataMapper.xml
View file @
dcad5e76
...
...
@@ -14,6 +14,9 @@
<if
test=
"gatewayId != null and gatewayId != ''"
>
gatewayId = #{gatewayId}
</if>
<if
test=
"gatewayId == null or gatewayId == ''"
>
equipmentNumber is not null
</if>
</where>
GROUP BY batch_no ,equipmentIndexName;
</select>
...
...
@@ -29,6 +32,16 @@
FROM
`temporary_data`
WHERE
gatewayId = #{gatewayId} and equipmentIndexName =#{equipmentIndexName}
</select>
<select
id=
"getAllData"
resultType=
"com.yeejoin.amos.boot.module.jxiop.biz.ESDto.ESWindSpeed"
>
SELECT
*
FROM
`temporary_data`
</select>
</mapper>
amos-boot-system-jxiop/pom.xml
View file @
dcad5e76
...
...
@@ -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