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
636aa187
Commit
636aa187
authored
Aug 28, 2023
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
移除大屏服务对于监盘服务的依赖,迁移业务代码到大屏服务
parent
10d73fb5
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
941 additions
and
14 deletions
+941
-14
ESDailyPowerGeneration.java
...s/boot/module/jxiop/biz/ESDto/ESDailyPowerGeneration.java
+79
-0
ESEquipments.java
...eejoin/amos/boot/module/jxiop/biz/ESDto/ESEquipments.java
+87
-0
ESMoonPowerGeneration.java
...os/boot/module/jxiop/biz/ESDto/ESMoonPowerGeneration.java
+80
-0
ESWindSpeed.java
...yeejoin/amos/boot/module/jxiop/biz/ESDto/ESWindSpeed.java
+28
-0
ESYearPowerGeneration.java
...os/boot/module/jxiop/biz/ESDto/ESYearPowerGeneration.java
+76
-0
AlarmEventDto.java
...yeejoin/amos/boot/module/jxiop/biz/dto/AlarmEventDto.java
+0
-1
ColModel.java
.../com/yeejoin/amos/boot/module/jxiop/biz/dto/ColModel.java
+1
-0
DataGridMock.java
.../yeejoin/amos/boot/module/jxiop/biz/dto/DataGridMock.java
+0
-1
HomeMapStationInfoDto.java
...amos/boot/module/jxiop/biz/dto/HomeMapStationInfoDto.java
+0
-1
MapAreaInfoDto.java
...eejoin/amos/boot/module/jxiop/biz/dto/MapAreaInfoDto.java
+0
-1
QueryDto.java
.../com/yeejoin/amos/boot/module/jxiop/biz/dto/QueryDto.java
+24
-0
RegionNationWideDto.java
...n/amos/boot/module/jxiop/biz/dto/RegionNationWideDto.java
+0
-1
ResultsData.java
...m/yeejoin/amos/boot/module/jxiop/biz/dto/ResultsData.java
+0
-1
SeriesData.java
...om/yeejoin/amos/boot/module/jxiop/biz/dto/SeriesData.java
+19
-0
StationCacheInfoDto.java
...n/amos/boot/module/jxiop/biz/dto/StationCacheInfoDto.java
+27
-0
SystemEnumDto.java
...yeejoin/amos/boot/module/jxiop/biz/dto/SystemEnumDto.java
+0
-3
TemporaryDataDto.java
...join/amos/boot/module/jxiop/biz/dto/TemporaryDataDto.java
+0
-2
TimeDate.java
.../com/yeejoin/amos/boot/module/jxiop/biz/dto/TimeDate.java
+14
-0
StationCacheDataInit.java
.../boot/module/jxiop/biz/initdata/StationCacheDataInit.java
+68
-0
CommonServiceImpl.java
...boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
+0
-3
DateUtil.java
...om/yeejoin/amos/boot/module/jxiop/biz/utils/DateUtil.java
+438
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/ESDto/ESDailyPowerGeneration.java
0 → 100644
View file @
636aa187
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
ESDto
;
import
io.github.classgraph.json.Id
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
org.springframework.data.elasticsearch.annotations.DateFormat
;
import
org.springframework.data.elasticsearch.annotations.Document
;
import
org.springframework.data.elasticsearch.annotations.Field
;
import
org.springframework.data.elasticsearch.annotations.FieldType
;
import
java.util.Date
;
/**
* @description:
* @author: tw
* @createDate: 2023/8/9
*/
@Data
@Accessors
(
chain
=
true
)
@Document
(
indexName
=
"jxiop_day"
)
public
class
ESDailyPowerGeneration
{
@Id
private
String
id
;
@Field
(
type
=
FieldType
.
Keyword
)
private
String
stationId
;
//场站名称
@Field
(
type
=
FieldType
.
Text
)
private
String
stationName
;
//场站类型
@Field
(
type
=
FieldType
.
Text
)
private
String
stationType
;
//所属省份
@Field
(
type
=
FieldType
.
Text
)
private
String
belongProvince
;
//所属片区
@Field
(
type
=
FieldType
.
Text
)
private
String
belongArea
;
@Field
(
type
=
FieldType
.
Keyword
)
private
String
day
;
//时间标识
@Field
(
type
=
FieldType
.
Keyword
)
private
String
moon
;
//月份标识
@Field
(
type
=
FieldType
.
Keyword
)
private
String
gatewayId
;
@Field
(
type
=
FieldType
.
Date
,
format
=
DateFormat
.
basic_date_time
,
index
=
false
)
private
Date
createdTime
;
@Field
(
type
=
FieldType
.
Double
,
index
=
false
)
private
Double
value
;
@Field
(
type
=
FieldType
.
Keyword
)
private
String
equipmentIndexName
;
@Field
(
type
=
FieldType
.
Keyword
)
private
String
equipmentNumber
;
@Field
(
type
=
FieldType
.
Text
,
index
=
false
)
private
String
address
;
public
ESDailyPowerGeneration
(
String
id
,
String
stationId
,
String
stationName
,
String
stationType
,
String
belongProvince
,
String
belongArea
,
String
day
,
String
gatewayId
,
Date
createdTime
,
Double
value
,
String
equipmentIndexName
,
String
equipmentNumber
,
String
address
,
String
moon
)
{
this
.
id
=
id
;
this
.
stationId
=
stationId
;
this
.
stationName
=
stationName
;
this
.
stationType
=
stationType
;
this
.
belongProvince
=
belongProvince
;
this
.
belongArea
=
belongArea
;
this
.
day
=
day
;
this
.
gatewayId
=
gatewayId
;
this
.
createdTime
=
createdTime
;
this
.
value
=
value
;
this
.
equipmentIndexName
=
equipmentIndexName
;
this
.
equipmentNumber
=
equipmentNumber
;
this
.
address
=
address
;
this
.
moon
=
moon
;
}
public
ESDailyPowerGeneration
()
{
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/ESDto/ESEquipments.java
0 → 100644
View file @
636aa187
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
ESDto
;
import
io.github.classgraph.json.Id
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
org.springframework.data.elasticsearch.annotations.DateFormat
;
import
org.springframework.data.elasticsearch.annotations.Document
;
import
org.springframework.data.elasticsearch.annotations.Field
;
import
org.springframework.data.elasticsearch.annotations.FieldType
;
import
java.util.Date
;
/**
* @description:
* @author: tw
* @createDate: 2023/8/8
*/
@Data
@Accessors
(
chain
=
true
)
@Document
(
indexName
=
"jxiop_equipments"
)
public
class
ESEquipments
{
@Id
private
String
id
;
@Field
(
type
=
FieldType
.
Text
,
index
=
false
)
private
String
address
;
@Field
(
type
=
FieldType
.
Text
,
index
=
false
)
private
String
dataType
;
@Field
(
type
=
FieldType
.
Text
)
private
String
equipmentSpecificName
;
@Field
(
type
=
FieldType
.
Keyword
)
private
String
gatewayId
;
@Field
(
type
=
FieldType
.
Text
)
private
String
isAlarm
;
@Field
(
type
=
FieldType
.
Date
,
format
=
DateFormat
.
basic_date_time
,
index
=
false
)
private
Date
createdTime
;
@Field
(
type
=
FieldType
.
Text
,
index
=
false
)
private
String
unit
;
@Field
(
type
=
FieldType
.
Text
,
index
=
false
)
private
String
value
;
@Field
(
type
=
FieldType
.
Double
,
index
=
false
)
private
Double
valueDouble
;
@Field
(
type
=
FieldType
.
Text
,
index
=
false
)
private
String
valueLabel
;
@Field
(
type
=
FieldType
.
Text
,
index
=
false
)
private
String
traceId
;
@Field
(
type
=
FieldType
.
Keyword
)
private
String
equipmentIndexName
;
@Field
(
type
=
FieldType
.
Keyword
)
private
String
equipmentNumber
;
@Field
(
type
=
FieldType
.
Text
)
private
String
frontModule
;
@Field
(
type
=
FieldType
.
Text
)
private
String
systemType
;
@Field
(
type
=
FieldType
.
Text
,
index
=
false
)
private
String
pictureName
;
@Field
(
type
=
FieldType
.
Text
,
index
=
false
)
private
String
displayName
;
public
ESEquipments
(
Double
valueDouble
,
String
id
,
String
address
,
String
dataType
,
String
equipmentSpecificName
,
String
gatewayId
,
String
isAlarm
,
Date
createdTime
,
String
unit
,
String
value
,
String
valueLabel
,
String
traceId
,
String
equipmentIndexName
,
String
equipmentNumber
,
String
frontModule
,
String
systemType
,
String
pictureName
,
String
displayName
)
{
this
.
valueDouble
=
valueDouble
;
this
.
id
=
id
;
this
.
address
=
address
;
this
.
dataType
=
dataType
;
this
.
equipmentSpecificName
=
equipmentSpecificName
;
this
.
gatewayId
=
gatewayId
;
this
.
isAlarm
=
isAlarm
;
this
.
createdTime
=
createdTime
;
this
.
unit
=
unit
;
this
.
value
=
value
;
this
.
valueLabel
=
valueLabel
;
this
.
traceId
=
traceId
;
this
.
equipmentIndexName
=
equipmentIndexName
;
this
.
equipmentNumber
=
equipmentNumber
;
this
.
frontModule
=
frontModule
;
this
.
systemType
=
systemType
;
this
.
pictureName
=
pictureName
;
this
.
displayName
=
displayName
;
}
public
ESEquipments
()
{
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/ESDto/ESMoonPowerGeneration.java
0 → 100644
View file @
636aa187
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
ESDto
;
import
io.github.classgraph.json.Id
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
org.springframework.data.elasticsearch.annotations.DateFormat
;
import
org.springframework.data.elasticsearch.annotations.Document
;
import
org.springframework.data.elasticsearch.annotations.Field
;
import
org.springframework.data.elasticsearch.annotations.FieldType
;
import
java.util.Date
;
/**
* @description:
* @author: tw
* @createDate: 2023/8/9
*/
@Data
@Accessors
(
chain
=
true
)
@Document
(
indexName
=
"jxiop_moon"
)
public
class
ESMoonPowerGeneration
{
@Id
private
String
id
;
@Field
(
type
=
FieldType
.
Keyword
)
private
String
stationId
;
//场站名称
@Field
(
type
=
FieldType
.
Text
)
private
String
stationName
;
//场站类型
@Field
(
type
=
FieldType
.
Text
)
private
String
stationType
;
//所属省份
@Field
(
type
=
FieldType
.
Text
)
private
String
belongProvince
;
//所属片区
@Field
(
type
=
FieldType
.
Text
)
private
String
belongArea
;
@Field
(
type
=
FieldType
.
Keyword
)
private
String
day
;
//时间标识
@Field
(
type
=
FieldType
.
Keyword
)
private
String
year
;
//年份标识
@Field
(
type
=
FieldType
.
Keyword
)
private
String
gatewayId
;
@Field
(
type
=
FieldType
.
Date
,
format
=
DateFormat
.
basic_date_time
,
index
=
false
)
private
Date
createdTime
;
@Field
(
type
=
FieldType
.
Double
,
index
=
false
)
private
Double
value
;
@Field
(
type
=
FieldType
.
Keyword
)
private
String
equipmentIndexName
;
@Field
(
type
=
FieldType
.
Keyword
)
private
String
equipmentNumber
;
@Field
(
type
=
FieldType
.
Text
,
index
=
false
)
private
String
address
;
public
ESMoonPowerGeneration
(
String
id
,
String
stationId
,
String
stationName
,
String
stationType
,
String
belongProvince
,
String
belongArea
,
String
day
,
String
gatewayId
,
Date
createdTime
,
Double
value
,
String
equipmentIndexName
,
String
equipmentNumber
,
String
address
,
String
year
)
{
this
.
id
=
id
;
this
.
stationId
=
stationId
;
this
.
stationName
=
stationName
;
this
.
stationType
=
stationType
;
this
.
belongProvince
=
belongProvince
;
this
.
belongArea
=
belongArea
;
this
.
day
=
day
;
this
.
gatewayId
=
gatewayId
;
this
.
createdTime
=
createdTime
;
this
.
value
=
value
;
this
.
equipmentIndexName
=
equipmentIndexName
;
this
.
equipmentNumber
=
equipmentNumber
;
this
.
address
=
address
;
this
.
year
=
year
;
}
public
ESMoonPowerGeneration
()
{
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/ESDto/ESWindSpeed.java
0 → 100644
View file @
636aa187
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
ESDto
;
import
io.github.classgraph.json.Id
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
org.springframework.data.elasticsearch.annotations.Document
;
import
org.springframework.data.elasticsearch.annotations.Field
;
import
org.springframework.data.elasticsearch.annotations.FieldType
;
@Data
@Accessors
(
chain
=
true
)
@Document
(
indexName
=
"wind_speed"
)
public
class
ESWindSpeed
{
@Id
private
Long
id
;
@Field
(
type
=
FieldType
.
Text
,
index
=
false
)
private
String
createdTime
;
@Field
(
type
=
FieldType
.
Text
,
index
=
false
)
private
String
equipmentIndexName
;
@Field
(
type
=
FieldType
.
Text
,
index
=
false
)
private
String
equipmentNumber
;
@Field
(
type
=
FieldType
.
Text
,
index
=
false
)
private
String
gatewayId
;
@Field
(
type
=
FieldType
.
Double
,
index
=
false
)
private
Double
value
;
@Field
(
type
=
FieldType
.
Text
,
index
=
false
)
private
String
batchNo
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/ESDto/ESYearPowerGeneration.java
0 → 100644
View file @
636aa187
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
ESDto
;
import
io.github.classgraph.json.Id
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
org.springframework.data.elasticsearch.annotations.DateFormat
;
import
org.springframework.data.elasticsearch.annotations.Document
;
import
org.springframework.data.elasticsearch.annotations.Field
;
import
org.springframework.data.elasticsearch.annotations.FieldType
;
import
java.util.Date
;
/**
* @description:
* @author: tw
* @createDate: 2023/8/9
*/
@Data
@Accessors
(
chain
=
true
)
@Document
(
indexName
=
"jxiop_year"
)
public
class
ESYearPowerGeneration
{
@Id
private
String
id
;
@Field
(
type
=
FieldType
.
Keyword
)
private
String
stationId
;
//场站名称
@Field
(
type
=
FieldType
.
Text
)
private
String
stationName
;
//场站类型
@Field
(
type
=
FieldType
.
Text
)
private
String
stationType
;
//所属省份
@Field
(
type
=
FieldType
.
Text
)
private
String
belongProvince
;
//所属片区
@Field
(
type
=
FieldType
.
Text
)
private
String
belongArea
;
@Field
(
type
=
FieldType
.
Keyword
)
private
String
day
;
//时间标识
@Field
(
type
=
FieldType
.
Keyword
)
private
String
gatewayId
;
@Field
(
type
=
FieldType
.
Date
,
format
=
DateFormat
.
basic_date_time
,
index
=
false
)
private
Date
createdTime
;
@Field
(
type
=
FieldType
.
Double
,
index
=
false
)
private
Double
value
;
@Field
(
type
=
FieldType
.
Keyword
)
private
String
equipmentIndexName
;
@Field
(
type
=
FieldType
.
Keyword
)
private
String
equipmentNumber
;
@Field
(
type
=
FieldType
.
Text
,
index
=
false
)
private
String
address
;
public
ESYearPowerGeneration
(
String
id
,
String
stationId
,
String
stationName
,
String
stationType
,
String
belongProvince
,
String
belongArea
,
String
day
,
String
gatewayId
,
Date
createdTime
,
Double
value
,
String
equipmentIndexName
,
String
equipmentNumber
,
String
address
)
{
this
.
id
=
id
;
this
.
stationId
=
stationId
;
this
.
stationName
=
stationName
;
this
.
stationType
=
stationType
;
this
.
belongProvince
=
belongProvince
;
this
.
belongArea
=
belongArea
;
this
.
day
=
day
;
this
.
gatewayId
=
gatewayId
;
this
.
createdTime
=
createdTime
;
this
.
value
=
value
;
this
.
equipmentIndexName
=
equipmentIndexName
;
this
.
equipmentNumber
=
equipmentNumber
;
this
.
address
=
address
;
}
public
ESYearPowerGeneration
()
{
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/AlarmEventDto.java
View file @
636aa187
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
dto
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
dto
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/ColModel.java
View file @
636aa187
...
@@ -25,4 +25,5 @@ public class ColModel {
...
@@ -25,4 +25,5 @@ public class ColModel {
this
.
type
=
type
;
this
.
type
=
type
;
this
.
key
=
key
;
this
.
key
=
key
;
}
}
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/DataGridMock.java
View file @
636aa187
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
dto
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
dto
;
import
lombok.Data
;
import
lombok.Data
;
import
org.apache.poi.ss.formula.functions.T
;
import
java.util.List
;
import
java.util.List
;
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/HomeMapStationInfoDto.java
View file @
636aa187
...
@@ -3,7 +3,6 @@ package com.yeejoin.amos.boot.module.jxiop.biz.dto;
...
@@ -3,7 +3,6 @@ package com.yeejoin.amos.boot.module.jxiop.biz.dto;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
@Data
@Data
public
class
HomeMapStationInfoDto
{
public
class
HomeMapStationInfoDto
{
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/MapAreaInfoDto.java
View file @
636aa187
...
@@ -3,7 +3,6 @@ package com.yeejoin.amos.boot.module.jxiop.biz.dto;
...
@@ -3,7 +3,6 @@ package com.yeejoin.amos.boot.module.jxiop.biz.dto;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
@Data
@Data
public
class
MapAreaInfoDto
{
public
class
MapAreaInfoDto
{
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/QueryDto.java
0 → 100644
View file @
636aa187
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
dto
;
import
lombok.Data
;
/**
* @description:
* @author: tw
* @createDate: 2023/8/9
*/
@Data
public
class
QueryDto
{
private
String
key
;
private
String
value
;
public
QueryDto
(
String
key
,
String
value
)
{
this
.
key
=
key
;
this
.
value
=
value
;
}
public
QueryDto
()
{
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/RegionNationWideDto.java
View file @
636aa187
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
dto
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
dto
;
import
com.sun.javafx.font.PrismFontFactory
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/ResultsData.java
View file @
636aa187
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
dto
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
dto
;
import
lombok.Data
;
import
lombok.Data
;
import
org.apache.poi.ss.formula.functions.T
;
import
java.util.List
;
import
java.util.List
;
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/SeriesData.java
0 → 100644
View file @
636aa187
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
dto
;
import
lombok.Data
;
import
java.util.List
;
import
java.util.Map
;
/**
* @description:
* @author: tw
* @createDate: 2023/8/14
*/
@Data
public
class
SeriesData
{
private
List
<
Map
<
String
,
Object
>>
seriesData
;
private
List
<
String
>
axisData
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/StationCacheInfoDto.java
0 → 100644
View file @
636aa187
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
dto
;
import
lombok.Data
;
import
java.io.Serializable
;
@Data
public
class
StationCacheInfoDto
implements
Serializable
{
//场站id
private
String
stationId
;
//场站名称
private
String
stationName
;
//场站类型
private
String
stationType
;
//所属省份
private
String
belongProvince
;
//所属片区
private
String
belongArea
;
//装机容量
private
String
installedCapacity
;
//设备数量
private
String
equipmentNumbers
;
//风机网关
private
String
fanGatewayId
;
//升压站网关
private
String
boosterGatewayId
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/SystemEnumDto.java
View file @
636aa187
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
dto
;
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.Data
;
import
lombok.experimental.Accessors
;
@Data
@Data
public
class
SystemEnumDto
{
public
class
SystemEnumDto
{
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/TemporaryDataDto.java
View file @
636aa187
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
dto
;
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.Data
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/TimeDate.java
0 → 100644
View file @
636aa187
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
dto
;
import
lombok.Data
;
/**
* @description:
* @author: tw
* @createDate: 2023/8/11
*/
@Data
public
class
TimeDate
{
private
String
key
;
private
double
value
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/initdata/StationCacheDataInit.java
0 → 100644
View file @
636aa187
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
initdata
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.MapRegion
;
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.MapRegionMapper
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.RegionMapper
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.StationBasicMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.ESDto.ESEquipments
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.QueryDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.StationCacheInfoDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.SjglZsjZsbtzMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.CommonServiceImpl
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.boot.CommandLineRunner
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
@Component
public
class
StationCacheDataInit
implements
CommandLineRunner
{
Logger
logger
=
LoggerFactory
.
getLogger
(
StationCacheDataInit
.
class
);
@Resource
private
StationBasicMapper
stationBasicMapper
;
@Resource
private
RegionMapper
regionMapper
;
@Resource
private
MapRegionMapper
mapRegionMapper
;
@Resource
private
SjglZsjZsbtzMapper
sjglZsjZsbtzMapper
;
@Resource
private
CommonServiceImpl
commonServiceImpl
;
@Resource
private
RedisTemplate
redisTemplate
;
public
void
run
(
String
...
args
)
throws
Exception
{
List
<
StationCacheInfoDto
>
stationCacheInfoDtos
=
new
ArrayList
<>();
redisTemplate
.
delete
(
"station_info_cache"
);
List
<
Region
>
regionList
=
regionMapper
.
selectList
(
new
QueryWrapper
<
Region
>().
eq
(
"LEVEL"
,
1
));
List
<
MapRegion
>
mapRegionList
=
mapRegionMapper
.
selectList
(
new
QueryWrapper
<
MapRegion
>().
isNotNull
(
"name"
));
List
<
StationBasic
>
stationBasicList
=
stationBasicMapper
.
selectList
(
new
QueryWrapper
<
StationBasic
>().
isNotNull
(
"belong_area"
).
isNotNull
(
"fan_gateway_id"
));
stationBasicList
.
forEach
(
stationBasic
->
{
StationCacheInfoDto
stationCacheInfoDto
=
new
StationCacheInfoDto
();
stationCacheInfoDto
.
setStationId
(
stationBasic
.
getSequenceNbr
().
toString
());
stationCacheInfoDto
.
setStationName
(
stationBasic
.
getStationName
());
stationCacheInfoDto
.
setStationType
(
stationBasic
.
getStationType
());
stationCacheInfoDto
.
setBelongProvince
(
regionList
.
stream
().
filter
(
region
->
region
.
getRegionCode
().
toString
().
equals
(
stationBasic
.
getBelongArea
().
replace
(
"["
,
""
).
split
(
","
)[
0
])).
map
(
region
->
region
.
getRegionName
()).
collect
(
Collectors
.
toList
()).
get
(
0
));
stationCacheInfoDto
.
setBelongArea
(
mapRegionList
.
stream
().
filter
(
mapRegion
->
mapRegion
.
getProvince
().
contains
(
stationCacheInfoDto
.
getBelongProvince
().
substring
(
0
,
2
))||
mapRegion
.
getProvince
().
contains
(
stationCacheInfoDto
.
getBelongProvince
().
substring
(
0
,
3
))).
map
(
mapRegion
->
mapRegion
.
getName
()).
collect
(
Collectors
.
toList
()).
get
(
0
));
stationCacheInfoDto
.
setInstalledCapacity
(
String
.
format
(
"%.2f"
,
sjglZsjZsbtzMapper
.
getStationCapactityByStationWerks
(
stationBasic
.
getStationNumber
())));
List
<
QueryDto
>
queryDtoList
=
new
ArrayList
<>();
queryDtoList
.
add
(
new
QueryDto
(
"gatewayId"
,
stationBasic
.
getFanGatewayId
()));
queryDtoList
.
add
(
new
QueryDto
(
"equipmentIndexName.keyword"
,
"有功功率"
));
if
(!
stationBasic
.
getStationType
().
equals
(
"FDZ"
)){
queryDtoList
.
add
(
new
QueryDto
(
"frontModule"
,
"逆变器"
));
}
stationCacheInfoDto
.
setEquipmentNumbers
(
commonServiceImpl
.
getCount
(
queryDtoList
,
"equipmentNumber.Keyword"
,
ESEquipments
.
class
).
toString
());
stationCacheInfoDto
.
setFanGatewayId
(
stationBasic
.
getFanGatewayId
());
stationCacheInfoDto
.
setBoosterGatewayId
(
stationBasic
.
getBoosterGatewayId
());
stationCacheInfoDtos
.
add
(
stationCacheInfoDto
);
});
redisTemplate
.
opsForList
().
leftPushAll
(
"station_info_cache"
,
stationCacheInfoDtos
);
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
View file @
636aa187
...
@@ -36,8 +36,6 @@ import java.util.ArrayList;
...
@@ -36,8 +36,6 @@ import java.util.ArrayList;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.Objects
;
import
java.util.concurrent.atomic.AtomicReference
;
import
java.util.stream.Collectors
;
@Service
@Service
public
class
CommonServiceImpl
{
public
class
CommonServiceImpl
{
...
@@ -103,7 +101,6 @@ public class CommonServiceImpl {
...
@@ -103,7 +101,6 @@ public class CommonServiceImpl {
}
}
/**
/**
* @deprecated 获取指标值平均值
* @deprecated 获取指标值平均值
* @param gatewayId 网关id 用于拼接sql语句
* @param indicator 指标名称 查询条件-根据指标名称获取风速
* @param indicator 指标名称 查询条件-根据指标名称获取风速
* @return 指标值总和
* @return 指标值总和
*/
*/
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/utils/DateUtil.java
0 → 100644
View file @
636aa187
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
utils
;
import
java.sql.Time
;
import
java.text.ParseException
;
import
java.text.ParsePosition
;
import
java.text.SimpleDateFormat
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.TimeZone
;
/**
*
* <pre>
* 日期
* </pre>
*
* @author as-chenjiajun
* @version $Id: DateUtil.java, v 0.1 2018年1月29日 下午5:08:40 as-chenjiajun Exp $
*/
public
class
DateUtil
{
private
static
String
LONG_PATTERN
=
"yyyy-MM-dd HH:mm:ss"
;
private
static
String
MID_PATTERN
=
"yyyy-MM-dd HH:mm"
;
private
static
String
SHORT_PATTERN
=
"yyyy-MM-dd"
;
public
static
long
THREE_DAY_MILLSEC
=
259200000L
;
public
static
long
ONE_DAY_MILLSEC
=
86400000L
;
public
static
long
ONE_HOUR_MILLSEC
=
3600000L
;
public
static
long
THREE_HOURS_MILLSEC
=
10800000L
;
public
static
long
TWELVE_HOURS_MILLSEC
=
43200000L
;
public
static
Date
EMPTY_DATE
=
null
;
static
{
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
set
(
9999
,
0
,
0
);
EMPTY_DATE
=
calendar
.
getTime
();
}
/**
* 获取当前时间
*
* @return 当前日期时间
*/
public
static
Date
getDateNow
()
{
return
new
Date
();
}
/**
*
* <pre>
* 获取当前北京时间
* </pre>
*
* @return
*/
public
static
Date
getCurrentDate
()
{
return
getCurrentCalendar
().
getTime
();
}
public
static
String
getLongCurrentDate
()
{
return
new
SimpleDateFormat
(
LONG_PATTERN
)
.
format
(
getCurrentCalendar
().
getTime
());
}
public
static
String
getLongDate
(
Date
date
)
{
if
(
null
==
date
)
return
getLongCurrentDate
();
else
return
new
SimpleDateFormat
(
LONG_PATTERN
).
format
(
date
);
}
public
static
String
getLongDate
(
long
value
)
{
return
new
SimpleDateFormat
(
LONG_PATTERN
).
format
(
new
Date
(
value
));
}
public
static
String
getShortCurrentDate
()
{
return
new
SimpleDateFormat
(
SHORT_PATTERN
).
format
(
new
Date
());
}
public
static
String
getShortDate
(
Date
date
)
{
if
(
null
==
date
)
return
getShortCurrentDate
();
else
return
new
SimpleDateFormat
(
SHORT_PATTERN
).
format
(
date
);
}
public
static
String
getShortDate
(
long
value
)
{
return
new
SimpleDateFormat
(
SHORT_PATTERN
).
format
(
new
Date
(
value
));
}
public
static
Date
getShortCurrentDate
(
String
shortDateStr
)
throws
ParseException
{
return
new
SimpleDateFormat
(
SHORT_PATTERN
).
parse
(
shortDateStr
);
}
public
static
Date
getLongDate
(
String
longDateStr
)
throws
ParseException
{
return
new
SimpleDateFormat
(
LONG_PATTERN
).
parse
(
longDateStr
);
}
public
static
String
getMidCurrentDate
()
{
return
new
SimpleDateFormat
(
MID_PATTERN
).
format
(
new
Date
());
}
public
static
String
getMidDate
(
Date
date
)
{
if
(
null
==
date
)
return
getMidCurrentDate
();
else
return
new
SimpleDateFormat
(
MID_PATTERN
).
format
(
new
Date
());
}
public
static
String
getMidDate
(
long
value
)
{
return
new
SimpleDateFormat
(
MID_PATTERN
).
format
(
new
Date
(
value
));
}
public
static
Date
str2Date
(
String
strDate
,
String
dateFormat
)
{
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
dateFormat
);
ParsePosition
pos
=
new
ParsePosition
(
0
);
Date
strtodate
=
formatter
.
parse
(
strDate
,
pos
);
return
strtodate
;
}
public
static
int
getYear
(
Date
date
)
{
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
date
);
int
year
=
calendar
.
get
(
Calendar
.
YEAR
);
return
year
;
}
public
static
int
getMonth
(
Date
date
)
{
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
date
);
int
month
=
calendar
.
get
(
Calendar
.
MONTH
)
+
1
;
return
month
;
}
public
static
int
getDay
(
Date
date
)
{
Calendar
c
=
Calendar
.
getInstance
();
c
.
setTime
(
date
);
int
day
=
c
.
get
(
Calendar
.
DATE
);
return
day
;
}
public
static
int
getHour
(
Date
date
)
{
Calendar
c
=
Calendar
.
getInstance
();
c
.
setTime
(
date
);
int
hour
=
c
.
get
(
Calendar
.
HOUR_OF_DAY
);
return
hour
;
}
public
static
int
getMinite
(
Date
date
)
{
Calendar
c
=
Calendar
.
getInstance
();
c
.
setTime
(
date
);
int
minite
=
c
.
get
(
Calendar
.
MINUTE
);
return
minite
;
}
/**
*
* <pre>
* 获取当前北京时间
* </pre>
*
* @return
*/
public
static
Calendar
getCurrentCalendar
()
{
TimeZone
.
setDefault
(
TimeZone
.
getTimeZone
(
"Asia/Shanghai"
));
return
Calendar
.
getInstance
();
}
/**
*
* <pre>
* 获取当前两个时间差
* </pre>
*
* @return
*/
public
static
String
getTimeDifference
(
Date
dateBefore
,
Date
dateAfter
)
{
long
l
=
dateAfter
.
getTime
()-
dateBefore
.
getTime
();
long
day
=
l
/(
24
*
60
*
60
*
1000
);
long
hour
=(
l
/(
60
*
60
*
1000
)-
day
*
24
);
long
min
=((
l
/(
60
*
1000
))-
day
*
24
*
60
-
hour
*
60
);
long
s
=(
l
/
1000
-
day
*
24
*
60
*
60
-
hour
*
60
*
60
-
min
*
60
);
return
""
+
day
+
"天"
+
hour
+
"小时"
+
min
+
"分"
+
s
+
"秒"
;
}
/**
* 获取某年某月的第一天日期
* @param date
* @param format
* @return
*/
public
static
String
getStartMonthDate
(
String
date
,
String
format
)
{
if
(
date
==
null
||
date
.
length
()<
6
||
format
==
null
){
return
null
;
}
int
year
=
Integer
.
parseInt
(
date
.
substring
(
0
,
4
));
int
month
=
Integer
.
parseInt
(
date
.
substring
(
4
,
6
));
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
set
(
year
,
month
-
1
,
1
);
return
new
SimpleDateFormat
(
format
).
format
(
calendar
.
getTime
());
}
/**
* 获取某年某月的最后一天日期
* @param date
* @param format
* @return
*/
public
static
String
getEndMonthDate
(
String
date
,
String
format
)
{
if
(
date
==
null
||
date
.
length
()<
6
||
format
==
null
){
return
null
;
}
int
year
=
Integer
.
parseInt
(
date
.
substring
(
0
,
4
));
int
month
=
Integer
.
parseInt
(
date
.
substring
(
4
,
6
));
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
set
(
year
,
month
-
1
,
1
);
int
day
=
calendar
.
getActualMaximum
(
5
);
calendar
.
set
(
year
,
month
-
1
,
day
);
return
new
SimpleDateFormat
(
format
).
format
(
calendar
.
getTime
());
}
/**
* 获取某天的间隔天数
* @param date
* @param interval 间隔天数。负数为前,正数为后
* @param format 输出格式化
* @return
*/
public
static
String
getIntervalDateStr
(
Date
date
,
int
interval
,
String
format
)
{
if
(
date
==
null
||
format
==
null
){
return
null
;
}
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
date
);
calendar
.
add
(
Calendar
.
DATE
,
interval
);
return
new
SimpleDateFormat
(
format
).
format
(
calendar
.
getTime
());
}
/**
* 获取某天的年初第一天
* @param date
* @param format 输出格式化
* @return
*/
public
static
String
getFirstDayOfYear
(
String
date
,
String
format
)
{
int
year
=
Integer
.
parseInt
(
date
.
substring
(
0
,
4
));
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
set
(
year
,
Calendar
.
JANUARY
,
1
);
return
new
SimpleDateFormat
(
format
).
format
(
calendar
.
getTime
());
}
/**
* 获取某天的年初第一天
* @param date
* @param format 输出格式化
* @return date
*/
public
static
Date
getFirstDayOfYearDate
(
String
date
)
{
int
year
=
Integer
.
parseInt
(
date
.
substring
(
0
,
4
));
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
set
(
year
,
Calendar
.
JANUARY
,
1
);
return
calendar
.
getTime
();
}
/**
* 获取某天的年末最后一天
* @param date
* @param format 输出格式化
* @return date
*/
public
static
Date
getLastDayOfYearDate
(
Date
date
)
{
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
date
);
final
int
last
=
calendar
.
getActualMaximum
(
Calendar
.
DAY_OF_YEAR
);
calendar
.
set
(
Calendar
.
DAY_OF_YEAR
,
last
);
return
calendar
.
getTime
();
}
/**
* 获取某天的间隔天数
* @param date
* @param interval 间隔天数。负数为前,正数为后
* @param format 输出格式化
* @return
*/
public
static
Date
getIntervalDate
(
Date
date
,
int
interval
)
{
if
(
date
==
null
){
return
null
;
}
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
date
);
calendar
.
add
(
Calendar
.
DATE
,
interval
);
return
calendar
.
getTime
();
}
/**
* 获得指定日期的间隔周末
* @param exeDate
* @param init
* @return
*/
public
static
Date
getIntervalWeekDate
(
Date
exeDate
,
int
init
)
{
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
exeDate
);
calendar
.
add
(
Calendar
.
DATE
,
init
*
7
);
calendar
.
set
(
Calendar
.
DAY_OF_WEEK
,
Calendar
.
SUNDAY
);
return
calendar
.
getTime
();
}
/**
* 获得制定日期间隔的上个月最后一天
* @param exeDate
* @param inter
* @return
*/
public
static
Date
getEndMonthDate
(
Date
exeDate
,
int
inter
)
{
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
exeDate
);
calendar
.
add
(
Calendar
.
MONTH
,
inter
-
1
);
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
calendar
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
return
calendar
.
getTime
();
}
/**
* 获取间隔周的
* @param mounthFirstDate
* @param whatWeek
* @param weekDay
* @return
*/
public
static
Date
getIntMonthWeekDate
(
Date
mounthFirstDate
,
int
week
,
int
day
)
{
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
mounthFirstDate
);
if
(
day
==
7
)
{
day
=
1
;
week
=
week
+
1
;
}
else
{
day
=
day
+
1
;
}
calendar
.
set
(
Calendar
.
WEEK_OF_MONTH
,
week
);
calendar
.
set
(
Calendar
.
DAY_OF_WEEK
,
day
);
return
calendar
.
getTime
();
}
/**
* 获取间隔的年日期
* @param planDegin
* @param init
* @return
*/
public
static
String
getIntervalYearDate
(
Date
planDegin
,
int
init
)
{
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
planDegin
);
calendar
.
add
(
Calendar
.
YEAR
,
init
);
return
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
calendar
.
getTime
());
}
/**
* 格式化日期
* @param beginDate
* @param string
* @return
*/
public
static
String
formatDatrToStr
(
Date
beginDate
,
String
formart
)
{
SimpleDateFormat
df
=
new
SimpleDateFormat
(
formart
);
String
strDate
=
df
.
format
(
beginDate
);
return
strDate
;
}
public
static
Time
formatStrToTime
(
String
strDate
){
String
str
=
strDate
;
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"hh:mm:ss"
);
Date
d
=
null
;
try
{
d
=
format
.
parse
(
str
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
Time
date
=
new
Time
(
d
.
getTime
());
return
date
;
}
public
static
String
cronTime
(
Date
date
){
StringBuilder
cron
=
new
StringBuilder
();
cron
.
append
(
date
.
getSeconds
()).
append
(
" "
)
.
append
(
date
.
getMinutes
()).
append
(
" "
)
.
append
(
date
.
getHours
()).
append
(
" "
)
.
append
(
date
.
getDay
()).
append
(
" "
)
.
append
(
date
.
getMonth
()).
append
(
" "
)
.
append
(
"?"
).
append
(
" "
)
.
append
(
date
.
getYear
());
return
cron
.
toString
();
}
public
static
int
getDaysByYearMonth
(
int
year
,
int
month
)
{
Calendar
a
=
Calendar
.
getInstance
();
a
.
set
(
Calendar
.
YEAR
,
year
);
a
.
set
(
Calendar
.
MONTH
,
month
-
1
);
a
.
set
(
Calendar
.
DATE
,
1
);
a
.
roll
(
Calendar
.
DATE
,
-
1
);
int
maxDate
=
a
.
get
(
Calendar
.
DATE
);
return
maxDate
;
}
}
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