Browse Source

20201127v1.8

tiaosheng
zy_Java 5 years ago
parent
commit
294f668463
  1. 8
      mt/src/main/java/com/ccsens/mt/persist/dao/CompeteScoreDao.java
  2. 55
      mt/src/main/java/com/ccsens/mt/service/CompeteService.java
  3. 4
      mt/src/main/resources/application.yml
  4. 3
      mt/src/main/resources/mapper_dao/CompeteScoreDao.xml

8
mt/src/main/java/com/ccsens/mt/persist/dao/CompeteScoreDao.java

@ -122,4 +122,12 @@ public interface CompeteScoreDao {
* @return * @return
*/ */
ScoreVo.CountScoreCurrentSite getCountScoreByOrderId(@Param("siteId")Long siteId); ScoreVo.CountScoreCurrentSite getCountScoreByOrderId(@Param("siteId")Long siteId);
/**
* 根据组别和项目查找排名
* @param projectId 项目id
* @param competeGroupId 组别id
* @return
*/
List<ScoreVo.CompeteScore> selectCountPlayer(@Param("projectId")Long projectId, @Param("competeGroupId")Long competeGroupId);
} }

55
mt/src/main/java/com/ccsens/mt/service/CompeteService.java

@ -1388,7 +1388,7 @@ public class CompeteService implements ICompeteService {
@Override @Override
public List<ScoreVo.CompeteScore> countScoreDetail(CompeteDto.ProjectIdAndGroupId params) { public List<ScoreVo.CompeteScore> countScoreDetail(CompeteDto.ProjectIdAndGroupId params) {
List<ScoreVo.CompeteScore> competeScoreList = new ArrayList<>(); // List<ScoreVo.CompeteScore> competeScoreList = new ArrayList<>();
//判断比赛类型 //判断比赛类型
long ProjectId = params.getProjectId(); long ProjectId = params.getProjectId();
long competeGroupId = params.getCompeteGroupId(); long competeGroupId = params.getCompeteGroupId();
@ -1396,26 +1396,39 @@ public class CompeteService implements ICompeteService {
if (ObjectUtil.isNotNull(competeProject)){ if (ObjectUtil.isNotNull(competeProject)){
int team = competeProject.getTeam(); int team = competeProject.getTeam();
long fatherId = competeProject.getParentId(); long fatherId = competeProject.getParentId();
//如果比赛是个人计数赛 if(fatherId == Constant.COMPETE_COUNT) {
if (fatherId == 2001 && team == 0){ if (competeProject.getTeam() == Constant.Compete.TEAM_YES) {
List<ScoreVo.CompeteScore> competeScores = competeScoreDao.selectSingleCount(ProjectId, competeGroupId); // 团体赛
competeScoreList.addAll(competeScores); List<ScoreVo.CompeteScore> competeScoreList = competeScoreDao.selectCountPlayer(params.getProjectId(),params.getCompeteGroupId());
} competeScoreDao.queryCountScoreTeam(param.getProjectId());
//如果是个人花样赛 } else {
if (fatherId == 2002 && team == 0){ // 个人赛
List<ScoreVo.CompeteScore> competeScores = competeScoreDao.selectSingleVarity(ProjectId, competeGroupId); competeScoreDao.queryCountScorePerson(param.getProjectId());
competeScoreList.addAll(competeScores); }
} }else {
//如果是团队计数赛
if (fatherId == 2001 && team == 1){ }
List<ScoreVo.CompeteScore> competeScores = competeScoreDao.selectGroupCount(ProjectId, competeGroupId);
competeScoreList.addAll(competeScores); // //如果比赛是个人计数赛
} // if (fatherId == 2001 && team == 0){
//如果是团队花样赛 // List<ScoreVo.CompeteScore> competeScores = competeScoreDao.selectSingleCount(ProjectId, competeGroupId);
if (fatherId == 2002 && team == 1){ // competeScoreList.addAll(competeScores);
List<ScoreVo.CompeteScore> competeScores = competeScoreDao.selectGroupVarity(ProjectId, competeGroupId); // }
competeScoreList.addAll(competeScores); // //如果是个人花样赛
} // if (fatherId == 2002 && team == 0){
// List<ScoreVo.CompeteScore> competeScores = competeScoreDao.selectSingleVarity(ProjectId, competeGroupId);
// competeScoreList.addAll(competeScores);
// }
// //如果是团队计数赛
// if (fatherId == 2001 && team == 1){
// List<ScoreVo.CompeteScore> competeScores = competeScoreDao.selectGroupCount(ProjectId, competeGroupId);
// competeScoreList.addAll(competeScores);
// }
// //如果是团队花样赛
// if (fatherId == 2002 && team == 1){
// List<ScoreVo.CompeteScore> competeScores = competeScoreDao.selectGroupVarity(ProjectId, competeGroupId);
// competeScoreList.addAll(competeScores);
// }
} }
return competeScoreList; return competeScoreList;
} }

4
mt/src/main/resources/application.yml

@ -1,6 +1,6 @@
spring: spring:
profiles: profiles:
active: prod active: dev
include: common, util-prod include: common, util-dev

3
mt/src/main/resources/mapper_dao/CompeteScoreDao.xml

@ -1079,6 +1079,9 @@
and so.rec_status = 0 and so.rec_status = 0
and cp.rec_status = 0 and cp.rec_status = 0
</select>
<select id="selectCountPlayer" resultType="com.ccsens.mt.bean.vo.ScoreVo$CompeteScore">
</select> </select>
<!--<select id="queryEightGroupLimit" resultType="com.ccsens.mt.bean.vo.CompeteExcelVo$BeforeEight"> <!--<select id="queryEightGroupLimit" resultType="com.ccsens.mt.bean.vo.CompeteExcelVo$BeforeEight">

Loading…
Cancel
Save