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
b8905690
Commit
b8905690
authored
Jul 07, 2023
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
监盘地图优化提交
parent
5adece57
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
7 deletions
+20
-7
MapUtils.java
...om/yeejoin/amos/boot/module/jxiop/biz/utils/MapUtils.java
+3
-3
MonitoringMapController.java
.../module/jxiop/biz/controller/MonitoringMapController.java
+2
-2
RegionNationWideDto.java
...n/amos/boot/module/jxiop/biz/dto/RegionNationWideDto.java
+2
-0
MonitoringServiceIMQTTmpl.java
...ule/jxiop/biz/service/impl/MonitoringServiceIMQTTmpl.java
+1
-1
MonitoringServiceImpl.java
.../module/jxiop/biz/service/impl/MonitoringServiceImpl.java
+11
-0
StationDataTaskImpl.java
...ot/module/jxiop/biz/service/impl/StationDataTaskImpl.java
+1
-1
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/utils/MapUtils.java
View file @
b8905690
...
...
@@ -19,9 +19,9 @@ public class MapUtils {
double
radLat
=
Math
.
toRadians
(
latitude
);
// 计算x、y、z坐标值
double
x
=
EARTH_RADIUS
*
Math
.
cos
(
radLat
)
*
Math
.
cos
(
radLng
)+
Math
.
random
()*
10
00
;
double
y
=
EARTH_RADIUS
*
Math
.
cos
(
radLat
)
*
Math
.
sin
(
radLng
)
-
Math
.
random
()*
100
0
;
double
z
=
EARTH_RADIUS
*
Math
.
sin
(
radLat
)+
Math
.
random
()*
1000
;
double
x
=
EARTH_RADIUS
*
Math
.
cos
(
radLat
)
*
Math
.
cos
(
radLng
)+
1
00
;
double
y
=
EARTH_RADIUS
*
Math
.
cos
(
radLat
)
*
Math
.
sin
(
radLng
)
+
1
0
;
double
z
=
EARTH_RADIUS
*
Math
.
sin
(
radLat
)+
2
;
arrayList
.
add
(
x
);
arrayList
.
add
(
y
);
arrayList
.
add
(
z
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/MonitoringMapController.java
View file @
b8905690
...
...
@@ -41,14 +41,14 @@ public class MonitoringMapController extends BaseController {
@Autowired
MonitoringServiceImpl
monitoringServiceImpl
;
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取监盘全国地图数据"
)
@GetMapping
(
"/nationwide"
)
public
ResponseModel
<
List
<
RegionNationWideDto
>>
getNationWideInfo
(
@RequestParam
(
value
=
"provinceName"
,
required
=
false
)
String
provinceName
)
{
return
ResponseHelper
.
buildResponse
(
monitoringServiceImpl
.
getNationWideInfo
(
provinceName
));
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取区域电量指标完成情况"
)
@GetMapping
(
"/getCompletionOfPowerIndicatorsByProvinceName"
)
public
ResponseModel
<
ResultsData
>
getCompletionOfPowerIndicatorsByProvinceName
(
@RequestParam
(
required
=
true
)
int
current
,
@RequestParam
(
required
=
true
)
int
size
,
@RequestParam
(
required
=
true
)
String
provinceName
)
{
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/RegionNationWideDto.java
View file @
b8905690
...
...
@@ -10,6 +10,8 @@ import java.util.HashMap;
public
class
RegionNationWideDto
{
@ApiModelProperty
(
value
=
"省份名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"省份名称"
)
private
String
staitionId
;
@ApiModelProperty
(
value
=
"光伏电站数量"
)
private
String
guangfu
=
"0"
;
@ApiModelProperty
(
value
=
"风机电站数量"
)
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitoringServiceIMQTTmpl.java
View file @
b8905690
...
...
@@ -94,7 +94,7 @@ public class MonitoringServiceIMQTTmpl {
Page
<
SocialContributionDto
>
socialContributionDtoPage
=
new
Page
<
SocialContributionDto
>();
logger
.
error
(
"--------------------------区域实时数据消息开始发送----------------------------------------------"
);
List
<
SocialContributionDto
>
socialContributionDtoList
=
new
ArrayList
<>();
Region
region
=
this
.
regionMapper
.
selectOne
(
new
QueryWrapper
<
Region
>().
eq
(
"level"
,
1
).
eq
(
"region_name"
,
"江
苏
省"
));
Region
region
=
this
.
regionMapper
.
selectOne
(
new
QueryWrapper
<
Region
>().
eq
(
"level"
,
1
).
eq
(
"region_name"
,
"江
西
省"
));
List
<
StationBasic
>
stationBasicList
=
stationBasicMapper
.
selectList
(
new
QueryWrapper
<
StationBasic
>().
like
(
"belong_area"
,
region
.
getRegionCode
()));
//日发电量
AtomicReference
<
Double
>
dailyPower
=
new
AtomicReference
<>(
0.0
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitoringServiceImpl.java
View file @
b8905690
...
...
@@ -21,6 +21,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
java.net.URLDecoder
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
...
...
@@ -106,15 +107,24 @@ public class MonitoringServiceImpl {
regionNationWideDtoList
.
add
(
regionNationWideDto
);
}
}
else
{
if
(
provinceName
.
contains
(
"%"
)){
try
{
provinceName
=
URLDecoder
.
decode
(
provinceName
,
"UTF-8"
);
}
catch
(
Exception
e
){
}
}
Region
region
=
this
.
regionMapper
.
selectOne
(
new
QueryWrapper
<
Region
>().
eq
(
"level"
,
1
).
eq
(
"region_name"
,
provinceName
));
List
<
StationBasic
>
list
=
stationBasicMapper
.
selectList
(
new
QueryWrapper
<
StationBasic
>().
like
(
"belong_area"
,
region
.
getRegionCode
()));
HashMap
<
String
,
Double
>
hashMap
=
new
HashMap
<>();
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
StationBasic
stationBasic
=
list
.
get
(
i
);
RegionNationWideDto
regionNationWideDto
=
new
RegionNationWideDto
();
regionNationWideDto
.
setStaitionId
(
String
.
valueOf
(
stationBasic
.
getSequenceNbr
()));
regionNationWideDto
.
setStaitionName
(
stationBasic
.
getStationName
());
regionNationWideDto
.
setStaitionType
(
stationBasic
.
getStationType
());
String
speendOrirradiate
=
""
;
regionNationWideDto
.
setStationCapacity
(
String
.
valueOf
(
getStationCaPACITYL
(
stationBasic
.
getStationNumber
())));
if
(
stationBasic
.
getStationType
().
equals
(
"FDZ"
))
{
speendOrirradiate
=
String
.
valueOf
(
commonServiceImpl
.
getAvgvalueByIndicatior
(
stationBasic
.
getFanGatewayId
(),
"30秒平均风速"
));
regionNationWideDto
.
setSpeendOrirradiate
(
speendOrirradiate
);
...
...
@@ -125,6 +135,7 @@ public class MonitoringServiceImpl {
hashMap
.
put
(
"lng"
,
Double
.
valueOf
(
stationCoordinate
.
getLongitude
()));
hashMap
.
put
(
"lat"
,
Double
.
valueOf
(
stationCoordinate
.
getLaitude
()));
regionNationWideDto
.
setPosition
(
hashMap
);
regionNationWideDtoList
.
add
(
regionNationWideDto
);
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/StationDataTaskImpl.java
View file @
b8905690
...
...
@@ -78,7 +78,7 @@ public class StationDataTaskImpl {
return
deviceDtoList
;
}
@Async
(
"jxiopAsyncExecutor"
)
//
@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"
;
//每个分机的指标数据
...
...
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