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. 53
      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
*/
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);
}

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

@ -1388,7 +1388,7 @@ public class CompeteService implements ICompeteService {
@Override
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 competeGroupId = params.getCompeteGroupId();
@ -1396,26 +1396,39 @@ public class CompeteService implements ICompeteService {
if (ObjectUtil.isNotNull(competeProject)){
int team = competeProject.getTeam();
long fatherId = competeProject.getParentId();
//如果比赛是个人计数赛
if (fatherId == 2001 && team == 0){
List<ScoreVo.CompeteScore> competeScores = competeScoreDao.selectSingleCount(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);
if(fatherId == Constant.COMPETE_COUNT) {
if (competeProject.getTeam() == Constant.Compete.TEAM_YES) {
// 团体赛
List<ScoreVo.CompeteScore> competeScoreList = competeScoreDao.selectCountPlayer(params.getProjectId(),params.getCompeteGroupId());
competeScoreDao.queryCountScoreTeam(param.getProjectId());
} else {
// 个人赛
competeScoreDao.queryCountScorePerson(param.getProjectId());
}
}else {
}
// //如果比赛是个人计数赛
// if (fatherId == 2001 && team == 0){
// List<ScoreVo.CompeteScore> competeScores = competeScoreDao.selectSingleCount(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;
}

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

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

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

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

Loading…
Cancel
Save