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
c136c3ec
Commit
c136c3ec
authored
Jun 28, 2023
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.大屏地图接口新增风险等级字段。
2.场站无法页面新增问题修复。
parent
4525316a
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
47 additions
and
23 deletions
+47
-23
StationBasicDto.java
...ejoin/amos/boot/module/jxiop/api/dto/StationBasicDto.java
+5
-0
StationInfoDto.java
...eejoin/amos/boot/module/jxiop/api/dto/StationInfoDto.java
+3
-0
StationRecordInfo.java
...oin/amos/boot/module/jxiop/api/dto/StationRecordInfo.java
+4
-0
StationBasic.java
...ejoin/amos/boot/module/jxiop/api/entity/StationBasic.java
+1
-0
StationBasicMapper.xml
...xiop-api/src/main/resources/mapper/StationBasicMapper.xml
+1
-0
StationBasicController.java
...t/module/jxiop/biz/controller/StationBasicController.java
+1
-1
StationBasicServiceImpl.java
...odule/jxiop/biz/service/impl/StationBasicServiceImpl.java
+28
-19
MapUtils.java
...om/yeejoin/amos/boot/module/jxiop/biz/utils/MapUtils.java
+4
-3
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/dto/StationBasicDto.java
View file @
c136c3ec
...
...
@@ -74,7 +74,10 @@ public class StationBasicDto extends BaseDto {
@ApiModelProperty
(
value
=
"所属片区"
)
private
String
area
;
@ApiModelProperty
(
value
=
"所属片区code"
)
private
String
areaCode
;
@ApiModelProperty
(
value
=
"所属地区名称"
)
private
String
areaName
;
...
...
@@ -89,6 +92,8 @@ public class StationBasicDto extends BaseDto {
@ApiModelProperty
(
value
=
"平台关联场站id"
)
private
String
platformStationId
;
@ApiModelProperty
(
value
=
"坐标列表"
)
private
List
<
StationCoordinateDto
>
stationCoordinate
;
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/dto/StationInfoDto.java
View file @
c136c3ec
...
...
@@ -46,4 +46,7 @@ public class StationInfoDto {
@ApiModelProperty
(
value
=
"卡片数据"
)
private
List
<
Indicator
>
indicatorData
;
@ApiModelProperty
(
value
=
"风险等级"
)
private
String
riskLevel
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/dto/StationRecordInfo.java
View file @
c136c3ec
...
...
@@ -32,4 +32,8 @@ public class StationRecordInfo {
@ApiModelProperty
(
value
=
"所属地区"
)
private
String
belongArea
;
@ApiModelProperty
(
value
=
"风险等级"
)
private
String
riskLevel
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/entity/StationBasic.java
View file @
c136c3ec
...
...
@@ -104,6 +104,7 @@ public class StationBasic extends BaseEntity {
@TableField
(
"area_name"
)
private
String
areaName
;
@TableField
(
exist
=
false
)
private
List
<
Integer
>
belongArealist
;
/**
* 业主单位
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/resources/mapper/StationBasicMapper.xml
View file @
c136c3ec
...
...
@@ -112,6 +112,7 @@
station_basic.station_flag stationFlag,
station_basic.area_code areaCode,
station_basic.jumpPath,
station_basic.risk_level riskLevel,
station_basic.belong_area belongArea,
station_coordinate.longitude,
station_coordinate.laitude ,
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/StationBasicController.java
View file @
c136c3ec
...
...
@@ -119,7 +119,7 @@ public class StationBasicController extends BaseController {
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/getById"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个场站基础信息表"
,
notes
=
"根据sequenceNbr查询单个场站基础信息表"
)
public
ResponseModel
<
StationBasic
>
selectOne
(
@RequestParam
Long
sequenceNbr
)
{
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/StationBasicServiceImpl.java
View file @
c136c3ec
...
...
@@ -274,11 +274,17 @@ public class StationBasicServiceImpl extends BaseService<StationBasicDto, Statio
}
public
List
<
StationInfoDto
>
getStationList
(
String
areaCode
,
String
type
)
{
// 场站信息列表 地图接口返回使用
List
<
StationInfoDto
>
stationInfoDtoList
=
new
LinkedList
<>();
//场站信息列表
List
<
StationRecordInfo
>
list
=
new
ArrayList
<>();
//图例数据列表
List
<
Indicator
>
indicatorList
=
indicatorServiceImpl
.
getIndicatorByType
(
type
);
if
(
areaCode
!=
null
)
{
// 如果传递areaCode 或者areaCode值不为空
if
(
areaCode
!=
null
&&!
areaCode
.
equals
(
""
))
{
//查询区域信息
MapRegion
mapRegion
=
mapRegionServiceImpl
.
getOne
(
new
QueryWrapper
<
MapRegion
>().
eq
(
"name"
,
areaCode
));
//如果区域信息不为空则继续查询省份
if
(
mapRegion
!=
null
)
{
ArrayList
<
String
>
provinces
=
mapRegion
.
getProvince
();
if
(!
provinces
.
isEmpty
())
{
...
...
@@ -290,32 +296,35 @@ public class StationBasicServiceImpl extends BaseService<StationBasicDto, Statio
}
}
}
else
{
//如果查不到区域 则查询省份信息
Region
region
=
regionServiceImpl
.
getRegionCodeByRegionName
(
areaCode
);
if
(
region
!=
null
&&
region
.
getRegionCode
()
!=
null
)
{
list
=
stationBasicMapper
.
getStationList
(
String
.
valueOf
(
region
.
getRegionCode
()));
}
}
}
//如果列表为空,则传值有问题返回所有
if
(
list
.
isEmpty
())
{
return
stationInfoDtoList
;
}
else
{
list
.
forEach
(
stationRecordInfo
->
{
StationInfoDto
stationInfoDto
=
new
StationInfoDto
();
stationInfoDto
.
setStationName
(
stationRecordInfo
.
getStationName
());
stationInfoDto
.
setType
(
stationRecordInfo
.
getStationType
());
//url 暂时写死
stationInfoDto
.
setUrl
(
"https://tse4-mm.cn.bing.net/th/id/OIP-C.ySnewoc464X4Aecg9jl03AAAAA?w=162&h=180&c=7&r=0&o=5&pid=1.7"
);
stationInfoDto
.
setJumpPath
(
stationRecordInfo
.
getJumpPath
());
if
(
stationRecordInfo
.
getBelongArea
()
!=
null
)
{
stationInfoDto
.
setRegion
(
this
.
getProviceName
(
stationRecordInfo
.
getBelongArea
()));
}
ArrayList
<
Double
>
arrayList
=
MapUtils
.
geoTo3d
(
Double
.
valueOf
(
stationRecordInfo
.
getLongitude
()),
Double
.
valueOf
(
stationRecordInfo
.
getLaitude
()));
stationInfoDto
.
setTitlePos
(
arrayList
);
stationInfoDto
.
setIndicatorData
(
indicatorList
);
stationInfoDtoList
.
add
(
stationInfoDto
);
});
list
.
addAll
(
stationBasicMapper
.
getStationList
(
null
));
}
//便利返回给地图的数据并对数据进行处理
list
.
forEach
(
stationRecordInfo
->
{
StationInfoDto
stationInfoDto
=
new
StationInfoDto
();
stationInfoDto
.
setStationName
(
stationRecordInfo
.
getStationName
());
stationInfoDto
.
setType
(
stationRecordInfo
.
getStationType
());
//url 暂时写死
stationInfoDto
.
setUrl
(
"https://tse4-mm.cn.bing.net/th/id/OIP-C.ySnewoc464X4Aecg9jl03AAAAA?w=162&h=180&c=7&r=0&o=5&pid=1.7"
);
stationInfoDto
.
setJumpPath
(
stationRecordInfo
.
getJumpPath
());
if
(
stationRecordInfo
.
getBelongArea
()
!=
null
)
{
stationInfoDto
.
setRegion
(
this
.
getProviceName
(
stationRecordInfo
.
getBelongArea
()));
}
ArrayList
<
Double
>
arrayList
=
MapUtils
.
geoTo3d
(
Double
.
valueOf
(
stationRecordInfo
.
getLongitude
()),
Double
.
valueOf
(
stationRecordInfo
.
getLaitude
()));
stationInfoDto
.
setTitlePos
(
arrayList
);
stationInfoDto
.
setIndicatorData
(
indicatorList
);
stationInfoDto
.
setRiskLevel
(
stationRecordInfo
.
getRiskLevel
());
stationInfoDtoList
.
add
(
stationInfoDto
);
});
return
stationInfoDtoList
;
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/utils/MapUtils.java
View file @
c136c3ec
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
utils
;
import
java.util.ArrayList
;
import
java.util.Random
;
public
class
MapUtils
{
private
static
final
double
EARTH_RADIUS
=
63.781370
;
// 地球半径
...
...
@@ -18,9 +19,9 @@ public class MapUtils {
double
radLat
=
Math
.
toRadians
(
latitude
);
// 计算x、y、z坐标值
double
x
=
EARTH_RADIUS
*
Math
.
cos
(
radLat
)
*
Math
.
cos
(
radLng
)+
10
;
double
y
=
EARTH_RADIUS
*
Math
.
cos
(
radLat
)
*
Math
.
sin
(
radLng
)-
3
;
double
z
=
EARTH_RADIUS
*
Math
.
sin
(
radLat
);
double
x
=
EARTH_RADIUS
*
Math
.
cos
(
radLat
)
*
Math
.
cos
(
radLng
)+
Math
.
random
()*
1000
;
double
y
=
EARTH_RADIUS
*
Math
.
cos
(
radLat
)
*
Math
.
sin
(
radLng
)-
Math
.
random
()*
1000
;
double
z
=
EARTH_RADIUS
*
Math
.
sin
(
radLat
)
+
Math
.
random
()*
1000
;
arrayList
.
add
(
x
);
arrayList
.
add
(
y
);
arrayList
.
add
(
z
);
...
...
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