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. 75
      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.collection.CollectionUtil;
import cn.hutool.core.util.IdcardUtil;
import cn.hutool.core.util.StrUtil;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
@ -46,6 +48,13 @@ public class TableVo {
private String bodyProtect; private String bodyProtect;
@ApiModelProperty("参赛队伍") @ApiModelProperty("参赛队伍")
private String joinTeam; 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<>(); List<TableVo.CompeteAllCount1> competeAllCountList = new ArrayList<>();
if(ObjectUtil.isNotNull(competeTime)){ if(ObjectUtil.isNotNull(competeTime)){
//查询个人赛的数量统计 //查询个人赛的数量统计
List<TableVo.CompeteAllCount1> nums = competePlayerDao.getJoinNumByType(competeTime.getType()); // List<TableVo.CompeteAllCount1> nums = competePlayerDao.getJoinNumByType(competeTime.getType());
competeAllCountList.addAll(nums); // competeAllCountList.addAll(nums);
//查询限制组别的团体赛的统计 //查询限制组别的团体赛的统计
List<TableVo.CompeteAllCount1> groupRuleNum = competePlayerDao.getJoinRuleTeamNumByType(competeTime.getType()); List<TableVo.CompeteAllCount1> groupRuleNum = competePlayerDao.getJoinRuleTeamNumByType(competeTime.getType());
competeAllCountList.addAll(groupRuleNum); competeAllCountList.addAll(groupRuleNum);
//查询团体赛的数量统计 //查询团体赛的数量统计
List<TableVo.CompeteAllCount1> groupNum = competePlayerDao.getJoinTeamNumByType(competeTime.getType()); // List<TableVo.CompeteAllCount1> groupNum = competePlayerDao.getJoinTeamNumByType(competeTime.getType());
competeAllCountList.addAll(groupNum); // competeAllCountList.addAll(groupNum);
} }
CollectionUtil.sort(competeAllCountList,(t1,t2)-> (int)(t1.getProjectId() - t2.getProjectId())); CollectionUtil.sort(competeAllCountList,(t1,t2)-> (int)(t1.getProjectId() - t2.getProjectId()));
return competeAllCountList; return competeAllCountList;

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

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

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

@ -405,34 +405,36 @@
</select> </select>
<select id="getJoinRuleTeamNumByType" resultMap="teamNum1"> <select id="getJoinRuleTeamNumByType" resultMap="teamNum1">
SELECT 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.id as projectId,
p.`name` as projectName, p.`name` as projectName,
p.certificate as certificate, p.certificate as certificate,
a.groupId as groupId,
a.aNum as aNum,
p.team as team, p.team as team,
p.join_rule as joinRule p.join_rule as joinRule
FROM FROM
t_compete_project p t_compete_project p ,
LEFT JOIN( t_compete_group gr
SELECT WHERE
g.id as groupId, p.type = 0
g.group_name as groupName, and gr.type = 0
g.sequence as sequence, and p.team = 1
t.projectId, and p.`level` = 2
if(t.num is null,'/',t.num) as aNum and p.join_rule = 0
FROM and p.rec_status = 0
t_compete_group g and gr.rec_status = 0
LEFT JOIN )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 SELECT
t.id as teamId, t.id as teamId,
@ -442,27 +444,22 @@
FROM FROM
t_compete_team t t_compete_team t
LEFT JOIN t_compete_company c on t.company_id = c.id 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 WHERE
(t.rec_status = 0 or t.rec_status is null) t.rec_status = 0
and (c.rec_status = 0 or c.rec_status is null) and p.type = 0
)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)
WHERE
p.type = #{type}
and p.team = 1 and p.team = 1
and p.`level` = 2 and p.`level` = 2
and p.join_rule = 0 and p.join_rule = 0
and p.rec_status = 0 and p.rec_status = 0
ORDER BY p.id,a.sequence 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> </select>
</mapper> </mapper>

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

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

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

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

Loading…
Cancel
Save