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
ca2fb797
Commit
ca2fb797
authored
Oct 11, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改大屏单个风机信息
parent
a0dd353e
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
77 additions
and
23 deletions
+77
-23
MonitoringMapController.java
.../module/jxiop/biz/controller/MonitoringMapController.java
+65
-14
LargeScreenImpl.java
...s/boot/module/jxiop/biz/service/impl/LargeScreenImpl.java
+8
-8
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+3
-0
TemporaryDataMapper.xml
...src/main/resources/mapper/cluster/TemporaryDataMapper.xml
+1
-1
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/MonitoringMapController.java
View file @
ca2fb797
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
controller
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
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.Region
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.StationBasic
;
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.api.mapper.StationBasicMapper
;
import
com.yeejoin.amos.boot.module.jxiop.api.service.IMapRegionService
;
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.dto.*
;
...
@@ -28,10 +32,9 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
...
@@ -28,10 +32,9 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.HashMap
;
import
java.util.*
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.logging.Handler
;
import
java.util.logging.Handler
;
import
java.util.stream.Collectors
;
@RestController
@RestController
@Api
(
tags
=
"监盘地图接口"
)
@Api
(
tags
=
"监盘地图接口"
)
...
@@ -43,7 +46,12 @@ public class MonitoringMapController extends BaseController {
...
@@ -43,7 +46,12 @@ public class MonitoringMapController extends BaseController {
@Autowired
@Autowired
LargeScreenImpl
largeScreenImpl
;
LargeScreenImpl
largeScreenImpl
;
@Autowired
RegionMapper
regionMapper
;
@Autowired
MapRegionMapper
mapRegionMapper
;
@Autowired
StationBasicMapper
stationBasicMapper
;
// @TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
// @TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
// @ApiOperation(value = "获取监盘全国地图数据")
// @ApiOperation(value = "获取监盘全国地图数据")
// @GetMapping("/nationwide")
// @GetMapping("/nationwide")
...
@@ -169,25 +177,68 @@ public class MonitoringMapController extends BaseController {
...
@@ -169,25 +177,68 @@ public class MonitoringMapController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
value
=
"监盘首页- 全国发电量趋势完成率"
)
@ApiOperation
(
value
=
"监盘首页- 全国发电量趋势完成率"
)
@GetMapping
(
"/getqgqs"
)
@GetMapping
(
"/gettimedateqyyfdqs"
)
public
ResponseModel
<
HashMap
<
String
,
List
<
String
>>>
getqgqs
()
{
public
ResponseModel
<
Map
<
String
,
Object
>>
sendQYFDLMqttyfdqs
(
String
areaName
)
{
List
<
StationBasic
>
stationBasicListAll
=
getListOfStationBasicByAreaName
(
areaName
);
List
<
String
>
ids
=
stationBasicListAll
.
stream
().
map
(
StationBasic:
:
getFanGatewayId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
idsStationId
=
stationBasicListAll
.
stream
().
map
(
StationBasic:
:
getSequenceNbr
).
collect
(
Collectors
.
toList
());
List
<
String
>
idsStationIdmnew
=
new
ArrayList
<>();
for
(
Long
aLong
:
idsStationId
)
{
idsStationIdmnew
.
add
(
String
.
valueOf
(
aLong
));
}
Map
<
String
,
Object
>
map
=
largeScreenImpl
.
gettimedateqyyfdqs
(
new
Date
(),
ids
,
areaName
,
idsStationIdmnew
);
largeScreenImpl
.
sendQYFDLMqttyfdqs
();
largeScreenImpl
.
sendQYFDLMqttyfd
();
return
ResponseHelper
.
buildResponse
(
null
);
return
ResponseHelper
.
buildResponse
(
map
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
value
=
"监盘首页- 全国发电量趋势完成率"
)
@ApiOperation
(
value
=
"监盘首页- 全国发电量趋势完成率"
)
@GetMapping
(
"/get
qyqs
"
)
@GetMapping
(
"/get
timedateqyyfd
"
)
public
ResponseModel
<
HashMap
<
String
,
List
<
String
>>>
getqyqs
(
)
{
public
ResponseModel
<
Map
<
String
,
Object
>>
sendQYFDLMqttyfd
(
String
areaName
)
{
largeScreenImpl
.
gettimedateyfdqs
();
List
<
StationBasic
>
stationBasicListAll
=
getListOfStationBasicByAreaName
(
areaName
);
largeScreenImpl
.
gettimedateyfd
();
List
<
String
>
ids
=
stationBasicListAll
.
stream
().
map
(
StationBasic:
:
getFanGatewayId
).
collect
(
Collectors
.
toList
());
Map
<
String
,
Object
>
map
=
largeScreenImpl
.
gettimedateqyyfd
(
new
Date
(),
ids
,
areaName
);
return
ResponseHelper
.
buildResponse
(
null
);
return
ResponseHelper
.
buildResponse
(
map
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
value
=
"监盘首页- 全国发电量趋势完成率"
)
@GetMapping
(
"/gettimedateyfdqs"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
gettimedateyfdqs
()
{
Map
<
String
,
Object
>
map
=
largeScreenImpl
.
gettimedateyfdqs
();
return
ResponseHelper
.
buildResponse
(
map
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
value
=
"监盘首页- 全国发电量趋势完成率"
)
@GetMapping
(
"/gettimedateyfd"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
gettimedateyfd
()
{
Map
<
String
,
Object
>
map
=
largeScreenImpl
.
gettimedateyfd
();
return
ResponseHelper
.
buildResponse
(
map
);
}
public
List
<
StationBasic
>
getListOfStationBasicByAreaName
(
String
areaName
)
{
List
<
StationBasic
>
stationBasicListAll
=
new
ArrayList
<>();
MapRegion
mapRegion
=
mapRegionMapper
.
selectOne
(
new
QueryWrapper
<
MapRegion
>().
eq
(
"name"
,
areaName
));
//获取片区下的省份名称
ArrayList
<
String
>
stringArrayList
=
mapRegion
.
getProvince
();
//变量获取所有的场站信息
for
(
int
i
=
0
;
i
<
stringArrayList
.
size
();
i
++)
{
Region
region
=
regionMapper
.
selectOne
(
new
QueryWrapper
<
Region
>().
eq
(
"LEVEL"
,
1
).
like
(
"REGION_NAME"
,
stringArrayList
.
get
(
i
)));
List
<
StationBasic
>
stationBasicList
=
stationBasicMapper
.
selectList
(
new
QueryWrapper
<
StationBasic
>().
like
(
"belong_area"
,
region
.
getRegionCode
()));
stationBasicListAll
.
addAll
(
stationBasicList
);
}
return
stationBasicListAll
;
}
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/LargeScreenImpl.java
View file @
ca2fb797
...
@@ -541,7 +541,7 @@ public class LargeScreenImpl {
...
@@ -541,7 +541,7 @@ public class LargeScreenImpl {
//全国月发电量趋势
//全国月发电量趋势
@Scheduled
(
cron
=
"0/10 * * * * ?"
)
@Scheduled
(
cron
=
"0/10 * * * * ?"
)
public
List
<
Double
>
gettimedateyfd
(
){
public
Map
<
String
,
Object
>
gettimedateyfd
(
){
SimpleDateFormat
myFmt2
=
new
SimpleDateFormat
(
"yyyy"
);
SimpleDateFormat
myFmt2
=
new
SimpleDateFormat
(
"yyyy"
);
String
monthy
=
myFmt2
.
format
(
new
Date
());
String
monthy
=
myFmt2
.
format
(
new
Date
());
...
@@ -587,7 +587,7 @@ public List<Double> gettimedateyfd( ){
...
@@ -587,7 +587,7 @@ public List<Double> gettimedateyfd( ){
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
return
listdate
;
return
mapjn
;
}
}
...
@@ -609,7 +609,7 @@ public List<Double> gettimedateyfd( ){
...
@@ -609,7 +609,7 @@ public List<Double> gettimedateyfd( ){
public
List
<
Double
>
gettimedateqyyfd
(
Date
date
,
List
<
String
>
gatewayId
,
String
areaCode
){
public
Map
<
String
,
Object
>
gettimedateqyyfd
(
Date
date
,
List
<
String
>
gatewayId
,
String
areaCode
){
SimpleDateFormat
myFmt2
=
new
SimpleDateFormat
(
"yyyy"
);
SimpleDateFormat
myFmt2
=
new
SimpleDateFormat
(
"yyyy"
);
String
monthy
=
myFmt2
.
format
(
date
);
String
monthy
=
myFmt2
.
format
(
date
);
...
@@ -655,7 +655,7 @@ public List<Double> gettimedateyfd( ){
...
@@ -655,7 +655,7 @@ public List<Double> gettimedateyfd( ){
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
return
listdate
;
return
mapjn
;
}
}
...
@@ -665,7 +665,7 @@ public List<Double> gettimedateyfd( ){
...
@@ -665,7 +665,7 @@ public List<Double> gettimedateyfd( ){
//全国发电完成趋势
//全国发电完成趋势
@Scheduled
(
cron
=
"0/10 * * * * ?"
)
@Scheduled
(
cron
=
"0/10 * * * * ?"
)
public
List
<
Double
>
gettimedateyfdqs
(
){
public
Map
<
String
,
Object
>
gettimedateyfdqs
(
){
SimpleDateFormat
myFmt2
=
new
SimpleDateFormat
(
"yyyy"
);
SimpleDateFormat
myFmt2
=
new
SimpleDateFormat
(
"yyyy"
);
String
monthy
=
myFmt2
.
format
(
new
Date
());
String
monthy
=
myFmt2
.
format
(
new
Date
());
...
@@ -727,7 +727,7 @@ public List<Double> gettimedateyfd( ){
...
@@ -727,7 +727,7 @@ public List<Double> gettimedateyfd( ){
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
return
listdate
;
return
mapjn
;
}
}
...
@@ -748,7 +748,7 @@ public List<Double> gettimedateyfd( ){
...
@@ -748,7 +748,7 @@ public List<Double> gettimedateyfd( ){
public
List
<
Double
>
gettimedateqyyfdqs
(
Date
date
,
List
<
String
>
gatewayId
,
String
areaCode
,
List
<
String
>
idsStationId
){
public
Map
<
String
,
Object
>
gettimedateqyyfdqs
(
Date
date
,
List
<
String
>
gatewayId
,
String
areaCode
,
List
<
String
>
idsStationId
){
SimpleDateFormat
myFmt2
=
new
SimpleDateFormat
(
"yyyy"
);
SimpleDateFormat
myFmt2
=
new
SimpleDateFormat
(
"yyyy"
);
String
monthy
=
myFmt2
.
format
(
date
);
String
monthy
=
myFmt2
.
format
(
date
);
...
@@ -813,7 +813,7 @@ public List<Double> gettimedateyfd( ){
...
@@ -813,7 +813,7 @@ public List<Double> gettimedateyfd( ){
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
return
listdate
;
return
mapjn
;
}
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
View file @
ca2fb797
...
@@ -1983,3 +1983,6 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
...
@@ -1983,3 +1983,6 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/resources/mapper/cluster/TemporaryDataMapper.xml
View file @
ca2fb797
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<select
id=
"timingTemporarysSorageData"
resultType=
"map"
>
<select
id=
"timingTemporarysSorageData"
resultType=
"map"
>
SELECT FORMAT(
avg
(value),2)as value ,
SELECT FORMAT(
sum
(value),2)as value ,
created_time as createdTime ,
created_time as createdTime ,
equipmentIndexName
equipmentIndexName
FROM
FROM
...
...
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