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. 24
      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
@ApiModel
public static class EnterInfo{
@NotNull
@ApiModelProperty("第几届信息的id")
private Long competeTimeId;
@ApiModelProperty("项目id")
private Long projectId;
@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 {
CompeteProjectConfig selectByProjectId(@Param("projectId") Long projectId);
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> 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> 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("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);

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) {
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){
//获取身份证
String idCard = competeJoin.getIdCard();
//根据身份证获取选手年龄并赋值
int ageByIdCard = IdcardUtil.getAgeByIdCard(idCard);
competeJoin.setAge(ageByIdCard);
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){
//获取身份证
String idCard = competeJoin.getIdCard();
//根据身份证获取选手年龄并赋值
int ageByIdCard = IdcardUtil.getAgeByIdCard(idCard);
competeJoin.setAge(ageByIdCard);
competeJoinList.add(competeJoin);
}
// Long competeTimeId = params.getCompeteTimeId();

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

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

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

@ -100,13 +100,10 @@
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>
<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}
@ -120,11 +117,14 @@
<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
and tct.rec_status = 0
</trim>
</select>
<select id="selectGroup" resultType="com.ccsens.mt.bean.vo.TableVo$CompeteJoin" parameterType="java.util.Map">
SELECT
@ -147,13 +147,10 @@
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>
<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.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
and tctt.rec_status = 0
</trim>
</select>
<select id="queryProjectConfig" resultType="com.ccsens.mt.bean.vo.TableVo$CompeteProjectConfig">
SELECT

Loading…
Cancel
Save