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
9dd3899d
Commit
9dd3899d
authored
May 13, 2020
by
sunyuhua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
扫码打卡
添加里程
parent
d36320b4
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
12 deletions
+24
-12
Score.java
src/main/java/com/dlbridge/jadp/plugins/cmpt/bean/Score.java
+3
-2
MicroApiController.java
...om/dlbridge/jadp/plugins/cmpt/web/MicroApiController.java
+16
-3
ScoreController.java
...a/com/dlbridge/jadp/plugins/cmpt/web/ScoreController.java
+1
-2
scan.jsp
src/main/webapp/WEB-INF/views/cmpt/scan.jsp
+2
-3
menu.jsp
src/main/webapp/WEB-INF/views/common/menu.jsp
+1
-1
scan.js
src/main/webapp/static/js/scan.js
+1
-1
No files found.
src/main/java/com/dlbridge/jadp/plugins/cmpt/bean/Score.java
View file @
9dd3899d
...
@@ -22,8 +22,9 @@ public class Score {
...
@@ -22,8 +22,9 @@ public class Score {
private
String
durationStr
;
private
String
durationStr
;
//小程序前端用户填写的里程
private
int
mileage
;
private
int
mileage
;
private
String
mileageStr
;
//小程序前端是否需要用户填写里程
private
int
switchMileage
;
}
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/web/MicroApiController.java
View file @
9dd3899d
...
@@ -847,9 +847,10 @@ public class MicroApiController {
...
@@ -847,9 +847,10 @@ public class MicroApiController {
if
(
scoreId
!=
null
){
if
(
scoreId
!=
null
){
return
Result
.
fail
().
setMsg
(
"已经上传过成绩!"
);
return
Result
.
fail
().
setMsg
(
"已经上传过成绩!"
);
}
}
//前端上传的里程数
int
mileage
=
score
.
getScore
().
getMileage
();
ScoreItem
scoreItem
=
new
ScoreItem
()
ScoreItem
scoreItem
=
new
ScoreItem
()
.
setSubsectionscore
(
score
.
getScore
().
getDuration
()).
setSubsectionMileage
(
score
.
getScore
().
getMileage
()
)
.
setSubsectionscore
(
score
.
getScore
().
getDuration
()).
setSubsectionMileage
(
mileage
)
.
setSubsectionTime
(
score
.
getScore
().
getDate
())
.
setSubsectionTime
(
score
.
getScore
().
getDate
())
.
setCmptId
(
score
.
getCmptId
())
.
setCmptId
(
score
.
getCmptId
())
.
setCmptScoreId
(
1
);
.
setCmptScoreId
(
1
);
...
@@ -903,10 +904,22 @@ public class MicroApiController {
...
@@ -903,10 +904,22 @@ public class MicroApiController {
result
.
put
(
"user"
,
userInfo
);
result
.
put
(
"user"
,
userInfo
);
Integer
scoreItemId
=
cmptScoreRuleService
.
getCmptScoreRulesMapByMarkNoAndRuleId
(
userInfo
.
getMarkNo
(),
rule
.
getId
());
Integer
scoreItemId
=
cmptScoreRuleService
.
getCmptScoreRulesMapByMarkNoAndRuleId
(
userInfo
.
getMarkNo
(),
rule
.
getId
());
//小程序添加里程的是否需要用户填写
FuncSetting
funcSetting
=
funcSettingService
.
getSettingByCmptId
(
score
.
getCmptId
());
Integer
switchMileage
=
funcSetting
.
getMileage
();
Integer
subsectionMileage
=
0
;
if
(
scoreItemId
!=
null
){
if
(
scoreItemId
!=
null
){
Result
<
ScoreItem
>
scoreItem
=
scoreService
.
getScoreItem
(
scoreItemId
);
Result
<
ScoreItem
>
scoreItem
=
scoreService
.
getScoreItem
(
scoreItemId
);
ScoreItem
content
=
scoreItem
.
getContent
();
ScoreItem
content
=
scoreItem
.
getContent
();
result
.
put
(
"score"
,
new
Score
().
setDate
(
content
.
getSubsectionTime
().
substring
(
0
,
10
)).
setDuration
(
content
.
getSubsectionscore
()));
if
(
content
.
getSubsectionMileage
()==
null
)
subsectionMileage
=
0
;
result
.
put
(
"score"
,
new
Score
().
setDate
(
content
.
getSubsectionTime
().
substring
(
0
,
10
)).
setDuration
(
content
.
getSubsectionscore
()).
setMileage
(
subsectionMileage
).
setSwitchMileage
(
switchMileage
));
}
else
{
//初始阶段没有上传成绩,json也显示score,方便前端判断
result
.
put
(
"score"
,
new
Score
().
setDate
(
"0000-00-00"
).
setDuration
(
0
).
setMileage
(
subsectionMileage
).
setSwitchMileage
(
switchMileage
));
}
}
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/web/ScoreController.java
View file @
9dd3899d
...
@@ -111,7 +111,7 @@ public class ScoreController {
...
@@ -111,7 +111,7 @@ public class ScoreController {
Score
score
=
new
Score
()
Score
score
=
new
Score
()
.
setDate
(
content
.
getSubsectionTime
().
substring
(
0
,
10
))
.
setDate
(
content
.
getSubsectionTime
().
substring
(
0
,
10
))
.
setDuration
(
content
.
getSubsectionscore
())
.
setDuration
(
content
.
getSubsectionscore
())
.
setDurationStr
(
DateUtil
.
formatDate
(
content
.
getSubsectionscore
()))
.
setDurationStr
(
DateUtil
.
formatDate
(
content
.
getSubsectionscore
()))
.
setMileage
(
content
.
getSubsectionMileage
())
.
setId
(
content
.
getId
());
.
setId
(
content
.
getId
());
scores
.
add
(
score
);
scores
.
add
(
score
);
duration
+=
content
.
getSubsectionscore
();
duration
+=
content
.
getSubsectionscore
();
...
@@ -281,7 +281,6 @@ public class ScoreController {
...
@@ -281,7 +281,6 @@ public class ScoreController {
user
.
setTotalDuration
(
total
);
user
.
setTotalDuration
(
total
);
user
.
setDurationStr
(
DateUtil
.
formatDate
(
total
));
user
.
setDurationStr
(
DateUtil
.
formatDate
(
total
));
user
.
setTotalMileage
(
totalMileage
);
user
.
setTotalMileage
(
totalMileage
);
user
.
setMileageStr
(
String
.
valueOf
(
totalMileage
/
1000
));
});
});
// 一条成绩没有的
// 一条成绩没有的
...
...
src/main/webapp/WEB-INF/views/cmpt/scan.jsp
View file @
9dd3899d
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<!doctype html>
<!doctype html>
<html>
<html>
<head>
<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-->
...
@@ -100,7 +100,6 @@
...
@@ -100,7 +100,6 @@
cursor
:
pointer
;
cursor
:
pointer
;
}
}
.load
{
.load
{
display
:
none
;
width
:
146px
;
width
:
146px
;
height
:
40px
;
height
:
40px
;
background
:
rgba
(
206
,
57
,
57
,
1
);
background
:
rgba
(
206
,
57
,
57
,
1
);
...
@@ -160,7 +159,7 @@
...
@@ -160,7 +159,7 @@
<jsp:include
page=
"../common/menu.jsp"
></jsp:include>
<jsp:include
page=
"../common/menu.jsp"
></jsp:include>
<div
class=
"rght"
>
<div
class=
"rght"
>
<div
class=
"title-new"
>
<div
class=
"title-new"
>
<span
class=
"title"
>
扫
描
打卡
</span>
<span
class=
"title"
>
扫
码
打卡
</span>
<div
style=
"line-height: 22px"
>
<div
style=
"line-height: 22px"
>
<span
class=
"road-notice"
></span>
<span
class=
"road-notice"
></span>
<span
class=
"road-notice-txt"
>
此功能仅适用于线下自助赛
</span>
<span
class=
"road-notice-txt"
>
此功能仅适用于线下自助赛
</span>
...
...
src/main/webapp/WEB-INF/views/common/menu.jsp
View file @
9dd3899d
...
@@ -157,7 +157,7 @@
...
@@ -157,7 +157,7 @@
<li
class=
"scan menu-item"
>
<li
class=
"scan menu-item"
>
<a
href=
"/gk/scan/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<a
href=
"/gk/scan/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"menuico left-arrow"
></span>
<span
class=
"menuico left-arrow"
></span>
<span
class=
"menu-txt"
>
扫
描
打卡
</span>
<span
class=
"menu-txt"
>
扫
码
打卡
</span>
</a>
</a>
</li>
</li>
</ul>
</ul>
...
...
src/main/webapp/static/js/scan.js
View file @
9dd3899d
...
@@ -153,7 +153,7 @@ function getGpsCp(roadId) {
...
@@ -153,7 +153,7 @@ function getGpsCp(roadId) {
url
:
'/gk/roadGpsCheckpoint/getGpsCheckPointByRoadId/'
+
getCId
()
+
"/"
+
roadId
,
url
:
'/gk/roadGpsCheckpoint/getGpsCheckPointByRoadId/'
+
getCId
()
+
"/"
+
roadId
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
if
(
data
.
status
){
if
(
data
.
status
){
$
(
'.load'
).
hide
();
$
(
'.load'
).
show
();
$
(
'.noroute'
).
hide
();
$
(
'.noroute'
).
hide
();
$
(
'.QRCodeDown'
).
show
();
$
(
'.QRCodeDown'
).
show
();
$
(
'.save-btn'
).
show
();
$
(
'.save-btn'
).
show
();
...
...
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