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
6d4f56a5
Commit
6d4f56a5
authored
May 14, 2020
by
yangshuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改提交成绩查看成绩,图片多次显示问题
parent
ee4586a3
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
21 deletions
+27
-21
FuncSettingMapper.xml
...bridge/jadp/plugins/cmpt/dao/mapper/FuncSettingMapper.xml
+1
-1
MicroApiController.java
...om/dlbridge/jadp/plugins/cmpt/web/MicroApiController.java
+12
-7
ScoreController.java
...a/com/dlbridge/jadp/plugins/cmpt/web/ScoreController.java
+2
-1
score.jsp
src/main/webapp/WEB-INF/views/cmpt/score.jsp
+6
-6
score.css
src/main/webapp/static/cmpt/score.css
+4
-4
score.js
src/main/webapp/static/js/score.js
+2
-2
No files found.
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/FuncSettingMapper.xml
View file @
6d4f56a5
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<insert
id=
"saveSetting"
>
<insert
id=
"saveSetting"
>
insert into gk_cmpt_func(cmpt_id,switch_mobile,switch_countdown,switch_news,switch_banner,switch_mileage,create_date)
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())
values (#{setting.cmptId},#{setting.mobile},#{setting.countDown},#{setting.news},#{setting.banner},
0
,now())
</insert>
</insert>
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/web/MicroApiController.java
View file @
6d4f56a5
...
@@ -854,13 +854,14 @@ public class MicroApiController {
...
@@ -854,13 +854,14 @@ public class MicroApiController {
.
setSubsectionTime
(
score
.
getScore
().
getDate
())
.
setSubsectionTime
(
score
.
getScore
().
getDate
())
.
setCmptId
(
score
.
getCmptId
())
.
setCmptId
(
score
.
getCmptId
())
.
setCmptScoreId
(
1
);
.
setCmptScoreId
(
1
);
String
date
=
score
.
getScore
().
getDate
()+
" 12:00:00"
;
Date
date1
=
DateUtils
.
parseDate
(
date
);
/*Date date1 = new Date(
);
Date endTime = rule.getEndTime();
Date endTime = rule.getEndTime();
Date startTime = rule.getStartTime();
Date startTime = rule.getStartTime();
if(date1.before(startTime) || date1.after(endTime)){
if(date1.before(startTime) || date1.after(endTime)){
return Result.fail().setMsg("上传的时间不符合设定的时间范围,需上传时间范围:"+format.format(startTime)+"~"+format.format(endTime));
return Result.fail().setMsg("上传的时间不符合设定的时间范围,需上传时间范围:"+format.format(startTime)+"~"+format.format(endTime));
}
}*/
// 保存成绩
// 保存成绩
Result
<
ScoreItem
>
scoreItemResult
=
scoreService
.
saveItem
(
scoreItem
);
Result
<
ScoreItem
>
scoreItemResult
=
scoreService
.
saveItem
(
scoreItem
);
log
.
info
(
scoreItemResult
);
log
.
info
(
scoreItemResult
);
...
@@ -906,8 +907,8 @@ public class MicroApiController {
...
@@ -906,8 +907,8 @@ public class MicroApiController {
Integer
scoreItemId
=
cmptScoreRuleService
.
getCmptScoreRulesMapByMarkNoAndRuleId
(
userInfo
.
getMarkNo
(),
rule
.
getId
());
Integer
scoreItemId
=
cmptScoreRuleService
.
getCmptScoreRulesMapByMarkNoAndRuleId
(
userInfo
.
getMarkNo
(),
rule
.
getId
());
//小程序添加里程的是否需要用户填写
//小程序添加里程的是否需要用户填写
FuncSetting
funcSetting
=
funcSettingService
.
getSettingByCmptId
(
score
.
getCmptId
());
FuncSetting
funcSetting
=
funcSettingService
.
getSettingByCmptId
(
score
.
getCmptId
());
Integer
switchMileage
=
funcSetting
.
getMileage
();
Integer
switchMileage
=
funcSetting
.
getMileage
();
Integer
subsectionMileage
=
0
;
Integer
subsectionMileage
=
0
;
if
(
scoreItemId
!=
null
){
if
(
scoreItemId
!=
null
){
...
@@ -918,9 +919,13 @@ public class MicroApiController {
...
@@ -918,9 +919,13 @@ public class MicroApiController {
}
else
{
}
else
{
subsectionMileage
=
content
.
getSubsectionMileage
();
subsectionMileage
=
content
.
getSubsectionMileage
();
}
}
result
.
put
(
"score"
,
new
Score
().
setDate
(
content
.
getSubsectionTime
().
substring
(
0
,
10
)).
setDuration
(
content
.
getSubsectionscore
()).
setMileage
(
subsectionMileage
).
setSwitchMileage
(
switchMileage
));
result
.
put
(
"score"
,
new
Score
().
setDate
(
content
.
getSubsectionTime
().
substring
(
0
,
10
))
.
setDuration
(
content
.
getSubsectionscore
())
.
setMileage
(
subsectionMileage
).
setSwitchMileage
(
switchMileage
));
}
else
{
//初始阶段没有上传成绩,json也显示score,方便前端判断
}
else
{
//初始阶段没有上传成绩,json也显示score,方便前端判断
result
.
put
(
"score"
,
new
Score
().
setDate
(
"0000-00-00"
).
setDuration
(
0
).
setMileage
(
subsectionMileage
).
setSwitchMileage
(
switchMileage
));
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 @
6d4f56a5
...
@@ -114,7 +114,8 @@ public class ScoreController {
...
@@ -114,7 +114,8 @@ public class ScoreController {
score
.
setDate
(
content
.
getSubsectionTime
().
substring
(
0
,
10
))
score
.
setDate
(
content
.
getSubsectionTime
().
substring
(
0
,
10
))
.
setDuration
(
content
.
getSubsectionscore
())
.
setDuration
(
content
.
getSubsectionscore
())
.
setDurationStr
(
DateUtil
.
formatDate
(
content
.
getSubsectionscore
())).
setMileage
(
content
.
getSubsectionMileage
())
.
setDurationStr
(
DateUtil
.
formatDate
(
content
.
getSubsectionscore
()))
.
setMileage
(
content
.
getSubsectionMileage
())
.
setId
(
content
.
getId
());
.
setId
(
content
.
getId
());
duration
+=
content
.
getSubsectionscore
();
duration
+=
content
.
getSubsectionscore
();
...
...
src/main/webapp/WEB-INF/views/cmpt/score.jsp
View file @
6d4f56a5
...
@@ -61,15 +61,15 @@
...
@@ -61,15 +61,15 @@
<label
for=
""
>
第${vs.index+1}次上传成绩的起止时间
</label>
<label
for=
""
>
第${vs.index+1}次上传成绩的起止时间
</label>
<div
class=
"input-group"
>
<div
class=
"input-group"
>
<input
type=
"text"
${
isClose
?
'
disabled
'
:
''}
class=
"time-input"
readonly
name=
"start"
<input
type=
"text"
${
isClose
?
'
disabled
'
:
''}
class=
"time-input"
readonly
name=
"start"
onclick=
"WdatePicker({dateFmt:'yyyy-MM-dd'})"
onclick=
"WdatePicker({dateFmt:'yyyy-MM-dd
HH:mm
'})"
value=
"
<fmt:formatDate
value=
'
${
item
.
startTime
}
'
pattern=
'yyyy-MM-dd'
></fmt:formatDate>
"
>
value=
"
<fmt:formatDate
value=
'
${
item
.
startTime
}
'
pattern=
'yyyy-MM-dd
HH:mm
'
></fmt:formatDate>
"
>
<span
class=
"down-arrow"
></span>
<span
class=
"down-arrow"
></span>
</div>
</div>
<div
class=
"line"
></div>
<div
class=
"line"
></div>
<div
class=
"input-group"
>
<div
class=
"input-group"
>
<input
type=
"text"
${
isClose
?
'
disabled
'
:
''}
class=
"time-input"
readonly
name=
"end"
<input
type=
"text"
${
isClose
?
'
disabled
'
:
''}
class=
"time-input"
readonly
name=
"end"
onclick=
"WdatePicker({dateFmt:'yyyy-MM-dd'})"
onclick=
"WdatePicker({dateFmt:'yyyy-MM-dd
HH:mm
'})"
value=
"
<fmt:formatDate
value=
'
${
item
.
endTime
}
'
pattern=
'yyyy-MM-dd'
></fmt:formatDate>
"
>
value=
"
<fmt:formatDate
value=
'
${
item
.
endTime
}
'
pattern=
'yyyy-MM-dd
HH:mm
'
></fmt:formatDate>
"
>
<span
class=
"down-arrow"
></span>
<span
class=
"down-arrow"
></span>
</div>
</div>
</div>
</div>
...
@@ -208,12 +208,12 @@
...
@@ -208,12 +208,12 @@
<div
class=
"rule-item template"
style=
"display: none"
>
<div
class=
"rule-item template"
style=
"display: none"
>
<label
for=
""
>
第1次上传成绩的起止时间
</label>
<label
for=
""
>
第1次上传成绩的起止时间
</label>
<div
class=
"input-group"
>
<div
class=
"input-group"
>
<input
type=
"text"
class=
"time-input"
readonly
name=
"start"
onclick=
"WdatePicker({dateFmt:'yyyy-MM-dd'})"
value=
"${ cmpt.startTime}"
>
<input
type=
"text"
class=
"time-input"
readonly
name=
"start"
onclick=
"WdatePicker({dateFmt:'yyyy-MM-dd
HH:mm
'})"
value=
"${ cmpt.startTime}"
>
<span
class=
"down-arrow"
></span>
<span
class=
"down-arrow"
></span>
</div>
</div>
<div
class=
"line"
></div>
<div
class=
"line"
></div>
<div
class=
"input-group"
>
<div
class=
"input-group"
>
<input
type=
"text"
class=
"time-input"
readonly
name=
"end"
onclick=
"WdatePicker({dateFmt:'yyyy-MM-dd'})"
value=
"${ cmpt.startTime}"
>
<input
type=
"text"
class=
"time-input"
readonly
name=
"end"
onclick=
"WdatePicker({dateFmt:'yyyy-MM-dd
HH:mm
'})"
value=
"${ cmpt.startTime}"
>
<span
class=
"down-arrow"
></span>
<span
class=
"down-arrow"
></span>
</div>
</div>
</div>
</div>
...
...
src/main/webapp/static/cmpt/score.css
View file @
6d4f56a5
...
@@ -186,10 +186,10 @@ label{
...
@@ -186,10 +186,10 @@ label{
}
}
.input-group
{
.input-group
{
position
:
relative
;
position
:
relative
;
width
:
1
56
px
;
width
:
1
70
px
;
}
}
.time-input
{
.time-input
{
width
:
1
56
px
;
width
:
1
70
px
;
height
:
38px
;
height
:
38px
;
cursor
:
pointer
;
cursor
:
pointer
;
}
}
...
@@ -202,11 +202,11 @@ label{
...
@@ -202,11 +202,11 @@ label{
background-repeat
:
no-repeat
;
background-repeat
:
no-repeat
;
position
:
absolute
;
position
:
absolute
;
top
:
15px
;
top
:
15px
;
right
:
10
px
;
right
:
4
px
;
background-size
:
contain
;
background-size
:
contain
;
}
}
.line
{
.line
{
width
:
10
0px
;
width
:
5
0px
;
height
:
1px
;
height
:
1px
;
background
:
#E5E5E5
;
background
:
#E5E5E5
;
margin
:
0px
10px
;
margin
:
0px
10px
;
...
...
src/main/webapp/static/js/score.js
View file @
6d4f56a5
...
@@ -212,8 +212,8 @@ $(document).ready(function () {
...
@@ -212,8 +212,8 @@ $(document).ready(function () {
return
false
;
return
false
;
}
}
var
id
=
$
(
e
).
attr
(
'data-id'
);
var
id
=
$
(
e
).
attr
(
'data-id'
);
obj
.
startTime
=
startTime
+
"
00:00
:00"
;
obj
.
startTime
=
startTime
+
":00"
;
obj
.
endTime
=
endTime
+
"
23:59:59
"
;
obj
.
endTime
=
endTime
+
"
:00
"
;
obj
.
id
=
id
;
obj
.
id
=
id
;
obj
.
index
=
i
;
obj
.
index
=
i
;
obj
.
cmptId
=
getCId
()
obj
.
cmptId
=
getCId
()
...
...
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