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
0f68cb81
Commit
0f68cb81
authored
Jun 12, 2023
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
场站图钉接口缺失逻辑补充
parent
e2ff0cf5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
20 deletions
+48
-20
StationBasicMapper.java
...amos/boot/module/jxiop/api/mapper/StationBasicMapper.java
+1
-1
StationBasicMapper.xml
...xiop-api/src/main/resources/mapper/StationBasicMapper.xml
+2
-2
RegionServiceImpl.java
...boot/module/jxiop/biz/service/impl/RegionServiceImpl.java
+5
-0
StationBasicServiceImpl.java
...odule/jxiop/biz/service/impl/StationBasicServiceImpl.java
+40
-17
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/mapper/StationBasicMapper.java
View file @
0f68cb81
...
@@ -42,7 +42,7 @@ public interface StationBasicMapper extends BaseMapper<StationBasic> {
...
@@ -42,7 +42,7 @@ public interface StationBasicMapper extends BaseMapper<StationBasic> {
);
);
//获取场站列表信息
//获取场站列表信息
List
<
StationRecordInfo
>
getStationList
(
@Param
(
"
areaCode"
)
String
areaCode
);
List
<
StationRecordInfo
>
getStationList
(
@Param
(
"
regionId"
)
String
regionId
);
int
deleteStationCoordinateByStationid
(
@Param
(
"sequence_nbr"
)
Long
sequence_nbr
);
int
deleteStationCoordinateByStationid
(
@Param
(
"sequence_nbr"
)
Long
sequence_nbr
);
int
getStationPersonByStationID
(
@Param
(
"sequence_nbr"
)
String
sequence_nbr
);
int
getStationPersonByStationID
(
@Param
(
"sequence_nbr"
)
String
sequence_nbr
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/resources/mapper/StationBasicMapper.xml
View file @
0f68cb81
...
@@ -128,8 +128,8 @@
...
@@ -128,8 +128,8 @@
LEFT JOIN station_coordinate ON station_basic.sequence_nbr = station_coordinate.station_id
LEFT JOIN station_coordinate ON station_basic.sequence_nbr = station_coordinate.station_id
GROUP BY
GROUP BY
( station_basic.sequence_nbr ))
( station_basic.sequence_nbr ))
<if
test=
"
areaCode != null and areaCode
!= ''"
>
<if
test=
"
regionId != null and regionId
!= ''"
>
AND station_basic.
area_code like concat('%',#{areaCode
},'%')
AND station_basic.
belong_area like concat('%',#{regionId
},'%')
</if>
</if>
</select>
</select>
<select
id=
"getStationPersonByStationID"
resultType=
"int"
>
<select
id=
"getStationPersonByStationID"
resultType=
"int"
>
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/RegionServiceImpl.java
View file @
0f68cb81
...
@@ -35,4 +35,8 @@ public class RegionServiceImpl extends BaseService<RegionDto,Region,RegionMapper
...
@@ -35,4 +35,8 @@ public class RegionServiceImpl extends BaseService<RegionDto,Region,RegionMapper
public
Region
getRegionByRegionCode
(
String
regionCode
){
public
Region
getRegionByRegionCode
(
String
regionCode
){
return
this
.
getOne
(
new
QueryWrapper
<
Region
>().
eq
(
"REGION_CODE"
,
regionCode
));
return
this
.
getOne
(
new
QueryWrapper
<
Region
>().
eq
(
"REGION_CODE"
,
regionCode
));
}
}
//根据regionName获取regionCode
public
Region
getRegionCodeByRegionName
(
String
regionName
)
{
return
this
.
getOne
(
new
QueryWrapper
<
Region
>().
like
(
"REGION_NAME"
,
regionName
).
eq
(
"LEVEL"
,
1
));
}
}
}
\ No newline at end of file
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 @
0f68cb81
...
@@ -55,6 +55,8 @@ public class StationBasicServiceImpl extends BaseService<StationBasicDto, Statio
...
@@ -55,6 +55,8 @@ public class StationBasicServiceImpl extends BaseService<StationBasicDto, Statio
IndicatorServiceImpl
indicatorServiceImpl
;
IndicatorServiceImpl
indicatorServiceImpl
;
@Autowired
@Autowired
RegionServiceImpl
regionServiceImpl
;
RegionServiceImpl
regionServiceImpl
;
@Autowired
MapRegionServiceImpl
mapRegionServiceImpl
;
private
final
String
CZLX
=
"CZLX"
;
private
final
String
CZLX
=
"CZLX"
;
/**
/**
...
@@ -272,26 +274,47 @@ public class StationBasicServiceImpl extends BaseService<StationBasicDto, Statio
...
@@ -272,26 +274,47 @@ public class StationBasicServiceImpl extends BaseService<StationBasicDto, Statio
}
}
public
List
<
StationInfoDto
>
getStationList
(
String
areaCode
,
String
type
)
{
public
List
<
StationInfoDto
>
getStationList
(
String
areaCode
,
String
type
)
{
List
<
StationInfoDto
>
stationInfoDtoList
=
new
LinkedList
<>();
List
<
StationInfoDto
>
stationInfoDtoList
=
new
LinkedList
<>();
List
<
Indicator
>
indicatorList
=
indicatorServiceImpl
.
getIndicatorByType
(
type
);
List
<
StationRecordInfo
>
list
=
new
ArrayList
<>();
List
<
StationRecordInfo
>
list
=
stationBasicMapper
.
getStationList
(
areaCode
);
List
<
Indicator
>
indicatorList
=
indicatorServiceImpl
.
getIndicatorByType
(
type
);
if
(
list
.
isEmpty
()){
if
(
areaCode
!=
null
)
{
MapRegion
mapRegion
=
mapRegionServiceImpl
.
getOne
(
new
QueryWrapper
<
MapRegion
>().
eq
(
"name"
,
areaCode
));
if
(
mapRegion
!=
null
)
{
ArrayList
<
String
>
provinces
=
mapRegion
.
getProvince
();
if
(!
provinces
.
isEmpty
())
{
for
(
int
i
=
0
;
i
<
provinces
.
size
();
i
++)
{
Region
region
=
regionServiceImpl
.
getRegionCodeByRegionName
(
provinces
.
get
(
i
));
if
(
region
!=
null
&&
region
.
getRegionCode
()
!=
null
)
{
list
.
addAll
(
stationBasicMapper
.
getStationList
(
String
.
valueOf
(
region
.
getRegionCode
())));
}
}
}
}
else
{
Region
region
=
regionServiceImpl
.
getRegionCodeByRegionName
(
areaCode
);
if
(
region
!=
null
&&
region
.
getRegionCode
()
!=
null
)
{
list
=
stationBasicMapper
.
getStationList
(
String
.
valueOf
(
region
.
getRegionCode
()));
}
}
}
if
(
list
.
isEmpty
())
{
return
stationInfoDtoList
;
return
stationInfoDtoList
;
}
else
{
}
else
{
list
.
forEach
(
stationRecordInfo
->{
list
.
forEach
(
stationRecordInfo
->
{
StationInfoDto
stationInfoDto
=
new
StationInfoDto
();
StationInfoDto
stationInfoDto
=
new
StationInfoDto
();
stationInfoDto
.
setStationName
(
stationRecordInfo
.
getStationName
());
stationInfoDto
.
setStationName
(
stationRecordInfo
.
getStationName
());
stationInfoDto
.
setType
(
stationRecordInfo
.
getStationType
());
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
.
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
());
stationInfoDto
.
setJumpPath
(
stationRecordInfo
.
getJumpPath
());
if
(
stationRecordInfo
.
getBelongArea
()!=
null
)
{
if
(
stationRecordInfo
.
getBelongArea
()
!=
null
)
{
stationInfoDto
.
setRegion
(
this
.
getProviceName
(
stationRecordInfo
.
getBelongArea
()));
stationInfoDto
.
setRegion
(
this
.
getProviceName
(
stationRecordInfo
.
getBelongArea
()));
}
}
ArrayList
<
Double
>
arrayList
=
MapUtils
.
geoTo3d
(
Double
.
valueOf
(
stationRecordInfo
.
getLongitude
()),
Double
.
valueOf
(
stationRecordInfo
.
getLaitude
()));
ArrayList
<
Double
>
arrayList
=
MapUtils
.
geoTo3d
(
Double
.
valueOf
(
stationRecordInfo
.
getLongitude
()),
Double
.
valueOf
(
stationRecordInfo
.
getLaitude
()));
stationInfoDto
.
setTitlePos
(
arrayList
);
stationInfoDto
.
setTitlePos
(
arrayList
);
stationInfoDto
.
setIndicatorData
(
indicatorList
);
stationInfoDto
.
setIndicatorData
(
indicatorList
);
stationInfoDtoList
.
add
(
stationInfoDto
);
stationInfoDtoList
.
add
(
stationInfoDto
);
}
);
});
}
}
return
stationInfoDtoList
;
return
stationInfoDtoList
;
}
}
...
@@ -300,13 +323,13 @@ public class StationBasicServiceImpl extends BaseService<StationBasicDto, Statio
...
@@ -300,13 +323,13 @@ public class StationBasicServiceImpl extends BaseService<StationBasicDto, Statio
return
stationBasicMapper
.
getStationPersonByStationID
(
id
);
return
stationBasicMapper
.
getStationPersonByStationID
(
id
);
}
}
public
String
getProviceName
(
String
belongArea
)
{
public
String
getProviceName
(
String
belongArea
)
{
String
proviceName
=
"湖北"
;
String
proviceName
=
"湖北"
;
if
(
belongArea
!=
null
)
{
if
(
belongArea
!=
null
)
{
String
[]
strings
=
belongArea
.
replace
(
"["
,
""
).
replace
(
"]"
,
""
).
split
(
","
);
String
[]
strings
=
belongArea
.
replace
(
"["
,
""
).
replace
(
"]"
,
""
).
split
(
","
);
if
(
strings
.
length
>
0
)
{
if
(
strings
.
length
>
0
)
{
Region
region
=
regionServiceImpl
.
getRegionByRegionCode
(
strings
[
0
]);
Region
region
=
regionServiceImpl
.
getRegionByRegionCode
(
strings
[
0
]);
proviceName
=
region
.
getRegionName
().
replace
(
"省"
,
""
).
replace
(
"市"
,
""
);
proviceName
=
region
.
getRegionName
().
replace
(
"省"
,
""
).
replace
(
"市"
,
""
);
}
}
}
}
return
proviceName
;
return
proviceName
;
...
...
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