Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gk
Project
Project
Details
Activity
Releases
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
micro_app
gk
Commits
b7d53c7c
Commit
b7d53c7c
authored
Apr 10, 2023
by
chenlin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加路线删除功能
parent
ee3c964e
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
61 additions
and
13 deletions
+61
-13
RoadMapper.java
...com/dlbridge/jadp/plugins/cmpt/dao/mapper/RoadMapper.java
+1
-1
RoadMapper.xml
.../com/dlbridge/jadp/plugins/cmpt/dao/mapper/RoadMapper.xml
+13
-9
TemplateMapper.xml
.../dlbridge/jadp/plugins/cmpt/dao/mapper/TemplateMapper.xml
+1
-1
RoadService.java
...a/com/dlbridge/jadp/plugins/cmpt/service/RoadService.java
+4
-0
RoadController.java
...va/com/dlbridge/jadp/plugins/cmpt/web/RoadController.java
+7
-0
road.jsp
src/main/webapp/WEB-INF/views/cmpt/road.jsp
+6
-1
road-new.css
src/main/webapp/static/cmpt/road-new.css
+5
-1
road-new.js
src/main/webapp/static/js/road-new.js
+24
-0
No files found.
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/RoadMapper.java
View file @
b7d53c7c
...
@@ -29,7 +29,7 @@ public interface RoadMapper {
...
@@ -29,7 +29,7 @@ public interface RoadMapper {
int
updateRoadGps
(
RoadGpsPoint
point
);
int
updateRoadGps
(
RoadGpsPoint
point
);
void
deleteGps
(
Integer
roadId
,
Integer
pathId
);
int
deleteGpsPath
(
int
pathId
);
void
countDownload
(
Integer
roadId
);
void
countDownload
(
Integer
roadId
);
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/RoadMapper.xml
View file @
b7d53c7c
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
, a.create_time createTime
, a.create_time createTime
from gk_roads_gps a
from gk_roads_gps a
WHERE 1=1
WHERE 1=1
AND a.is_delete = 0
AND a.cmpt_id = #{cmptId}
AND a.cmpt_id = #{cmptId}
AND a.road_id = #{roadId}
AND a.road_id = #{roadId}
</select>
</select>
...
@@ -50,6 +51,7 @@
...
@@ -50,6 +51,7 @@
LEFT JOIN gk_roads_gps c ON c.cmpt_id = a.cmpt_id AND a.road_id=c.road_id
LEFT JOIN gk_roads_gps c ON c.cmpt_id = a.cmpt_id AND a.road_id=c.road_id
WHERE a.cmpt_id = #{cmptId}
WHERE a.cmpt_id = #{cmptId}
AND a.is_delete = 0
AND a.is_delete = 0
AND c.is_delete = 0
</select>
</select>
<update
id=
"delete"
>
<update
id=
"delete"
>
...
@@ -97,10 +99,11 @@
...
@@ -97,10 +99,11 @@
</update>
</update>
<select
id=
"getGps"
resultType=
"com.dlbridge.jadp.plugins.cmpt.bean.RoadGpsPoint"
>
<select
id=
"getGps"
resultType=
"com.dlbridge.jadp.plugins.cmpt.bean.RoadGpsPoint"
>
select id,cmpt_id cmptId,road_id roadId,points,path_name pathName,file_name fileName,file_url fileUrl,file_size fileSize
SELECT id,cmpt_id cmptId,road_id roadId,points,path_name pathName,file_name fileName,file_url fileUrl,file_size fileSize
from gk_roads_gps
FROM gk_roads_gps
where road_id = #{roadId}
WHERE road_id = #{roadId}
and id = #{pathId}
AND id = #{pathId}
AND is_delete = 0
limit 1
limit 1
</select>
</select>
...
@@ -108,13 +111,14 @@
...
@@ -108,13 +111,14 @@
select id,cmpt_id cmptId,road_id roadId,points,path_name pathName,file_name fileName,file_url fileUrl,file_size fileSize
select id,cmpt_id cmptId,road_id roadId,points,path_name pathName,file_name fileName,file_url fileUrl,file_size fileSize
from gk_roads_gps
from gk_roads_gps
where road_id = #{roadId}
where road_id = #{roadId}
AND is_delete = 0
</select>
</select>
<
delete
id=
"deleteGps
"
>
<
update
id=
"deleteGpsPath
"
>
delete from
gk_roads_gps
UPDATE
gk_roads_gps
where road_id = #{roadId}
SET is_delete = 1
and
id = #{pathId}
WHERE
id = #{pathId}
</
dele
te>
</
upda
te>
<update
id=
"countDownload"
>
<update
id=
"countDownload"
>
update gk_road set times = times+1
update gk_road set times = times+1
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/TemplateMapper.xml
View file @
b7d53c7c
...
@@ -701,7 +701,7 @@
...
@@ -701,7 +701,7 @@
select null, #{new_gk_cmptId},
select null, #{new_gk_cmptId},
#{new_gk_itemId}, points, now()
#{new_gk_itemId}, points, now()
from gksite.gk_roads_gps
from gksite.gk_roads_gps
where cmpt_id = #{cmpt_id} and road_id = #{item_id}
where cmpt_id = #{cmpt_id} and road_id = #{item_id}
AND is_delete = 0
</insert>
</insert>
<!--复制 gksite 下的表 gk_roads_gps_checkpoint_map -->
<!--复制 gksite 下的表 gk_roads_gps_checkpoint_map -->
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/service/RoadService.java
View file @
b7d53c7c
...
@@ -43,6 +43,10 @@ public class RoadService {
...
@@ -43,6 +43,10 @@ public class RoadService {
return
roadMapper
.
delete
(
id
);
return
roadMapper
.
delete
(
id
);
}
}
public
int
deleteGpsPath
(
int
pathId
)
{
return
roadMapper
.
deleteGpsPath
(
pathId
);
}
/**
/**
* 根据赛事、组别 获取路线列表
* 根据赛事、组别 获取路线列表
* @param cmptId 赛事ID
* @param cmptId 赛事ID
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/web/RoadController.java
View file @
b7d53c7c
...
@@ -150,6 +150,13 @@ public class RoadController {
...
@@ -150,6 +150,13 @@ public class RoadController {
return
Result
.
success
();
return
Result
.
success
();
}
}
@RequestMapping
(
"delGpsPath"
)
@ResponseBody
public
Result
deleteGpsPath
(
int
pathId
)
{
int
count
=
roadService
.
deleteGpsPath
(
pathId
);
return
Result
.
success
();
}
/**
/**
* 上传轨迹的接口,针对不同的项目,上传不同的gpx,kml轨迹文件
* 上传轨迹的接口,针对不同的项目,上传不同的gpx,kml轨迹文件
* @param url
* @param url
...
...
src/main/webapp/WEB-INF/views/cmpt/road.jsp
View file @
b7d53c7c
...
@@ -83,7 +83,7 @@
...
@@ -83,7 +83,7 @@
</div>
</div>
<div
class=
"divhorizontal divhorizontal-item3 edit-new"
>
<div
class=
"divhorizontal divhorizontal-item3 edit-new"
>
<span
class=
"edit-road"
></span>
<span
class=
"edit-road"
></span>
<span
class=
"edit-text "
name=
"name"
>
路线编辑
</span>
<span
class=
"edit-text "
name=
"name"
>
编辑路线
</span>
</div>
</div>
<c:if
test=
"
${
item
.
isMultiRoute
==
'1'
}
"
>
<c:if
test=
"
${
item
.
isMultiRoute
==
'1'
}
"
>
<div
class=
"divhorizontal divhorizontal-item3 add-new"
>
<div
class=
"divhorizontal divhorizontal-item3 add-new"
>
...
@@ -91,6 +91,10 @@
...
@@ -91,6 +91,10 @@
<span
class=
"edit-text "
name=
"name"
>
新增路线
</span>
<span
class=
"edit-text "
name=
"name"
>
新增路线
</span>
</div>
</div>
</c:if>
</c:if>
<div
class=
"divhorizontal divhorizontal-item3 del-new"
>
<span
class=
"edit-road"
></span>
<span
class=
"edit-text "
name=
"name"
>
删除路线
</span>
</div>
</div>
</div>
</c:forEach>
</c:forEach>
</c:when>
</c:when>
...
@@ -195,5 +199,6 @@
...
@@ -195,5 +199,6 @@
</div>
</div>
</div>
</div>
</body>
</body>
<script
src=
"${ctxStatic}/js/qikoo.js"
></script>
<script
type=
"text/javascript"
src=
"${ctxStatic}/js/road-new.js"
></script>
<script
type=
"text/javascript"
src=
"${ctxStatic}/js/road-new.js"
></script>
</html>
</html>
src/main/webapp/static/cmpt/road-new.css
View file @
b7d53c7c
...
@@ -49,7 +49,7 @@
...
@@ -49,7 +49,7 @@
}
}
.divhorizontal-item3
{
.divhorizontal-item3
{
width
:
1
4
0px
;
width
:
1
1
0px
;
text-align
:
center
;
text-align
:
center
;
padding-right
:
0px
!important
;
padding-right
:
0px
!important
;
background-color
:
#F7F7F7
!important
;
background-color
:
#F7F7F7
!important
;
...
@@ -171,6 +171,10 @@ nav.side-navbar .sidebar-header
...
@@ -171,6 +171,10 @@ nav.side-navbar .sidebar-header
.edit-new
{
.edit-new
{
cursor
:
pointer
;
cursor
:
pointer
;
}
}
.del-new
{
margin-left
:
5px
;
cursor
:
pointer
;
}
.add-new
{
.add-new
{
cursor
:
pointer
;
cursor
:
pointer
;
margin-left
:
5px
;
margin-left
:
5px
;
...
...
src/main/webapp/static/js/road-new.js
View file @
b7d53c7c
...
@@ -152,6 +152,30 @@ $(document).ready(function () {
...
@@ -152,6 +152,30 @@ $(document).ready(function () {
$
(
'.force'
).
hide
();
$
(
'.force'
).
hide
();
});
});
// 删除路线
$
(
'body'
).
on
(
'click'
,
'.del-new'
,
function
()
{
var
parent
=
$
(
this
).
parent
();
var
pathId
=
parent
.
attr
(
'data-path-id'
);
qikoo
.
dialog
.
confirm
(
'确认要删除?'
,
function
()
{
$
.
ajax
({
url
:
'/gk/road/delGpsPath'
,
data
:
{
pathId
:
pathId
},
type
:
'post'
,
success
:
function
(
data
)
{
if
(
data
.
status
)
{
parent
.
remove
();
layer
.
msg
(
'删除成功!'
);
}
else
{
layer
.
msg
(
'操作失败'
,
{
icon
:
5
,
time
:
1500
});
}
},
error
:
function
()
{
layer
.
msg
(
'操作失败'
,
{
icon
:
5
,
time
:
1500
});
}
});
});
});
$
(
'body'
).
on
(
'click'
,
'.map-data .edit'
,
function
()
{
$
(
'body'
).
on
(
'click'
,
'.map-data .edit'
,
function
()
{
$
(
this
).
hide
();
$
(
this
).
hide
();
$
(
'.save'
).
fadeIn
();
$
(
'.save'
).
fadeIn
();
...
...
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