Browse Source

20201125v1.3

tiaosheng
zy_Java 5 years ago
parent
commit
5561c92140
  1. 9
      mt/src/main/java/com/ccsens/mt/bean/vo/TableVo.java
  2. 8
      mt/src/main/java/com/ccsens/mt/service/ExcelService.java
  3. 4
      mt/src/main/resources/application.yml
  4. 93
      mt/src/main/resources/mapper_dao/CompetePlayerDao.xml
  5. 2
      mt/src/main/resources/mapper_dao/CompeteVideoDao.xml
  6. 4
      tall/src/main/resources/application.yml

9
mt/src/main/java/com/ccsens/mt/bean/vo/TableVo.java

@ -2,6 +2,8 @@ package com.ccsens.mt.bean.vo;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.IdcardUtil;
import cn.hutool.core.util.StrUtil;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ -46,6 +48,13 @@ public class TableVo {
private String bodyProtect;
@ApiModelProperty("参赛队伍")
private String joinTeam;
public int getAge(){
if(StrUtil.isNotEmpty(idCard) && age == 0){
return IdcardUtil.getAgeByIdCard(idCard);
}
return age;
}
}

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

@ -916,14 +916,14 @@ public class ExcelService implements IExcelService {
List<TableVo.CompeteAllCount1> competeAllCountList = new ArrayList<>();
if(ObjectUtil.isNotNull(competeTime)){
//查询个人赛的数量统计
List<TableVo.CompeteAllCount1> nums = competePlayerDao.getJoinNumByType(competeTime.getType());
competeAllCountList.addAll(nums);
// List<TableVo.CompeteAllCount1> nums = competePlayerDao.getJoinNumByType(competeTime.getType());
// competeAllCountList.addAll(nums);
//查询限制组别的团体赛的统计
List<TableVo.CompeteAllCount1> groupRuleNum = competePlayerDao.getJoinRuleTeamNumByType(competeTime.getType());
competeAllCountList.addAll(groupRuleNum);
//查询团体赛的数量统计
List<TableVo.CompeteAllCount1> groupNum = competePlayerDao.getJoinTeamNumByType(competeTime.getType());
competeAllCountList.addAll(groupNum);
// List<TableVo.CompeteAllCount1> groupNum = competePlayerDao.getJoinTeamNumByType(competeTime.getType());
// competeAllCountList.addAll(groupNum);
}
CollectionUtil.sort(competeAllCountList,(t1,t2)-> (int)(t1.getProjectId() - t2.getProjectId()));
return competeAllCountList;

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

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

93
mt/src/main/resources/mapper_dao/CompetePlayerDao.xml

@ -405,64 +405,61 @@
</select>
<select id="getJoinRuleTeamNumByType" resultMap="teamNum1">
SELECT
g.id as groupId,
g.group_name,
g.projectId,
g.`projectName`,
g.`certificate`,
g.`team`,
g.`joinRule`,
if(count(t.teamId) = 0,'/',count(t.teamId)) as aNum
FROM
(
SELECT
gr.*,
p.id as projectId,
p.`name` as projectName,
p.certificate as certificate,
a.groupId as groupId,
a.aNum as aNum,
p.team as team,
p.join_rule as joinRule
FROM
t_compete_project p
LEFT JOIN(
SELECT
g.id as groupId,
g.group_name as groupName,
g.sequence as sequence,
t.projectId,
if(t.num is null,'/',t.num) as aNum
FROM
t_compete_group g
LEFT JOIN
(
SELECT
g.id as gid,
g.group_name,
count(t.teamId) as num,
t.projectId as projectId
FROM
t_compete_group g
LEFT JOIN
(
SELECT
t.id as teamId,
t.project_id as projectId,
t.gender_group,
t.group_remark
FROM
t_compete_team t
LEFT JOIN t_compete_company c on t.company_id = c.id
WHERE
(t.rec_status = 0 or t.rec_status is null)
and (c.rec_status = 0 or c.rec_status is null)
)t on ((t.gender_group = g.sex and t.group_remark = g.group_remark) or t.teamId is null)
WHERE
g.type = 0
and g.rec_status = 0
GROUP BY g.id,t.projectId
ORDER BY g.sequence
)t
on (t.gid = g.id or t.gid is null)
WHERE
g.type = 0
and g.rec_status = 0
)a on (p.id = a.projectId or a.projectId is null)
t_compete_project p ,
t_compete_group gr
WHERE
p.type = #{type}
p.type = 0
and gr.type = 0
and p.team = 1
and p.`level` = 2
and p.join_rule = 0
and p.rec_status = 0
ORDER BY p.id,a.sequence
and gr.rec_status = 0
)g
left join
(
SELECT
t.id as teamId,
t.project_id as projectId,
t.gender_group,
t.group_remark
FROM
t_compete_team t
LEFT JOIN t_compete_company c on t.company_id = c.id
LEFT JOIN t_compete_project p on t.project_id = p.id
WHERE
t.rec_status = 0
and p.type = 0
and p.team = 1
and p.`level` = 2
and p.join_rule = 0
and p.rec_status = 0
and c.rec_status = 0
)t on t.gender_group = g.sex
and t.group_remark = g.group_remark
and t.projectId = g.projectId
WHERE
g.type = 0
and g.rec_status = 0
GROUP BY g.projectId,g.id
ORDER BY g.projectId,g.sequence
</select>
</mapper>

2
mt/src/main/resources/mapper_dao/CompeteVideoDao.xml

@ -30,8 +30,6 @@
<!-- ) group by company id-->
) tcpl on tcpl.company_id=tcc.id
where
tct.id= #{param.id}

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

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

Loading…
Cancel
Save