Browse Source

11-19-3

tiaosheng
Lihong@123456 5 years ago
parent
commit
082b01b639
  1. 3
      mt/src/main/java/com/ccsens/mt/bean/dto/CompeteDto.java
  2. 4
      mt/src/main/java/com/ccsens/mt/persist/dao/CompeteProjectConfigDao.java
  3. 14
      mt/src/main/java/com/ccsens/mt/service/ExcelService.java
  4. 4
      mt/src/main/resources/application.yml
  5. 154
      mt/src/main/resources/mapper_dao/CompeteProjectConfigDao.xml

3
mt/src/main/java/com/ccsens/mt/bean/dto/CompeteDto.java

@ -320,9 +320,6 @@ public class CompeteDto {
@Data @Data
@ApiModel @ApiModel
public static class EnterInfo{ public static class EnterInfo{
@NotNull
@ApiModelProperty("第几届信息的id")
private Long competeTimeId;
@ApiModelProperty("项目id") @ApiModelProperty("项目id")
private Long projectId; private Long projectId;
@ApiModelProperty("组别id") @ApiModelProperty("组别id")

4
mt/src/main/java/com/ccsens/mt/persist/dao/CompeteProjectConfigDao.java

@ -17,8 +17,8 @@ import java.util.List;
public interface CompeteProjectConfigDao extends CompeteProjectConfigMapper { public interface CompeteProjectConfigDao extends CompeteProjectConfigMapper {
CompeteProjectConfig selectByProjectId(@Param("projectId") Long projectId); CompeteProjectConfig selectByProjectId(@Param("projectId") Long projectId);
List<TableVo.SchedulePlanDetail> selectDetail (); List<TableVo.SchedulePlanDetail> selectDetail ();
List<TableVo.CompeteJoin> selectSingle (@Param("competeTimeId") Long competeTimeId,@Param("projectId") Long projectId,@Param("groupId") Long groupId,@Param("companyId") Long companyId,@Param("name") String name,@Param("idCard") String idCard); List<TableVo.CompeteJoin> selectSingle (@Param("projectId") Long projectId,@Param("groupId") Long groupId,@Param("companyId") Long companyId,@Param("name") String name,@Param("idCard") String idCard);
List<TableVo.CompeteJoin> selectGroup (@Param("competeTimeId") Long competeTimeId,@Param("projectId") Long projectId,@Param("groupId") Long groupId,@Param("companyId") Long companyId,@Param("name") String name,@Param("idCard") String idCard); List<TableVo.CompeteJoin> selectGroup (@Param("projectId") Long projectId,@Param("groupId") Long groupId,@Param("companyId") Long companyId,@Param("name") String name,@Param("idCard") String idCard);
CompeteProjectConfig selectStartTime(@Param("projectId") Long projectId); CompeteProjectConfig selectStartTime(@Param("projectId") Long projectId);

14
mt/src/main/java/com/ccsens/mt/service/ExcelService.java

@ -1145,23 +1145,13 @@ public class ExcelService implements IExcelService {
public List<TableVo.CompeteJoin> getCompeteJoinDetail(CompeteDto.EnterInfo params) { public List<TableVo.CompeteJoin> getCompeteJoinDetail(CompeteDto.EnterInfo params) {
List<TableVo.CompeteJoin> competeJoinList = new ArrayList<>(); List<TableVo.CompeteJoin> competeJoinList = new ArrayList<>();
//个人项目查询 //个人项目查询
List<TableVo.CompeteJoin> competeJoinList1 = competeProjectConfigDao.selectSingle(params.getCompeteTimeId(),params.getProjectId(),params.getGroupId(),params.getCompanyId(),params.getName(),params.getIdCard()); List<TableVo.CompeteJoin> competeJoinList1 = competeProjectConfigDao.selectSingle(params.getProjectId(),params.getGroupId(),params.getCompanyId(),params.getName(),params.getIdCard());
for (TableVo.CompeteJoin competeJoin : competeJoinList1){ for (TableVo.CompeteJoin competeJoin : competeJoinList1){
//获取身份证
String idCard = competeJoin.getIdCard();
//根据身份证获取选手年龄并赋值
int ageByIdCard = IdcardUtil.getAgeByIdCard(idCard);
competeJoin.setAge(ageByIdCard);
competeJoinList.add(competeJoin); competeJoinList.add(competeJoin);
} }
//团队项目查询 //团队项目查询
List<TableVo.CompeteJoin> competeJoinList2 = competeProjectConfigDao.selectGroup(params.getCompeteTimeId(),params.getProjectId(),params.getGroupId(),params.getCompanyId(),params.getName(),params.getIdCard()); List<TableVo.CompeteJoin> competeJoinList2 = competeProjectConfigDao.selectGroup(params.getProjectId(),params.getGroupId(),params.getCompanyId(),params.getName(),params.getIdCard());
for (TableVo.CompeteJoin competeJoin : competeJoinList2){ for (TableVo.CompeteJoin competeJoin : competeJoinList2){
//获取身份证
String idCard = competeJoin.getIdCard();
//根据身份证获取选手年龄并赋值
int ageByIdCard = IdcardUtil.getAgeByIdCard(idCard);
competeJoin.setAge(ageByIdCard);
competeJoinList.add(competeJoin); competeJoinList.add(competeJoin);
} }
// Long competeTimeId = params.getCompeteTimeId(); // Long competeTimeId = params.getCompeteTimeId();

4
mt/src/main/resources/application.yml

@ -1,5 +1,5 @@
spring: spring:
profiles: profiles:
active: test active: dev
include: common, util-test include: common, util-dev

154
mt/src/main/resources/mapper_dao/CompeteProjectConfigDao.xml

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

Loading…
Cancel
Save