Browse Source

Merge branch 'pt' of dd.tall.wiki:ccsens_wiki/ccsenscloud into pt

tiaosheng
zy_Java 5 years ago
parent
commit
f5956238bd
  1. 6
      mt/src/main/java/com/ccsens/mt/service/ExcelService.java
  2. 4
      mt/src/main/resources/application.yml
  3. 9
      mt/src/main/resources/mapper_dao/CompeteCompanyDao.xml

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

@ -626,14 +626,14 @@ public class ExcelService implements IExcelService {
private List<TableVo.CompeteOverview> competeJoinCountList(CompeteDto.CompeteTime params) {
List<TableVo.CompeteOverview> competeOverviewList = competeCompanyDao.selectCompeteJoinCountList(params.getCompeteTimeId());
List<TableVo.CompeteOverview> list = new LinkedList<>();
for (TableVo.CompeteOverview mes : competeOverviewList){
if (mes.getCoachNum() != 0 && mes.getGuideNum() != 0 && mes.getPlayerNum() != 0){
competeOverviewList.forEach(mes->{
if (mes.getGuideNum()!=0 && mes.getCoachNum()!=0 && mes.getPlayerNum()!=0){
int num = mes.getCoachNum()+mes.getPlayerNum()+mes.getGuideNum();
mes.setSum(num);
list.add(mes);
}
}
});
return list;
}

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

9
mt/src/main/resources/mapper_dao/CompeteCompanyDao.xml

@ -401,15 +401,20 @@
<select id="selectCompeteJoinCountList" resultType="com.ccsens.mt.bean.vo.TableVo$CompeteOverview">
SELECT
SELECT * FROM
(SELECT
tcc.`name` as companyName,
tcc.id,
(SELECT count(tcca.id) FROM t_compete_coach tcca WHERE tcc.id = tcca.company_id and identity = 1 and rec_status = 0) as coachNum,
(SELECT count(tcca.id) FROM t_compete_coach tcca WHERE tcc.id = tcca.company_id and identity = 0 and rec_status = 0) as guideNum,
(SELECT COUNT(tcpp.id) FROM t_compete_project_player tcpp LEFT JOIN t_compete_player tcp on tcp.id = tcpp.player_id WHERE tcp.company_id = tcc.id and tcp.rec_status = 0 and tcpp.rec_status = 0) as playerNum
((SELECT COUNT(tcpp.id) FROM t_compete_project_player tcpp LEFT JOIN t_compete_player tcp on tcp.id = tcpp.player_id WHERE tcp.company_id = tcc.id and tcp.rec_status = 0 and tcpp.rec_status = 0 and tcp.rec_status = 0) +
(SELECT COUNT(tctm.id) FROM t_compete_team_member tctm LEFT JOIN t_compete_team tct on tctm.compete_team_id = tct.id WHERE tct.company_id = tcc.id and tct.rec_status = 0 and tctm.rec_status = 0 ))as playerNum
FROM
t_compete_company tcc
WHERE
tcc.rec_status =0
and tcc.compete_time_id = #{competeTimeId}
) c
WHERE c.playerNum &lt;&gt; 0
</select>
</mapper>
Loading…
Cancel
Save