Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
map-parent
Overview
Overview
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
常超
map-parent
Commits
5b006114
Commit
5b006114
authored
Mar 01, 2022
by
YANGYANG
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
热力图检索整体提交
parent
c11ed492
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
89 additions
and
3 deletions
+89
-3
common/common_utils/src/main/java/com/founder/commonutils/publicEntity/JsParams.java
+16
-0
service/publicapi/src/main/java/com/founder/publicapi/controller/JsController.java
+18
-3
service/publicapi/src/main/java/com/founder/publicapi/mapper/GjMapper.java
+4
-0
service/publicapi/src/main/java/com/founder/publicapi/mapper/xml/GjMapper.xml
+51
-0
No files found.
common/common_utils/src/main/java/com/founder/commonutils/publicEntity/JsParams.java
View file @
5b006114
...
...
@@ -40,4 +40,20 @@ public class JsParams {
@ApiModelProperty
(
"类型/区分机场、火车站"
)
private
String
type
;
private
int
begin
;
private
int
end
;
private
int
rownum
=
10
;
public
void
setPagePara
(
Integer
rows
){
if
(
rows
!=
null
){
this
.
begin
=
(
this
.
page
-
1
)
*
rows
;
this
.
end
=
this
.
page
*
rows
;
}
else
{
this
.
begin
=
(
this
.
page
-
1
)
*
rownum
;
this
.
end
=
this
.
page
*
rownum
;
}
}
}
service/publicapi/src/main/java/com/founder/publicapi/controller/JsController.java
View file @
5b006114
...
...
@@ -80,8 +80,13 @@ public class JsController {
@PostMapping
(
value
=
"/trainStation"
)
public
MapRestResult
trainStation
(
JsParams
jsParams
)
throws
Exception
{
jsParams
.
setType
(
"1"
);
jsParams
.
setPagePara
(
jsParams
.
getPageSize
());
List
<
JsResult
>
list
=
gjMapper
.
getHczOrJc
(
jsParams
);
return
MapRestResult
.
build
(
200
,
"成功获取火车站信息"
,
list
.
size
(),
list
);
Integer
total
=
0
;
if
(
list
.
size
()>
0
){
total
=
gjMapper
.
getHczOrJcCount
(
jsParams
);
}
return
MapRestResult
.
build
(
200
,
"成功获取火车站信息"
,
total
,
list
);
}
@OperLog
(
message
=
"客运站"
,
operation
=
OperationType
.
QUERY
)
...
...
@@ -97,16 +102,26 @@ public class JsController {
@PostMapping
(
value
=
"/airport"
)
public
MapRestResult
airport
(
JsParams
jsParams
)
throws
Exception
{
jsParams
.
setType
(
"2"
);
jsParams
.
setPagePara
(
jsParams
.
getPageSize
());
List
<
JsResult
>
list
=
gjMapper
.
getHczOrJc
(
jsParams
);
return
MapRestResult
.
build
(
200
,
"成功获取机场信息"
,
list
.
size
(),
list
);
Integer
total
=
0
;
if
(
list
.
size
()>
0
){
total
=
gjMapper
.
getHczOrJcCount
(
jsParams
);
}
return
MapRestResult
.
build
(
200
,
"成功获取机场信息"
,
total
,
list
);
}
@OperLog
(
message
=
"卡口"
,
operation
=
OperationType
.
QUERY
)
@ApiOperation
(
value
=
"卡口"
)
@PostMapping
(
value
=
"/bayonet"
)
public
MapRestResult
bayonet
(
JsParams
jsParams
)
throws
Exception
{
jsParams
.
setPagePara
(
jsParams
.
getPageSize
());
List
<
JsResult
>
list
=
gjMapper
.
getKkInfoByQsJwd
(
jsParams
);
return
MapRestResult
.
build
(
200
,
"成功获取卡口信息"
,
list
.
size
(),
list
);
Integer
total
=
0
;
if
(
list
.
size
()>
0
){
total
=
gjMapper
.
getKkInfoByQsJwdCount
(
jsParams
);
}
return
MapRestResult
.
build
(
200
,
"成功获取卡口信息"
,
total
,
list
);
}
@OperLog
(
message
=
"电子围栏"
,
operation
=
OperationType
.
QUERY
)
...
...
service/publicapi/src/main/java/com/founder/publicapi/mapper/GjMapper.java
View file @
5b006114
...
...
@@ -26,4 +26,8 @@ public interface GjMapper {
List
<
JsResult
>
getHczOrJc
(
JsParams
jsParams
);
List
<
JsResult
>
getKkInfoByQsJwd
(
JsParams
jsParams
);
Integer
getHczOrJcCount
(
JsParams
jsParams
);
Integer
getKkInfoByQsJwdCount
(
JsParams
jsParams
);
}
service/publicapi/src/main/java/com/founder/publicapi/mapper/xml/GjMapper.xml
View file @
5b006114
...
...
@@ -53,6 +53,9 @@
</select>
<!-- 根据起始经纬度获取火车站或者机场-->
<select
id=
"getHczOrJc"
parameterType=
"com.founder.commonutils.publicEntity.JsParams"
resultType=
"com.founder.commonutils.publicEntity.JsResult"
>
select t2.* from(
select t1.*,rownum as rn from
(
SELECT
BSM as name,
BSMC as address,
...
...
@@ -70,9 +73,20 @@
<if
test=
"type!=null and type!=''"
>
AND type = #{type,jdbcType=VARCHAR}
</if>
) t1
<where>
rownum
<![CDATA[ <= ]]>
#{ end , jdbcType=VARCHAR }
</where>
)t2
<where>
rn
<![CDATA[ > ]]>
#{ begin, jdbcType=VARCHAR }
</where>
</select>
<!--根据起始经纬度获取卡口点位数据-->
<select
id=
"getKkInfoByQsJwd"
parameterType=
"com.founder.commonutils.publicEntity.JsParams"
resultType=
"com.founder.commonutils.publicEntity.JsResult"
>
select t2.* from(
select t1.*,rownum as rn from
(
select
SBMC as name,
SBBH as bh,
...
...
@@ -88,6 +102,43 @@
AND JD
<![CDATA[>=]]>
#{startLng,jdbcType=VARCHAR} AND JD
<![CDATA[<=]]>
#{endLng,jdbcType=VARCHAR}
AND WD
<![CDATA[>=]]>
#{startLat,jdbcType=VARCHAR} AND WD
<![CDATA[<=]]>
#{endLat,jdbcType=VARCHAR}
</if>
) t1
<where>
rownum
<![CDATA[ <= ]]>
#{ end , jdbcType=VARCHAR }
</where>
)t2
<where>
rn
<![CDATA[ > ]]>
#{ begin, jdbcType=VARCHAR }
</where>
</select>
<!-- 根据起始经纬度获取火车站或者机场-->
<select
id=
"getHczOrJcCount"
parameterType=
"com.founder.commonutils.publicEntity.JsParams"
resultType=
"java.lang.Integer"
>
SELECT
count(*)
FROM
SYS_DICTITEM_JT
WHERE
SCBZ = '0'
<if
test=
"startLng!=null and startLng!='' and endLng!=null and endLng!='' and startLat!=null and startLat!='' and endLat!=null and endLat!=''"
>
AND JD
<![CDATA[>=]]>
#{startLng,jdbcType=VARCHAR} AND JD
<![CDATA[<=]]>
#{endLng,jdbcType=VARCHAR}
AND WD
<![CDATA[>=]]>
#{startLat,jdbcType=VARCHAR} AND WD
<![CDATA[<=]]>
#{endLat,jdbcType=VARCHAR}
</if>
<if
test=
"type!=null and type!=''"
>
AND type = #{type,jdbcType=VARCHAR}
</if>
</select>
<!--根据起始经纬度获取卡口点位数据-->
<select
id=
"getKkInfoByQsJwdCount"
parameterType=
"com.founder.commonutils.publicEntity.JsParams"
resultType=
"java.lang.Integer"
>
select
count(*)
from
tb_m_jj_kkdwxx
where
1=1
<if
test=
"startLng!=null and startLng!='' and endLng!=null and endLng!='' and startLat!=null and startLat!='' and endLat!=null and endLat!=''"
>
AND JD
<![CDATA[>=]]>
#{startLng,jdbcType=VARCHAR} AND JD
<![CDATA[<=]]>
#{endLng,jdbcType=VARCHAR}
AND WD
<![CDATA[>=]]>
#{startLat,jdbcType=VARCHAR} AND WD
<![CDATA[<=]]>
#{endLat,jdbcType=VARCHAR}
</if>
</select>
</mapper>
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