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
830cfbf8
Commit
830cfbf8
authored
May 22, 2020
by
yangshuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug优化
parent
0e514012
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
5 deletions
+36
-5
CmptScoreRuleMapper.xml
...idge/jadp/plugins/cmpt/dao/mapper/CmptScoreRuleMapper.xml
+1
-1
CmptScoreRuleService.java
...ridge/jadp/plugins/cmpt/service/CmptScoreRuleService.java
+1
-1
MicroApiController.java
...om/dlbridge/jadp/plugins/cmpt/web/MicroApiController.java
+2
-1
score.css
src/main/webapp/static/cmpt/score.css
+1
-1
score.js
src/main/webapp/static/js/score.js
+31
-1
No files found.
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/CmptScoreRuleMapper.xml
View file @
830cfbf8
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
from gk_cmpt_score_rule where cmpt_id=#{cmptId} order by `index`
from gk_cmpt_score_rule where cmpt_id=#{cmptId} order by `index`
</select>
</select>
<insert
id=
"save"
useGeneratedKeys=
"true"
keyProperty=
"id"
keyColumn=
"id"
>
<insert
id=
"save"
useGeneratedKeys=
"true"
keyProperty=
"
cmptScoreRule.
id"
keyColumn=
"id"
>
insert into gk_cmpt_score_rule(cmpt_id,`index`,start_time,end_time)
insert into gk_cmpt_score_rule(cmpt_id,`index`,start_time,end_time)
VALUES(#{cmptScoreRule.cmptId},#{cmptScoreRule.index},#{cmptScoreRule.startTime},#{cmptScoreRule.endTime})
VALUES(#{cmptScoreRule.cmptId},#{cmptScoreRule.index},#{cmptScoreRule.startTime},#{cmptScoreRule.endTime})
</insert>
</insert>
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/service/CmptScoreRuleService.java
View file @
830cfbf8
...
@@ -24,7 +24,7 @@ public class CmptScoreRuleService {
...
@@ -24,7 +24,7 @@ public class CmptScoreRuleService {
*/
*/
public
int
saveOrUpdate
(
List
<
CmptScoreRule
>
cmptScoreRules
){
public
int
saveOrUpdate
(
List
<
CmptScoreRule
>
cmptScoreRules
){
for
(
CmptScoreRule
cmptScoreRule:
cmptScoreRules
){
for
(
CmptScoreRule
cmptScoreRule:
cmptScoreRules
){
if
(
cmptScoreRule
.
getId
()
=
=
0
){
if
(
cmptScoreRule
.
getId
()
<
=
0
){
cmptScoreRuleMapper
.
save
(
cmptScoreRule
);
cmptScoreRuleMapper
.
save
(
cmptScoreRule
);
}
else
{
}
else
{
cmptScoreRuleMapper
.
update
(
cmptScoreRule
);
cmptScoreRuleMapper
.
update
(
cmptScoreRule
);
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/web/MicroApiController.java
View file @
830cfbf8
...
@@ -136,6 +136,7 @@ public class MicroApiController {
...
@@ -136,6 +136,7 @@ public class MicroApiController {
log
.
info
(
"userId:"
+
userId
+
",phone:"
+
phone
+
",cmptId:"
+
cmptId
);
log
.
info
(
"userId:"
+
userId
+
",phone:"
+
phone
+
",cmptId:"
+
cmptId
);
EnrollInfo
info
=
cmptService
.
bind
(
userId
,
phone
,
cmptId
);
EnrollInfo
info
=
cmptService
.
bind
(
userId
,
phone
,
cmptId
);
if
(
info
==
null
)
{
if
(
info
==
null
)
{
return
Result
.
fail
().
setMsg
(
"该用户未报名!"
);
return
Result
.
fail
().
setMsg
(
"该用户未报名!"
);
}
}
return
Result
.
success
().
setMsg
(
"绑定成功!"
).
setContent
(
info
);
return
Result
.
success
().
setMsg
(
"绑定成功!"
).
setContent
(
info
);
...
@@ -242,7 +243,7 @@ public class MicroApiController {
...
@@ -242,7 +243,7 @@ public class MicroApiController {
public
Result
getCustomer
(
@PathVariable
(
"cmptId"
)
Integer
cmptId
)
{
public
Result
getCustomer
(
@PathVariable
(
"cmptId"
)
Integer
cmptId
)
{
Customer
customer
=
customerService
.
getCusomerServiceInfo
(
cmptId
);
Customer
customer
=
customerService
.
getCusomerServiceInfo
(
cmptId
);
Map
<
String
,
String
>
result
=
new
HashMap
<>();
Map
<
String
,
String
>
result
=
new
HashMap
<>();
result
.
put
(
"mobile"
,
customer
.
getMobile
());
result
.
put
(
"mobile"
,
customer
==
null
?
""
:
customer
.
getMobile
());
return
Result
.
success
().
setContent
(
result
);
return
Result
.
success
().
setContent
(
result
);
}
}
...
...
src/main/webapp/static/cmpt/score.css
View file @
830cfbf8
...
@@ -21,7 +21,7 @@ input{
...
@@ -21,7 +21,7 @@ input{
background
:
rgba
(
247
,
247
,
247
,
1
);
background
:
rgba
(
247
,
247
,
247
,
1
);
border-radius
:
4px
;
border-radius
:
4px
;
border
:
1px
solid
rgba
(
229
,
229
,
229
,
1
);
border
:
1px
solid
rgba
(
229
,
229
,
229
,
1
);
padding-left
:
10
px
;
padding-left
:
7
px
;
}
}
.tip
{
.tip
{
font-size
:
16px
;
font-size
:
16px
;
...
...
src/main/webapp/static/js/score.js
View file @
830cfbf8
...
@@ -34,6 +34,10 @@ $(document).ready(function () {
...
@@ -34,6 +34,10 @@ $(document).ready(function () {
url
:
"/gk/score/getScore/"
+
getCId
()
+
"/"
+
param
,
url
:
"/gk/score/getScore/"
+
getCId
()
+
"/"
+
param
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
var
result
=
data
.
content
;
var
result
=
data
.
content
;
if
(
result
.
user
){
layer
.
msg
(
"未查到人员信息"
);
return
;
}
$
(
'#score-body'
).
empty
();
$
(
'#score-body'
).
empty
();
if
(
result
.
scores
.
length
>
0
){
if
(
result
.
scores
.
length
>
0
){
$
(
'#data'
).
fadeIn
();
$
(
'#data'
).
fadeIn
();
...
@@ -126,6 +130,10 @@ $(document).ready(function () {
...
@@ -126,6 +130,10 @@ $(document).ready(function () {
})
})
$
(
'.add-btn'
).
click
(
function
()
{
$
(
'.add-btn'
).
click
(
function
()
{
if
(
$
(
'.rule-field tbody tr'
).
length
>=
5
){
layer
.
alert
(
'最多只能设置5个项目!'
);
return
;
}
$
(
'.dialog'
).
removeAttr
(
'data-id'
);
$
(
'.dialog'
).
removeAttr
(
'data-id'
);
$
(
'.dialog input'
).
val
(
''
);
$
(
'.dialog input'
).
val
(
''
);
$
(
'.mask'
).
fadeIn
();
$
(
'.mask'
).
fadeIn
();
...
@@ -162,6 +170,10 @@ $(document).ready(function () {
...
@@ -162,6 +170,10 @@ $(document).ready(function () {
});
});
$
(
'.count-input'
).
keyup
(
function
()
{
$
(
'.count-input'
).
keyup
(
function
()
{
if
(
$
(
'.save-btn'
).
length
==
0
){
layer
.
alert
(
'比赛已经开始,不能修改规则!'
);
return
;
}
var
value
=
$
(
this
).
val
();
var
value
=
$
(
this
).
val
();
if
(
value
>
10
){
if
(
value
>
10
){
layer
.
msg
(
'最多只能设置9次!'
);
layer
.
msg
(
'最多只能设置9次!'
);
...
@@ -182,7 +194,7 @@ $(document).ready(function () {
...
@@ -182,7 +194,7 @@ $(document).ready(function () {
item
=
$
(
'#rule-section .rule-item'
).
last
().
clone
().
clone
();
item
=
$
(
'#rule-section .rule-item'
).
last
().
clone
().
clone
();
}
}
var
number
=
item
.
find
(
'label'
).
text
().
replace
(
/
[^
0-9
]
/ig
,
""
);
var
number
=
item
.
find
(
'label'
).
text
().
replace
(
/
[^
0-9
]
/ig
,
""
);
item
.
removeAttr
(
'data-id'
)
item
.
attr
(
'data-id'
,(
$
(
'.rule-item'
).
length
+
1
)
*-
1
)
item
.
find
(
'label'
).
text
(
'第'
+
(
$
(
'#rule-section .rule-item'
).
length
+
1
)
+
"次上传成绩的起止时间"
)
item
.
find
(
'label'
).
text
(
'第'
+
(
$
(
'#rule-section .rule-item'
).
length
+
1
)
+
"次上传成绩的起止时间"
)
$
(
'#rule-section'
).
append
(
item
);
$
(
'#rule-section'
).
append
(
item
);
$
(
'#rule-section'
).
append
(
$
(
'#rule-section .clear'
));
$
(
'#rule-section'
).
append
(
$
(
'#rule-section .clear'
));
...
@@ -229,6 +241,21 @@ $(document).ready(function () {
...
@@ -229,6 +241,21 @@ $(document).ready(function () {
success
:
function
(
data
)
{
success
:
function
(
data
)
{
if
(
data
.
status
){
if
(
data
.
status
){
layer
.
msg
(
"保存成功!"
);
layer
.
msg
(
"保存成功!"
);
$
(
'#rule-section .rule-item'
).
remove
();
$
.
each
(
data
.
content
,
function
(
i
,
e
)
{
var
item
=
null
;
item
=
$
(
'.template'
).
clone
().
clone
().
show
();
item
.
removeClass
(
"template"
)
var
number
=
item
.
find
(
'label'
).
text
().
replace
(
/
[^
0-9
]
/ig
,
""
);
var
start
=
new
Date
(
e
.
startTime
);
var
end
=
new
Date
(
e
.
endTime
);
item
.
find
(
'input[name="start"]'
).
val
(
start
.
getFullYear
()
+
"-"
+
(
start
.
getMonth
()
+
1
)
+
"-"
+
start
.
getDate
()
+
" "
+
start
.
getHours
()
+
":"
+
start
.
getMinutes
());
item
.
find
(
'input[name="end"]'
).
val
(
end
.
getFullYear
()
+
"-"
+
(
end
.
getMonth
()
+
1
)
+
"-"
+
end
.
getDate
()
+
" "
+
end
.
getHours
()
+
":"
+
end
.
getMinutes
());
item
.
attr
(
'data-id'
,
e
.
id
)
item
.
find
(
'label'
).
text
(
'第'
+
(
$
(
'#rule-section .rule-item'
).
length
+
1
)
+
"次上传成绩的起止时间"
)
$
(
'#rule-section'
).
append
(
item
);
$
(
'#rule-section'
).
append
(
$
(
'#rule-section .clear'
));
})
}
}
}
}
})
})
...
@@ -352,6 +379,9 @@ function drawChart(roads,series) {
...
@@ -352,6 +379,9 @@ function drawChart(roads,series) {
text
:
'打卡次数'
text
:
'打卡次数'
}
}
}],
}],
credits
:
{
enabled
:
false
},
legend
:
{
legend
:
{
shadow
:
false
shadow
:
false
},
},
...
...
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