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
8caa8b83
Commit
8caa8b83
authored
Aug 07, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
迁移服务
parent
b1980332
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
58 changed files
with
2723 additions
and
0 deletions
+2723
-0
ClusterDbConfig.java
...in/amos/boot/module/jxiop/biz/config/ClusterDbConfig.java
+75
-0
DataSource2Config.java
.../amos/boot/module/jxiop/biz/config/DataSource2Config.java
+53
-0
JxiopExecutorConfig.java
...mos/boot/module/jxiop/biz/config/JxiopExecutorConfig.java
+45
-0
MasterDbConfig.java
...oin/amos/boot/module/jxiop/biz/config/MasterDbConfig.java
+94
-0
PrimaryDataSourceConfig.java
...boot/module/jxiop/biz/config/PrimaryDataSourceConfig.java
+67
-0
DemoController.java
...amos/boot/module/jxiop/biz/controller/DemoController.java
+202
-0
DeviceController.java
...os/boot/module/jxiop/biz/controller/DeviceController.java
+73
-0
MonitorFanIdxController.java
.../module/jxiop/biz/controller/MonitorFanIdxController.java
+0
-0
MonitoringMapController.java
.../module/jxiop/biz/controller/MonitoringMapController.java
+168
-0
SjglZsjZsbtzController.java
...t/module/jxiop/biz/controller/SjglZsjZsbtzController.java
+50
-0
TpriDmpDatabookController.java
...odule/jxiop/biz/controller/TpriDmpDatabookController.java
+47
-0
AlarmEventDto.java
...yeejoin/amos/boot/module/jxiop/biz/dto/AlarmEventDto.java
+21
-0
ColModel.java
.../com/yeejoin/amos/boot/module/jxiop/biz/dto/ColModel.java
+28
-0
CompletionOfPowerIndicatorsDto.java
.../module/jxiop/biz/dto/CompletionOfPowerIndicatorsDto.java
+22
-0
DataGridMock.java
.../yeejoin/amos/boot/module/jxiop/biz/dto/DataGridMock.java
+31
-0
HomeMapStationInfoDto.java
...amos/boot/module/jxiop/biz/dto/HomeMapStationInfoDto.java
+22
-0
IndicatorsDto.java
...yeejoin/amos/boot/module/jxiop/biz/dto/IndicatorsDto.java
+45
-0
MapAreaInfoDto.java
...eejoin/amos/boot/module/jxiop/biz/dto/MapAreaInfoDto.java
+30
-0
RegionNationWideDto.java
...n/amos/boot/module/jxiop/biz/dto/RegionNationWideDto.java
+35
-0
ResultsData.java
...m/yeejoin/amos/boot/module/jxiop/biz/dto/ResultsData.java
+28
-0
SjglZsjZsbtzDto.java
...ejoin/amos/boot/module/jxiop/biz/dto/SjglZsjZsbtzDto.java
+125
-0
SocialContributionDto.java
...amos/boot/module/jxiop/biz/dto/SocialContributionDto.java
+15
-0
SystemEnumDto.java
...yeejoin/amos/boot/module/jxiop/biz/dto/SystemEnumDto.java
+17
-0
TabDto.java
...va/com/yeejoin/amos/boot/module/jxiop/biz/dto/TabDto.java
+17
-0
TemporaryDataDto.java
...join/amos/boot/module/jxiop/biz/dto/TemporaryDataDto.java
+17
-0
TestDto.java
...a/com/yeejoin/amos/boot/module/jxiop/biz/dto/TestDto.java
+20
-0
TpriDmpDatabookDto.java
...in/amos/boot/module/jxiop/biz/dto/TpriDmpDatabookDto.java
+60
-0
AlarmEvent.java
...yeejoin/amos/boot/module/jxiop/biz/entity/AlarmEvent.java
+34
-0
SjglZsjZsbtz.java
...ejoin/amos/boot/module/jxiop/biz/entity/SjglZsjZsbtz.java
+178
-0
SwitchPicture.java
...join/amos/boot/module/jxiop/biz/entity/SwitchPicture.java
+27
-0
SystemEnum.java
...yeejoin/amos/boot/module/jxiop/biz/entity/SystemEnum.java
+26
-0
TemporaryData.java
...join/amos/boot/module/jxiop/biz/entity/TemporaryData.java
+26
-0
Test.java
...a/com/yeejoin/amos/boot/module/jxiop/biz/entity/Test.java
+30
-0
TpriDmpDatabook.java
...in/amos/boot/module/jxiop/biz/entity/TpriDmpDatabook.java
+86
-0
AlarmEventMapper.java
.../amos/boot/module/jxiop/biz/mapper2/AlarmEventMapper.java
+19
-0
SjglZsjZsbtzMapper.java
...mos/boot/module/jxiop/biz/mapper2/SjglZsjZsbtzMapper.java
+29
-0
SwitchPictureMapper.java
...os/boot/module/jxiop/biz/mapper2/SwitchPictureMapper.java
+8
-0
SystemEnumMapper.java
.../amos/boot/module/jxiop/biz/mapper2/SystemEnumMapper.java
+18
-0
TemporaryDataMapper.java
...os/boot/module/jxiop/biz/mapper2/TemporaryDataMapper.java
+21
-0
TestMapper.java
...eejoin/amos/boot/module/jxiop/biz/mapper2/TestMapper.java
+15
-0
TpriDmpDatabookMapper.java
.../boot/module/jxiop/biz/mapper2/TpriDmpDatabookMapper.java
+14
-0
IMonitorFanIndicator.java
...s/boot/module/jxiop/biz/service/IMonitorFanIndicator.java
+23
-0
ItestService.java
...join/amos/boot/module/jxiop/biz/service/ItestService.java
+6
-0
AlarmEventServiceImpl.java
.../module/jxiop/biz/service/impl/AlarmEventServiceImpl.java
+11
-0
CommonServiceImpl.java
...boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
+122
-0
DataSynchronizationImpl.java
...odule/jxiop/biz/service/impl/DataSynchronizationImpl.java
+82
-0
MonitorFanIndicatorAsync.java
...dule/jxiop/biz/service/impl/MonitorFanIndicatorAsync.java
+33
-0
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+0
-0
MonitoringServiceIMQTTmpl.java
...ule/jxiop/biz/service/impl/MonitoringServiceIMQTTmpl.java
+0
-0
MonitoringServiceImpl.java
.../module/jxiop/biz/service/impl/MonitoringServiceImpl.java
+0
-0
RegionServiceImpl.java
...boot/module/jxiop/biz/service/impl/RegionServiceImpl.java
+44
-0
SjglZsjZsbtzServiceImpl.java
...odule/jxiop/biz/service/impl/SjglZsjZsbtzServiceImpl.java
+63
-0
StationBasicServiceImpl.java
...odule/jxiop/biz/service/impl/StationBasicServiceImpl.java
+173
-0
StationDataTaskImpl.java
...ot/module/jxiop/biz/service/impl/StationDataTaskImpl.java
+107
-0
TemporaryDataServiceImpl.java
...dule/jxiop/biz/service/impl/TemporaryDataServiceImpl.java
+10
-0
TestServiceImpl.java
...s/boot/module/jxiop/biz/service/impl/TestServiceImpl.java
+21
-0
TpriDmpDatabookServiceImpl.java
...le/jxiop/biz/service/impl/TpriDmpDatabookServiceImpl.java
+47
-0
StationDataTask.java
...oin/amos/boot/module/jxiop/biz/tasks/StationDataTask.java
+43
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/config/ClusterDbConfig.java
0 → 100644
View file @
8caa8b83
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-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/config/DataSource2Config.java
0 → 100644
View file @
8caa8b83
//package com.yeejoin.amos.boot.module.jxiop.biz.config;
//import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder;
//import org.apache.ibatis.session.SqlSessionFactory;
//import org.apache.ibatis.type.JdbcType;
//import org.mybatis.spring.SqlSessionFactoryBean;
//import org.mybatis.spring.boot.autoconfigure.MybatisProperties;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.beans.factory.annotation.Qualifier;
//import org.springframework.boot.context.properties.ConfigurationProperties;
//import org.springframework.boot.context.properties.EnableConfigurationProperties;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.context.annotation.Primary;
//import org.springframework.core.io.Resource;
//import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
//import org.springframework.jdbc.core.JdbcTemplate;
//import org.springframework.jdbc.datasource.DataSourceTransactionManager;
//
//import javax.sql.DataSource;
//import java.io.IOException;
//import java.util.Optional;
//import java.util.stream.Stream;
//
//@Configuration
//@EnableConfigurationProperties(MybatisProperties.class)
//public class DataSource2Config {
// @Bean(name = "db2DataSource")
// @ConfigurationProperties(prefix = "spring.db2.datasource")
// public DataSource db3DataSource() {
// return DruidDataSourceBuilder.create().build();
// }
//
// @Bean(name = "db2SqlSessionFactory")
// public SqlSessionFactory db2SqlSessionFactory(@Qualifier("db2DataSource") DataSource datasource)
// throws Exception {
// SqlSessionFactoryBean bean = new SqlSessionFactoryBean();
// bean.setDataSource(datasource);
// bean.setMapperLocations(
// new PathMatchingResourcePatternResolver().getResources("classpath*:oraclemappers/*.xml"));
// return bean.getObject();
// }
//
// @Bean(name="db2transactionManager")
// public DataSourceTransactionManager transactionManagerOne(){
// return new DataSourceTransactionManager(db3DataSource());
// }
//
// @Bean(name = "db2JdbcTemplate")
// public JdbcTemplate jdbcTemplate(
// @Qualifier("db2DataSource") DataSource dataSource) {
// return new JdbcTemplate(dataSource);
// }
//}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/config/JxiopExecutorConfig.java
0 → 100644
View file @
8caa8b83
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
config
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor
;
import
java.util.concurrent.Executor
;
import
java.util.concurrent.ThreadPoolExecutor
;
/**
* @description:
* @author: tw
* @createDate: 2023/7/3
*/
@Slf4j
@Configuration
@EnableAsync
public
class
JxiopExecutorConfig
{
@Bean
(
name
=
"jxiopAsyncExecutor"
)
public
Executor
asyncServiceExecutor
()
{
ThreadPoolTaskExecutor
executor
=
new
ThreadPoolTaskExecutor
();
//配置核心线程数
executor
.
setCorePoolSize
(
30
);
//配置最大线程数
executor
.
setMaxPoolSize
(
800
);
//配置队列大小
executor
.
setQueueCapacity
(
5000
);
//配置线程池中的线程的名称前缀
executor
.
setThreadNamePrefix
(
"jxiop"
);
//线程池维护线程所允许的空闲时间
executor
.
setKeepAliveSeconds
(
10
);
// rejection-policy:当pool已经达到max size的时候,如何处理新任务
// CALLER_RUNS:不在新线程中执行任务,而是有调用者所在的线程来执行--拒绝策略
executor
.
setRejectedExecutionHandler
(
new
ThreadPoolExecutor
.
CallerRunsPolicy
());
//执行初始化
executor
.
initialize
();
//等待所有任务结束后再关闭线程池
executor
.
setWaitForTasksToCompleteOnShutdown
(
true
);
return
executor
;
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/config/MasterDbConfig.java
0 → 100644
View file @
8caa8b83
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-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/config/PrimaryDataSourceConfig.java
0 → 100644
View file @
8caa8b83
//package com.yeejoin.amos.boot.module.jxiop.biz.config;
//import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder;
//import org.apache.ibatis.session.SqlSessionFactory;
//import org.apache.ibatis.type.JdbcType;
//import org.mybatis.spring.SqlSessionFactoryBean;
//import org.mybatis.spring.annotation.MapperScan;
//import org.mybatis.spring.boot.autoconfigure.MybatisProperties;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.beans.factory.annotation.Qualifier;
//import org.springframework.boot.context.properties.ConfigurationProperties;
//import org.springframework.boot.context.properties.EnableConfigurationProperties;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.context.annotation.Primary;
//import org.springframework.core.io.Resource;
//import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
//import org.springframework.jdbc.datasource.DataSourceTransactionManager;
//
//import javax.sql.DataSource;
//import java.io.IOException;
//import java.util.Optional;
//import java.util.stream.Stream;
//@Configuration
//@MapperScan(value = { "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.*" },sqlSessionFactoryRef = "sql1SessionFactory")
//public class PrimaryDataSourceConfig {
//
// @Bean(name = "db1DataSource")
// // @ConfigurationProperties(prefix = "spring.db1.datasource")
// @Primary
// public DataSource db1DataSource() {
// return DruidDataSourceBuilder.create().build();
// }
//
// @Bean(name = "sql1SessionFactory")
// @ConfigurationProperties(prefix = "mybatis")
// @Primary
// public SqlSessionFactory sql1SessionFactory(@Qualifier("db1DataSource") DataSource dataSource) throws Exception {
// SqlSessionFactoryBean bean = new SqlSessionFactoryBean();
// bean.setDataSource(dataSource);
// bean.setMapperLocations(
// new PathMatchingResourcePatternResolver().getResources("classpath*:mappers/*.xml"));
// return bean.getObject();
// }
//
// private Resource[] resolveMapperLocations(String[] mapperLocations) {
// PathMatchingResourcePatternResolver pathMatchingResourcePatternResolver = new PathMatchingResourcePatternResolver();
//
// return Stream.of(Optional.ofNullable(mapperLocations).orElse(new String[0]))
// .flatMap(location -> Stream.of(getResources(pathMatchingResourcePatternResolver, location))).toArray(Resource[]::new);
// }
//
// private Resource[] getResources(PathMatchingResourcePatternResolver pathMatchingResourcePatternResolver, String location) {
// try {
// return pathMatchingResourcePatternResolver.getResources(location);
// } catch (IOException e) {
// return new Resource[0];
// }
// }
//
// @Bean(name = "db1TransactionManager")
// @Primary
// public DataSourceTransactionManager testTransactionManager(@Qualifier("db1DataSource") DataSource dataSource) {
// return new DataSourceTransactionManager(dataSource);
// }
//}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/DemoController.java
0 → 100644
View file @
8caa8b83
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/controller/DeviceController.java
0 → 100644
View file @
8caa8b83
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.api.dto.IndexDto
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.StationBasic
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.StationBasicMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.ColModel
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.DataGridMock
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.ResultsData
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.MonitorFanIndicatorImpl
;
import
com.yeejoin.amos.boot.module.jxiop.biz.utils.InfluxDButils
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
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.ArrayList
;
import
java.util.List
;
/**
* @description:
* @author: tw
* @createDate: 2023/7/4
*/
@RestController
@Api
(
tags
=
"device"
)
@RequestMapping
(
value
=
"/device"
)
public
class
DeviceController
extends
BaseController
{
@Autowired
MonitorFanIndicatorImpl
monitorFanIndicatorImpl
;
@Autowired
StationBasicMapper
stationBasicMapper
;
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取每个风机实时告警数据"
)
@GetMapping
(
"/nationwide"
)
public
ResponseModel
<
ResultsData
>
getNationWideInfo
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"stationBasicId"
)
String
stationBasicId
,
@RequestParam
(
value
=
"equipmentNumber"
,
required
=
false
)
String
equipmentNumber
)
{
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationBasicId
);
String
fanGatewayId
=
stationBasic
.
getFanGatewayId
();
ResultsData
resultsData
=
monitorFanIndicatorImpl
.
getNationWideInfo
(
current
,
size
,
fanGatewayId
,
equipmentNumber
);
return
ResponseHelper
.
buildResponse
(
resultsData
);
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取历史告警数据"
)
@GetMapping
(
"/historyNationwide"
)
public
ResponseModel
<
ResultsData
>
getLSNationWideInfo
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"stationBasicId"
)
String
stationBasicId
,
@RequestParam
(
value
=
"equipmentNumber"
,
required
=
false
)
String
equipmentNumber
)
{
ResultsData
resultsData
=
monitorFanIndicatorImpl
.
getLsNationWideInfo
(
current
,
size
,
stationBasicId
,
equipmentNumber
);
return
ResponseHelper
.
buildResponse
(
resultsData
);
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/MonitorFanIdxController.java
0 → 100644
View file @
8caa8b83
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/controller/MonitoringMapController.java
0 → 100644
View file @
8caa8b83
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.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.Region
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.StationBasic
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.StationBasicMapper
;
import
com.yeejoin.amos.boot.module.jxiop.api.service.IMapRegionService
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.*
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.Test
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.MonitoringServiceImpl
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.RegionServiceImpl
;
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.component.influxdb.InfluxDbConnection
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
javafx.scene.control.Tab
;
import
org.aspectj.apache.bcel.classfile.Module
;
import
org.influxdb.dto.QueryResult
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
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.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.logging.Handler
;
@RestController
@Api
(
tags
=
"监盘地图接口"
)
@RequestMapping
(
value
=
"/monitormap"
)
public
class
MonitoringMapController
extends
BaseController
{
@Autowired
MonitoringServiceImpl
monitoringServiceImpl
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
value
=
"获取监盘全国地图数据"
)
@GetMapping
(
"/nationwide"
)
public
ResponseModel
<
List
<
RegionNationWideDto
>>
getNationWideInfo
(
@RequestParam
(
value
=
"provinceName"
,
required
=
false
)
String
provinceName
,
@RequestParam
(
value
=
"type"
,
required
=
false
)
String
type
)
{
return
ResponseHelper
.
buildResponse
(
monitoringServiceImpl
.
getNationWideInfo
(
provinceName
,
type
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
value
=
"获取监盘全国地图-发电量数据"
)
@GetMapping
(
"/getNationalPowerGenerationData"
)
public
ResponseModel
<
List
<
HashMap
<
String
,
Object
>>>
getNationalPowerGenerationData
()
{
return
ResponseHelper
.
buildResponse
(
monitoringServiceImpl
.
getNationalPowerGenerationData
());
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
value
=
"获取监盘全国地图-获取功率曲线下拉框数据"
)
@GetMapping
(
"/getSelectDataForNational"
)
public
ResponseModel
<
List
<
HashMap
<
String
,
Object
>>>
getSelectDataForNational
()
{
return
ResponseHelper
.
buildResponse
(
monitoringServiceImpl
.
getSelectDataForNational
());
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
value
=
"获取区域电量指标完成情况"
)
@GetMapping
(
"/getCompletionOfPowerIndicatorsByProvinceName"
)
public
ResponseModel
<
ResultsData
>
getCompletionOfPowerIndicatorsByProvinceName
(
@RequestParam
(
required
=
true
)
int
current
,
@RequestParam
(
required
=
true
)
int
size
,
@RequestParam
(
required
=
true
)
String
provinceName
)
{
return
ResponseHelper
.
buildResponse
(
monitoringServiceImpl
.
getCompletionOfPowerIndicatorsByProvinceName
(
current
,
size
,
provinceName
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
value
=
"根据场站id动态获取tab页签"
)
@GetMapping
(
"/getTabsByStationBasicId"
)
public
ResponseModel
<
List
<
TabDto
>>
getTabsByStationBasicId
(
@RequestParam
(
required
=
true
)
String
stationBasicId
)
{
return
ResponseHelper
.
buildResponse
(
monitoringServiceImpl
.
getTabsByStationBasicId
(
stationBasicId
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
value
=
"监盘首页地图-全国"
)
@GetMapping
(
"/getAreaInfo"
)
public
ResponseModel
<
List
<
MapAreaInfoDto
>>
getAreaInfo
()
{
return
ResponseHelper
.
buildResponse
(
monitoringServiceImpl
.
getAreaInfo
());
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
value
=
"监盘首页地图-片区"
)
@GetMapping
(
"/getStaitonListInfoByAreaName"
)
public
ResponseModel
<
List
<
HomeMapStationInfoDto
>>
getStaitonListInfoByAreaName
(
@RequestParam
(
required
=
true
)
String
areaName
)
{
return
ResponseHelper
.
buildResponse
(
monitoringServiceImpl
.
getStaitonListInfoByAreaName
(
areaName
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
value
=
"监盘首页-场站分类信息"
)
@GetMapping
(
"/getStaionCategoryInfo"
)
public
ResponseModel
<
List
<
Map
<
String
,
String
>>>
getStaionCategoryInfo
(
@RequestParam
(
required
=
false
)
String
areaName
)
{
return
ResponseHelper
.
buildResponse
(
monitoringServiceImpl
.
getStaionCategoryInfo
(
areaName
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
value
=
"监盘首页-装机容量"
)
@GetMapping
(
"/getInstallCapityByAreaName"
)
public
ResponseModel
<
HashMap
<
String
,
String
>>
getInstallCapityByAreaName
(
@RequestParam
(
required
=
false
)
String
areaName
)
{
return
ResponseHelper
.
buildResponse
(
monitoringServiceImpl
.
getInstallCapityByAreaName
(
areaName
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
value
=
"监盘首页-有功功率"
)
@GetMapping
(
"/getActivePowerByAreaName"
)
public
ResponseModel
<
HashMap
<
String
,
String
>>
getActivePowerByAreaName
(
@RequestParam
(
required
=
false
)
String
areaName
)
{
return
ResponseHelper
.
buildResponse
(
monitoringServiceImpl
.
getActivePowerByAreaName
(
areaName
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
value
=
"监盘首页-社会贡献"
)
@GetMapping
(
"/getSocialContributionDtoList"
)
public
ResponseModel
<
Page
<
SocialContributionDto
>>
getSocialContributionDtoList
(
@RequestParam
(
required
=
false
)
String
areaName
,
@RequestParam
(
required
=
false
)
String
station
)
{
return
ResponseHelper
.
buildResponse
(
monitoringServiceImpl
.
getSocialContributionDtoList
(
areaName
,
station
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
value
=
"监盘首页-发电量趋势"
)
@GetMapping
(
"/getPowerGenerationTrendsOfMonth"
)
public
ResponseModel
<
HashMap
<
String
,
List
<
String
>>>
getPowerGenerationTrendsOfMonth
(
@RequestParam
(
required
=
false
)
String
areaName
)
{
return
ResponseHelper
.
buildResponse
(
monitoringServiceImpl
.
getPowerGenerationTrendsOfMonth
(
areaName
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
value
=
"监盘首页-发电量详情"
)
@GetMapping
(
"/getDetailsOnPowergeneration"
)
public
ResponseModel
<
Page
<
HashMap
<
String
,
String
>>>
getDetailsOnPowergeneration
(
@RequestParam
(
required
=
false
)
String
areaName
)
{
return
ResponseHelper
.
buildResponse
(
monitoringServiceImpl
.
getDetailsOnPowergeneration
(
areaName
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
value
=
"监盘首页-发电量趋势完成率"
)
@GetMapping
(
"/getPowerGenerationTrendsOfCompletionRate"
)
public
ResponseModel
<
HashMap
<
String
,
List
<
String
>>>
getPowerGenerationTrendsOfCompletionRate
(
@RequestParam
(
required
=
false
)
String
areaName
)
{
return
ResponseHelper
.
buildResponse
(
monitoringServiceImpl
.
getPowerGenerationTrendsOfCompletionRate
(
areaName
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
value
=
"监盘首页-发电top5"
)
@GetMapping
(
"/getPowerGenerationTrendsOfCompletionTopFive"
)
public
ResponseModel
<
Page
<
HashMap
<
String
,
String
>>>
getPowerGenerationTrendsOfCompletionTopFive
(
@RequestParam
(
required
=
false
)
String
areaName
)
{
return
ResponseHelper
.
buildResponse
(
monitoringServiceImpl
.
getPowerGenerationTrendsOfCompletionTopFive
(
areaName
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
value
=
"监盘首页-发电小时排名top3"
)
@GetMapping
(
"/getPowerGenerationTrendsOfCompletionTopThree"
)
public
ResponseModel
<
Page
<
HashMap
<
String
,
String
>>>
getPowerGenerationTrendsOfCompletionTopThree
(
@RequestParam
(
required
=
false
)
String
areaName
,
@RequestParam
(
required
=
false
,
defaultValue
=
"0"
)
String
tabValue
)
{
return
ResponseHelper
.
buildResponse
(
monitoringServiceImpl
.
getPowerGenerationTrendsOfCompletionTopThree
(
tabValue
,
areaName
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
value
=
"运行监盘-获取全国数据"
)
@GetMapping
(
"/getTotalData"
)
public
void
getTotalData
()
{
monitoringServiceImpl
.
getTotalData
();
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
value
=
"运行监盘-功率曲线"
)
@GetMapping
(
"/getTheStationPowerCurve"
)
public
ResponseModel
<
HashMap
<
String
,
Object
>>
getTheStationPowerCurve
(
@RequestParam
(
required
=
false
)
String
stationId
,
@RequestParam
(
required
=
false
)
String
date
)
{
return
ResponseHelper
.
buildResponse
(
monitoringServiceImpl
.
getTheStationPowerCurve
(
stationId
,
date
));
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/SjglZsjZsbtzController.java
0 → 100644
View file @
8caa8b83
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
controller
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.SjglZsjZsbtzDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.SjglZsjZsbtz
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.SjglZsjZsbtzServiceImpl
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.List
;
/**
* 设备基本信息
*
* @author system_generator
* @date 2023-07-03
*/
@RestController
@Api
(
tags
=
"设备基本信息 Api"
)
@RequestMapping
(
value
=
"/sjgl-zsj-zsbtz"
)
public
class
SjglZsjZsbtzController
{
@Autowired
SjglZsjZsbtzServiceImpl
sjglZsjZsbtzServiceImpl
;
/**
* 新增设备基本信息
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/getSjglZsjZsbtzList"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"新增设备基本信息 "
,
notes
=
"新增设备基本信息 "
)
public
ResponseModel
<
List
<
SjglZsjZsbtz
>>
getSjglZsjZsbtzList
(
@RequestParam
Long
MACHGENRE
,
@RequestParam
String
WERKS
)
{
return
ResponseHelper
.
buildResponse
(
sjglZsjZsbtzServiceImpl
.
getSjglZsjZsbtzList
(
MACHGENRE
,
WERKS
));
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/TpriDmpDatabookController.java
0 → 100644
View file @
8caa8b83
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
controller
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.TpriDmpDatabook
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.TpriDmpDatabookServiceImpl
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.util.List
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
/**
* 数据字典表
*
* @author system_generator
* @date 2023-07-03
*/
@RestController
@Api
(
tags
=
"数据字典表Api"
)
@RequestMapping
(
value
=
"/tpri-dmp-databook"
)
public
class
TpriDmpDatabookController
extends
BaseController
{
@Autowired
TpriDmpDatabookServiceImpl
tpriDmpDatabookServiceImpl
;
/**
* 新增数据字典表
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取中间表数字字典列表"
,
notes
=
"获取中间表数字字典列表"
)
public
ResponseModel
<
List
<
TpriDmpDatabook
>>
getTpriDmpDatabookList
()
{
return
ResponseHelper
.
buildResponse
(
tpriDmpDatabookServiceImpl
.
getTpriDmpDatabookList
());
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/AlarmEventDto.java
0 → 100644
View file @
8caa8b83
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
dto
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
java.util.Date
;
@Data
@Accessors
(
chain
=
true
)
public
class
AlarmEventDto
{
private
Long
sequenceNumber
;
private
Date
createdTime
;
private
String
stationName
;
private
String
stationId
;
private
String
gatewayId
;
private
String
eventDesc
;
private
String
alarmGroupName
;
private
String
eventTime
;
private
String
eventMovement
;
private
long
sort
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/ColModel.java
0 → 100644
View file @
8caa8b83
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
dto
;
import
lombok.Data
;
/**
* @description:
* @author: tw
* @createDate: 2023/7/6
*/
@Data
public
class
ColModel
{
private
String
fid
;
private
String
dataIndex
;
private
String
name
;
private
String
title
;
private
String
type
;
private
String
key
;
public
ColModel
(
String
fid
,
String
dataIndex
,
String
name
,
String
title
,
String
type
,
String
key
)
{
this
.
fid
=
fid
;
this
.
dataIndex
=
dataIndex
;
this
.
name
=
name
;
this
.
title
=
title
;
this
.
type
=
type
;
this
.
key
=
key
;
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/CompletionOfPowerIndicatorsDto.java
0 → 100644
View file @
8caa8b83
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
dto
;
import
lombok.Data
;
@Data
public
class
CompletionOfPowerIndicatorsDto
{
//场站名称
private
String
stationName
;
//装机容量
private
String
installCapactity
;
//风速或者辐照度
private
String
windSpeedOrIrradiance
;
//有功功率
private
String
activePower
;
//日发电量
private
String
dailyPower
;
//月发电量
private
String
monthlyPower
;
//年发电量
private
String
annualPower
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/DataGridMock.java
0 → 100644
View file @
8caa8b83
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
dto
;
import
lombok.Data
;
import
org.apache.poi.ss.formula.functions.T
;
import
java.util.List
;
/**
* @description:
* @author: tw
* @createDate: 2023/7/6
*/
@Data
public
class
DataGridMock
{
private
int
current
;
private
int
total
;
private
boolean
pagination
;
private
int
totalPage
;
private
List
dataList
;
public
DataGridMock
(
int
current
,
int
total
,
boolean
pagination
,
int
totalPage
,
List
dataList
)
{
this
.
current
=
current
;
this
.
total
=
total
;
this
.
pagination
=
pagination
;
this
.
totalPage
=
totalPage
;
this
.
dataList
=
dataList
;
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/HomeMapStationInfoDto.java
0 → 100644
View file @
8caa8b83
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
dto
;
import
lombok.Data
;
import
java.util.List
;
import
java.util.Map
;
@Data
public
class
HomeMapStationInfoDto
{
//场站id
String
stationId
;
//当前功率
String
currentPower
=
"0"
;
//风速辐照度
String
speendOrirradiate
;
//场站类型
String
stationType
;
//场站装机容量
String
stationInstalledCapacity
;
//场站经纬度
List
<
String
>
stationPosition
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/IndicatorsDto.java
0 → 100644
View file @
8caa8b83
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
dto
;
import
lombok.Data
;
/**
* 指标dto-用于接收influxdb里边查询的到的数据
*/
@Data
public
class
IndicatorsDto
{
private
String
address
;
private
String
createdTime
;
private
String
dataType
;
private
String
equipmentIndex
;
private
String
equipmentIndexName
;
private
String
equipmentNumber
;
private
String
equipmentSpecificName
;
private
String
equipmentsIdx
;
private
String
equipmentsIdx_1
;
private
String
frontModule
;
private
String
gatewayId
;
private
String
isAlarm
;
private
String
systemType
;
private
String
traceId
;
private
String
unit
;
private
String
value
;
private
String
valueLabel
;
private
String
distinct
;
private
String
time
;
private
String
displayName
;
private
String
pictureName
;
private
String
title
;
private
String
state
;
public
String
getTime
()
{
if
(
null
!=
time
)
{
String
[]
ts
=
time
.
replace
(
":00Z"
,
""
).
split
(
"T"
);
return
ts
[
1
];
}
return
null
;
}
public
void
setTime
(
String
time
)
{
this
.
time
=
time
;
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/MapAreaInfoDto.java
0 → 100644
View file @
8caa8b83
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
dto
;
import
lombok.Data
;
import
java.util.List
;
import
java.util.Map
;
@Data
public
class
MapAreaInfoDto
{
//片区省份
List
<
String
>
province
;
//经纬度
List
<
String
>
position
;
//片区名称
String
areaName
;
//片区code
String
areaCode
;
//风电站数量
String
windPowerStationCount
=
"0"
;
//集中式光伏电站数量
String
centralizedPhotovoltaicStationCount
=
"0"
;
//分布式光伏电站数量
String
distributedPhotovoltaicStationCount
=
"0"
;
//储能电站数量
String
energyStorageStationCount
=
"0"
;
//装机容量
String
installedCapacity
=
"0"
;
//当日发电量
String
electricityGenerationOfDay
=
"0"
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/RegionNationWideDto.java
0 → 100644
View file @
8caa8b83
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
dto
;
import
com.sun.javafx.font.PrismFontFactory
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.HashMap
;
@Data
public
class
RegionNationWideDto
{
@ApiModelProperty
(
value
=
"省份名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"省份名称"
)
private
String
staitionId
;
@ApiModelProperty
(
value
=
"光伏电站数量"
)
private
String
guangfu
=
"0"
;
@ApiModelProperty
(
value
=
"风机电站数量"
)
private
String
fengdian
=
"0"
;
@ApiModelProperty
(
value
=
"光伏装机容量"
)
private
String
guangfuMW
=
"0"
;
@ApiModelProperty
(
value
=
"风机装机容量"
)
private
String
fengdianMV
=
"0"
;
@ApiModelProperty
(
value
=
"是否已接入数据"
)
private
Boolean
jsJoin
=
false
;
@ApiModelProperty
(
value
=
"场站名称"
)
private
String
staitionName
;
@ApiModelProperty
(
value
=
"场站类型"
)
private
String
staitionType
;
@ApiModelProperty
(
value
=
"场站容量"
)
private
String
stationCapacity
;
@ApiModelProperty
(
value
=
"风速"
)
private
String
speendOrirradiate
;
@ApiModelProperty
(
value
=
"坐标"
)
private
HashMap
<
String
,
Double
>
position
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/ResultsData.java
0 → 100644
View file @
8caa8b83
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
dto
;
import
lombok.Data
;
import
org.apache.poi.ss.formula.functions.T
;
import
java.util.List
;
/**
* @description:
* @author: tw
* @createDate: 2023/7/6
*/
@Data
public
class
ResultsData
{
private
DataGridMock
dataGridMock
;
private
List
<
ColModel
>
colModel
;
public
ResultsData
()
{
}
public
ResultsData
(
DataGridMock
dataGridMock
,
List
<
ColModel
>
colModel
)
{
this
.
dataGridMock
=
dataGridMock
;
this
.
colModel
=
colModel
;
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/SjglZsjZsbtzDto.java
0 → 100644
View file @
8caa8b83
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
dto
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.time.LocalDateTime
;
import
java.util.Date
;
/**
* 设备基本信息
*
* @author system_generator
* @date 2023-07-03
*/
@Data
@ApiModel
(
value
=
"SjglZsjZsbtzDto"
,
description
=
"设备基本信息 "
)
public
class
SjglZsjZsbtzDto
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"主键ID"
)
@TableId
(
"DBID"
)
private
Long
dbid
;
@ApiModelProperty
(
value
=
"设备类别0风机1设备2线缆3升压站4其他5箱变"
)
@TableField
(
"MACHGENRE"
)
private
Long
machgenre
;
@ApiModelProperty
(
value
=
"设备编码"
)
@TableField
(
"SBBM"
)
private
String
sbbm
;
@ApiModelProperty
(
value
=
"设备名称"
)
@TableField
(
"SBMC"
)
private
String
sbmc
;
@ApiModelProperty
(
value
=
"机组品牌"
)
@TableField
(
"MACHTYPE"
)
private
Long
machtype
;
@ApiModelProperty
(
value
=
"经度"
)
@TableField
(
"LONGITUDE"
)
private
String
longitude
;
@ApiModelProperty
(
value
=
"纬度"
)
@TableField
(
"LATITUDE"
)
private
String
latitude
;
@ApiModelProperty
(
value
=
"容量"
)
@TableField
(
"CAPACITYL"
)
private
String
capacityl
;
@ApiModelProperty
(
value
=
"KKS编码"
)
@TableField
(
"KKSBM"
)
private
String
kksbm
;
@ApiModelProperty
(
value
=
"KKS描述"
)
@TableField
(
"KKSMS"
)
private
String
kksms
;
@ApiModelProperty
(
value
=
"型号"
)
@TableField
(
"GGXH"
)
private
String
ggxh
;
@ApiModelProperty
(
value
=
"生产厂家"
)
@TableField
(
"SCCJ"
)
private
String
sccj
;
@ApiModelProperty
(
value
=
"投产时间"
)
@TableField
(
"TYRQ"
)
private
Date
tyrq
;
@ApiModelProperty
(
value
=
"父设备"
)
@TableField
(
"FSB"
)
private
Long
fsb
;
@ApiModelProperty
(
value
=
"设备分类"
)
@TableField
(
"SBFL"
)
private
String
sbfl
;
@ApiModelProperty
(
value
=
"根节点ID"
)
@TableField
(
"XTDY"
)
private
Long
xtdy
;
@ApiModelProperty
(
value
=
"工厂编码"
)
@TableField
(
"WERKS"
)
private
String
werks
;
@ApiModelProperty
(
value
=
"创建人"
)
@TableField
(
"CREATE_BY"
)
private
Long
createBy
;
@ApiModelProperty
(
value
=
"创建时间"
)
@TableField
(
"CREATE_TIME"
)
private
Date
createTime
;
@ApiModelProperty
(
value
=
"更新人"
)
@TableField
(
"UPDATE_BY"
)
private
Long
updateBy
;
@ApiModelProperty
(
value
=
"更新时间"
)
@TableField
(
"UPDATE_TIME"
)
private
Date
updateTime
;
@ApiModelProperty
(
value
=
"时间戳"
)
@TableField
(
"UPDATE_STAMP"
)
private
LocalDateTime
updateStamp
;
@ApiModelProperty
(
value
=
"设备层级码(废弃)"
)
@TableField
(
"SBCJM"
)
private
String
sbcjm
;
@ApiModelProperty
(
value
=
"是否删除 未删除为0删除为1"
)
@TableField
(
"IS_DEL"
)
private
String
isDel
;
@ApiModelProperty
(
value
=
"所属系统"
)
@TableField
(
"SSXT"
)
private
Long
ssxt
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/SocialContributionDto.java
0 → 100644
View file @
8caa8b83
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
dto
;
import
lombok.Data
;
@Data
public
class
SocialContributionDto
{
/**
* 社会贡献值
*/
private
String
title
;
/**
* 贡献单位
*/
private
String
unit
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/SystemEnumDto.java
0 → 100644
View file @
8caa8b83
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
dto
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
@Data
public
class
SystemEnumDto
{
private
Long
sequenceNumber
;
private
String
type
;
private
String
syetemName
;
private
String
code
;
private
String
enumDesc
;
private
String
eunmValue
;
private
String
gatewayId
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/TabDto.java
0 → 100644
View file @
8caa8b83
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
dto
;
import
lombok.Data
;
@Data
public
class
TabDto
{
String
activeIcon
;
String
icon
;
String
text
;
String
value
;
public
TabDto
(
String
text
,
String
value
){
this
.
activeIcon
=
""
;
this
.
icon
=
""
;
this
.
text
=
text
;
this
.
value
=
value
;
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/TemporaryDataDto.java
0 → 100644
View file @
8caa8b83
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
dto
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
@Data
@Accessors
(
chain
=
true
)
public
class
TemporaryDataDto
{
private
Long
sequenceNumber
;
private
String
createdTime
;
private
String
equipmentIndexName
;
private
String
equipmentNumber
;
private
String
gatewayId
;
private
float
value
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/TestDto.java
0 → 100644
View file @
8caa8b83
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
dto
;
import
lombok.Data
;
@Data
public
class
TestDto
{
// "date": "2020-12-12 12:12:12",
// "address": "陕西省西安市雁塔区太白南路A座C区",
// "level": "紧急",
// "name": "咸阳机场项目",
// "id": "1",
// "status": "研发中"
private
String
createdTime
;
private
String
equipmentIndex
;
private
String
equipmentIndexName
;
private
String
traceId
;
private
String
value
;
private
String
valueLabel
;
private
String
unit
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/TpriDmpDatabookDto.java
0 → 100644
View file @
8caa8b83
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
dto
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* 数据字典表
*
* @author system_generator
* @date 2023-07-03
*/
@Data
@ApiModel
(
value
=
"TpriDmpDatabookDto"
,
description
=
"数据字典表"
)
public
class
TpriDmpDatabookDto
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"主键ID"
)
@TableId
(
"DATA"
)
private
Long
dataid
;
@ApiModelProperty
(
value
=
"编码"
)
@TableField
(
"DATACODE"
)
private
String
datacode
;
@ApiModelProperty
(
value
=
"名称"
)
@TableField
(
"DATANAME"
)
private
String
dataname
;
@ApiModelProperty
(
value
=
"说明"
)
@TableField
(
"DATADESC"
)
private
String
datadesc
;
@ApiModelProperty
(
value
=
"类型,1:数据项,0:分类"
)
@TableField
(
"TYPE"
)
private
String
type
;
@ApiModelProperty
(
value
=
"父ID"
)
@TableField
(
"GROUPID"
)
private
Long
groupid
;
@ApiModelProperty
(
value
=
"分类编码"
)
@TableField
(
"GROUPCODE"
)
private
String
groupcode
;
@TableField
(
"PROJECTID"
)
private
Long
projectid
;
@TableField
(
"SYS_USER"
)
private
String
sysUser
;
@ApiModelProperty
(
value
=
"排序字段"
)
@TableField
(
"ORDERS"
)
private
Integer
orders
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/entity/AlarmEvent.java
0 → 100644
View file @
8caa8b83
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
java.util.Date
;
@Data
@Accessors
(
chain
=
true
)
@TableName
(
"fault_alarm_event"
)
public
class
AlarmEvent
{
@TableField
(
"sequence_nbr"
)
private
Long
sequenceNumber
;
@TableField
(
"created_time"
)
private
Date
createdTime
;
@TableField
(
"station_name"
)
private
String
stationName
;
@TableField
(
"station_id"
)
private
String
stationId
;
@TableField
(
"gateway_id"
)
private
String
gatewayId
;
@TableField
(
"event_desc"
)
private
String
eventDesc
;
@TableField
(
"alarm_group_name"
)
private
String
alarmGroupName
;
@TableField
(
"event_time"
)
private
Date
eventTime
;
@TableField
(
"event_movement"
)
private
String
eventMovement
;
@TableField
(
"sort"
)
private
long
sort
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/entity/SjglZsjZsbtz.java
0 → 100644
View file @
8caa8b83
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
org.joda.time.DateTime
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
import
java.util.Date
;
/**
* 设备基本信息
*
* @author system_generator
* @date 2023-07-03
*/
@Data
@Accessors
(
chain
=
true
)
@TableName
(
"sjgl_zsj_zsbtz"
)
public
class
SjglZsjZsbtz
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键ID
*/
@TableField
(
"DBID"
)
private
Long
dbid
;
/**
* 设备类别0风机1设备2线缆3升压站4其他5箱变
*/
@TableField
(
"MACHGENRE"
)
private
Long
machgenre
;
/**
* 设备编码
*/
@TableField
(
"SBBM"
)
private
String
sbbm
;
/**
* 设备名称
*/
@TableField
(
"SBMC"
)
private
String
sbmc
;
/**
* 机组品牌
*/
@TableField
(
"MACHTYPE"
)
private
Long
machtype
;
/**
* 经度
*/
@TableField
(
"LONGITUDE"
)
private
String
longitude
;
/**
* 纬度
*/
@TableField
(
"LATITUDE"
)
private
String
latitude
;
/**
* 容量
*/
@TableField
(
"CAPACITYL"
)
private
String
capacityl
;
/**
* KKS编码
*/
@TableField
(
"KKSBM"
)
private
String
kksbm
;
/**
* KKS描述
*/
@TableField
(
"KKSMS"
)
private
String
kksms
;
/**
* 型号
*/
@TableField
(
"GGXH"
)
private
String
ggxh
;
/**
* 生产厂家
*/
@TableField
(
"SCCJ"
)
private
String
sccj
;
/**
* 投产时间
*/
@TableField
(
"TYRQ"
)
private
Date
tyrq
;
/**
* 父设备
*/
@TableField
(
"FSB"
)
private
Long
fsb
;
/**
* 设备分类
*/
@TableField
(
"SBFL"
)
private
String
sbfl
;
/**
* 根节点ID
*/
@TableField
(
"XTDY"
)
private
Long
xtdy
;
/**
* 工厂编码
*/
@TableField
(
"WERKS"
)
private
String
werks
;
/**
* 创建人
*/
@TableField
(
"CREATE_BY"
)
private
Long
createBy
;
/**
* 创建时间
*/
@TableField
(
"CREATE_TIME"
)
private
Date
createTime
;
/**
* 更新人
*/
@TableField
(
"UPDATE_BY"
)
private
Long
updateBy
;
/**
* 更新时间
*/
@TableField
(
"UPDATE_TIME"
)
private
Date
updateTime
;
/**
* 时间戳
*/
@TableField
(
"UPDATE_STAMP"
)
private
DateTime
updateStamp
;
/**
* 设备层级码(废弃)
*/
@TableField
(
"SBCJM"
)
private
String
sbcjm
;
/**
* 是否删除 未删除为0删除为1
*/
@TableField
(
"IS_DEL"
)
private
String
isDel
;
/**
* 所属系统
*/
@TableField
(
"SSXT"
)
private
Long
ssxt
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/entity/SwitchPicture.java
0 → 100644
View file @
8caa8b83
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
;
@Data
@Accessors
(
chain
=
true
)
@TableName
(
"switch_picture_url"
)
public
class
SwitchPicture
{
@TableField
(
value
=
"sequence_nbr"
)
public
long
sequenceNumber
;
@TableField
(
value
=
"gateway_id"
)
public
String
gatewayId
;
@TableField
(
value
=
"switch_num"
)
public
String
switchNum
;
@TableField
(
value
=
"on_url"
)
public
String
onUrl
;
@TableField
(
value
=
"off_url"
)
public
String
offUrl
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/entity/SystemEnum.java
0 → 100644
View file @
8caa8b83
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
;
@Data
@Accessors
(
chain
=
true
)
@TableName
(
"system_enum"
)
public
class
SystemEnum
{
@TableField
(
"sequence_nbr"
)
private
Long
sequenceNumber
;
@TableField
(
"type"
)
private
String
type
;
@TableField
(
"system_name"
)
private
String
syetemName
;
@TableField
(
"code"
)
private
String
code
;
@TableField
(
"enum_desc"
)
private
String
enumDesc
;
@TableField
(
"eunm_value"
)
private
String
eunmValue
;
@TableField
(
"gatewayId"
)
private
String
gatewayId
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/entity/TemporaryData.java
0 → 100644
View file @
8caa8b83
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
;
@Data
@Accessors
(
chain
=
true
)
@TableName
(
"temporary_data"
)
public
class
TemporaryData
{
@TableField
(
"sequence_nbr"
)
private
Long
sequenceNumber
;
@TableField
(
"created_time"
)
private
String
createdTime
;
@TableField
(
"equipmentIndexName"
)
private
String
equipmentIndexName
;
@TableField
(
"equipmentNumber"
)
private
String
equipmentNumber
;
@TableField
(
"gatewayId"
)
private
String
gatewayId
;
@TableField
(
"value"
)
private
float
value
;
@TableField
(
"batch_no"
)
private
long
batchNo
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/entity/Test.java
0 → 100644
View file @
8caa8b83
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
java.util.Date
;
/**
*
*
* @author system_generator
* @date 2023-06-08
*/
@Data
@Accessors
(
chain
=
true
)
@TableName
(
"test"
)
public
class
Test
{
private
static
final
long
serialVersionUID
=
1L
;
/**
*
*/
@TableField
(
"name"
)
private
String
Test
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/entity/TpriDmpDatabook.java
0 → 100644
View file @
8caa8b83
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 数据字典表
*
* @author system_generator
* @date 2023-07-03
*/
@Data
@Accessors
(
chain
=
true
)
@TableName
(
"tpri_dmp_databook"
)
public
class
TpriDmpDatabook
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键ID
*/
@TableField
(
"DATAID"
)
private
Long
dataid
;
/**
* 编码
*/
@TableField
(
"DATACODE"
)
private
String
datacode
;
/**
* 名称
*/
@TableField
(
"DATANAME"
)
private
String
dataname
;
/**
* 说明
*/
@TableField
(
"DATADESC"
)
private
String
datadesc
;
/**
* 类型,1:数据项,0:分类
*/
@TableField
(
"TYPE"
)
private
String
type
;
/**
* 父ID
*/
@TableField
(
"GROUPID"
)
private
Long
groupid
;
/**
* 分类编码
*/
@TableField
(
"GROUPCODE"
)
private
String
groupcode
;
/**
*
*/
@TableField
(
"PROJECTID"
)
private
Long
projectid
;
/**
*
*/
@TableField
(
"SYS_USER"
)
private
String
sysUser
;
/**
* 排序字段
*/
@TableField
(
"ORDERS"
)
private
Integer
orders
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/AlarmEventMapper.java
0 → 100644
View file @
8caa8b83
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
mapper2
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.AlarmEventDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.AlarmEvent
;
import
java.util.List
;
public
interface
AlarmEventMapper
extends
BaseMapper
<
AlarmEvent
>
{
String
getLastDataBySort
(
String
gatewayId
);
List
<
AlarmEventDto
>
getAlarmEventList
(
String
gatewayId
,
String
stationId
,
int
current
,
int
size
);
List
<
String
>
getOldAlarmsBySort
(
String
gatewayId
,
String
sort
);
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/SjglZsjZsbtzMapper.java
0 → 100644
View file @
8caa8b83
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.SjglZsjZsbtz
;
import
java.util.List
;
import
java.util.Map
;
/**
* 设备基本信息 Mapper 接口
*
* @author system_generator
* @date 2023-07-03
*/
public
interface
SjglZsjZsbtzMapper
extends
BaseMapper
<
SjglZsjZsbtz
>
{
/**
* 根据场站信息获取装机容量
* @param WERKS
* @return
*/
Double
getStationCapactityByStationWerks
(
String
WERKS
);
List
<
Map
<
String
,
Object
>>
getStationInfoMapByStationWerks
(
String
WERKS
,
String
DATAID
);
List
<
Map
<
String
,
Object
>>
getStationInfoMapByStationGFWerks
(
String
WERKS
,
String
DATAID
);
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/SwitchPictureMapper.java
0 → 100644
View file @
8caa8b83
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.SwitchPicture
;
public
interface
SwitchPictureMapper
extends
BaseMapper
<
SwitchPicture
>
{
SwitchPicture
getSwitchUrl
(
String
gatewayId
,
String
switchNum
);
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/SystemEnumMapper.java
0 → 100644
View file @
8caa8b83
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
mapper2
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.SystemEnumDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.SystemEnum
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.TemporaryData
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
java.util.List
;
import
java.util.Map
;
public
interface
SystemEnumMapper
extends
BaseMapper
<
SystemEnum
>
{
List
<
SystemEnumDto
>
getStatusMonitoring
(
String
type
,
String
systemName
);
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/TemporaryDataMapper.java
0 → 100644
View file @
8caa8b83
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.TemporaryData
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
java.util.List
;
import
java.util.Map
;
public
interface
TemporaryDataMapper
extends
BaseMapper
<
TemporaryData
>
{
List
<
Map
<
String
,
String
>>
timingTemporarysSorageData
(
@RequestParam
(
value
=
"gatewayId"
)
String
gatewayId
);
Map
<
String
,
String
>
getStatisticsInfo
(
@RequestParam
(
value
=
"gatewayId"
)
String
gatewayId
,
@RequestParam
(
value
=
"equipmentIndexName"
)
String
equipmentIndexName
);
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/TestMapper.java
0 → 100644
View file @
8caa8b83
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
mapper2
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.Region
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.Test
;
/**
* Mapper 接口
*
* @author system_generator
* @date 2023-06-08
*/
public
interface
TestMapper
extends
BaseMapper
<
Test
>
{
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/TpriDmpDatabookMapper.java
0 → 100644
View file @
8caa8b83
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.TpriDmpDatabook
;
/**
* 数据字典表 Mapper 接口
*
* @author system_generator
* @date 2023-07-03
*/
public
interface
TpriDmpDatabookMapper
extends
BaseMapper
<
TpriDmpDatabook
>{
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/IMonitorFanIndicator.java
0 → 100644
View file @
8caa8b83
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
service
;
import
com.yeejoin.amos.boot.module.jxiop.api.dto.IndexDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.ResultsData
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
java.util.List
;
import
java.util.Map
;
/**
* @description:
* @author: tw
* @createDate: 2023/7/3
*/
public
interface
IMonitorFanIndicator
{
//批量修改指标值
void
UpdateMonitorFanIndicator
(
List
<
IndexDto
>
list
);
ResultsData
getNationWideInfo
(
int
current
,
int
size
,
String
stationBasicId
,
String
equipmentNumber
);
ResultsData
getLsNationWideInfo
(
int
current
,
int
size
,
String
stationBasicId
,
String
equipmentNumber
);
Map
<
String
,
Object
>
partofWaring3D
(
String
stationId
,
String
equipNum
);
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/ItestService.java
0 → 100644
View file @
8caa8b83
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
service
;
import
org.springframework.stereotype.Service
;
public
interface
ItestService
{
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/AlarmEventServiceImpl.java
0 → 100644
View file @
8caa8b83
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
service
.
impl
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.AlarmEventDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.AlarmEvent
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.AlarmEventMapper
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
@Service
public
class
AlarmEventServiceImpl
extends
BaseService
<
AlarmEventDto
,
AlarmEvent
,
AlarmEventMapper
>
{
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
0 → 100644
View file @
8caa8b83
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.dto.IndicatorsDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.SocialContributionDto
;
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.springframework.beans.factory.annotation.Autowired
;
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.concurrent.atomic.AtomicReference
;
import
java.util.stream.Collectors
;
@Service
public
class
CommonServiceImpl
{
@Autowired
InfluxDButils
influxDButils
;
@Autowired
InfluxdbUtil
influxdbUtil
;
@Autowired
SjglZsjZsbtzMapper
sjglZsjZsbtzMapper
;
/**
* @deprecated 获取指标值总和
* @param gatewayId 网关id 用于拼接sql语句
* @param indicator 指标名称 查询条件-根据指标名称获取风速
* @return 指标值总和
*/
public
Double
getTotalByIndicatior
(
String
gatewayId
,
String
indicator
){
String
sql
=
"SELECT * FROM indicators_"
+
gatewayId
+
" where equipmentIndexName='"
+
indicator
+
"'"
;
Double
totalvalue
=
0.0
;
List
<
Map
<
String
,
Object
>>
mapList
=
influxdbUtil
.
query
(
sql
);
totalvalue
=
mapList
.
stream
().
filter
(
stringObjectMap
->
!
ObjectUtils
.
isEmpty
(
stringObjectMap
.
get
(
"value"
))).
mapToDouble
(
l
->
Double
.
parseDouble
((
String
)
l
.
get
(
"value"
))).
sum
();
return
Double
.
valueOf
(
String
.
format
(
"%.2f"
,
totalvalue
));
}
public
Double
getNumByIndicatior
(
String
gatewayId
,
String
indicator
){
String
sql
=
"SELECT * FROM indicators_"
+
gatewayId
+
" where equipmentIndexName=~/"
+
indicator
+
"$/"
;
Double
totalvalue
=
0.0
;
List
<
Map
<
String
,
Object
>>
mapList
=
influxdbUtil
.
query
(
sql
);
totalvalue
=
mapList
.
stream
().
filter
(
stringObjectMap
->
!
ObjectUtils
.
isEmpty
(
stringObjectMap
.
get
(
"value"
))).
mapToDouble
(
l
->
Double
.
parseDouble
((
String
)
l
.
get
(
"value"
))).
sum
();
return
Double
.
valueOf
(
String
.
format
(
"%.2f"
,
totalvalue
));
}
/**
* @deprecated 获取指标值平均值
* @param gatewayId 网关id 用于拼接sql语句
* @param indicator 指标名称 查询条件-根据指标名称获取风速
* @return 指标值总和
*/
public
Double
getAvgvalueByIndicatior
(
String
gatewayId
,
String
indicator
){
String
sql
=
"SELECT * FROM indicators_"
+
gatewayId
+
" where equipmentIndexName='"
+
indicator
+
"'"
;
Double
avageValue
=
0.0
;
List
<
Map
<
String
,
Object
>>
mapList
=
influxdbUtil
.
query
(
sql
);
avageValue
=
mapList
.
stream
().
filter
(
stringObjectMap
->
!
ObjectUtils
.
isEmpty
(
stringObjectMap
.
get
(
"value"
))).
mapToDouble
(
l
->
Double
.
parseDouble
((
String
)
l
.
get
(
"value"
))).
average
().
getAsDouble
();
return
Double
.
valueOf
(
String
.
format
(
"%.2f"
,
avageValue
));
}
public
Double
getTotalByIndicatior
(
List
<
Map
<
String
,
Object
>>
mapList
,
String
indicator
){
Double
totalvalue
=
0.0
;
totalvalue
=
mapList
.
stream
().
filter
(
stringObjectMap
->
stringObjectMap
.
get
(
"equipmentIndexName"
).
toString
().
contains
(
indicator
)&&!
ObjectUtils
.
isEmpty
(
stringObjectMap
.
get
(
"value"
))).
mapToDouble
(
l
->
Double
.
parseDouble
((
String
)
l
.
get
(
"value"
))).
sum
();
return
Double
.
valueOf
(
String
.
format
(
"%.2f"
,
totalvalue
));
}
/**
* @deprecated 获取指标值平均值
* @param gatewayId 网关id 用于拼接sql语句
* @param indicator 指标名称 查询条件-根据指标名称获取风速
* @return 指标值总和
*/
public
Double
getAvgvalueByIndicatior
(
List
<
Map
<
String
,
Object
>>
mapList
,
String
indicator
){
Double
avageValue
=
0.0
;
avageValue
=
mapList
.
stream
().
filter
(
stringObjectMap
->
stringObjectMap
.
get
(
"equipmentIndexName"
).
toString
().
contains
(
indicator
)&&!
ObjectUtils
.
isEmpty
(
stringObjectMap
.
get
(
"value"
))).
mapToDouble
(
l
->
Double
.
parseDouble
((
String
)
l
.
get
(
"value"
))).
sum
();
return
Double
.
valueOf
(
String
.
format
(
"%.2f"
,
avageValue
));
}
public
Double
getStationCapactityByStationWerks
(
String
WERKS
){
return
sjglZsjZsbtzMapper
.
getStationCapactityByStationWerks
(
WERKS
);
}
public
Page
<
SocialContributionDto
>
getSocialContributionDtoList
(
Double
totalSocialContribution
){
Page
<
SocialContributionDto
>
socialContributionDtoPage
=
new
Page
<
SocialContributionDto
>();
List
<
SocialContributionDto
>
socialContributionDtoList
=
new
ArrayList
<>();
//获取所有网关id不为空的数据
//二氧化碳贡献数
SocialContributionDto
co2
=
new
SocialContributionDto
();
//标准煤贡献度
SocialContributionDto
coal
=
new
SocialContributionDto
();
//碳粉尘计算公式
SocialContributionDto
toner
=
new
SocialContributionDto
();
//二氧化硫贡献度
SocialContributionDto
so2
=
new
SocialContributionDto
();
/** 社会贡献原始计算公式,后边的数据已经经过处理
//二氧化碳计算公式 *10000*832/10000/1000/1000
//标准煤计算公式 *10000*304.9/10000/1000/1000
//碳粉尘计算公式 *10000*0.032/1000/1000
//二氧化硫计算公式 =A2*10000*0.16/1000/1000
*/
co2
.
setUnit
(
"二氧化碳减排量(万t)"
);
co2
.
setTitle
(
String
.
format
(
"%.2f"
,
totalSocialContribution
*
0.000832
));
socialContributionDtoList
.
add
(
co2
);
coal
.
setUnit
(
"节约标准煤(万t)"
);
coal
.
setTitle
(
String
.
format
(
"%.2f"
,
totalSocialContribution
*
0.0003049
));
socialContributionDtoList
.
add
(
coal
);
toner
.
setUnit
(
"碳粉尘减排量(万t)"
);
toner
.
setTitle
(
String
.
format
(
"%.2f"
,
totalSocialContribution
*
0.00032
));
socialContributionDtoList
.
add
(
toner
);
so2
.
setUnit
(
"二氧化硫减排量(万t)"
);
so2
.
setTitle
(
String
.
format
(
"%.2f"
,
totalSocialContribution
*
0.0016
));
socialContributionDtoList
.
add
(
so2
);
socialContributionDtoPage
.
setRecords
(
socialContributionDtoList
);
socialContributionDtoPage
.
setTotal
(
100
);
socialContributionDtoPage
.
setCurrent
(
1
);
return
socialContributionDtoPage
;
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/DataSynchronizationImpl.java
0 → 100644
View file @
8caa8b83
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
service
.
impl
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.StationBasic
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.SjglZsjZsbtz
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.component.cache.Redis
;
import
java.util.ArrayList
;
import
java.util.List
;
@Service
public
class
DataSynchronizationImpl
{
//缓存的热工院数据
private
static
final
String
RedisKey
=
"RGYZJB_CACHE"
;
/**
* 场站信息service
*/
@Autowired
StationBasicServiceImpl
stationBasicServiceImpl
;
/**
* 中间表service
*/
@Autowired
SjglZsjZsbtzServiceImpl
sjglZsjZsbtzServiceImpl
;
public
void
dataSync
(){
// 1: 场站 list
List
<
StationBasic
>
stationBasicList
=
getStationBasicList
();
stationBasicList
.
forEach
(
stationBasic
->
{
getSjglZsjZsbtz
(
stationBasic
);
});
// 2:异步 每个场站
// 3: 风机list 同步
// 4:查询单个分机 异步
// 5:时序库 lidt
// size(),
// List<List<Map<String ,Object>>> lidtd= Lists.partition(lidt,1000);
//
// 异步:
// mysql
}
/**@deprecated 获取所有的场站列表
*
* @return 场站列表list
*/
public
List
<
StationBasic
>
getStationBasicList
(){
List
<
StationBasic
>
stationBasicList
=
new
ArrayList
<>();
stationBasicList
=
stationBasicServiceImpl
.
list
();
return
stationBasicList
;
}
/**
* @deprecated 获取场站下的所有设备信
* @param stationBasic 场站信息
* @return 设备基础信息
*/
public
List
<
SjglZsjZsbtz
>
getSjglZsjZsbtz
(
StationBasic
stationBasic
){
List
<
SjglZsjZsbtz
>
sjglZsjZsbtzList
=
new
ArrayList
<>();
sjglZsjZsbtzList
=
sjglZsjZsbtzServiceImpl
.
getSjglZsjZsbtzListByWerks
(
stationBasic
.
getStationNumber
());
return
sjglZsjZsbtzList
;
}
/**
* @deprecated 获取场站下的所有设备信
* @return 设备基础信息
*/
public
List
<
SjglZsjZsbtz
>
cacheSjglZsjZsbtz
(){
List
cacheParams
=
new
ArrayList
();
cacheParams
=
Redis
.
getRedisTemplate
().
opsForList
().
range
(
RedisKey
,
0
,
-
1
);
List
<
SjglZsjZsbtz
>
sjglZsjZsbtzList
=
sjglZsjZsbtzServiceImpl
.
getSjglZsjZsbtzList
();
if
(
cacheParams
.
size
()
!=
sjglZsjZsbtzList
.
size
()){
Redis
.
getRedisTemplate
().
delete
(
RedisKey
);
Redis
.
getRedisTemplate
().
opsForList
().
leftPushAll
(
RedisKey
,
sjglZsjZsbtzList
);
}
return
sjglZsjZsbtzList
;
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitorFanIndicatorAsync.java
0 → 100644
View file @
8caa8b83
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
service
.
impl
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.boot.module.jxiop.api.dto.IndexDto
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
/**
* @description:
* @author: tw
* @createDate: 2023/7/4
*/
@Component
public
class
MonitorFanIndicatorAsync
{
@Autowired
MonitorFanIndicatorImpl
monitorFanIndicatorImpl
;
@Value
(
"${station.section}"
)
private
int
stationSection
;
@Value
(
"${station.isok}"
)
private
boolean
isok
;
@Async
(
"jxiopAsyncExecutor"
)
public
void
UpdateMonitorFanIndicator
(
List
<
IndexDto
>
list
){
monitorFanIndicatorImpl
.
UpdateMonitorFanIndicator
(
list
);
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
0 → 100644
View file @
8caa8b83
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/service/impl/MonitoringServiceIMQTTmpl.java
0 → 100644
View file @
8caa8b83
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/service/impl/MonitoringServiceImpl.java
0 → 100644
View file @
8caa8b83
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/service/impl/RegionServiceImpl.java
0 → 100644
View file @
8caa8b83
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.dto.RegionDto
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.Region
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.RegionMapper
;
import
com.yeejoin.amos.boot.module.jxiop.api.service.IRegionService
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.List
;
/**
* 服务实现类
*
* @author system_generator
* @date 2023-06-08
*/
@Service
public
class
RegionServiceImpl
extends
BaseService
<
RegionDto
,
Region
,
RegionMapper
>
implements
IRegionService
{
/**
* 分页查询
*/
public
Page
<
RegionDto
>
queryForRegionPage
(
Page
<
RegionDto
>
page
)
{
return
this
.
queryForPage
(
page
,
null
,
false
);
}
/**
* 列表查询 示例
*/
public
List
<
RegionDto
>
queryForRegionList
()
{
return
this
.
queryForList
(
""
,
false
);
}
public
Region
getRegionByRegionCode
(
String
regionCode
){
return
this
.
getOne
(
new
QueryWrapper
<
Region
>().
eq
(
"REGION_CODE"
,
regionCode
));
}
//根据regionName获取regionCode
public
Region
getRegionCodeByRegionName
(
String
regionName
)
{
return
this
.
getOne
(
new
QueryWrapper
<
Region
>().
like
(
"REGION_NAME"
,
regionName
).
eq
(
"LEVEL"
,
1
));
}
}
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/SjglZsjZsbtzServiceImpl.java
0 → 100644
View file @
8caa8b83
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.dto.SjglZsjZsbtzDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.SjglZsjZsbtz
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.SjglZsjZsbtzMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* 设备基本信息 服务实现类
*
* @author system_generator
* @date 2023-07-03
*/
@Service
public
class
SjglZsjZsbtzServiceImpl
{
/**
* 分页查询
*/
@Autowired
SjglZsjZsbtzMapper
sjglZsjZsbtzMapper
;
/**
* @deprecated 根据设备类型及场站编号获取基础设备信息
* @param MACHGENRE 设备类型
* @param WERKS 场站编号
* @return 基础设别列表
*/
public
List
<
SjglZsjZsbtz
>
getSjglZsjZsbtzList
(
Long
MACHGENRE
,
String
WERKS
){
List
<
SjglZsjZsbtz
>
sjglZsjZsbtzList
=
new
ArrayList
<>();
sjglZsjZsbtzList
=
sjglZsjZsbtzMapper
.
selectList
(
new
QueryWrapper
<
SjglZsjZsbtz
>().
eq
(
"MACHGENRE"
,
MACHGENRE
).
eq
(
"WERKS"
,
WERKS
));
return
sjglZsjZsbtzList
;
}
/**
* @deprecated 根据场站编号获取基础设备信息
* @param WERKS 场站编号
* @return 基础设别列表
*/
public
List
<
SjglZsjZsbtz
>
getSjglZsjZsbtzListByWerks
(
String
WERKS
){
List
<
SjglZsjZsbtz
>
sjglZsjZsbtzList
=
new
ArrayList
<>();
sjglZsjZsbtzList
=
sjglZsjZsbtzMapper
.
selectList
(
new
QueryWrapper
<
SjglZsjZsbtz
>().
eq
(
"WERKS"
,
WERKS
));
return
sjglZsjZsbtzList
;
}
/**
* @deprecated 根据场站编号获取基础设备信息
* @param WERKS 场站编号
* @return 基础设别列表
*/
public
List
<
SjglZsjZsbtz
>
getSjglZsjZsbtzList
(){
List
<
SjglZsjZsbtz
>
sjglZsjZsbtzList
=
new
ArrayList
<>();
sjglZsjZsbtzList
=
sjglZsjZsbtzMapper
.
selectList
(
new
QueryWrapper
<
SjglZsjZsbtz
>().
isNotNull
(
"DBID"
));
return
sjglZsjZsbtzList
;
}
public
Double
getStationCapactityByStationWerks
(
String
WERKS
){
return
sjglZsjZsbtzMapper
.
getStationCapactityByStationWerks
(
WERKS
);
}
}
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/StationBasicServiceImpl.java
0 → 100644
View file @
8caa8b83
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jxiop.api.dto.StationBasicDto
;
import
com.yeejoin.amos.boot.module.jxiop.api.dto.StationInfoDto
;
import
com.yeejoin.amos.boot.module.jxiop.api.dto.StationRecordInfo
;
import
com.yeejoin.amos.boot.module.jxiop.api.dto.StationTaksDto
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.*
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.StationBasicMapper
;
import
com.yeejoin.amos.boot.module.jxiop.api.service.IStationBasicService
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.ArrayList
;
import
java.util.LinkedList
;
import
java.util.List
;
/**
* 场站基础信息表服务实现类
*
* @author system_generator
* @date 2023-04-20
*/
@Service
public
class
StationBasicServiceImpl
extends
BaseService
<
StationBasicDto
,
StationBasic
,
StationBasicMapper
>
implements
IStationBasicService
{
@Autowired
StationBasicMapper
stationBasicMapper
;
private
final
String
CZLX
=
"CZLX"
;
/**
* 分页查询
*/
public
Page
<
StationBasicDto
>
queryForStationBasicPage
(
Page
<
StationBasicDto
>
page
)
{
return
this
.
queryForPage
(
page
,
null
,
false
);
}
/**
* 分页查询
*/
public
Page
<
StationBasicDto
>
queryPage
(
Page
<
StationBasicDto
>
page
,
String
stationMasterName
,
String
stationName
,
String
stationType
,
String
orgCode
)
{
List
<
StationBasicDto
>
list
=
stationBasicMapper
.
queryPage
((
page
.
getCurrent
()
-
1
)
*
page
.
getSize
(),
page
.
getSize
(),
stationMasterName
,
stationName
,
stationType
,
orgCode
);
List
<
StationBasicDto
>
listcount
=
stationBasicMapper
.
queryPagecount
(
stationMasterName
,
stationName
,
stationType
,
orgCode
);
page
.
setTotal
(
listcount
.
size
());
page
.
setRecords
(
list
);
return
page
;
}
/**
* 列表查询 示例
*/
public
List
<
StationBasicDto
>
queryForStationBasicList
()
{
return
this
.
queryForList
(
""
,
false
);
}
private
CompanyModel
addCompanyModel
(
CompanyModel
companyModel
)
{
FeignClientResult
<
CompanyModel
>
Model
=
Privilege
.
companyClient
.
create
(
companyModel
);
CompanyModel
user
=
new
CompanyModel
();
if
(!
ObjectUtils
.
isEmpty
(
Model
))
{
if
(
Model
.
getStatus
()
==
200
)
{
user
=
Model
.
getResult
();
}
else
{
throw
new
RuntimeException
(
Model
.
getMessage
());
}
}
return
user
;
}
private
void
deleteCompany
(
String
ids
)
{
FeignClientResult
Model
=
Privilege
.
companyClient
.
deleteCompany
(
ids
);
CompanyModel
user
=
new
CompanyModel
();
if
(!
ObjectUtils
.
isEmpty
(
Model
))
{
if
(
Model
.
getStatus
()
!=
200
)
{
throw
new
RuntimeException
(
Model
.
getMessage
());
}
}
}
private
String
queryByCode
(
String
dictCode
,
String
dictDataKey
)
{
FeignClientResult
<
DictionarieValueModel
>
Model
=
Systemctl
.
dictionarieClient
.
value
(
dictCode
,
dictDataKey
);
DictionarieValueModel
user
=
new
DictionarieValueModel
();
if
(!
ObjectUtils
.
isEmpty
(
Model
))
{
if
(
Model
.
getStatus
()
==
200
)
{
user
=
Model
.
getResult
();
}
else
{
throw
new
RuntimeException
(
Model
.
getMessage
());
}
}
return
user
.
getDictDataValue
();
}
private
CompanyModel
updateCompanyModel
(
CompanyModel
companyModel
,
Long
sequenceNbr
)
{
FeignClientResult
<
CompanyModel
>
Model
=
Privilege
.
companyClient
.
update
(
companyModel
,
sequenceNbr
);
CompanyModel
user
=
new
CompanyModel
();
if
(!
ObjectUtils
.
isEmpty
(
Model
))
{
if
(
Model
.
getStatus
()
==
200
)
{
user
=
Model
.
getResult
();
}
else
{
throw
new
RuntimeException
(
Model
.
getMessage
());
}
}
return
user
;
}
public
int
deleteList
(
String
ids
)
{
QueryWrapper
<
StationBasic
>
wrapper
=
new
QueryWrapper
();
wrapper
.
in
(
"sequence_nbr"
,
ids
);
List
<
StationBasic
>
list
=
this
.
list
(
wrapper
);
List
<
String
>
idscom
=
new
ArrayList
<>();
for
(
StationBasic
personAccount
:
list
)
{
idscom
.
add
(
personAccount
.
getPlatformStationId
());
}
//删除平台
int
deleteResult
=
stationBasicMapper
.
deleteList
(
ids
);
this
.
deleteCompany
(
String
.
join
(
","
,
idscom
));
return
deleteResult
;
}
public
int
getStationPersonByStationID
(
String
id
)
{
return
stationBasicMapper
.
getStationPersonByStationID
(
id
);
}
public
List
<
StationTaksDto
>
getStationTaksDtoList
(){
return
stationBasicMapper
.
getStationBasicDtoList
();
}
}
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/StationDataTaskImpl.java
0 → 100644
View file @
8caa8b83
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
service
.
impl
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.boot.module.jxiop.api.dto.DeviceDto
;
import
com.yeejoin.amos.boot.module.jxiop.api.dto.IndexDto
;
import
com.yeejoin.amos.boot.module.jxiop.api.dto.StationTaksDto
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.StationBasic
;
import
com.yeejoin.amos.boot.module.jxiop.api.service.IStationDataTask
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.SjglZsjZsbtz
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.TpriDmpDatabook
;
import
com.yeejoin.amos.boot.module.jxiop.biz.utils.InfluxDButils
;
import
com.yeejoin.amos.component.influxdb.InfluxDbConnection
;
import
org.influxdb.dto.QueryResult
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
@Component
public
class
StationDataTaskImpl
{
@Autowired
StationBasicServiceImpl
stationBasicServiceImpl
;
@Autowired
SjglZsjZsbtzServiceImpl
sjglZsjZsbtzServiceImpl
;
@Autowired
TpriDmpDatabookServiceImpl
tpriDmpDatabookServiceImpl
;
@Autowired
MonitorFanIndicatorImpl
monitorFanIndicatorImpl
;
@Value
(
"${station.section}"
)
private
int
stationSection
;
@Value
(
"${station.isok}"
)
private
boolean
isok
;
@Autowired
InfluxDButils
influxDButils
;
@Autowired
MonitorFanIndicatorAsync
monitorFanIndicatorAsync
;
/**
* 获取 List<StationTaksDto>
* @return <StationTaksDto>
*/
public
List
<
StationTaksDto
>
getListStationBasic
()
{
return
stationBasicServiceImpl
.
getStationTaksDtoList
();
}
/**
* @deprecated 获取该场站下所有的风机信息
* @param stationTaksDto
* @return List<DeviceDto> 设备信息列表
*/
public
List
<
DeviceDto
>
getListDevice
(
StationTaksDto
stationTaksDto
)
{
List
<
DeviceDto
>
deviceDtoList
=
new
ArrayList
<>();
//获取风机的字典id
TpriDmpDatabook
tpriDmpDatabook
=
tpriDmpDatabookServiceImpl
.
getTpriDmpDatabookByDataName
(
"风机"
);
//根据字典id与场站编码获取所有的风机列表
List
<
SjglZsjZsbtz
>
sjglZsjZsbtzList
=
sjglZsjZsbtzServiceImpl
.
getSjglZsjZsbtzList
(
tpriDmpDatabook
.
getDataid
(),
stationTaksDto
.
getStationNumber
());
//遍历风机列表对于需要的参数进行组装
sjglZsjZsbtzList
.
forEach
(
sjglZsjZsbtz
->
{
DeviceDto
deviceDto
=
new
DeviceDto
();
deviceDto
.
setGateway
(
stationTaksDto
.
getGateway
());
String
kksbm
=
sjglZsjZsbtz
.
getKksbm
();
String
[]
kksbms
=
kksbm
.
split
(
" "
);
String
numberName
=
kksbms
[
kksbms
.
length
-
1
].
replace
(
"MD"
,
""
);
deviceDto
.
setNumberName
(
numberName
);
deviceDtoList
.
add
(
deviceDto
);
});
return
deviceDtoList
;
}
// @Async("jxiopAsyncExecutor")
public
List
<
IndexDto
>
getIndexDto
(
DeviceDto
deviceDto
)
{
String
querysql
=
"SELECT createdTime ,gatewayId,address,valueLabel ,equipmentsIdx FROM iot_data WHERE equipmentSpecificName=~/.*"
+
deviceDto
.
getNumberName
()+
"风机"
+
".*/ and gatewayId='"
+
deviceDto
.
getGateway
()+
"' ORDER BY time desc LIMIT 600"
;
//每个分机的指标数据
List
<
IndexDto
>
list
=
influxDButils
.
getListData
(
querysql
,
IndexDto
.
class
);
if
(
list
!=
null
&&
list
.
size
()>
0
){
//对数据切片处理 默认创建
if
(
stationSection
>
list
.
size
()||!
isok
){
monitorFanIndicatorImpl
.
UpdateMonitorFanIndicator
(
list
);
}
else
{
//进行分片处理
List
<
List
<
IndexDto
>>
listfp4
=
Lists
.
partition
(
list
,
stationSection
);
for
(
List
<
IndexDto
>
indexDtos
:
listfp4
)
{
//每个分级信息处理
monitorFanIndicatorAsync
.
UpdateMonitorFanIndicator
(
indexDtos
);
}
}
}
return
list
;
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/TemporaryDataServiceImpl.java
0 → 100644
View file @
8caa8b83
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
service
.
impl
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.TemporaryDataDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.TemporaryData
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.TemporaryDataMapper
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
@Service
public
class
TemporaryDataServiceImpl
extends
BaseService
<
TemporaryDataDto
,
TemporaryData
,
TemporaryDataMapper
>
{
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/TestServiceImpl.java
0 → 100644
View file @
8caa8b83
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.netflix.loadbalancer.RetryRule
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.Test
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.TestMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.ItestService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
@Service
public
class
TestServiceImpl
implements
ItestService
{
@Autowired
TestMapper
testMapper
;
public
List
<
Test
>
getList
(){
return
testMapper
.
selectList
(
new
QueryWrapper
<
Test
>().
isNotNull
(
"name"
));
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/TpriDmpDatabookServiceImpl.java
0 → 100644
View file @
8caa8b83
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.TpriDmpDatabook
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.TpriDmpDatabookMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* 数据字典表服务实现类
*
* @author system_generator
* @date 2023-07-03
*/
@Service
public
class
TpriDmpDatabookServiceImpl
{
@Autowired
TpriDmpDatabookMapper
tpriDmpDatabookMapper
;
/**
* @deprecated 获取字典参数列表
* @parsm null
* @return List<TpriDmpDatabook> 所有的数字列表项
*/
public
List
<
TpriDmpDatabook
>
getTpriDmpDatabookList
()
{
List
<
TpriDmpDatabook
>
tpriDmpDatabookList
=
new
ArrayList
<>();
tpriDmpDatabookList
=
this
.
tpriDmpDatabookMapper
.
selectList
(
new
QueryWrapper
<
TpriDmpDatabook
>().
isNotNull
(
"DATAID"
));
return
tpriDmpDatabookList
;
}
/**
* @deprecated 根据数据字典名称查询字典项
* @param dataName 字典名称
* @return TpriDmpDatabook实体
*/
public
TpriDmpDatabook
getTpriDmpDatabookByDataName
(
String
dataName
){
TpriDmpDatabook
tpriDmpDatabook
=
new
TpriDmpDatabook
();
tpriDmpDatabook
=
this
.
tpriDmpDatabookMapper
.
selectOne
(
new
QueryWrapper
<
TpriDmpDatabook
>().
eq
(
"DATANAME"
,
dataName
));
return
tpriDmpDatabook
;
}
}
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/tasks/StationDataTask.java
0 → 100644
View file @
8caa8b83
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
tasks
;
import
com.yeejoin.amos.boot.module.jxiop.api.dto.DeviceDto
;
import
com.yeejoin.amos.boot.module.jxiop.api.dto.IndexDto
;
import
com.yeejoin.amos.boot.module.jxiop.api.dto.StationTaksDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.StationDataTaskImpl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
/**
* @description: 定时获取场站最新数据
* @author: tw
* @createDate: 2023/7/3
*/
@Component
@EnableScheduling
public
class
StationDataTask
{
@Autowired
StationDataTaskImpl
stationDataTask
;
//定时获取场站指标最新数据
// @Scheduled(cron = "${station.task.cron}")
public
void
getStationDataTask
(){
//获取所有场站信息
List
<
StationTaksDto
>
list
=
stationDataTask
.
getListStationBasic
();
for
(
StationTaksDto
stationTaksDto
:
list
)
{
//获取分机
List
<
DeviceDto
>
listDeviceDto
=
stationDataTask
.
getListDevice
(
stationTaksDto
);
if
(
listDeviceDto
!=
null
&&
listDeviceDto
.
size
()>
0
){
for
(
DeviceDto
deviceDto
:
listDeviceDto
)
{
List
<
IndexDto
>
listIndexDto
=
stationDataTask
.
getIndexDto
(
deviceDto
);
}
}
}
}
}
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