Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
d90f129f
Commit
d90f129f
authored
Oct 19, 2023
by
wujiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改风机状态
parent
6a458722
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
195 additions
and
0 deletions
+195
-0
EquipmentSpecificIndexMapper.java
...odule/jxiop/api/mapper4/EquipmentSpecificIndexMapper.java
+8
-0
ForthDbConfig.java
...join/amos/boot/module/jxiop/biz/config/ForthDbConfig.java
+91
-0
EquipmentSpecificIndex.java
.../boot/module/jxiop/biz/entity/EquipmentSpecificIndex.java
+84
-0
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+0
-0
application-dev.properties
...monitor-biz/src/main/resources/application-dev.properties
+7
-0
EquipmentSpecificIndexMapper.xml
...n/resources/mapper/forth/EquipmentSpecificIndexMapper.xml
+5
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/mapper4/EquipmentSpecificIndexMapper.java
0 → 100644
View file @
d90f129f
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
api
.
mapper4
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.EquipmentSpecificIndex
;
public
interface
EquipmentSpecificIndexMapper
extends
BaseMapper
<
EquipmentSpecificIndex
>{
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/config/ForthDbConfig.java
0 → 100644
View file @
d90f129f
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.mapper4"
,
sqlSessionFactoryRef
=
"forthSqlSessionFactory"
)
public
class
ForthDbConfig
{
private
Logger
logger
=
LoggerFactory
.
getLogger
(
ForthDbConfig
.
class
);
// 精确到 master 目录,以便跟其他数据源隔离
private
static
final
String
MAPPER_LOCATION
=
"classpath*:mapper/forth/*.xml"
;
@Value
(
"${spring.db4.datasource.url}"
)
private
String
dbUrl
;
@Value
(
"${spring.db4.datasource.username}"
)
private
String
username
;
@Value
(
"${spring.db4.datasource.password}"
)
private
String
password
;
@Value
(
"${spring.db4.datasource.driver-class-name}"
)
private
String
driverClassName
;
@Bean
(
name
=
"forthDataSource"
)
//声明其为Bean实例
public
DataSource
masterDataSource
()
{
DruidDataSource
datasource
=
new
DruidDataSource
();
datasource
.
setUrl
(
this
.
dbUrl
);
datasource
.
setUsername
(
username
);
datasource
.
setPassword
(
password
);
datasource
.
setDriverClassName
(
driverClassName
);
return
datasource
;
}
@Bean
(
name
=
"forthTransactionManager"
)
public
DataSourceTransactionManager
masterTransactionManager
()
{
return
new
DataSourceTransactionManager
(
masterDataSource
());
}
@Bean
(
name
=
"forthSqlSessionFactory"
)
public
SqlSessionFactory
masterSqlSessionFactory
(
@Qualifier
(
"forthDataSource"
)
DataSource
masterDataSource
)
throws
Exception
{
final
MybatisSqlSessionFactoryBean
sessionFactory
=
new
MybatisSqlSessionFactoryBean
();
sessionFactory
.
setDataSource
(
masterDataSource
);
sessionFactory
.
setMapperLocations
(
new
PathMatchingResourcePatternResolver
()
.
getResources
(
ForthDbConfig
.
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-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/entity/EquipmentSpecificIndex.java
0 → 100644
View file @
d90f129f
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
entity
;
import
java.util.Date
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
@Data
@Accessors
(
chain
=
true
)
@TableName
(
"wl_equipment_specific_index"
)
public
class
EquipmentSpecificIndex
{
@TableField
(
"id"
)
private
Long
id
;
@TableField
(
"equipment_specific_id"
)
private
Long
address
;
@TableField
(
"value"
)
private
String
value
;
@TableField
(
"create_date"
)
private
Date
createDate
;
@TableField
(
"equipment_index_id"
)
private
Long
equipmentIndexId
;
@TableField
(
"update_date"
)
private
Date
updateDate
;
@TableField
(
"equipment_specific_name"
)
private
String
equipmentSpecificName
;
@TableField
(
"equipment_index_name"
)
private
String
equipmentIndexName
;
@TableField
(
"equipment_index_key"
)
private
String
equipmentIndexKey
;
@TableField
(
"value_label"
)
private
String
valueLabel
;
@TableField
(
"value_enum"
)
private
String
valueEnum
;
@TableField
(
"emergency_level_color"
)
private
String
emergencyLevelColor
;
@TableField
(
"is_alarm"
)
private
boolean
isAlarm
;
@TableField
(
"emergency_level"
)
private
String
emergencyLevel
;
@TableField
(
"emergency_level_describe"
)
private
String
emergencyLevelDescribe
;
@TableField
(
"trace_id"
)
private
String
traceId
;
@TableField
(
"index_address"
)
private
String
indexAddress
;
@TableField
(
"station"
)
private
String
station
;
@TableField
(
"quality"
)
private
boolean
quality
;
@TableField
(
"data_type"
)
private
String
dataType
;
@TableField
(
"time_stamp"
)
private
String
timeStamp
;
@TableField
(
"gateway_id"
)
private
String
gatewayId
;
@TableField
(
"unit"
)
private
String
unit
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
View file @
d90f129f
This diff is collapsed.
Click to expand it.
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/resources/application-dev.properties
View file @
d90f129f
...
...
@@ -12,6 +12,13 @@ spring.db2.datasource.username=root
spring.db2.datasource.password
=
Yeejoin@2020
spring.db2.datasource.driver-class-name
:
com.mysql.cj.jdbc.Driver
## db4-equip
spring.db4.datasource.type
:
com.alibaba.druid.pool.DruidDataSource
spring.db4.datasource.url
=
jdbc:mysql://139.9.173.44:3306/equipment?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.db4.datasource.username
=
root
spring.db4.datasource.password
=
Yeejoin@2020
spring.db4.datasource.driver-class-name
:
com.mysql.cj.jdbc.Driver
## db3-td-engine
#spring.db3.datasource.type: com.alibaba.druid.pool.DruidDataSource
spring.db3.datasource.url
=
jdbc:TAOS-RS://139.9.170.47:6041/iot_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/resources/mapper/forth/EquipmentSpecificIndexMapper.xml
0 → 100644
View file @
d90f129f
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.jxiop.biz.mapper2.EquipmentSpecificIndexMapper"
>
</mapper>
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