Commit 882653d4 authored by yangshuxing's avatar yangshuxing

调整成绩规则,默认排序

parent bb85a681
...@@ -164,7 +164,10 @@ ...@@ -164,7 +164,10 @@
start_time = #{startTime}, start_time = #{startTime},
</if> </if>
<if test="cmptType != null"> <if test="cmptType != null">
cmpt_type = #{cmptType} cmpt_type = #{cmptType},
</if>
<if test="endTime != null">
end_time = #{endTime}
</if> </if>
</set> </set>
where cmpt_id = #{cmptId} where cmpt_id = #{cmptId}
......
...@@ -44,7 +44,9 @@ public class CmptService { ...@@ -44,7 +44,9 @@ public class CmptService {
} }
cmpt.setCmptId(cmptId); cmpt.setCmptId(cmptId);
logger.info(cmpt); logger.info(cmpt);
Cmpt localCmpt = cmptMapper.queryCmptBycmptId(cmptId); Cmpt localCmpt = cmptMapper.queryCmptBycmptId(cmptId);
if (localCmpt == null) { if (localCmpt == null) {
save(cmpt); save(cmpt);
return cmptMapper.queryCmptBycmptId(cmptId); return cmptMapper.queryCmptBycmptId(cmptId);
......
package com.dlbridge.jadp.plugins.cmpt.web; package com.dlbridge.jadp.plugins.cmpt.web;
import java.rmi.Remote;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import com.dlbridge.jadp.common.interceptor.PageView; import com.dlbridge.jadp.common.interceptor.PageView;
import com.dlbridge.jadp.common.persistence.IStorageService;
import com.dlbridge.jadp.common.persistence.Result;
import com.dlbridge.jadp.common.properties.Global;
import com.dlbridge.jadp.common.service.FileSystemStorageService;
import com.dlbridge.jadp.plugins.cmpt.bean.NeuUser; import com.dlbridge.jadp.plugins.cmpt.bean.NeuUser;
import com.dlbridge.jadp.plugins.cmpt.bean.RaceEnrollUser; import com.dlbridge.jadp.plugins.cmpt.bean.RaceEnrollUser;
import com.neusoft.www.utils.web.*; import com.dlbridge.jadp.plugins.cmpt.dao.model.Cmpt;
import com.dlbridge.jadp.plugins.cmpt.service.CmptService;
import com.dlbridge.jadp.plugins.cmpt.service.CmptSettingService;
import com.dlbridge.jadp.plugins.cmpt.service.RemoteService; import com.dlbridge.jadp.plugins.cmpt.service.RemoteService;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.apache.commons.lang3.StringUtils;
import org.springframework.util.DigestUtils; import org.springframework.util.DigestUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.support.StandardMultipartHttpServletRequest; import org.springframework.web.multipart.support.StandardMultipartHttpServletRequest;
import com.dlbridge.jadp.common.persistence.IStorageService;
import com.dlbridge.jadp.common.persistence.Result;
import com.dlbridge.jadp.common.properties.Global;
import com.dlbridge.jadp.common.service.FileSystemStorageService;
import com.dlbridge.jadp.plugins.cmpt.dao.model.Cmpt;
import com.dlbridge.jadp.plugins.cmpt.service.CmptService;
import com.dlbridge.jadp.plugins.cmpt.service.CmptSettingService;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import springfox.documentation.annotations.ApiIgnore; import springfox.documentation.annotations.ApiIgnore;
import sun.misc.BASE64Decoder; import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder; import sun.misc.BASE64Encoder;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/** /**
* 赛事 * 赛事
* *
...@@ -61,6 +54,13 @@ public class CmptController { ...@@ -61,6 +54,13 @@ public class CmptController {
@Value("${timer.url}") @Value("${timer.url}")
private String timerURL; private String timerURL;
@RequestMapping("/getCmpt/{cmptId}")
@ResponseBody
public Cmpt getCmpt(@PathVariable("cmptId") int cmptId){
Cmpt cmptByCmptId = remoteService.getCmptByCmptId(cmptId);
return cmptByCmptId;
}
/** /**
* 保存修改赛事目录手册 * 保存修改赛事目录手册
* *
......
package com.dlbridge.jadp.plugins.cmpt.web; package com.dlbridge.jadp.plugins.cmpt.web;
import com.dlbridge.feign.GeexekScoreService;
import com.dlbridge.jadp.common.interceptor.PageView; import com.dlbridge.jadp.common.interceptor.PageView;
import com.dlbridge.jadp.plugins.cmpt.bean.CmptSettingTemplate; import com.dlbridge.jadp.plugins.cmpt.bean.CmptSettingTemplate;
import com.dlbridge.jadp.plugins.cmpt.bean.FuncSetting; import com.dlbridge.jadp.plugins.cmpt.bean.FuncSetting;
...@@ -59,6 +60,9 @@ public class CmptSettingController { ...@@ -59,6 +60,9 @@ public class CmptSettingController {
@Resource @Resource
private FuncSettingService funcSettingService; private FuncSettingService funcSettingService;
@Resource
private GeexekScoreService geexekScoreService;
/** /**
* 去功能管理页面 * 去功能管理页面
* *
...@@ -170,6 +174,8 @@ public class CmptSettingController { ...@@ -170,6 +174,8 @@ public class CmptSettingController {
count = remoteService.getEnrollCmptAuditStatus(cmptId + ""); count = remoteService.getEnrollCmptAuditStatus(cmptId + "");
}else if (type == 12) { // 赛事报名 }else if (type == 12) { // 赛事报名
count = remoteService.getCmptEnrollCount(cmptId); count = remoteService.getCmptEnrollCount(cmptId);
}else if (type == 15 || type == 16) { // 自动打卡,扫描打卡
count = geexekScoreService.hasCheckPoint(cmptId);
} else { } else {
return Result.success(); return Result.success();
} }
......
package com.dlbridge.jadp.plugins.cmpt.web; package com.dlbridge.jadp.plugins.cmpt.web;
import com.dlbridge.feign.NewsService;
import com.dlbridge.feign.bean.News;
import com.dlbridge.jadp.plugins.cmpt.bean.Banner; import com.dlbridge.jadp.plugins.cmpt.bean.Banner;
import com.dlbridge.jadp.plugins.cmpt.bean.Customer; import com.dlbridge.jadp.plugins.cmpt.bean.Customer;
import com.dlbridge.jadp.plugins.cmpt.bean.FuncSetting; import com.dlbridge.jadp.plugins.cmpt.bean.FuncSetting;
...@@ -8,7 +10,6 @@ import com.dlbridge.jadp.plugins.cmpt.service.CustomerService; ...@@ -8,7 +10,6 @@ import com.dlbridge.jadp.plugins.cmpt.service.CustomerService;
import com.dlbridge.jadp.plugins.cmpt.service.FuncSettingService; import com.dlbridge.jadp.plugins.cmpt.service.FuncSettingService;
import com.neusoft.www.utils.web.Result; import com.neusoft.www.utils.web.Result;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -28,6 +29,9 @@ public class FuncSettingController { ...@@ -28,6 +29,9 @@ public class FuncSettingController {
@Resource @Resource
private CustomerService customerService; private CustomerService customerService;
@Resource
private NewsService newsService;
@Resource @Resource
BannerService bannerService; BannerService bannerService;
...@@ -42,13 +46,17 @@ public class FuncSettingController { ...@@ -42,13 +46,17 @@ public class FuncSettingController {
if(setting.getBanner() != null && setting.getBanner() == 1){ if(setting.getBanner() != null && setting.getBanner() == 1){
List<Banner> banners = bannerService.queryAll(setting.getCmptId()); List<Banner> banners = bannerService.queryAll(setting.getCmptId());
if(banners.size() == 0){ if(banners.size() == 0){
return Result.fail().setCode(-201).setMsg("未设置广告"); return Result.fail().setCode(-201).setMsg("未设置广告!");
} }
} } else if(setting.getCustomer() != null && setting.getCustomer() == 1){
if(setting.getCustomer() != null && setting.getCustomer() == 1){
Customer customer = customerService.getCusomerServiceInfo(setting.getCmptId()); Customer customer = customerService.getCusomerServiceInfo(setting.getCmptId());
if(customer == null || StringUtils.isBlank(customer.getMobile())){ if(customer == null || StringUtils.isBlank(customer.getMobile())){
return Result.fail().setCode(-301).setMsg("未设置客服"); return Result.fail().setCode(-301).setMsg("未设置客服!");
}
}else if(setting.getNews() != null && setting.getNews() == 1){
List<News> news = newsService.queryNewsByCmptId(setting.getCmptId());
if(news == null || news.size() == 0){
return Result.fail().setCode(-401).setMsg("未设置公告!");
} }
} }
FuncSetting settingByCmptId = funcSettingService.getSettingByCmptId(setting.getCmptId()); FuncSetting settingByCmptId = funcSettingService.getSettingByCmptId(setting.getCmptId());
......
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
<span>{{Number(score.subsectionMileage/1000).toFixed(3)}}</span> <span>{{Number(score.subsectionMileage/1000).toFixed(3)}}</span>
<span>{{score.subsectionscore | date_format}}</span> <span>{{score.subsectionscore | date_format}}</span>
<span>{{score.cmptPace | pace(Number(score.subsectionMileage/1000).toFixed(3),score.subsectionscore) }}</span> <span>{{score.cmptPace | pace(Number(score.subsectionMileage/1000).toFixed(3),score.subsectionscore) }}</span>
<span><input v-on:click.stop="javascrip:;"type="checkbox" :value="score.cmptScoreRuleScoreinfoId" :checked="checked?'true':'' "></span> <span><input v-on:click.stop=""type="checkbox" :value="score.cmptScoreRuleScoreinfoId" :checked="checked?'true':'' "></span>
</div> </div>
<div class="flex score-img"> <div class="flex score-img">
<div class="img-item" v-for="item in score.scoreFieldValueList"> <div class="img-item" v-for="item in score.scoreFieldValueList">
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
getCharts(); getCharts();
function getCharts() { function getCharts() {
$.ajax({ $.ajax({
url : 'http://localhost:8081/geexekscore/api/v1/cmpt-score-rule-scoreinfo/scoreStatistic?cmptId='+getCId(), url : 'http://testzs.geexek.com.cn/geexekscore/api/v1/cmpt-score-rule-scoreinfo/scoreStatistic?cmptId='+getCId(),
success:function (data) { success:function (data) {
var roads = data.data; var roads = data.data;
var roadNames = []; var roadNames = [];
......
...@@ -26,6 +26,9 @@ $(function () { ...@@ -26,6 +26,9 @@ $(function () {
window.location.href="/gk/banner/index/"+getCmptId()+"?"+window.location.search; window.location.href="/gk/banner/index/"+getCmptId()+"?"+window.location.search;
}else if(data.code == -301){ }else if(data.code == -301){
window.location.href="/gk/customer/index/"+getCmptId()+"?"+window.location.search; window.location.href="/gk/customer/index/"+getCmptId()+"?"+window.location.search;
}else if(data.code == -401){
layer.msg("还没设置公告!")
window.location.href="/gk/news/index/"+getCmptId()+"?"+window.location.search;
} }
} }
}) })
...@@ -66,6 +69,12 @@ $(function () { ...@@ -66,6 +69,12 @@ $(function () {
layer.alert("要启用此功能,需要先联系管理员通过赛事审核"); layer.alert("要启用此功能,需要先联系管理员通过赛事审核");
} else if (type == 12){ } else if (type == 12){
layer.alert("要启用此功能,请先在计时管理页面完成名单导入"); layer.alert("要启用此功能,请先在计时管理页面完成名单导入");
}else if (type == 15){
layer.alert("要启用此功能,请先导入路线,且路线上至少有3个标注点");
window.location.href="/gk/road/index/"+getCmptId()+"?"+window.location.search;
} else if (type == 16){
layer.alert("要启用此功能,请先导入路线,且路线上至少有3个标注点");
window.location.href="/gk/road/index/"+getCmptId()+"?"+window.location.search;
} }
} else { } else {
if (type == 2 || type == 5) { if (type == 2 || type == 5) {
......
...@@ -122,7 +122,7 @@ var score = new Vue({ ...@@ -122,7 +122,7 @@ var score = new Vue({
return ; return ;
} }
$.ajax({ $.ajax({
url:"http://localhost:8081/geexekscore/api/v1/cmpt-score-rule-scoreinfo/getCmptScoreRuleScoreDetails?scoreId="+id, url:"http://testzs.geexek.com.cn/geexekscore/api/v1/cmpt-score-rule-scoreinfo/getCmptScoreRuleScoreDetails?scoreId="+id,
success:function (data) { success:function (data) {
if(data.code == 200){ if(data.code == 200){
if(data.data.length == 0){ if(data.data.length == 0){
...@@ -158,7 +158,7 @@ var score = new Vue({ ...@@ -158,7 +158,7 @@ var score = new Vue({
return; return;
} }
$.ajax({ $.ajax({
url : 'http://localhost:8081/geexekscore/api/v1/cmpt-score-rule-scoreinfo/deleteScoreInfos', url : 'http://testzs.geexek.com.cn/geexekscore/api/v1/cmpt-score-rule-scoreinfo/deleteScoreInfos',
data:{ids:delIds.join(",")}, data:{ids:delIds.join(",")},
type: 'post', type: 'post',
success:function (data) { success:function (data) {
...@@ -202,7 +202,7 @@ var reviewPage = { ...@@ -202,7 +202,7 @@ var reviewPage = {
score.$data.param.origin = score.$data.selectedOrigin; score.$data.param.origin = score.$data.selectedOrigin;
score.$data.param.keyword = score.$data.searchWord; score.$data.param.keyword = score.$data.searchWord;
$.ajax({ $.ajax({
url : 'http://localhost:8081/geexekscore/api/v1/cmpt-score-rule-scoreinfo/getCmptScoreRuleScoreInfo', url : 'http://testzs.geexek.com.cn/geexekscore/api/v1/cmpt-score-rule-scoreinfo/getCmptScoreRuleScoreInfo',
data:score.$data.param, data:score.$data.param,
type:'post', type:'post',
beforeSend:function(){ beforeSend:function(){
...@@ -235,7 +235,7 @@ var reviewPage = { ...@@ -235,7 +235,7 @@ var reviewPage = {
}, },
getStatistic:function(){ getStatistic:function(){
$.ajax({ $.ajax({
url : 'http://localhost:8081/geexekscore/api/v1/cmpt-score-rule-scoreinfo/getCmptScoreRuleScoreInfoStatistics?cmptId='+getCId()+'&roadId='+ url : 'http://testzs.geexek.com.cn/geexekscore/api/v1/cmpt-score-rule-scoreinfo/getCmptScoreRuleScoreInfoStatistics?cmptId='+getCId()+'&roadId='+
score.$data.selectedRoadId score.$data.selectedRoadId
+'&origin='+ score.$data.selectedOrigin+"&keyword="+score.$data.searchWord, +'&origin='+ score.$data.selectedOrigin+"&keyword="+score.$data.searchWord,
type:'post', type:'post',
...@@ -271,7 +271,7 @@ var reviewPage = { ...@@ -271,7 +271,7 @@ var reviewPage = {
var param = {cmptId : getCId(),'checkstatus':score.$data.param.checkstatus, var param = {cmptId : getCId(),'checkstatus':score.$data.param.checkstatus,
roadId: score.$data.selectedRoadId,passedIds:passedIds.join(','),noPassedIds:noPassedIds.join(',')}; roadId: score.$data.selectedRoadId,passedIds:passedIds.join(','),noPassedIds:noPassedIds.join(',')};
$.ajax({ $.ajax({
url : 'http://localhost:8081/geexekscore/api/v1/cmpt-score-rule-scoreinfo/uploadCmptScoreRuleScoreInfo', url : 'http://testzs.geexek.com.cn/geexekscore/api/v1/cmpt-score-rule-scoreinfo/uploadCmptScoreRuleScoreInfo',
data: param, data: param,
beforeSend:function(){ beforeSend:function(){
layer.load(); layer.load();
......
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