Commit e48a35d5 authored by sunyuhua's avatar sunyuhua

成绩提交后台sever

parent 61cde405
package com.dlbridge.jadp.plugins.cmpt.web;
import com.alibaba.fastjson.JSON;
import com.dlbridge.jadp.plugins.cmpt.bean.CmptScoreRule;
import com.dlbridge.jadp.plugins.cmpt.service.CmptScoreRuleService;
import com.neusoft.www.utils.web.Result;
......@@ -11,6 +12,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
import springfox.documentation.annotations.ApiIgnore;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
@Controller
......@@ -35,6 +37,7 @@ public class CmptScoreRuleController {
/**
* 根据赛事Id获取赛事规则信息
*
* @param cmptId
* @return
*/
......@@ -44,4 +47,28 @@ public class CmptScoreRuleController {
List<CmptScoreRule> cmptScoreRules=cmptScoreRuleService.getCmptScoreRulesByCmptId(cmptId);
return Result.success().setContent(cmptScoreRules);
}
/**
* 根据赛事Id获取赛事规则是单条还是多条
* @param cmptId
* @return
*/
private Result isCmptScoreRuleSingleByCmptId(int cmptId){
List<CmptScoreRule> cmptScoreRules=cmptScoreRuleService.getCmptScoreRulesByCmptId(cmptId);
boolean isCmptScoreRuleSingle=false;
int cmptScoreRuleSingle=0;
if(cmptScoreRules.size()==1){
isCmptScoreRuleSingle=true;
cmptScoreRuleSingle=cmptScoreRules.size();
}else{
isCmptScoreRuleSingle=false;
cmptScoreRuleSingle=cmptScoreRules.size();
}
HashMap<String,Object> result=new HashMap<String,Object>();
result.put("isCmptScoreRuleSingle",isCmptScoreRuleSingle);
result.put("cmptScoreRuleSingle",cmptScoreRuleSingle);
return Result.success().setContent(result);
}
}
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