|
|
@ -81,79 +81,76 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectSingle" resultType="com.ccsens.mt.bean.vo.TableVo$CompeteJoin" parameterType="java.util.Map"> |
|
|
|
SELECT |
|
|
|
tcpro.id as projectId, |
|
|
|
tcpro.name as competeProject, |
|
|
|
tcg.group_name as competeGroup, |
|
|
|
tcc.`name` as joinTeam, |
|
|
|
tcp.`name` as name, |
|
|
|
tcp.gender as gender, |
|
|
|
tcp.id_card as idCard, |
|
|
|
(SELECT visit_location from t_common_file where tcp.id_card_front_file = id ) as idCardPromiseFront, |
|
|
|
(SELECT visit_location from t_common_file where tcp.id_card_back_file = id ) as idCardPromiseBack, |
|
|
|
(SELECT visit_location from t_common_file where tcp.id_photo_file = id ) as picture, |
|
|
|
(SELECT visit_location from t_common_file where tcp.student_record_file = id ) as studentPromise, |
|
|
|
(SELECT visit_location from t_common_file where tcp.health_record_file = id ) as bodyTest, |
|
|
|
(SELECT visit_location from t_common_file where tcp.insurance_record_file = id ) as bodyProtect |
|
|
|
from |
|
|
|
t_compete_project tcpro LEFT JOIN t_compete_project_player tcpp on tcpro.id = tcpp.project_id |
|
|
|
LEFT JOIN t_compete_player tcp on tcpp.player_id = tcp.id |
|
|
|
LEFT JOIN t_compete_group tcg on tcg.id = tcp.compete_group_id |
|
|
|
LEFT JOIN t_compete_company tcc on tcc.id = tcp.company_id |
|
|
|
LEFT JOIN t_compete_time tct on tct.type = tcpro.type |
|
|
|
where |
|
|
|
<if test="competeTimeId != null"> |
|
|
|
tct.id = #{competeTimeId} |
|
|
|
</if> |
|
|
|
<if test="projectId != null"> |
|
|
|
and tcpro.id = #{projectId} |
|
|
|
</if> |
|
|
|
<if test="groupId != null"> |
|
|
|
and tcg.id = #{groupId} |
|
|
|
</if> |
|
|
|
<if test="companyId != null"> |
|
|
|
and tcc.id = #{companyId} |
|
|
|
</if> |
|
|
|
<if test="name != null and name != ''"> |
|
|
|
and tcp.name like concat('%',#{name, jdbcType=VARCHAR},'%') |
|
|
|
</if> |
|
|
|
<if test="idCard != null and idCard != ''"> |
|
|
|
and tcp.id_card = #{idCard} |
|
|
|
</if> |
|
|
|
and tcp.rec_status = 0 |
|
|
|
and tcc.rec_status = 0 |
|
|
|
and tcpp.rec_status = 0 |
|
|
|
and tcpro.rec_status = 0 |
|
|
|
and tct.rec_status = 0 |
|
|
|
SELECT |
|
|
|
tcpro.id as projectId, |
|
|
|
tcpro.name as competeProject, |
|
|
|
tcg.group_name as competeGroup, |
|
|
|
tcc.`name` as joinTeam, |
|
|
|
tcp.`name` as name, |
|
|
|
tcp.gender as gender, |
|
|
|
tcp.id_card as idCard, |
|
|
|
(SELECT visit_location from t_common_file where tcp.id_card_front_file = id ) as idCardPromiseFront, |
|
|
|
(SELECT visit_location from t_common_file where tcp.id_card_back_file = id ) as idCardPromiseBack, |
|
|
|
(SELECT visit_location from t_common_file where tcp.id_photo_file = id ) as picture, |
|
|
|
(SELECT visit_location from t_common_file where tcp.student_record_file = id ) as studentPromise, |
|
|
|
(SELECT visit_location from t_common_file where tcp.health_record_file = id ) as bodyTest, |
|
|
|
(SELECT visit_location from t_common_file where tcp.insurance_record_file = id ) as bodyProtect |
|
|
|
from |
|
|
|
t_compete_project tcpro LEFT JOIN t_compete_project_player tcpp on tcpro.id = tcpp.project_id |
|
|
|
LEFT JOIN t_compete_player tcp on tcpp.player_id = tcp.id |
|
|
|
LEFT JOIN t_compete_group tcg on tcg.id = tcp.compete_group_id |
|
|
|
LEFT JOIN t_compete_company tcc on tcc.id = tcp.company_id |
|
|
|
where |
|
|
|
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|
|
|
<if test="projectId != null"> |
|
|
|
tcpro.id = #{projectId} |
|
|
|
</if> |
|
|
|
<if test="groupId != null"> |
|
|
|
and tcg.id = #{groupId} |
|
|
|
</if> |
|
|
|
<if test="companyId != null"> |
|
|
|
and tcc.id = #{companyId} |
|
|
|
</if> |
|
|
|
<if test="name != null and name != ''"> |
|
|
|
and tcp.name like concat('%',#{name, jdbcType=VARCHAR},'%') |
|
|
|
</if> |
|
|
|
<if test="idCard != null and idCard != ''"> |
|
|
|
and tcp.id_card = #{idCard} |
|
|
|
</if> |
|
|
|
and tcpro.type=0 |
|
|
|
and tcpro.`level` =2 |
|
|
|
and tcpro.team=0 |
|
|
|
and tcp.rec_status = 0 |
|
|
|
and tcc.rec_status = 0 |
|
|
|
and tcpp.rec_status = 0 |
|
|
|
and tcpro.rec_status = 0 |
|
|
|
</trim> |
|
|
|
</select> |
|
|
|
<select id="selectGroup" resultType="com.ccsens.mt.bean.vo.TableVo$CompeteJoin" parameterType="java.util.Map"> |
|
|
|
SELECT |
|
|
|
tcpro.id as projectId, |
|
|
|
tcpro.name as competeProject, |
|
|
|
tcg.group_name as competeGroup, |
|
|
|
tcc.`name` as joinTeam, |
|
|
|
tcp.`name` as name, |
|
|
|
tcp.gender as gender, |
|
|
|
tcp.id_card as idCard, |
|
|
|
(SELECT visit_location from t_common_file where tcp.id_card_front_file = id ) as idCardPromiseFront, |
|
|
|
(SELECT visit_location from t_common_file where tcp.id_card_back_file = id ) as idCardPromiseBack, |
|
|
|
(SELECT visit_location from t_common_file where tcp.id_photo_file = id ) as picture, |
|
|
|
(SELECT visit_location from t_common_file where tcp.student_record_file = id ) as studentPromise, |
|
|
|
(SELECT visit_location from t_common_file where tcp.health_record_file = id ) as bodyTest, |
|
|
|
(SELECT visit_location from t_common_file where tcp.insurance_record_file = id ) as bodyProtect |
|
|
|
from |
|
|
|
t_compete_project tcpro LEFT JOIN t_compete_team tct on tcpro.id = tct.project_id |
|
|
|
LEFT JOIN t_compete_team_member tctm on tct.id = tctm.compete_team_id |
|
|
|
LEFT JOIN t_compete_player tcp on tcp.id = tctm.player_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_time tctt on tctt.type = tcpro.type |
|
|
|
WHERE |
|
|
|
<if test="competeTimeId != null"> |
|
|
|
tctt.id = #{competeTimeId} |
|
|
|
</if> |
|
|
|
SELECT |
|
|
|
tcpro.id as projectId, |
|
|
|
tcpro.name as competeProject, |
|
|
|
tcg.group_name as competeGroup, |
|
|
|
tcc.`name` as joinTeam, |
|
|
|
tcp.`name` as name, |
|
|
|
tcp.gender as gender, |
|
|
|
tcp.id_card as idCard, |
|
|
|
(SELECT visit_location from t_common_file where tcp.id_card_front_file = id ) as idCardPromiseFront, |
|
|
|
(SELECT visit_location from t_common_file where tcp.id_card_back_file = id ) as idCardPromiseBack, |
|
|
|
(SELECT visit_location from t_common_file where tcp.id_photo_file = id ) as picture, |
|
|
|
(SELECT visit_location from t_common_file where tcp.student_record_file = id ) as studentPromise, |
|
|
|
(SELECT visit_location from t_common_file where tcp.health_record_file = id ) as bodyTest, |
|
|
|
(SELECT visit_location from t_common_file where tcp.insurance_record_file = id ) as bodyProtect |
|
|
|
from |
|
|
|
t_compete_project tcpro LEFT JOIN t_compete_team tct on tcpro.id = tct.project_id |
|
|
|
LEFT JOIN t_compete_team_member tctm on tct.id = tctm.compete_team_id |
|
|
|
LEFT JOIN t_compete_player tcp on tcp.id = tctm.player_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 |
|
|
|
WHERE |
|
|
|
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|
|
|
<if test="projectId != null"> |
|
|
|
and tcpro.id = #{projectId} |
|
|
|
tcpro.id = #{projectId} |
|
|
|
</if> |
|
|
|
<if test="groupId != null"> |
|
|
|
and tcg.id = #{groupId} |
|
|
@ -167,13 +164,16 @@ |
|
|
|
<if test="idCard != null and idCard != ''"> |
|
|
|
and tcp.id_card = #{idCard} |
|
|
|
</if> |
|
|
|
and tcpro.rec_status = 0 |
|
|
|
and tctm.rec_status = 0 |
|
|
|
and tcp.rec_status = 0 |
|
|
|
and tcc.rec_status = 0 |
|
|
|
and tcg.rec_status = 0 |
|
|
|
and tct.rec_status = 0 |
|
|
|
and tctt.rec_status = 0 |
|
|
|
and tcpro.type=0 |
|
|
|
and tcpro.`level` =2 |
|
|
|
and tcpro.team=1 |
|
|
|
and tcpro.rec_status = 0 |
|
|
|
and tctm.rec_status = 0 |
|
|
|
and tcp.rec_status = 0 |
|
|
|
and tcc.rec_status = 0 |
|
|
|
and tcg.rec_status = 0 |
|
|
|
and tct.rec_status = 0 |
|
|
|
</trim> |
|
|
|
</select> |
|
|
|
<select id="queryProjectConfig" resultType="com.ccsens.mt.bean.vo.TableVo$CompeteProjectConfig"> |
|
|
|
SELECT |
|
|
|