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
e2c9b856
Commit
e2c9b856
authored
May 12, 2020
by
sunyuhua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1/添加里程
2/二维码
parent
498cbe94
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
84 additions
and
8 deletions
+84
-8
ScoreItem.java
src/main/java/com/dlbridge/feign/bean/ScoreItem.java
+1
-0
FuncSetting.java
...java/com/dlbridge/jadp/plugins/cmpt/bean/FuncSetting.java
+2
-0
Score.java
src/main/java/com/dlbridge/jadp/plugins/cmpt/bean/Score.java
+4
-0
ScoreExcelBean.java
...a/com/dlbridge/jadp/plugins/cmpt/bean/ScoreExcelBean.java
+4
-0
UserScoreExcelBean.java
...m/dlbridge/jadp/plugins/cmpt/bean/UserScoreExcelBean.java
+20
-0
FuncSettingMapper.xml
...bridge/jadp/plugins/cmpt/dao/mapper/FuncSettingMapper.xml
+6
-3
FuncSettingController.java
...dlbridge/jadp/plugins/cmpt/web/FuncSettingController.java
+20
-0
MicroApiController.java
...om/dlbridge/jadp/plugins/cmpt/web/MicroApiController.java
+10
-1
ScoreController.java
...a/com/dlbridge/jadp/plugins/cmpt/web/ScoreController.java
+3
-1
scan.jsp
src/main/webapp/WEB-INF/views/cmpt/scan.jsp
+0
-3
score.jsp
src/main/webapp/WEB-INF/views/cmpt/score.jsp
+14
-0
No files found.
src/main/java/com/dlbridge/feign/bean/ScoreItem.java
View file @
e2c9b856
...
...
@@ -17,6 +17,7 @@ public class ScoreItem {
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
String
subsectionTime
;
private
Integer
subsectionscore
;
private
Integer
subsectionMileage
;
private
Integer
subsectionRankNo
;
private
String
subsectionRemark
;
private
Integer
isDelete
;
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/bean/FuncSetting.java
View file @
e2c9b856
...
...
@@ -24,6 +24,8 @@ public class FuncSetting {
private
Integer
news
;
@ApiModelProperty
(
value
=
"轮播开关"
)
private
Integer
banner
;
@ApiModelProperty
(
value
=
"里程开关,小程序成绩提交页面"
)
private
Integer
mileage
;
@JsonIgnore
private
String
newsAlias
;
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/bean/Score.java
View file @
e2c9b856
...
...
@@ -22,4 +22,8 @@ public class Score {
private
String
durationStr
;
private
int
mileage
;
private
String
mileageStr
;
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/bean/ScoreExcelBean.java
View file @
e2c9b856
...
...
@@ -14,8 +14,12 @@ public class ScoreExcelBean {
// 分段ID
private
int
ruleId
;
//分段耗时
private
int
duration
;
//分段里程
private
int
mileage
;
private
String
date
;
private
List
<
CmptScoreFieldValue
>
fieldValues
;
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/bean/UserScoreExcelBean.java
View file @
e2c9b856
...
...
@@ -17,6 +17,10 @@ public class UserScoreExcelBean {
private
String
durationStr
;
private
int
totalMileage
;
private
String
mileageStr
;
private
int
rankNo
;
private
boolean
isDone
;
...
...
@@ -101,6 +105,22 @@ public class UserScoreExcelBean {
this
.
noDuration
=
noDuration
;
}
public
int
getTotalMileage
()
{
return
totalMileage
;
}
public
void
setTotalMileage
(
int
totalMileage
)
{
this
.
totalMileage
=
totalMileage
;
}
public
String
getMileageStr
()
{
return
mileageStr
;
}
public
void
setMileageStr
(
String
mileageStr
)
{
this
.
mileageStr
=
mileageStr
;
}
@Override
public
String
toString
()
{
return
"UserScoreExcelBean{"
+
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/FuncSettingMapper.xml
View file @
e2c9b856
...
...
@@ -3,8 +3,8 @@
<mapper
namespace=
"com.dlbridge.jadp.plugins.cmpt.dao.mapper.FuncSettingMapper"
>
<insert
id=
"saveSetting"
>
insert into gk_cmpt_func(cmpt_id,switch_mobile,switch_countdown,switch_news,switch_banner,create_date)
values (#{setting.cmptId},#{setting.mobile},#{setting.countDown},#{setting.news},#{setting.banner},
now())
insert into gk_cmpt_func(cmpt_id,switch_mobile,switch_countdown,switch_news,switch_banner,
switch_mileage,
create_date)
values (#{setting.cmptId},#{setting.mobile},#{setting.countDown},#{setting.news},#{setting.banner},
#{setting.mileage},
now())
</insert>
...
...
@@ -26,6 +26,9 @@
<if
test=
"setting.newsAlias != null"
>
news_alias=#{setting.newsAlias}
</if>
<if
test=
"setting.mileage != null"
>
switch_mileage=#{setting.mileage}
</if>
</set>
where cmpt_id = #{setting.cmptId}
</update>
...
...
@@ -33,7 +36,7 @@
<select
id=
"getSettingByCmptId"
resultType=
"com.dlbridge.jadp.plugins.cmpt.bean.FuncSetting"
>
select cmpt_id cmptId,switch_mobile mobile,
switch_countdown countdown,
switch_news news,switch_banner banner,news_alias newsAlias
switch_news news,switch_banner banner,news_alias newsAlias
,switch_mileage mileage
from gk_cmpt_func
where cmpt_id=#{cmptId}
</select>
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/web/FuncSettingController.java
View file @
e2c9b856
...
...
@@ -44,4 +44,24 @@ public class FuncSettingController {
funcSettingService
.
updateSetting
(
setting
);
return
Result
.
success
();
}
/**
* 后台成绩提交页面,设置是否在成绩提交页面显示里程
* @param cmptId
* @param mileage
* @return
*/
@RequestMapping
(
"/upMileage/{cmptId}/{mileage}"
)
public
Result
upMileage
(
@PathVariable
(
"cmptId"
)
int
cmptId
,
@PathVariable
(
"mileage"
)
int
mileage
){
FuncSetting
setting
=
new
FuncSetting
();
setting
.
setCmptId
(
cmptId
);
setting
.
setMileage
(
mileage
);
FuncSetting
settingByCmptId
=
funcSettingService
.
getSettingByCmptId
(
cmptId
);
if
(
settingByCmptId
==
null
)
{
funcSettingService
.
saveSetting
(
setting
);
}
else
{
funcSettingService
.
updateSetting
(
setting
);
}
return
Result
.
success
();
}
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/web/MicroApiController.java
View file @
e2c9b856
...
...
@@ -849,7 +849,7 @@ public class MicroApiController {
}
ScoreItem
scoreItem
=
new
ScoreItem
()
.
setSubsectionscore
(
score
.
getScore
().
getDuration
())
.
setSubsectionscore
(
score
.
getScore
().
getDuration
())
.
setSubsectionMileage
(
score
.
getScore
().
getMileage
())
.
setSubsectionTime
(
score
.
getScore
().
getDate
())
.
setCmptId
(
score
.
getCmptId
())
.
setCmptScoreId
(
1
);
...
...
@@ -1027,4 +1027,13 @@ public class MicroApiController {
return
Result
.
success
().
setContent
(
roadTimerCheckpointList
);
}
@GetMapping
(
value
=
"/getSwitchMileage/{cmptId}"
)
@ApiResponses
({
@ApiResponse
(
code
=
-
1
,
message
=
"失败"
,
response
=
ObjectUtils
.
Null
.
class
),
@ApiResponse
(
code
=
200
,
message
=
"成功"
,
response
=
Result
.
class
,
responseContainer
=
"List"
)})
@ApiOperation
(
value
=
"根据赛事Id获取用户是否设置了成绩提交附加项:里程必填项"
,
notes
=
"根据赛事Id获取用户是否设置了成绩提交附加项:里程必填项"
,
tags
=
"根据赛事Id获取用户是否设置了成绩提交附加项:里程必填项"
)
public
Result
getSwitchMileage
(
@PathVariable
(
"cmptId"
)
int
cmptId
){
FuncSetting
settingByCmptId
=
funcSettingService
.
getSettingByCmptId
(
cmptId
);
return
Result
.
success
().
setContent
(
settingByCmptId
);
}
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/web/ScoreController.java
View file @
e2c9b856
...
...
@@ -265,7 +265,7 @@ public class ScoreController {
// 计算 总成绩 以及 总排名
users
.
forEach
(
user
->
{
long
total
=
user
.
getScores
().
stream
().
mapToLong
(
ScoreExcelBean:
:
getDuration
).
sum
();
int
totalMileage
=
user
.
getScores
().
stream
().
mapToInt
(
ScoreExcelBean:
:
getMileage
).
sum
();
// 判断是否完赛
if
(
user
.
getScores
().
size
()
==
rules
.
size
()){
user
.
setDone
(
true
);
...
...
@@ -274,6 +274,8 @@ public class ScoreController {
}
user
.
setTotalDuration
(
total
);
user
.
setDurationStr
(
DateUtil
.
formatDate
(
total
));
user
.
setTotalMileage
(
totalMileage
);
user
.
setMileageStr
(
String
.
valueOf
(
totalMileage
/
1000
));
});
// 一条成绩没有的
...
...
src/main/webapp/WEB-INF/views/cmpt/scan.jsp
View file @
e2c9b856
...
...
@@ -152,9 +152,6 @@
left
:
50%
;
margin-left
:
-69px
;
}
.QRCodeDown
{
display
:
none
;
}
</style>
</head>
<body>
...
...
src/main/webapp/WEB-INF/views/cmpt/score.jsp
View file @
e2c9b856
...
...
@@ -167,6 +167,20 @@
</tbody>
</table>
</div>
<!--成绩附加项-->
<div
class=
"section"
>
<h3
class=
"title"
>
成绩附加项
</h3>
<div
style=
"line-height: 22px"
>
<span
class=
"road-notice"
></span>
<span
class=
"road-notice-txt"
>
每一个附加项在每次成绩上传时均为必填,请谨慎启用
</span>
</div>
<div
class=
"add-btn"
>
<span>
+
</span>
<span>
添加照片项
</span>
</div>
</div>
</div>
</div>
...
...
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