Commit 6d4f56a5 authored by yangshuxing's avatar yangshuxing

修改提交成绩查看成绩,图片多次显示问题

parent ee4586a3
...@@ -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>
......
...@@ -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));
} }
......
...@@ -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();
......
...@@ -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>
......
...@@ -186,10 +186,10 @@ label{ ...@@ -186,10 +186,10 @@ label{
} }
.input-group{ .input-group{
position: relative; position: relative;
width: 156px; width: 170px;
} }
.time-input{ .time-input{
width: 156px; width: 170px;
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: 10px; right: 4px;
background-size: contain; background-size: contain;
} }
.line{ .line{
width: 100px; width: 50px;
height: 1px; height: 1px;
background: #E5E5E5; background: #E5E5E5;
margin: 0px 10px; margin: 0px 10px;
......
...@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment