Browse Source

1

tiaosheng
Lihong@123456 5 years ago
parent
commit
6336262ec9
  1. 2
      mt/src/main/java/com/ccsens/mt/bean/vo/TableVo.java
  2. 23
      mt/src/main/java/com/ccsens/mt/service/ExcelService.java
  3. 2
      mt/src/main/resources/mapper_dao/CompeteProjectConfigDao.xml
  4. 6
      mt/src/main/resources/mapper_dao/CompeteProjectDao.xml
  5. 4
      tall/src/main/resources/application.yml

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

@ -48,6 +48,8 @@ public class TableVo {
private String bodyProtect;
@ApiModelProperty("参赛队伍")
private String joinTeam;
@ApiModelProperty("加入规则")
private Byte joinRule;
public int getAge(){
if(StrUtil.isNotEmpty(idCard) && age == 0){

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

@ -274,11 +274,17 @@ public class ExcelService implements IExcelService {
//个人项目名报名
List<TableVo.CompeteJoin> playerForSingleList = competeProjectDao.getPlayerForSingle(level, type);
playerForSingleList.forEach(mes->{
if (mes.getJoinRule()==1){
mes.setCompeteGroup("不限组别");
}
competeJoinList.add(mes);
});
//团队项目报名
List<TableVo.CompeteJoin> playerForTeamList = competeProjectDao.getPlayerForTeam(level, type);
playerForTeamList.forEach(mes->{
if (mes.getJoinRule()==1){
mes.setCompeteGroup("不限组别");
}
competeJoinList.add(mes);
});
return competeJoinList;
@ -1071,6 +1077,11 @@ public class ExcelService implements IExcelService {
// }
PageHelper.startPage(params.getPage(),params.getSize());
List<TableVo.CompeteJoin> competeJoinList = competeProjectConfigDao.selectPeople(params.getProjectId(), params.getGroupId(), params.getCompanyId(), params.getName(), params.getIdCard());
competeJoinList.forEach(mes->{
if (mes.getJoinRule()==1){
mes.setCompeteGroup("不限组别");
}
});
PageInfo pageInfo = new PageInfo<>(competeJoinList);
return pageInfo;
}
@ -1160,6 +1171,7 @@ public class ExcelService implements IExcelService {
cells.add(poiUtilCel3);
StringBuilder stringBuilder = new StringBuilder();
if (CollectionUtil.isNotEmpty(schedulePlan.getSchedulePlanDetailListMorning())) {
int a = 1;
for (TableVo.SchedulePlanDetail schedulePlanDetail : schedulePlan.getSchedulePlanDetailListMorning()) {
Date date = new Date(schedulePlanDetail.getStartTime());
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH:mm");
@ -1168,7 +1180,8 @@ public class ExcelService implements IExcelService {
SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat("HH:mm");
String year1 = simpleDateFormat1.format(date1);
String string = schedulePlanDetail.getProjectName() + "(" + year +"-"+ year1 + ")";
stringBuilder.append(string+" \n");
stringBuilder.append(a+"、"+string+" \n");
a++;
}
}
@ -1176,6 +1189,7 @@ public class ExcelService implements IExcelService {
cells.add(poiUtilCel);
StringBuilder stringBuilder1 = new StringBuilder();
if (CollectionUtil.isNotEmpty(schedulePlan.getSchedulePlanDetailListAfternoon())) {
int a =1;
for (TableVo.SchedulePlanDetail schedulePlanDetail : schedulePlan.getSchedulePlanDetailListAfternoon()) {
Date date = new Date(schedulePlanDetail.getStartTime());
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH:mm");
@ -1184,13 +1198,15 @@ public class ExcelService implements IExcelService {
SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat("HH:mm");
String year1 = simpleDateFormat1.format(date1);
String string = schedulePlanDetail.getProjectName() + "(" + year +"-"+ year1 + ")";
stringBuilder1.append(string+" "+"\n");
stringBuilder1.append(a+"、"+string+" \n");
a++;
}
}
PoiUtil.PoiUtilCell poiUtilCell = new PoiUtil.PoiUtilCell(stringBuilder1.toString());
cells.add(poiUtilCell);
StringBuilder stringBuilder2 = new StringBuilder();
if (CollectionUtil.isNotEmpty(schedulePlan.getSchedulePlanDetailListNight())){
int a=1;
for (TableVo.SchedulePlanDetail schedulePlanDetail: schedulePlan.getSchedulePlanDetailListNight()){
Date date = new Date(schedulePlanDetail.getStartTime());
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH:mm");
@ -1199,7 +1215,8 @@ public class ExcelService implements IExcelService {
SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat("HH:mm");
String year1 = simpleDateFormat1.format(date1);
String string = schedulePlanDetail.getProjectName() + "(" + year +"-"+ year1 + ")";
stringBuilder2.append(string+" "+"\n");
stringBuilder2.append(a+"、"+string+" \n");
a++;
}
}
PoiUtil.PoiUtilCell poiUtilCel2 = new PoiUtil.PoiUtilCell(stringBuilder2.toString());

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

@ -91,6 +91,7 @@
tcp.`name` as name,
tcp.gender as gender,
tcp.id_card as idCard,
tcpro.join_rule as joinRule,
(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_photo_file = id ) as picture,
@ -139,6 +140,7 @@
tcp.`name` as name,
tcp.gender as gender,
tcp.id_card as idCard,
tcpro.join_rule as joinRule,
(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_photo_file = id ) as picture,

6
mt/src/main/resources/mapper_dao/CompeteProjectDao.xml

@ -17,7 +17,8 @@
tcp.`name` as name,
if(tcp.gender = 1,'男','女') as gender,
tcp.id_card as idCard,
(2020 - SUBSTR(tcp.id_card FROM 7 FOR 4)) as age
(2020 - SUBSTR(tcp.id_card FROM 7 FOR 4)) as age,
tcpro.join_rule as joinRule
from t_compete_project tcpro
LEFT JOIN t_compete_project_player tcpp on tcpro.id = tcpp.project_id
LEFT JOIN t_compete_player tcp on tcp.id = tcpp.player_id
@ -42,7 +43,8 @@
pl.`name` as name ,
pl.id_card as idCard,
if(pl.gender = 1,'男','女') as gender,
(2020 - SUBSTR(pl.id_card FROM 7 FOR 4)) as age
(2020 - SUBSTR(pl.id_card FROM 7 FOR 4)) as age,
p.join_rule as joinRule
FROM
t_compete_project p
LEFT JOIN t_compete_team t on p.id = t.project_id

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

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

Loading…
Cancel
Save