Browse Source

Merge branch 'pt' of dd.tall.wiki:ccsens_wiki/ccsenscloud into pt

tiaosheng
zy_Java 5 years ago
parent
commit
e121921352
  1. 18
      mt/src/main/resources/mapper_dao/CompeteScoreDao.xml

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

@ -237,7 +237,7 @@
and tcg.rec_status=0 and tcg.rec_status=0
</select> </select>
<select id="queryEight" resultType="com.ccsens.mt.bean.vo.CompeteExcelVo$BeforeEight"> <select id="queryEight" resultType="com.ccsens.mt.bean.vo.CompeteExcelVo$BeforeEight">
select groupName, GROUP_CONCAT( NAME ) AS eightNames from ( select groupName, GROUP_CONCAT( NAME order by count ) AS eightNames from (
SELECT SELECT
t1.group_name AS groupName, t1.group_name AS groupName,
t1.name, t1.name,
@ -301,7 +301,7 @@
t1.group_name = t2.group_name t1.group_name = t2.group_name
AND t1.final_score &lt;= t2.final_score AND t1.final_score &lt;= t2.final_score
GROUP BY GROUP BY
t1.group_name, t1.name t1.id
HAVING HAVING
count( t2.id ) &lt;= 8 count( t2.id ) &lt;= 8
) t ) t
@ -316,6 +316,7 @@
CASE team.gender_group WHEN 0 THEN '女子组' WHEN 1 THEN '男子组' ELSE '混合组' END CASE team.gender_group WHEN 0 THEN '女子组' WHEN 1 THEN '男子组' ELSE '混合组' END
) AS group_name, ) AS group_name,
GROUP_CONCAT(player.name SEPARATOR '、') as name, GROUP_CONCAT(player.name SEPARATOR '、') as name,
score.id,
score.final_score score.final_score
FROM FROM
t_compete_count_score score, t_compete_count_score score,
@ -343,6 +344,7 @@
CASE team.gender_group WHEN 0 THEN '女子组' WHEN 1 THEN '男子组' ELSE '混合组' END CASE team.gender_group WHEN 0 THEN '女子组' WHEN 1 THEN '男子组' ELSE '混合组' END
) AS group_name, ) AS group_name,
GROUP_CONCAT(player.name) as name, GROUP_CONCAT(player.name) as name,
score.id,
score.final_score score.final_score
FROM FROM
t_compete_count_score score, t_compete_count_score score,
@ -366,8 +368,8 @@
WHERE WHERE
t1.group_name = t2.group_name t1.group_name = t2.group_name
AND t1.final_score &lt;= t2.final_score AND t1.final_score &lt;= t2.final_score
GROUP BY t1.group_name, t1.name GROUP BY t1.id
HAVING count( * ) &lt;= 8) t HAVING count( t2.id ) &lt;= 8) t
group by t.group_name group by t.group_name
</select> </select>
@ -560,7 +562,7 @@
having count(t2.groupName) &lt;= 8 having count(t2.groupName) &lt;= 8
</select> </select>
<select id="queryCountScoreTeam" resultType="com.ccsens.mt.bean.vo.ScoreVo$CountScorePublicity"> <select id="queryCountScoreTeam" resultType="com.ccsens.mt.bean.vo.ScoreVo$CountScorePublicity">
select t1.*, count(*) as rangee from select t1.*, count(t2.id) +1 as rangee from
(SELECT (SELECT
CONCAT( CONCAT(
CASE team.group_remark WHEN 1 THEN '小学' WHEN 2 THEN '中学' WHEN 3 THEN '高职院校' WHEN 4 THEN '本科院校' ELSE '俱乐部'END, CASE team.group_remark WHEN 1 THEN '小学' WHEN 2 THEN '中学' WHEN 3 THEN '高职院校' WHEN 4 THEN '本科院校' ELSE '俱乐部'END,
@ -568,6 +570,7 @@
) AS groupName, ) AS groupName,
GROUP_CONCAT(player.name SEPARATOR '、') as name, GROUP_CONCAT(player.name SEPARATOR '、') as name,
company.name as companyName, company.name as companyName,
score.id,
score.judgment_a_score as mainOneScore, score.judgment_a_score as mainOneScore,
score.judgment_b_score2 as mainTwoScore, score.judgment_b_score2 as mainTwoScore,
score.should_times as shouldScore, score.should_times as shouldScore,
@ -602,6 +605,7 @@
) AS groupName, ) AS groupName,
GROUP_CONCAT(player.name SEPARATOR '、') as name, GROUP_CONCAT(player.name SEPARATOR '、') as name,
company.name as companyName, company.name as companyName,
score.id,
score.judgment_a_score as mainOneScore, score.judgment_a_score as mainOneScore,
score.judgment_b_score2 as mainTwoScore, score.judgment_b_score2 as mainTwoScore,
score.should_times as shouldScore, score.should_times as shouldScore,
@ -631,8 +635,8 @@
on on
t1.groupName = t2.groupName t1.groupName = t2.groupName
AND t1.finalScore &lt; t2.finalScore AND t1.finalScore &lt; t2.finalScore
GROUP BY t1.groupName, t1.name group by t1.id
order by rangee desc order by t1.groupName, rangee
</select> </select>
<select id="queryCountScorePerson" resultType="com.ccsens.mt.bean.vo.ScoreVo$CountScorePublicity"> <select id="queryCountScorePerson" resultType="com.ccsens.mt.bean.vo.ScoreVo$CountScorePublicity">
select t1.*, count(t2.id) + 1 as rangee from select t1.*, count(t2.id) + 1 as rangee from

Loading…
Cancel
Save