16 changed files with 551 additions and 224 deletions
@ -0,0 +1,39 @@ |
|||
package com.ccsens.mt.bean.po; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
public class CompeteCountScoreKey implements Serializable { |
|||
private Long id; |
|||
|
|||
private Integer shouldTimes; |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
public Long getId() { |
|||
return id; |
|||
} |
|||
|
|||
public void setId(Long id) { |
|||
this.id = id; |
|||
} |
|||
|
|||
public Integer getShouldTimes() { |
|||
return shouldTimes; |
|||
} |
|||
|
|||
public void setShouldTimes(Integer shouldTimes) { |
|||
this.shouldTimes = shouldTimes; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
StringBuilder sb = new StringBuilder(); |
|||
sb.append(getClass().getSimpleName()); |
|||
sb.append(" ["); |
|||
sb.append("Hash = ").append(hashCode()); |
|||
sb.append(", id=").append(id); |
|||
sb.append(", shouldTimes=").append(shouldTimes); |
|||
sb.append("]"); |
|||
return sb.toString(); |
|||
} |
|||
} |
@ -0,0 +1,27 @@ |
|||
package com.ccsens.mt.persist.dao; |
|||
|
|||
import com.ccsens.mt.bean.po.CompeteCoach; |
|||
import com.ccsens.mt.bean.po.CompeteCompany; |
|||
import com.ccsens.mt.bean.vo.CompeteExcelVo; |
|||
import com.ccsens.mt.bean.vo.CompeteVo; |
|||
import com.ccsens.mt.bean.vo.ProvinceCompeteVo; |
|||
import com.ccsens.mt.bean.vo.ScoreVo; |
|||
import com.ccsens.mt.persist.mapper.CompeteCompanyMapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
import org.springframework.stereotype.Repository; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author 逗 |
|||
*/ |
|||
@Repository |
|||
public interface CompeteScoreDao { |
|||
List<ScoreVo.CompeteScore> selectSingleCount (@Param("projectId") long projectId,@Param("competeGroupId") long competeGroupId); |
|||
List<ScoreVo.CompeteScore> selectGroupCount (@Param("projectId") long projectId,@Param("competeGroupId") long competeGroupId); |
|||
List<ScoreVo.CompeteScore> selectSingleVarity(@Param("projectId") long projectId,@Param("competeGroupId") long competeGroupId); |
|||
List<ScoreVo.CompeteScore> selectGroupVarity (@Param("projectId") long projectId,@Param("competeGroupId") long competeGroupId); |
|||
List<ScoreVo.CountScoreCurrentSite> selectCountScoreCurrentSite (@Param("siteId") long siteId); |
|||
|
|||
|
|||
} |
@ -0,0 +1,109 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.ccsens.mt.persist.dao.CompeteScoreDao"> |
|||
<select id="selectSingleCount" resultType="com.ccsens.mt.bean.vo.ScoreVo$CompeteScore" parameterType="java.util.Map"> |
|||
SELECT |
|||
tcp.`name` as name, |
|||
tcc.`name` as companyName, |
|||
tccs.final_score as score |
|||
from |
|||
t_compete_project_player tcpp LEFT JOIN t_compete_player tcp ON tcpp.player_id = tcp.id |
|||
LEFT JOIN t_compete_start_order tcso on tcso.player_id = tcpp.player_id |
|||
LEFT JOIN t_compete_count_score tccs on tccs.site_order_id = tcso.id |
|||
LEFT JOIN t_compete_company tcc on tcc.id = tcp.company_id |
|||
WHERE tcpp.rec_status = 0 |
|||
and tcp.rec_status=0 |
|||
and tcso.rec_status=0 |
|||
and tccs.rec_status=0 |
|||
and tcc.rec_status = 0 |
|||
and tcpp.project_id= #{projectId} |
|||
and tcpp.compete_group_id =#{competeGroupId} |
|||
GROUP BY tccs.final_score |
|||
</select> |
|||
|
|||
<select id="selectGroupCount" resultType="com.ccsens.mt.bean.vo.ScoreVo$CompeteScore" parameterType="java.util.Map"> |
|||
SELECT |
|||
tccs.final_score as score, |
|||
tcc.`name` as companyName |
|||
from |
|||
t_compete_team tct LEFT JOIN t_compete_start_order tcso ON tct.id = tcso.player_id |
|||
LEFT JOIN t_compete_count_score tccs ON tccs.site_order_id = tcso.id |
|||
LEFT JOIN t_compete_company tcc on tcc.id = tct.company_id |
|||
WHERE tct.rec_status = 0 |
|||
and tcso.rec_status=0 |
|||
and tccs.rec_status =0 |
|||
and and tct.project_id= #{projectId} |
|||
and tct.compete_group_id = #{competeGroupId} |
|||
GROUP BY tccs.final_score; |
|||
</select> |
|||
|
|||
<select id="selectSingleVarity" resultType="com.ccsens.mt.bean.vo.ScoreVo$CompeteScore" parameterType="java.util.Map"> |
|||
SELECT |
|||
tcp.`name` as name, |
|||
tcc.`name` as companyName, |
|||
tcvs.score as score |
|||
|
|||
from |
|||
t_compete_project_player tcpp LEFT JOIN t_compete_player tcp ON tcpp.player_id = tcp.id |
|||
LEFT JOIN t_compete_start_order tcso on tcso.player_id = tcpp.player_id |
|||
LEFT JOIN t_compete_variety_score tcvs on tcvs.site_order_id = tcso.id |
|||
LEFT JOIN t_compete_company tcc on tcc.id = tcp.company_id |
|||
WHERE tcpp.rec_status = 0 |
|||
and tcp.rec_status=0 |
|||
and tcso.rec_status=0 |
|||
and tcvs.rec_status=0 |
|||
and tcc.rec_status = 0 |
|||
and tcpp.project_id= #{projectId} |
|||
and tcpp.compete_group_id = #{competeGroupId} |
|||
GROUP BY tcvs.score |
|||
</select> |
|||
<select id="selectGroupVarity" resultType="com.ccsens.mt.bean.vo.ScoreVo$CompeteScore" parameterType="java.util.Map"> |
|||
SELECT |
|||
tcc.`name` as companyName, |
|||
tcvs.score as score |
|||
from |
|||
t_compete_team tct LEFT JOIN t_compete_start_order tcso ON tct.id = tcso.player_id |
|||
LEFT JOIN t_compete_variety_score tcvs ON tcvs.site_order_id = tcso.id |
|||
LEFT JOIN t_compete_company tcc on tcc.id = tct.company_id |
|||
WHERE tct.rec_status = 0 |
|||
and tcso.rec_status=0 |
|||
and tcvs.rec_status =0 |
|||
and and tct.project_id= #{projectId} |
|||
and tct.compete_group_id = #{competeGroupId} |
|||
GROUP BY tcvs.score |
|||
</select> |
|||
|
|||
|
|||
<select id="selectCountScoreCurrentSite" resultType="com.ccsens.mt.bean.vo.ScoreVo$CountScoreCurrentSite" parameterType="java.util.Map"> |
|||
SELECT |
|||
tcp.`name` as name, |
|||
tcc.`name` as companyName, |
|||
tcg.group_name as groupName, |
|||
tcppro.`name` as projectName, |
|||
tcso.site as site, |
|||
tcso.compete_order as competeOrder, |
|||
tccs.chief_judgment_score as mainScore, |
|||
tccs.judgment_a_score as mainOneScore, |
|||
tccs.judgment_b_score2 as mainTwoScore, |
|||
tccs.should_times as shouldScore, |
|||
tccs.deduct_times as deductTime, |
|||
tccs.deduct_cause as deductReason, |
|||
tccs.final_score as finalScore |
|||
from |
|||
t_compete_start_order tcso LEFT JOIN t_compete_player tcp on tcso.player_id = tcp.id |
|||
LEFT JOIN t_compete_company tcc on tcc.id = tcp.company_id |
|||
LEFT JOIN t_compete_group tcg on tcg.id = tcp.compete_group_id |
|||
LEFT JOIN t_compete_project tcppro on tcppro.id = tcso.project_id |
|||
LEFT JOIN t_compete_count_score tccs on tccs.site_order_id = tcso.id |
|||
WHERE |
|||
tcso.rec_status=0 |
|||
and tcp.rec_status=0 |
|||
and tcc.rec_status=0 |
|||
and tcg.rec_status=0 |
|||
and tcppro.rec_status=0 |
|||
and tccs.rec_status =0 |
|||
and tcso.id =#{siteId} |
|||
</select> |
|||
|
|||
|
|||
</mapper> |
Loading…
Reference in new issue