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
e12abcb2
Commit
e12abcb2
authored
Oct 29, 2025
by
daniel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(road): 新增轨迹排序功能
parent
c2cf9f8d
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
549 additions
and
257 deletions
+549
-257
Path.java
src/main/java/com/dlbridge/jadp/plugins/cmpt/bean/Path.java
+3
-0
Road.java
src/main/java/com/dlbridge/jadp/plugins/cmpt/bean/Road.java
+6
-0
RoadGpsPoint.java
...ava/com/dlbridge/jadp/plugins/cmpt/bean/RoadGpsPoint.java
+3
-0
BusMapper.java
.../com/dlbridge/jadp/plugins/cmpt/dao/mapper/BusMapper.java
+8
-0
BusMapper.xml
...a/com/dlbridge/jadp/plugins/cmpt/dao/mapper/BusMapper.xml
+15
-0
RoadMapper.java
...com/dlbridge/jadp/plugins/cmpt/dao/mapper/RoadMapper.java
+8
-0
RoadMapper.xml
.../com/dlbridge/jadp/plugins/cmpt/dao/mapper/RoadMapper.xml
+23
-15
BusTicketParam.java
...dge/jadp/plugins/cmpt/dao/model/param/BusTicketParam.java
+14
-0
BusVerifyStatistics.java
...e/jadp/plugins/cmpt/dao/model/vo/BusVerifyStatistics.java
+3
-1
BusService.java
...va/com/dlbridge/jadp/plugins/cmpt/service/BusService.java
+58
-7
RoadService.java
...a/com/dlbridge/jadp/plugins/cmpt/service/RoadService.java
+46
-35
BusController.java
...ava/com/dlbridge/jadp/plugins/cmpt/web/BusController.java
+14
-0
RoadController.java
...va/com/dlbridge/jadp/plugins/cmpt/web/RoadController.java
+8
-2
road.jsp
src/main/webapp/WEB-INF/views/cmpt/road.jsp
+271
-197
road-new.js
src/main/webapp/static/js/road-new.js
+69
-0
No files found.
src/main/java/com/dlbridge/jadp/plugins/cmpt/bean/Path.java
View file @
e12abcb2
...
@@ -40,6 +40,9 @@ public class Path {
...
@@ -40,6 +40,9 @@ public class Path {
private
String
createTime
;
private
String
createTime
;
@ApiModelProperty
(
value
=
"轨迹排序"
,
notes
=
"轨迹排序"
)
private
Integer
sort
;
@Override
@Override
public
boolean
equals
(
Object
o
)
{
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
{
if
(
this
==
o
)
{
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/bean/Road.java
View file @
e12abcb2
...
@@ -46,6 +46,12 @@ public class Road {
...
@@ -46,6 +46,12 @@ public class Road {
private
String
createTime
;
private
String
createTime
;
@ApiModelProperty
(
value
=
"轨迹排序"
,
notes
=
"轨迹排序"
)
private
Integer
sort
;
@Override
@Override
public
boolean
equals
(
Object
o
)
{
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
{
if
(
this
==
o
)
{
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/bean/RoadGpsPoint.java
View file @
e12abcb2
...
@@ -53,4 +53,7 @@ public class RoadGpsPoint {
...
@@ -53,4 +53,7 @@ public class RoadGpsPoint {
private
double
fileSize
;
private
double
fileSize
;
@ApiModelProperty
(
value
=
"排序"
,
notes
=
"排序"
)
private
Integer
sort
;
}
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/BusMapper.java
View file @
e12abcb2
package
com
.
dlbridge
.
jadp
.
plugins
.
cmpt
.
dao
.
mapper
;
package
com
.
dlbridge
.
jadp
.
plugins
.
cmpt
.
dao
.
mapper
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.param.BusTicketParam
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.param.BusVerifyRecordParam
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.param.BusVerifyRecordParam
;
import
com.dlbridge.jadp.plugins.cmpt.dto.*
;
import
com.dlbridge.jadp.plugins.cmpt.dto.*
;
import
feign.Param
;
import
feign.Param
;
...
@@ -70,5 +71,12 @@ public interface BusMapper {
...
@@ -70,5 +71,12 @@ public interface BusMapper {
*/
*/
List
<
BusVerificationRecord
>
selectVerifyRecordByPage
(
BusVerifyRecordParam
queryDTO
);
List
<
BusVerificationRecord
>
selectVerifyRecordByPage
(
BusVerifyRecordParam
queryDTO
);
/**
* 查询车票记录列表
* @param queryDTO 查询参数
* @return 查询车票记录列表
*/
List
<
BusTicketVerification
>
queryBusTicketByPage
(
BusTicketParam
queryDTO
);
}
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/BusMapper.xml
View file @
e12abcb2
...
@@ -232,4 +232,19 @@
...
@@ -232,4 +232,19 @@
AND bvr.ticket_no = #{ticketNo}
AND bvr.ticket_no = #{ticketNo}
</if>
</if>
</select>
</select>
<select
id=
"queryBusTicketByPage"
resultType=
"com.dlbridge.jadp.plugins.cmpt.dto.BusTicketVerification"
>
SELECT
*
FROM gksite.bus_ticket_verification
WHERE cmpt_id = #{cmptId}
<if
test=
"keyword != null and keyword != '' "
>
AND (ticket_no LIKE #{keyword} OR passenger_name LIKE #{keyword} OR passenger_phone LIKE #{keyword})
</if>
<if
test=
"ticketStatus != null and ticketStatus != '' "
>
AND ticket_status = #{ticketStatus}
</if>
<if
test=
"scheduleId != null and scheduleId != ''"
>
AND schedule_id = #{scheduleId}
</if>
</select>
</mapper>
</mapper>
\ No newline at end of file
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/RoadMapper.java
View file @
e12abcb2
...
@@ -39,4 +39,12 @@ public interface RoadMapper {
...
@@ -39,4 +39,12 @@ public interface RoadMapper {
* @return 配置信息
* @return 配置信息
*/
*/
Map
<
String
,
String
>
getMultiRouteInfo
(
Integer
cmptId
);
Map
<
String
,
String
>
getMultiRouteInfo
(
Integer
cmptId
);
/**
* 更新路线排序
* @param pathId 路线ID
* @param sort 排序
* @return 更新数量
*/
int
updateGpsPathSort
(
int
pathId
,
int
sort
);
}
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/RoadMapper.xml
View file @
e12abcb2
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
, a.id pathId
, a.id pathId
, a.path_name pathName
, a.path_name pathName
, a.create_time createTime
, a.create_time createTime
, a.sort
from gk_roads_gps a
from gk_roads_gps a
WHERE 1=1
WHERE 1=1
AND a.is_delete = 0
AND a.is_delete = 0
...
@@ -46,11 +47,13 @@
...
@@ -46,11 +47,13 @@
, case when b.item_type = 2 then '团队赛' when b.item_type = 1 then '个人赛' else '其他' end roadTypeName
, case when b.item_type = 2 then '团队赛' when b.item_type = 1 then '个人赛' else '其他' end roadTypeName
, c.id pathId
, c.id pathId
, c.path_name pathName
, c.path_name pathName
, c.sort
from gk_road a
from gk_road a
LEFT JOIN geerunner.cmpt_item b ON a.cmpt_id = b.cmpt_id AND a.road_id = b.item_id
LEFT JOIN geerunner.cmpt_item b ON a.cmpt_id = b.cmpt_id AND a.road_id = b.item_id
LEFT JOIN gk_roads_gps c ON c.cmpt_id = a.cmpt_id AND a.road_id
=
c.road_id AND c.is_delete = 0
LEFT JOIN gk_roads_gps c ON c.cmpt_id = a.cmpt_id AND a.road_id
=
c.road_id AND c.is_delete = 0
WHERE a.cmpt_id = #{cmptId}
WHERE a.cmpt_id = #{cmptId}
AND a.is_delete = 0
AND a.is_delete = 0
ORDER BY c.sort ASC
</select>
</select>
<update
id=
"delete"
>
<update
id=
"delete"
>
...
@@ -82,8 +85,8 @@
...
@@ -82,8 +85,8 @@
</insert>
</insert>
<insert
id=
"saveGps"
useGeneratedKeys=
"true"
keyColumn=
"id"
keyProperty=
"id"
>
<insert
id=
"saveGps"
useGeneratedKeys=
"true"
keyColumn=
"id"
keyProperty=
"id"
>
insert into gk_roads_gps(cmpt_id ,road_id,points,path_name,file_name,file_url,file_size,create_time)
insert into gk_roads_gps(cmpt_id ,road_id,points,path_name,file_name,file_url,file_size,create_time
,sort
)
values (#{cmptId},#{roadId},#{points},#{pathName},#{fileName},#{fileUrl},#{fileSize},now())
values (#{cmptId},#{roadId},#{points},#{pathName},#{fileName},#{fileUrl},#{fileSize},now()
,#{sort}
)
</insert>
</insert>
<update
id=
"updateRoadGps"
parameterType=
"com.dlbridge.jadp.plugins.cmpt.bean.RoadGpsPoint"
>
<update
id=
"updateRoadGps"
parameterType=
"com.dlbridge.jadp.plugins.cmpt.bean.RoadGpsPoint"
>
...
@@ -94,11 +97,12 @@
...
@@ -94,11 +97,12 @@
, file_url=#{fileUrl}
, file_url=#{fileUrl}
, file_size=#{fileSize}
, file_size=#{fileSize}
, create_time=now()
, create_time=now()
, sort = #{sort}
where id = #{pathId}
where id = #{pathId}
</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
,sort
FROM gk_roads_gps
FROM gk_roads_gps
WHERE road_id = #{roadId}
WHERE road_id = #{roadId}
AND id = #{pathId}
AND id = #{pathId}
...
@@ -107,7 +111,7 @@
...
@@ -107,7 +111,7 @@
</select>
</select>
<select
id=
"getRoadGpsList"
resultType=
"com.dlbridge.jadp.plugins.cmpt.bean.RoadGpsPoint"
>
<select
id=
"getRoadGpsList"
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
,sort
from gk_roads_gps
from gk_roads_gps
where road_id = #{roadId}
where road_id = #{roadId}
AND is_delete = 0
AND is_delete = 0
...
@@ -123,7 +127,11 @@
...
@@ -123,7 +127,11 @@
update gk_road set times = times+1
update gk_road set times = times+1
where road_id = #{roadId}
where road_id = #{roadId}
</update>
</update>
<update
id=
"updateGpsPathSort"
>
update gk_roads_gps
set sort = #{sort}
where id = #{pathId}
</update>
<select
id=
"getMultiRouteInfo"
resultType=
"java.util.Map"
>
<select
id=
"getMultiRouteInfo"
resultType=
"java.util.Map"
>
SELECT b.cmptName, concat(b.createUserId,'') createUserId, IFNULL(c.partner_id,'') partnerId
SELECT b.cmptName, concat(b.createUserId,'') createUserId, IFNULL(c.partner_id,'') partnerId
,IFNULL(c.is_multi_route, '1') isMultiRoute
,IFNULL(c.is_multi_route, '1') isMultiRoute
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/model/param/BusTicketParam.java
0 → 100644
View file @
e12abcb2
package
com
.
dlbridge
.
jadp
.
plugins
.
cmpt
.
dao
.
model
.
param
;
import
com.dlbridge.jadp.plugins.cmpt.dto.PageDTO
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
@EqualsAndHashCode
(
callSuper
=
false
)
@Data
public
class
BusTicketParam
extends
PageDTO
{
private
Integer
cmptId
;
private
Integer
ticketStatus
;
private
String
keyword
;
private
Integer
scheduleId
;
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/model/vo/BusVerifyStatistics.java
View file @
e12abcb2
...
@@ -8,11 +8,13 @@ import lombok.Data;
...
@@ -8,11 +8,13 @@ import lombok.Data;
@Data
@Data
public
class
BusVerifyStatistics
{
public
class
BusVerifyStatistics
{
private
String
scheduleName
;
private
String
scheduleName
;
private
Integer
scheduleId
;
private
Integer
verifyCount
;
private
Integer
verifyCount
;
public
BusVerifyStatistics
()
{}
public
BusVerifyStatistics
()
{}
public
BusVerifyStatistics
(
String
scheduleName
,
Integer
verifyCount
)
{
public
BusVerifyStatistics
(
Integer
scheduleId
,
String
scheduleName
,
Integer
verifyCount
)
{
this
.
scheduleId
=
scheduleId
;
this
.
scheduleName
=
scheduleName
;
this
.
scheduleName
=
scheduleName
;
this
.
verifyCount
=
verifyCount
;
this
.
verifyCount
=
verifyCount
;
}
}
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/service/BusService.java
View file @
e12abcb2
...
@@ -3,6 +3,7 @@ package com.dlbridge.jadp.plugins.cmpt.service;
...
@@ -3,6 +3,7 @@ package com.dlbridge.jadp.plugins.cmpt.service;
import
com.dlbridge.jadp.common.web.Result
;
import
com.dlbridge.jadp.common.web.Result
;
import
com.dlbridge.jadp.plugins.cmpt.dao.mapper.BusMapper
;
import
com.dlbridge.jadp.plugins.cmpt.dao.mapper.BusMapper
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.param.BusParam
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.param.BusParam
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.param.BusTicketParam
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.param.BusVerifyRecordParam
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.param.BusVerifyRecordParam
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.vo.BusVerifyStatistics
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.vo.BusVerifyStatistics
;
import
com.dlbridge.jadp.plugins.cmpt.dto.*
;
import
com.dlbridge.jadp.plugins.cmpt.dto.*
;
...
@@ -25,6 +26,7 @@ import com.dlbridge.jadp.plugins.cmpt.utils.PageConvertUtil;
...
@@ -25,6 +26,7 @@ import com.dlbridge.jadp.plugins.cmpt.utils.PageConvertUtil;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.io.ByteArrayOutputStream
;
import
java.io.ByteArrayOutputStream
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -227,18 +229,50 @@ public class BusService {
...
@@ -227,18 +229,50 @@ public class BusService {
return
busMapper
.
selectVerificationRecord
(
cmptId
,
verifierId
,
ticketNo
);
return
busMapper
.
selectVerificationRecord
(
cmptId
,
verifierId
,
ticketNo
);
}
}
// public List<BusVerifyStatistics> busVerifyStatistics(Integer cmptId) {
// List<BusVerificationRecord> records = busMapper.selectVerificationRecord(cmptId, null, null);
// Map<String, Long> scheduleCountMap = records.stream()
// .collect(Collectors.groupingBy(
// BusVerificationRecord::getScheduleName,
// Collectors.counting()
// ));
//
// // 转换为BusVerifyStatistics列表
// return scheduleCountMap.entrySet().stream()
// .map(entry -> new BusVerifyStatistics(entry.getKey(), entry.getValue().intValue()))
// .collect(Collectors.toList());
// }
/**
* 查询班车核销统计列表
* @param cmptId 赛事ID
* @return List<BusVerifyStatistics>
*/
public
List
<
BusVerifyStatistics
>
busVerifyStatistics
(
Integer
cmptId
)
{
public
List
<
BusVerifyStatistics
>
busVerifyStatistics
(
Integer
cmptId
)
{
List
<
BusVerificationRecord
>
records
=
busMapper
.
selectVerificationRecord
(
cmptId
,
null
,
null
);
List
<
BusVerificationRecord
>
records
=
busMapper
.
selectVerificationRecord
(
cmptId
,
null
,
null
);
Map
<
String
,
Long
>
scheduleCountMap
=
records
.
stream
()
// 按 scheduleId 和 scheduleName 进行分组统计
Map
<
Integer
,
Map
<
String
,
Long
>>
scheduleCountMap
=
records
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
.
collect
(
Collectors
.
groupingBy
(
BusVerificationRecord:
:
getScheduleId
,
// 按 scheduleId 分组
Collectors
.
groupingBy
(
BusVerificationRecord:
:
getScheduleName
,
BusVerificationRecord:
:
getScheduleName
,
Collectors
.
counting
()
Collectors
.
counting
()
)
));
));
// 转换为BusVerifyStatistics列表
// 转换为 BusVerifyStatistics 列表
return
scheduleCountMap
.
entrySet
().
stream
()
List
<
BusVerifyStatistics
>
statisticsList
=
new
ArrayList
<>();
.
map
(
entry
->
new
BusVerifyStatistics
(
entry
.
getKey
(),
entry
.
getValue
().
intValue
()))
for
(
Map
.
Entry
<
Integer
,
Map
<
String
,
Long
>>
entry
:
scheduleCountMap
.
entrySet
())
{
.
collect
(
Collectors
.
toList
());
Integer
scheduleId
=
entry
.
getKey
();
for
(
Map
.
Entry
<
String
,
Long
>
inner
:
entry
.
getValue
().
entrySet
())
{
String
scheduleName
=
inner
.
getKey
();
Integer
verifyCount
=
inner
.
getValue
().
intValue
();
statisticsList
.
add
(
new
BusVerifyStatistics
(
scheduleId
,
scheduleName
,
verifyCount
));
}
}
return
statisticsList
;
}
}
/**
/**
...
@@ -268,10 +302,27 @@ public class BusService {
...
@@ -268,10 +302,27 @@ public class BusService {
// List<BusVerificationRecord> list = busMapper.selectVerifyRecordByPage(queryDTO);
// List<BusVerificationRecord> list = busMapper.selectVerifyRecordByPage(queryDTO);
// return new PageInfo<>(list);
// return new PageInfo<>(list);
// }
// }
/**
* 查询班车核销记录列表
* @param queryDTO 查询参数
* @return 班车核销记录分页列表
*/
public
Page
<
List
<
BusVerificationRecord
>>
verifyPageRecord
(
BusVerifyRecordParam
queryDTO
)
{
public
Page
<
List
<
BusVerificationRecord
>>
verifyPageRecord
(
BusVerifyRecordParam
queryDTO
)
{
PageHelper
.
startPage
(
queryDTO
.
getPageNum
(),
queryDTO
.
getPageSize
());
PageHelper
.
startPage
(
queryDTO
.
getPageNum
(),
queryDTO
.
getPageSize
());
List
<
BusVerificationRecord
>
list
=
busMapper
.
selectVerifyRecordByPage
(
queryDTO
);
List
<
BusVerificationRecord
>
list
=
busMapper
.
selectVerifyRecordByPage
(
queryDTO
);
PageInfo
<
BusVerificationRecord
>
pageInfo
=
new
PageInfo
<>(
list
);
PageInfo
<
BusVerificationRecord
>
pageInfo
=
new
PageInfo
<>(
list
);
return
PageConvertUtil
.
convert
(
pageInfo
);
return
PageConvertUtil
.
convert
(
pageInfo
);
}
}
/**
* 查询车票记录列表
* @param queryDTO 查询参数
* @return 查询车票记录列表
*/
public
Page
<
List
<
BusTicketVerification
>>
busTicketPage
(
BusTicketParam
queryDTO
)
{
PageHelper
.
startPage
(
queryDTO
.
getPageNum
(),
queryDTO
.
getPageSize
());
List
<
BusTicketVerification
>
list
=
busMapper
.
queryBusTicketByPage
(
queryDTO
);
PageInfo
<
BusTicketVerification
>
pageInfo
=
new
PageInfo
<>(
list
);
return
PageConvertUtil
.
convert
(
pageInfo
);
}
}
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/service/RoadService.java
View file @
e12abcb2
...
@@ -49,37 +49,40 @@ public class RoadService {
...
@@ -49,37 +49,40 @@ public class RoadService {
/**
/**
* 根据赛事、组别 获取路线列表
* 根据赛事、组别 获取路线列表
*
* @param cmptId 赛事ID
* @param cmptId 赛事ID
* @param roadId 路线ID
* @param roadId 路线ID
* @return 路线列表
* @return 路线列表
*/
*/
public
List
<
Path
>
queryPaths
(
Integer
cmptId
,
Integer
roadId
){
public
List
<
Path
>
queryPaths
(
Integer
cmptId
,
Integer
roadId
)
{
return
roadMapper
.
queryPaths
(
cmptId
,
roadId
);
return
roadMapper
.
queryPaths
(
cmptId
,
roadId
);
}
}
public
List
<
Road
>
queryRoads
(
Integer
cmptId
)
{
public
List
<
Road
>
queryRoads
(
Integer
cmptId
)
{
// log.info("=====queryRoads -> RoadService enter");
// log.info("=====queryRoads -> RoadService enter");
List
<
Road
>
roads
=
remoteService
.
getRoads
(
cmptId
);
List
<
Road
>
roads
=
remoteService
.
getRoads
(
cmptId
);
if
(
roads
==
null
)
{
if
(
roads
==
null
)
{
return
null
;
return
null
;
}
}
// for (Road road : roads) {
// for (Road road : roads) {
// log.info("RoadService api接口 getName:" + road.getName() + " getRoadId:" + road.getRoadId() + " getFileName:" + road.getFileName() + " getFileUrl:" + road.getFileUrl());
// log.info("RoadService api接口 getName:" + road.getName() + " getRoadId:" + road.getRoadId() + " getFileName:" + road.getFileName() + " getFileUrl:" + road.getFileUrl());
// }
// }
List
<
Road
>
localRoads
=
roadMapper
.
queryRoadsMultiPath
(
cmptId
);
List
<
Road
>
localRoads
=
roadMapper
.
queryRoadsMultiPath
(
cmptId
);
// for (Road road : localRoads) {
// for (Road road : localRoads) {
// log.info("RoadService 数据库接口 getName:" + road.getName() + " getRoadId:" + road.getRoadId() + " getFileName:" + road.getFileName() + " getFileUrl:" + road.getFileUrl());
// log.info("RoadService 数据库接口 getName:" + road.getName() + " getRoadId:" + road.getRoadId() + " getFileName:" + road.getFileName() + " getFileUrl:" + road.getFileUrl());
// }
// }
for
(
Road
road
:
roads
)
{
// 更新 插入操作
for
(
Road
road
:
roads
)
{
// 更新 插入操作
if
(
localRoads
.
contains
(
road
))
{
if
(
localRoads
.
contains
(
road
))
{
Road
rd
=
localRoads
.
get
(
localRoads
.
indexOf
(
road
));
Road
rd
=
localRoads
.
get
(
localRoads
.
indexOf
(
road
));
if
(!
rd
.
getName
().
equals
(
road
.
getName
()))
{
if
(!
rd
.
getName
()
.
equals
(
road
.
getName
()))
{
rd
.
setName
(
road
.
getName
());
rd
.
setName
(
road
.
getName
());
roadMapper
.
update
(
road
);
roadMapper
.
update
(
road
);
}
}
// log.info("RoadService contains getName:" + road.getName() + " getRoadId:" + road.getRoadId() + " getFileName:" + road.getFileName());
// log.info("RoadService contains getName:" + road.getName() + " getRoadId:" + road.getRoadId() + " getFileName:" + road.getFileName());
}
else
{
}
else
{
roadMapper
.
save
(
road
);
roadMapper
.
save
(
road
);
// log.info("RoadService not contains getName:" + road.getName() + " getRoadId:" + road.getRoadId() + " getFileName:" + road.getFileName());
// log.info("RoadService not contains getName:" + road.getName() + " getRoadId:" + road.getRoadId() + " getFileName:" + road.getFileName());
}
}
}
}
for
(
Road
road
:
localRoads
)
{
// 删除操作
for
(
Road
road
:
localRoads
)
{
// 删除操作
...
@@ -88,41 +91,43 @@ public class RoadService {
...
@@ -88,41 +91,43 @@ public class RoadService {
}
}
}
}
// for (Road road : localRoads) {
// for (Road road : localRoads) {
// log.info("RoadService 接口和api更新后数据 getName:" + road.getName() + " getRoadId:" + road.getRoadId() + " getFileName:" + road.getFileName() + " getFileUrl:" + road.getFileUrl());
// log.info("RoadService 接口和api更新后数据 getName:" + road.getName() + " getRoadId:" + road.getRoadId() + " getFileName:" + road.getFileName() + " getFileUrl:" + road.getFileUrl());
// }
// }
return
roadMapper
.
queryRoadsMultiPath
(
cmptId
);
return
roadMapper
.
queryRoadsMultiPath
(
cmptId
);
}
}
/**
/**
* 获取组别(多路线支持)
* 获取组别(多路线支持)
*
* @param cmptId
* @param cmptId
* @return
* @return
*/
*/
public
List
<
Road
>
queryRoadsMultiPath
(
Integer
cmptId
)
{
public
List
<
Road
>
queryRoadsMultiPath
(
Integer
cmptId
)
{
// log.info("===== queryRoadsMultiPath -> RoadService enter");
// log.info("===== queryRoadsMultiPath -> RoadService enter");
List
<
Road
>
roads
=
remoteService
.
getRoads
(
cmptId
);
List
<
Road
>
roads
=
remoteService
.
getRoads
(
cmptId
);
if
(
roads
==
null
)
{
if
(
roads
==
null
)
{
return
null
;
return
null
;
}
}
// for (Road road : roads) {
// for (Road road : roads) {
// log.info("RoadService api接口 getName:" + road.getName() + " getRoadId:" + road.getRoadId() + " getFileName:" + road.getFileName() + " getFileUrl:" + road.getFileUrl());
// log.info("RoadService api接口 getName:" + road.getName() + " getRoadId:" + road.getRoadId() + " getFileName:" + road.getFileName() + " getFileUrl:" + road.getFileUrl());
// }
// }
List
<
Road
>
localRoads
=
roadMapper
.
queryRoadsMultiPath
(
cmptId
);
List
<
Road
>
localRoads
=
roadMapper
.
queryRoadsMultiPath
(
cmptId
);
// for (Road road : localRoads) {
// for (Road road : localRoads) {
// log.info("RoadService 数据库接口 getName:" + road.getName() + " getRoadId:" + road.getRoadId() + " getFileName:" + road.getFileName() + " getFileUrl:" + road.getFileUrl());
// log.info("RoadService 数据库接口 getName:" + road.getName() + " getRoadId:" + road.getRoadId() + " getFileName:" + road.getFileName() + " getFileUrl:" + road.getFileUrl());
// }
// }
for
(
Road
road
:
roads
)
{
// 更新 插入操作
for
(
Road
road
:
roads
)
{
// 更新 插入操作
if
(
localRoads
.
contains
(
road
))
{
if
(
localRoads
.
contains
(
road
))
{
Road
rd
=
localRoads
.
get
(
localRoads
.
indexOf
(
road
));
Road
rd
=
localRoads
.
get
(
localRoads
.
indexOf
(
road
));
if
(!
rd
.
getName
().
equals
(
road
.
getName
()))
{
if
(!
rd
.
getName
()
.
equals
(
road
.
getName
()))
{
rd
.
setName
(
road
.
getName
());
rd
.
setName
(
road
.
getName
());
roadMapper
.
update
(
road
);
roadMapper
.
update
(
road
);
}
}
// log.info("RoadService contains getName:" + road.getName() + " getRoadId:" + road.getRoadId() + " getFileName:" + road.getFileName());
// log.info("RoadService contains getName:" + road.getName() + " getRoadId:" + road.getRoadId() + " getFileName:" + road.getFileName());
}
else
{
}
else
{
roadMapper
.
save
(
road
);
roadMapper
.
save
(
road
);
// log.info("RoadService not contains getName:" + road.getName() + " getRoadId:" + road.getRoadId() + " getFileName:" + road.getFileName());
// log.info("RoadService not contains getName:" + road.getName() + " getRoadId:" + road.getRoadId() + " getFileName:" + road.getFileName());
}
}
}
}
for
(
Road
road
:
localRoads
)
{
// 删除操作
for
(
Road
road
:
localRoads
)
{
// 删除操作
...
@@ -131,14 +136,15 @@ public class RoadService {
...
@@ -131,14 +136,15 @@ public class RoadService {
}
}
}
}
// for (Road road : localRoads) {
// for (Road road : localRoads) {
// log.info("RoadService 接口和api更新后数据 getName:" + road.getName() + " getRoadId:" + road.getRoadId() + " getFileName:" + road.getFileName() + " getFileUrl:" + road.getFileUrl());
// log.info("RoadService 接口和api更新后数据 getName:" + road.getName() + " getRoadId:" + road.getRoadId() + " getFileName:" + road.getFileName() + " getFileUrl:" + road.getFileUrl());
// }
// }
return
roadMapper
.
queryRoadsMultiPath
(
cmptId
);
return
roadMapper
.
queryRoadsMultiPath
(
cmptId
);
}
}
/**
/**
* 将gps文件转化为json文件
* 将gps文件转化为json文件
*
* @param url
* @param url
* @return
* @return
*/
*/
...
@@ -146,7 +152,8 @@ public class RoadService {
...
@@ -146,7 +152,8 @@ public class RoadService {
ResponseEntity
<
org
.
springframework
.
core
.
io
.
Resource
>
entity
=
restTemplate
.
getForEntity
(
url
,
org
.
springframework
.
core
.
io
.
Resource
.
class
);
ResponseEntity
<
org
.
springframework
.
core
.
io
.
Resource
>
entity
=
restTemplate
.
getForEntity
(
url
,
org
.
springframework
.
core
.
io
.
Resource
.
class
);
InputStream
inputStream
=
null
;
InputStream
inputStream
=
null
;
try
{
try
{
inputStream
=
entity
.
getBody
().
getInputStream
();
inputStream
=
entity
.
getBody
()
.
getInputStream
();
String
json
=
""
;
String
json
=
""
;
if
(
url
.
indexOf
(
".gpx"
)
>
-
1
)
{
if
(
url
.
indexOf
(
".gpx"
)
>
-
1
)
{
json
=
GpxParserUtil
.
parseGpx
(
inputStream
);
json
=
GpxParserUtil
.
parseGpx
(
inputStream
);
...
@@ -162,13 +169,13 @@ public class RoadService {
...
@@ -162,13 +169,13 @@ public class RoadService {
public
int
saveGps
(
RoadGpsPoint
point
)
{
public
int
saveGps
(
RoadGpsPoint
point
)
{
// 存在pathId的时候先把原来的路线删除再保存
// 存在pathId的时候先把原来的路线删除再保存
// if(point.getPathId() > 0){
// if(point.getPathId() > 0){
// roadMapper.deleteGps(point.getRoadId(), point.getPathId());
// roadMapper.deleteGps(point.getRoadId(), point.getPathId());
// }
// }
return
roadMapper
.
saveGps
(
point
);
return
roadMapper
.
saveGps
(
point
);
}
}
public
int
updateRoadGps
(
RoadGpsPoint
point
){
public
int
updateRoadGps
(
RoadGpsPoint
point
)
{
return
roadMapper
.
updateRoadGps
(
point
);
return
roadMapper
.
updateRoadGps
(
point
);
}
}
...
@@ -184,7 +191,11 @@ public class RoadService {
...
@@ -184,7 +191,11 @@ public class RoadService {
roadMapper
.
countDownload
(
roadId
);
roadMapper
.
countDownload
(
roadId
);
}
}
public
Map
<
String
,
String
>
getMultiRouteInfo
(
Integer
cmptId
){
public
Map
<
String
,
String
>
getMultiRouteInfo
(
Integer
cmptId
)
{
return
roadMapper
.
getMultiRouteInfo
(
cmptId
);
return
roadMapper
.
getMultiRouteInfo
(
cmptId
);
}
}
public
int
updateGpsPathSort
(
int
pathId
,
int
sort
)
{
return
roadMapper
.
updateGpsPathSort
(
pathId
,
sort
);
}
}
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/web/BusController.java
View file @
e12abcb2
...
@@ -2,6 +2,7 @@ package com.dlbridge.jadp.plugins.cmpt.web;
...
@@ -2,6 +2,7 @@ package com.dlbridge.jadp.plugins.cmpt.web;
import
com.dlbridge.jadp.common.web.Result
;
import
com.dlbridge.jadp.common.web.Result
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.param.BusParam
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.param.BusParam
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.param.BusTicketParam
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.param.BusVerifyRecordParam
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.param.BusVerifyRecordParam
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.vo.BusVerifyStatistics
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.vo.BusVerifyStatistics
;
import
com.dlbridge.jadp.plugins.cmpt.dto.*
;
import
com.dlbridge.jadp.plugins.cmpt.dto.*
;
...
@@ -162,5 +163,18 @@ public class BusController {
...
@@ -162,5 +163,18 @@ public class BusController {
Page
<
List
<
BusVerificationRecord
>>
result
=
busService
.
verifyPageRecord
(
queryDTO
);
Page
<
List
<
BusVerificationRecord
>>
result
=
busService
.
verifyPageRecord
(
queryDTO
);
return
Result
.
success
(
result
);
return
Result
.
success
(
result
);
}
}
/**
* 查询车票记录分页列表接口
*
* @param queryDTO 查询参数
* @return 查询车票记录列表
*/
@ResponseBody
@PostMapping
(
"/bus-ticket-page"
)
@ApiOperation
(
value
=
"获取班车车票列表"
,
notes
=
"获取班车车票列表"
)
public
Result
<?>
busTicketPage
(
@RequestBody
BusTicketParam
queryDTO
)
{
Page
<
List
<
BusTicketVerification
>>
result
=
busService
.
busTicketPage
(
queryDTO
);
return
Result
.
success
(
result
);
}
}
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/web/RoadController.java
View file @
e12abcb2
...
@@ -98,7 +98,7 @@ public class RoadController {
...
@@ -98,7 +98,7 @@ public class RoadController {
setPoints
(
json
).
setRoadId
(
road
.
getRoadId
())
setPoints
(
json
).
setRoadId
(
road
.
getRoadId
())
.
setCmptId
(
road
.
getCmptId
()).
setPathName
(
road
.
getPathName
())
.
setCmptId
(
road
.
getCmptId
()).
setPathName
(
road
.
getPathName
())
.
setFileName
(
road
.
getFileName
()).
setFileUrl
(
road
.
getFileUrl
())
.
setFileName
(
road
.
getFileName
()).
setFileUrl
(
road
.
getFileUrl
())
.
setFileSize
(
road
.
getFileSize
()).
setPathId
(
road
.
getPathId
());
.
setFileSize
(
road
.
getFileSize
()).
setPathId
(
road
.
getPathId
())
.
setSort
(
road
.
getSort
())
;
roadService
.
saveGps
(
roadGpsPoint
);
roadService
.
saveGps
(
roadGpsPoint
);
newPahtId
=
roadGpsPoint
.
getId
();
newPahtId
=
roadGpsPoint
.
getId
();
log
.
info
(
"=====生成新的路线ID:{}"
,
newPahtId
);
log
.
info
(
"=====生成新的路线ID:{}"
,
newPahtId
);
...
@@ -110,7 +110,7 @@ public class RoadController {
...
@@ -110,7 +110,7 @@ public class RoadController {
setPoints
(
json
).
setRoadId
(
road
.
getRoadId
())
setPoints
(
json
).
setRoadId
(
road
.
getRoadId
())
.
setCmptId
(
road
.
getCmptId
()).
setPathName
(
road
.
getPathName
())
.
setCmptId
(
road
.
getCmptId
()).
setPathName
(
road
.
getPathName
())
.
setFileName
(
road
.
getFileName
()).
setFileUrl
(
road
.
getFileUrl
())
.
setFileName
(
road
.
getFileName
()).
setFileUrl
(
road
.
getFileUrl
())
.
setFileSize
(
road
.
getFileSize
()).
setPathId
(
road
.
getPathId
());
.
setFileSize
(
road
.
getFileSize
()).
setPathId
(
road
.
getPathId
())
.
setSort
(
road
.
getSort
())
;
roadService
.
updateRoadGps
(
roadGpsPoint
);
roadService
.
updateRoadGps
(
roadGpsPoint
);
}
}
...
@@ -155,6 +155,12 @@ public class RoadController {
...
@@ -155,6 +155,12 @@ public class RoadController {
int
count
=
roadService
.
deleteGpsPath
(
pathId
);
int
count
=
roadService
.
deleteGpsPath
(
pathId
);
return
Result
.
success
();
return
Result
.
success
();
}
}
@PostMapping
(
"updateGpsPathSort/{pathId}/{sort}"
)
@ResponseBody
public
Result
updateGpsPathSort
(
@PathVariable
(
"pathId"
)
int
pathId
,
@PathVariable
(
"sort"
)
int
sort
)
{
int
count
=
roadService
.
updateGpsPathSort
(
pathId
,
sort
);
return
Result
.
success
();
}
/**
/**
* 上传轨迹的接口,针对不同的项目,上传不同的gpx,kml轨迹文件
* 上传轨迹的接口,针对不同的项目,上传不同的gpx,kml轨迹文件
...
...
src/main/webapp/WEB-INF/views/cmpt/road.jsp
View file @
e12abcb2
<%@ page
language=
"java"
contentType=
"text/html; charset=utf-8"
pageEncoding=
"utf-8"
%>
<%@ page
language=
"java"
contentType=
"text/html; charset=utf-8"
pageEncoding=
"utf-8"
%>
<%@ include
file=
"/WEB-INF/views/include/taglib.jsp"
%>
<%@ taglib
prefix=
"c"
uri=
"http://java.sun.com/jsp/jstl/core"
%>
<%@ taglib
prefix=
"fn"
uri=
"http://java.sun.com/jsp/jstl/functions"
%>
<%@ include
file=
"/WEB-INF/views/include/taglib.jsp"
%>
<!doctype html>
<%@ taglib
prefix=
"fn"
uri=
"http://java.sun.com/jsp/jstl/functions"
%>
<html>
<%@ taglib
prefix=
"fmt"
uri=
"http://java.sun.com/jsp/jstl/fmt"
%>
<head>
<%@ taglib
prefix=
"fns"
uri=
"/WEB-INF/tlds/fns.tld"
%>
<%@ taglib
prefix=
"fnc"
uri=
"/WEB-INF/tlds/fnc.tld"
%>
<!doctype html>
<html>
<head>
<title>
路线导入
</title>
<title>
路线导入
</title>
<!-- Bootstrap CSS-->
<!-- Bootstrap CSS-->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/vendor/bootstrap/css/bootstrap.min.css"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/vendor/bootstrap/css/bootstrap.min.css"
>
<!-- Font Awesome CSS-->
<!-- Font Awesome CSS-->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/vendor/font-awesome/css/font-awesome.min.css"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/vendor/font-awesome/css/font-awesome.min.css"
>
<!-- Fontastic Custom icon font-->
<!-- Fontastic Custom icon font-->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/fontastic.css"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/fontastic.css"
>
<!-- Google fonts - Poppins -->
<!-- Google fonts - Poppins -->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/font-css.css"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/font-css.css"
>
<!-- theme stylesheet-->
<!-- theme stylesheet-->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/style.default.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
id=
"theme-stylesheet"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/style.default.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
id=
"theme-stylesheet"
>
<!-- Custom stylesheet - for your changes-->
<!-- Custom stylesheet - for your changes-->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/custom.css"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/custom.css"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/juery-ui-1.12.css"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/juery-ui-1.12.css"
>
...
@@ -22,31 +31,46 @@
...
@@ -22,31 +31,46 @@
<link
rel=
"shortcut icon"
href=
"https://img.geexek.com/files/home/favicon.ico"
>
<link
rel=
"shortcut icon"
href=
"https://img.geexek.com/files/home/favicon.ico"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/custom.css"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/custom.css"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/main.css"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/main.css"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/cmpt/setting.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
>
<link
rel=
"stylesheet"
<link
rel=
"stylesheet"
href=
"${ctxStatic}/leaflet/css/leaflet.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
/>
href=
"${ctxStatic}/cmpt/setting.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/leaflet/css/leaflet_label.css"
/>
<link
rel=
"stylesheet"
<link
rel=
"stylesheet"
href=
"${ctxStatic}/cmpt/road.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
/>
href=
"${ctxStatic}/leaflet/css/leaflet.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
/>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/cmpt/road-new.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
/>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/leaflet/css/leaflet_label.css"
/>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/cmpt/road.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
/>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/cmpt/road-new.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
/>
<script
src=
"${ctxStatic}/newdermon/vendor/jquery/jquery.min.js"
></script>
<script
src=
"${ctxStatic}/newdermon/vendor/jquery/jquery.min.js"
></script>
<script
type=
"text/javascript"
src=
"${ctxStatic}/leaflet/leaflet.js"
></script>
<script
type=
"text/javascript"
src=
"${ctxStatic}/leaflet/leaflet.js"
></script>
<script
type=
"text/javascript"
src=
"${ctxStatic}/leaflet/label.js"
></script>
<script
type=
"text/javascript"
src=
"${ctxStatic}/leaflet/label.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
src=
"${ctxStatic}/layer/layer.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
src=
"${ctxStatic}/layer/layer.js"
></script>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/layer/skin/layer.css"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/layer/skin/layer.css"
>
<script
src=
"${ctxStatic}/newdermon/vendor/bootstrap/js/bootstrap.js"
></script>
<script
src=
"${ctxStatic}/newdermon/vendor/bootstrap/js/bootstrap.js"
></script>
</head>
</head>
<style
type=
"text/css"
>
<style
type=
"text/css"
>
.editCpDis-box
{
.editCpDis-box
{
display
:
flex
;
display
:
flex
;
justify-content
:
space-around
;
justify-content
:
space-around
;
margin
:
8px
;
margin
:
8px
;
}
}
.dis-name
{
.dis-name
{
line-height
:
2rem
;
line-height
:
2rem
;
}
}
</style>
<body>
.layui-layer-title
{
<jsp:include
page=
"../common/header.jsp"
></jsp:include>
color
:
white
;
<div
class=
"page-content d-flex align-items-stretch main-body"
>
}
.layui-layer-btn
{
color
:
white
;
}
</style>
<body>
<jsp:include
page=
"../common/header.jsp"
></jsp:include>
<div
class=
"page-content d-flex align-items-stretch main-body"
>
<jsp:include
page=
"../common/menu.jsp"
></jsp:include>
<jsp:include
page=
"../common/menu.jsp"
></jsp:include>
<div
class=
"rght"
>
<div
class=
"rght"
>
<div
class=
"force"
>
<div
class=
"force"
>
...
@@ -63,21 +87,39 @@
...
@@ -63,21 +87,39 @@
<c:choose>
<c:choose>
<c:when
test=
"
${
fn:
length
(
list
)
>
0
}
"
>
<c:when
test=
"
${
fn:
length
(
list
)
>
0
}
"
>
<c:forEach
var=
"item"
items=
"
${
list
}
"
>
<c:forEach
var=
"item"
items=
"
${
list
}
"
>
<div
class=
"equip-item-new equip-item"
data-id=
"${item.roadId}"
data-name=
"${item.name}"
<div
class=
"equip-item-new equip-item"
data-file-name=
"${item.fileName}"
data-file-url=
"${item.fileUrl}"
data-id=
"${item.roadId}"
data-name=
"${item.name}"
data-file-size=
"${item.fileSize}"
data-path-id=
"${item.pathId}"
data-path-name=
"${item.pathName}"
>
data-id=
"${item.roadId}"
data-sort=
"${item.sort}"
data-file-name=
"${item.fileName}"
data-file-url=
"${item.fileUrl}"
data-file-size=
"${item.fileSize}"
data-path-id=
"${item.pathId}"
data-path-name=
"${item.pathName}"
>
<div
class=
"divhorizontal divhorizontal-item1"
>
<div
class=
"divhorizontal divhorizontal-item1"
>
<span
class=
"name-color"
>
${item.name}
</span>
<span
class=
"name-color"
>
${item.name}
</span>
</div>
</div>
<div
class=
"divhorizontal divhorizontal-item4"
>
<div
class=
"divhorizontal divhorizontal-item4"
>
<span
class=
"name-color"
>
${item.pathName}
</span>
<span
class=
"name-color"
>
${item.pathName}
</span>
</div>
<div
class=
"divhorizontal divhorizontal-item2 edit-sort"
style=
"cursor: pointer;"
>
<p
class=
""
>
排序
</p>
<c:if
test=
"
${
item
.
sort
!=
null
}
"
>
<p
class=
"status-color "
>
${item.sort}
</p>
</c:if>
</div>
</div>
<div
class=
"divhorizontal divhorizontal-item2"
>
<div
class=
"divhorizontal divhorizontal-item2"
>
<p
class=
""
>
状态
</p>
<p
class=
""
>
状态
</p>
<c:if
test=
"
${
item
.
fileUrl
!=
null
&&
item
.
fileUrl
!=
''
}
"
>
<c:if
test=
"
${
item
.
fileUrl
!=
null
&&
item
.
fileUrl
!=
''
}
"
>
<p
class=
"status-color"
>
线路已上传
</p>
<p
class=
"status-color"
>
线路已上传
</p>
</c:if>
</c:if>
<c:if
test=
"
${
item
.
fileUrl
==
null
||
item
.
fileUrl
==
''
}
"
>
<c:if
test=
"
${
item
.
fileUrl
==
null
||
item
.
fileUrl
==
''
}
"
>
<p
class=
"status-2-color"
>
线路未上传
</p>
<p
class=
"status-2-color"
>
线路未上传
</p>
</c:if>
</c:if>
</div>
</div>
...
@@ -86,7 +128,8 @@
...
@@ -86,7 +128,8 @@
<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"
>
<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>
...
@@ -110,8 +153,10 @@
...
@@ -110,8 +153,10 @@
</div>
</div>
</div>
</div>
<div
class=
"map-container"
style=
"transform: translateX(-9999px)"
>
<div
class=
"map-container"
style=
"transform: translateX(-9999px)"
>
<div
class=
"flex flex-row back-div"
style=
"align-items: center; margin: 10px 0px;"
>
<div
class=
"flex flex-row back-div"
<span
class=
"back"
></span><span
style=
"font-size:20px;color:rgba(0,0,0,1)"
>
返回
</span>
style=
"align-items: center; margin: 10px 0px;"
>
<span
class=
"back"
></span><span
style=
"font-size:20px;color:rgba(0,0,0,1)"
>
返回
</span>
</div>
</div>
<div
class=
"map-title"
>
<div
class=
"map-title"
>
<div
class=
"flex flex-column"
>
<div
class=
"flex flex-column"
>
...
@@ -119,12 +164,16 @@
...
@@ -119,12 +164,16 @@
<input
type=
"hidden"
id=
"pathId"
>
<input
type=
"hidden"
id=
"pathId"
>
<span
id=
"roadName"
></span>
<span
id=
"roadName"
></span>
<span
id=
"gpsName"
></span>
<span
id=
"gpsName"
></span>
<input
type=
"text"
id=
"pathName"
class=
"ipt-middle"
placeholder=
"请输入路线名"
>
<input
type=
"text"
id=
"pathName"
class=
"ipt-middle"
placeholder=
"请输入路线名"
>
</div>
</div>
<div
class=
"right"
>
<div
class=
"right"
>
<button
type=
"button"
class=
"btn upload"
>
载入路线
</button>
<button
type=
"button"
class=
"btn upload"
>
载入路线
</button>
<input
type=
"file"
id=
"route-file"
style=
"display: none;"
onchange=
"uploadFile(this)"
>
<input
type=
"file"
id=
"route-file"
style=
"display: none;"
<button
type=
"button"
id=
"editCpDisBtn"
class=
"btn"
data-toggle=
"modal"
data-target=
"#editCpDis"
style=
"display: none;"
>
点位距离设置
</button>
onchange=
"uploadFile(this)"
>
<button
type=
"button"
id=
"editCpDisBtn"
class=
"btn"
data-toggle=
"modal"
data-target=
"#editCpDis"
style=
"display: none;"
>
点位距离设置
</button>
</div>
</div>
</div>
</div>
...
@@ -146,8 +195,8 @@
...
@@ -146,8 +195,8 @@
<div
class=
"markers-edit"
>
<div
class=
"markers-edit"
>
<div
style=
"display: flex"
>
<div
style=
"display: flex"
>
<span
class=
"edit-tip-distance"
>
里程
<br
/>
距起点
</span>
<span
class=
"edit-tip-distance"
>
里程
<br
/>
距起点
</span>
<span
class=
"edit-tip-cp"
>
用作
<br
/>
计时点
</span>
<span
class=
"edit-tip-cp"
>
用作
<br
/>
计时点
</span>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -155,12 +204,14 @@
...
@@ -155,12 +204,14 @@
</div>
</div>
</div>
</div>
<div
class=
"modal fade"
id=
"editCpDis"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"editCpDisLabel"
style=
"z-index: 9999999;"
>
<div
class=
"modal fade"
id=
"editCpDis"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"editCpDisLabel"
style=
"z-index: 9999999;"
>
<div
class=
"modal-dialog"
role=
"document"
>
<div
class=
"modal-dialog"
role=
"document"
>
<div
class=
"modal-content"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
style=
"display: block;"
>
<div
class=
"modal-header"
style=
"display: block;"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-label=
"Close"
><span
aria-hidden=
"true"
>
×
</span></button>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-label=
"Close"
><span
aria-hidden=
"true"
>
×
</span></button>
<h4
class=
"modal-title"
id=
"editCpDisLabel"
>
间距设置(单位:KM)
</h4>
<h4
class=
"modal-title"
id=
"editCpDisLabel"
>
间距设置(单位:KM)
</h4>
</div>
</div>
<div
class=
"modal-body"
>
<div
class=
"modal-body"
>
...
@@ -170,35 +221,58 @@
...
@@ -170,35 +221,58 @@
<%-- 计时点1-计时点2--%>
<%-- 计时点1-计时点2--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- <div class="dis-input">--%>
<%-- <div class="dis-input">--%>
<%-- <input type="number" name="" placeholder="单位:M" step="1" class="form-control"/>--%>
<%-- <input type="number" name=""
placeholder="单位:M" step="1"
class="form-control" />--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- <div class="editCpDis-box">--%>
<%-- <div class="editCpDis-box">--%>
<%-- <div class="dis-name">--%>
<%-- <div class="dis-name">--%>
<%-- 计时点1-计时--%>
<%-- 计时点1-计时--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- <div class="dis-input">--%>
<%-- <div
<%-- <input type="number" name="" placeholder="单位:M" step="1" class="form-control"/>--%>
class="dis-input">--%>
<%-- </div>--%>
<%-- <input
<%-- </div>--%>
type="number"
<%-- <div class="editCpDis-box">--%>
name=""
<%-- <div class="dis-name">--%>
placeholder="单位:M"
<%-- 计时点1-计时点2121121--%>
step="1"
<%-- </div>--%>
class="form-control" />--%>
<%-- <div class="dis-input">--%>
<%-- <input type="number" name="" placeholder="单位:M" step="1" class="form-control"/>--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- <div
class="editCpDis-box">--%>
<%-- <div
class="dis-name">--%>
<%--
计时点1-计时点2121121--%>
<%--
</div>--%>
<%-- <div
class="dis-input">--%>
<%-- <input
type="number"
name=""
placeholder="单位:M"
step="1"
class="form-control" />--%>
<%--
</div>--%>
<%--
</div>--%>
</div>
</div>
</div>
</div>
<div
class=
"modal-footer"
>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
<button
type=
"button"
class=
"btn btn-default"
<button
type=
"button"
class=
"btn btn-primary"
onclick=
"saveCpDis()"
>
保存
</button>
data-dismiss=
"modal"
>
关闭
</button>
<button
type=
"button"
class=
"btn btn-primary"
onclick=
"saveCpDis()"
>
保存
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</body>
<script
src=
"${ctxStatic}/js/qikoo.js"
></script>
<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>
\ No newline at end of file
src/main/webapp/static/js/road-new.js
View file @
e12abcb2
...
@@ -130,6 +130,75 @@ $(document).ready(function () {
...
@@ -130,6 +130,75 @@ $(document).ready(function () {
}
}
})*/
})*/
});
});
$
(
'body'
).
on
(
'click'
,
'.edit-sort'
,
function
()
{
// layer.msg('click触发了',{icon:3,time:1500});
var
parent
=
$
(
this
).
parent
();
var
pathId
=
parent
.
attr
(
'data-path-id'
);
var
pathName
=
parent
.
attr
(
'data-path-name'
);
var
sort
=
parent
.
attr
(
'data-sort'
);
if
(
!
sort
)
{
return
layer
.
msg
(
'请先上传路线'
,
{
icon
:
3
,
time
:
1500
});
}
const
index
=
layer
.
open
({
type
:
1
,
title
:
'设置'
+
pathName
+
'排序'
,
content
:
`
<div style="padding:20px;">
<div class="form-group">
<label>排序数字(越小越靠前)</label>
<input type="number" class="form-control" id="sort"
placeholder="请输入排序数字" value="
${
sort
||
100
}
">
</div>
</div>
`
,
btn
:
[
'确定'
,
'取消'
],
yes
:
()
=>
{
let
loadIndex
=
0
;
const
newSort
=
$
(
'#sort'
).
val
();
if
(
newSort
===
''
)
{
layer
.
msg
(
'请输入排序数字'
);
return
;
}
if
(
isNaN
(
newSort
))
{
layer
.
msg
(
'排序必须是数字'
);
return
;
}
$
.
ajax
({
url
:
'/gk/road/updateGpsPathSort/'
+
pathId
+
'/'
+
newSort
,
contentType
:
'application/json'
,
type
:
'post'
,
beforeSend
:
function
()
{
loadIndex
=
layer
.
load
();
},
success
:
()
=>
{
layer
.
close
(
loadIndex
);
layer
.
msg
(
'排序更新成功'
,
()
=>
layer
.
close
(
index
));
window
.
location
.
reload
();
}
});
}
});
/*$.ajax({
url: '/gk/road/save',
data: {
'roadId': id,
'fileName': fileName,
'fileUrl': fileUrl,
'name': name,
cmptId: getCmptId(),
'fileSize': fileSize
},
type: 'post',
success: function (data) {
if (data.status) {
// parent.attr('data-id', data.content.roadId);
$('.map-container').css('transform', 'none');
$('.map-container').attr('data-id', data.content.roadId);
$('.force').hide();
}
}
})*/
});
// 新增路线
// 新增路线
$
(
'body'
).
on
(
'click'
,
'.add-new'
,
function
()
{
$
(
'body'
).
on
(
'click'
,
'.add-new'
,
function
()
{
...
...
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