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
25084a57
Commit
25084a57
authored
May 23, 2020
by
sunyuhua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上传成绩精确到分钟
parent
3fd2c198
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
MicroApiController.java
...om/dlbridge/jadp/plugins/cmpt/web/MicroApiController.java
+6
-2
No files found.
src/main/java/com/dlbridge/jadp/plugins/cmpt/web/MicroApiController.java
View file @
25084a57
...
...
@@ -38,6 +38,7 @@ import java.net.HttpURLConnection;
import
java.net.URL
;
import
java.text.DecimalFormat
;
import
java.text.SimpleDateFormat
;
import
java.time.LocalTime
;
import
java.util.*
;
...
...
@@ -897,10 +898,13 @@ public class MicroApiController {
DecimalFormat
df
=
new
DecimalFormat
(
"0.##"
);
cmptPace
=
Float
.
valueOf
(
df
.
format
((
float
)
duration
/
mileage
));
}
LocalTime
nowTime
=
LocalTime
.
now
().
withNano
(
0
);
//提交时间,根据服务器的时间补充
String
subsectionTime
=
score
.
getScore
().
getDate
()+
" "
+
nowTime
;
//前端上传json中取出里程,耗时,提交时间,赛事地,规则id,markNo
CmptScoreRuleScoreInfo
cmptScoreRuleScoreInfo
=
new
CmptScoreRuleScoreInfo
().
setCmptId
(
score
.
getCmptId
())
.
setSubsectionscore
(
score
.
getScore
().
getDuration
()).
setSubsectionMileage
(
mileage
).
setCmptPace
(
cmptPace
)
.
setSubsectionTime
(
s
core
.
getScore
().
getDate
()
)
.
setSubsectionTime
(
s
ubsectionTime
)
.
setCmptId
(
score
.
getCmptId
()).
setRuleId
(
rule
.
getId
()).
setMarkNo
(
score
.
getMarkNo
()).
setCheckStatus
(
0
);
//如果自动审核开启的话,进行单条成绩的审核处理
if
(
settingByCmptId
.
getSwitchScoreReview
()==
1
){
...
...
@@ -932,7 +936,7 @@ public class MicroApiController {
@ApiResponse
(
code
=
200
,
message
=
"成功"
),
@ApiResponse
(
code
=
-
1
,
message
=
"失败"
),
@ApiResponse
(
code
=
200
,
message
=
"成功"
,
response
=
Result
.
class
)})
@ApiOperation
(
value
=
"
上传成绩"
,
notes
=
"上传成绩"
,
response
=
Result
.
class
,
tags
=
"上传
成绩"
)
@ApiOperation
(
value
=
"
获取成绩"
,
notes
=
"获取成绩"
,
response
=
Result
.
class
,
tags
=
"获取
成绩"
)
public
Result
getScore
(
UserScore
score
)
{
log
.
info
(
"用户提交的成绩信息:"
+
score
.
toString
());
CmptScoreRule
rule
=
cmptScoreRuleService
.
getCmptScoreRulesByCmptIdAndIndex
(
score
.
getCmptId
(),
score
.
getIndexId
());
...
...
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