Commit 882653d4 authored by yangshuxing's avatar yangshuxing

调整成绩规则,默认排序

parent bb85a681
......@@ -164,7 +164,10 @@
start_time = #{startTime},
</if>
<if test="cmptType != null">
cmpt_type = #{cmptType}
cmpt_type = #{cmptType},
</if>
<if test="endTime != null">
end_time = #{endTime}
</if>
</set>
where cmpt_id = #{cmptId}
......
......@@ -44,7 +44,9 @@ public class CmptService {
}
cmpt.setCmptId(cmptId);
logger.info(cmpt);
Cmpt localCmpt = cmptMapper.queryCmptBycmptId(cmptId);
if (localCmpt == null) {
save(cmpt);
return cmptMapper.queryCmptBycmptId(cmptId);
......
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.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.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 lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.apache.commons.lang3.StringUtils;
import org.springframework.util.DigestUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
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 springfox.documentation.annotations.ApiIgnore;
import sun.misc.BASE64Decoder;
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 {
@Value("${timer.url}")
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;
import com.dlbridge.feign.GeexekScoreService;
import com.dlbridge.jadp.common.interceptor.PageView;
import com.dlbridge.jadp.plugins.cmpt.bean.CmptSettingTemplate;
import com.dlbridge.jadp.plugins.cmpt.bean.FuncSetting;
......@@ -59,6 +60,9 @@ public class CmptSettingController {
@Resource
private FuncSettingService funcSettingService;
@Resource
private GeexekScoreService geexekScoreService;
/**
* 去功能管理页面
*
......@@ -170,6 +174,8 @@ public class CmptSettingController {
count = remoteService.getEnrollCmptAuditStatus(cmptId + "");
}else if (type == 12) { // 赛事报名
count = remoteService.getCmptEnrollCount(cmptId);
}else if (type == 15 || type == 16) { // 自动打卡,扫描打卡
count = geexekScoreService.hasCheckPoint(cmptId);
} else {
return Result.success();
}
......
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.Customer;
import com.dlbridge.jadp.plugins.cmpt.bean.FuncSetting;
......@@ -8,7 +10,6 @@ import com.dlbridge.jadp.plugins.cmpt.service.CustomerService;
import com.dlbridge.jadp.plugins.cmpt.service.FuncSettingService;
import com.neusoft.www.utils.web.Result;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
......@@ -28,6 +29,9 @@ public class FuncSettingController {
@Resource
private CustomerService customerService;
@Resource
private NewsService newsService;
@Resource
BannerService bannerService;
......@@ -42,13 +46,17 @@ public class FuncSettingController {
if(setting.getBanner() != null && setting.getBanner() == 1){
List<Banner> banners = bannerService.queryAll(setting.getCmptId());
if(banners.size() == 0){
return Result.fail().setCode(-201).setMsg("未设置广告");
return Result.fail().setCode(-201).setMsg("未设置广告!");
}
}
if(setting.getCustomer() != null && setting.getCustomer() == 1){
} else if(setting.getCustomer() != null && setting.getCustomer() == 1){
Customer customer = customerService.getCusomerServiceInfo(setting.getCmptId());
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());
......
......@@ -144,7 +144,7 @@
<span>{{Number(score.subsectionMileage/1000).toFixed(3)}}</span>
<span>{{score.subsectionscore | date_format}}</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 class="flex score-img">
<div class="img-item" v-for="item in score.scoreFieldValueList">
......
......@@ -54,7 +54,7 @@
getCharts();
function getCharts() {
$.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) {
var roads = data.data;
var roadNames = [];
......
......@@ -26,6 +26,9 @@ $(function () {
window.location.href="/gk/banner/index/"+getCmptId()+"?"+window.location.search;
}else if(data.code == -301){
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 () {
layer.alert("要启用此功能,需要先联系管理员通过赛事审核");
} else if (type == 12){
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 {
if (type == 2 || type == 5) {
......
......@@ -122,7 +122,7 @@ var score = new Vue({
return ;
}
$.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) {
if(data.code == 200){
if(data.data.length == 0){
......@@ -158,7 +158,7 @@ var score = new Vue({
return;
}
$.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(",")},
type: 'post',
success:function (data) {
......@@ -202,7 +202,7 @@ var reviewPage = {
score.$data.param.origin = score.$data.selectedOrigin;
score.$data.param.keyword = score.$data.searchWord;
$.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,
type:'post',
beforeSend:function(){
......@@ -235,7 +235,7 @@ var reviewPage = {
},
getStatistic:function(){
$.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
+'&origin='+ score.$data.selectedOrigin+"&keyword="+score.$data.searchWord,
type:'post',
......@@ -271,7 +271,7 @@ var reviewPage = {
var param = {cmptId : getCId(),'checkstatus':score.$data.param.checkstatus,
roadId: score.$data.selectedRoadId,passedIds:passedIds.join(','),noPassedIds:noPassedIds.join(',')};
$.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,
beforeSend:function(){
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