|
|
@ -1106,6 +1106,7 @@ |
|
|
|
|
|
|
|
</select> |
|
|
|
<select id="selectCountTeam" resultType="com.ccsens.mt.bean.vo.ScoreVo$CompeteScore"> |
|
|
|
|
|
|
|
SELECT |
|
|
|
t1.*, |
|
|
|
count( t2.id ) + 1 AS rangee |
|
|
@ -1121,7 +1122,7 @@ |
|
|
|
score.should_times AS shouldScore, |
|
|
|
score.deduct_times AS deductTime, |
|
|
|
score.final_score AS score, |
|
|
|
#{projectId} as projectId |
|
|
|
#{projectId} as projectId |
|
|
|
FROM |
|
|
|
t_compete_count_score score, |
|
|
|
t_compete_start_order startOrder, |
|
|
@ -1160,7 +1161,8 @@ |
|
|
|
score.judgment_b_score2 AS mainTwoScore, |
|
|
|
score.should_times AS shouldScore, |
|
|
|
score.deduct_times AS deductTime, |
|
|
|
score.final_score AS finalScore |
|
|
|
score.final_score AS score, |
|
|
|
#{projectId} as projectId |
|
|
|
FROM |
|
|
|
t_compete_count_score score, |
|
|
|
t_compete_start_order startOrder, |
|
|
@ -1190,8 +1192,8 @@ |
|
|
|
score.id |
|
|
|
) t2 |
|
|
|
on 1=1 |
|
|
|
AND t1.finalScore < |
|
|
|
t2.finalScore |
|
|
|
AND t1.score < |
|
|
|
t2.score |
|
|
|
GROUP BY |
|
|
|
t1.id |
|
|
|
ORDER BY |
|
|
@ -1207,8 +1209,7 @@ |
|
|
|
score.id, |
|
|
|
score.judgment_a_score as mainOneScore, |
|
|
|
score.judgment_b_score2 as mainTwoScore, |
|
|
|
score.should_times as shouldScore, |
|
|
|
score.deduct_times as score, |
|
|
|
score.should_times as score, |
|
|
|
#{projectId} as projectId |
|
|
|
FROM |
|
|
|
t_compete_count_score score, |
|
|
@ -1238,8 +1239,8 @@ |
|
|
|
score.id, |
|
|
|
score.judgment_a_score as mainOneScore, |
|
|
|
score.judgment_b_score2 as mainTwoScore, |
|
|
|
score.should_times as shouldScore, |
|
|
|
score.deduct_times as deductTime |
|
|
|
score.should_times as score, |
|
|
|
#{projectId} as projectId |
|
|
|
FROM |
|
|
|
t_compete_count_score score, |
|
|
|
t_compete_start_order startOrder, |
|
|
@ -1263,8 +1264,88 @@ |
|
|
|
group by t1.id |
|
|
|
order by t1.groupName, rangee |
|
|
|
</select> |
|
|
|
<select id="selectVatietyPlayer" resultType="com.ccsens.mt.bean.vo.ScoreVo$CompeteScore"> |
|
|
|
<select id="selectVarietyPlayer" resultType="com.ccsens.mt.bean.vo.ScoreVo$CompeteScore"> |
|
|
|
SELECT |
|
|
|
s.*, |
|
|
|
|
|
|
|
c.NAME AS companyName, |
|
|
|
GROUP_CONCAT( p.NAME ) AS name, |
|
|
|
#{projectId} as projectId, |
|
|
|
convert( |
|
|
|
( |
|
|
|
ifnull( s.referee1, 0 )+ ifnull( s.referee2, 0 )+ ifnull( s.referee3, 0 ))/ 3 + ( |
|
|
|
ifnull( s.referee4, 0 )+ ifnull( s.referee5, 0 )+ ifnull( s.referee6, 0 ))/ 3 - ifnull(s.referee0,0),decimal(15,2)) |
|
|
|
AS score |
|
|
|
|
|
|
|
FROM |
|
|
|
( |
|
|
|
SELECT |
|
|
|
site_order_id, |
|
|
|
max( |
|
|
|
IF |
|
|
|
( chief_judgment = 0, score, NULL )) AS referee0, |
|
|
|
max( |
|
|
|
IF |
|
|
|
( chief_judgment = 1, score, NULL )) AS referee1, |
|
|
|
max( |
|
|
|
IF |
|
|
|
( chief_judgment = 2, score, NULL )) AS referee2, |
|
|
|
max( |
|
|
|
IF |
|
|
|
( chief_judgment = 3, score, NULL )) AS referee3, |
|
|
|
max( |
|
|
|
IF |
|
|
|
( chief_judgment = 4, score, NULL )) AS referee4, |
|
|
|
max( |
|
|
|
IF |
|
|
|
( chief_judgment = 5, score, NULL )) AS referee5, |
|
|
|
max( |
|
|
|
IF |
|
|
|
( chief_judgment = 6, score, NULL )) AS referee6, |
|
|
|
max( |
|
|
|
IF |
|
|
|
( chief_judgment = 7, score, NULL )) AS referee7 |
|
|
|
FROM |
|
|
|
( |
|
|
|
SELECT |
|
|
|
s.site_order_id, |
|
|
|
j.chief_judgment, |
|
|
|
sum( s.score ) AS score |
|
|
|
FROM |
|
|
|
t_compete_variety_score s, |
|
|
|
t_compete_judgment j |
|
|
|
WHERE |
|
|
|
s.judgment_id = j.id |
|
|
|
AND s.project_id = #{projectId} |
|
|
|
AND s.rec_status = 0 |
|
|
|
AND j.rec_status = 0 |
|
|
|
GROUP BY |
|
|
|
s.site_order_id, |
|
|
|
j.chief_judgment |
|
|
|
) t |
|
|
|
GROUP BY |
|
|
|
t.site_order_id |
|
|
|
) s, |
|
|
|
t_compete_start_order o, |
|
|
|
t_compete_team t, |
|
|
|
t_compete_team_member m, |
|
|
|
t_compete_player p, |
|
|
|
t_compete_company c |
|
|
|
WHERE |
|
|
|
s.site_order_id = o.id |
|
|
|
AND o.player_id = t.id |
|
|
|
AND t.id = m.compete_team_id |
|
|
|
AND m.player_id = p.id |
|
|
|
AND p.company_id = c.id |
|
|
|
AND o.rec_status = 0 |
|
|
|
AND t.rec_status = 0 |
|
|
|
AND m.rec_status = 0 |
|
|
|
AND p.rec_status = 0 |
|
|
|
AND c.rec_status = 0 |
|
|
|
GROUP BY |
|
|
|
s.site_order_id |
|
|
|
ORDER BY |
|
|
|
score DESC |
|
|
|
</select> |
|
|
|
|
|
|
|
<!--<select id="queryEightGroupLimit" resultType="com.ccsens.mt.bean.vo.CompeteExcelVo$BeforeEight"> |
|
|
|