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

Loading…
Cancel
Save