Browse Source

Merge branch 'pt' of https://gitee.com/ccsens_s/ccsenscloud into pt

tiaosheng
zhizhi wu 5 years ago
parent
commit
fd41d96685
  1. 17
      cloudutil/src/main/java/com/ccsens/cloudutil/aspect/LogAspect.java
  2. 4
      cloudutil/src/main/java/com/ccsens/cloudutil/bean/tall/dto/LogDto.java
  3. 2
      cloudutil/src/main/java/com/ccsens/cloudutil/bean/tall/dto/WpsDto.java
  4. 2
      cloudutil/src/main/java/com/ccsens/cloudutil/feign/TallFeignClient.java
  5. 2
      cloudutil/src/main/resources/application-util-prod.yml
  6. 62
      cloudutil/src/main/resources/application-util-test.yml
  7. 3
      ct/src/main/resources/druid-test.yml
  8. 4
      game/src/main/java/com/ccsens/game/config/SpringConfig.java
  9. 24
      game/src/main/java/com/ccsens/game/service/ScreenService.java
  10. 10
      game/src/main/resources/application-test.yml
  11. 4
      game/src/main/resources/druid-test.yml
  12. 3
      health/src/main/java/com/ccsens/health/api/DebugController.java
  13. 18
      ht/src/main/java/com/ccsens/ht/api/DoctorController.java
  14. 3
      ht/src/main/java/com/ccsens/ht/api/PatientController.java
  15. 28
      ht/src/main/java/com/ccsens/ht/api/PatientReportController.java
  16. 8
      ht/src/main/java/com/ccsens/ht/bean/dto/PatientReportDto.java
  17. 11
      ht/src/main/java/com/ccsens/ht/bean/po/HtDoctor.java
  18. 70
      ht/src/main/java/com/ccsens/ht/bean/po/HtDoctorExample.java
  19. 11
      ht/src/main/java/com/ccsens/ht/bean/po/HtPatientReport.java
  20. 60
      ht/src/main/java/com/ccsens/ht/bean/po/HtPatientReportExample.java
  21. 258
      ht/src/main/java/com/ccsens/ht/bean/vo/PatientReportVo.java
  22. 13
      ht/src/main/java/com/ccsens/ht/persist/dao/HtPatientReportDao.java
  23. 40
      ht/src/main/java/com/ccsens/ht/service/DoctorService.java
  24. 7
      ht/src/main/java/com/ccsens/ht/service/IDoctorService.java
  25. 15
      ht/src/main/java/com/ccsens/ht/service/IPatientReportService.java
  26. 40
      ht/src/main/java/com/ccsens/ht/service/PatientReportService.java
  27. 4
      ht/src/main/java/com/ccsens/ht/service/PatientService.java
  28. 34
      ht/src/main/java/com/ccsens/ht/service/QuestionService.java
  29. 10
      ht/src/main/java/com/ccsens/ht/uitl/Constant.java
  30. 4
      ht/src/main/resources/application-dev.yml
  31. 9
      ht/src/main/resources/application-prod.yml
  32. 1
      ht/src/main/resources/application-test.yml
  33. 18
      ht/src/main/resources/mapper_dao/HtPatientReportDao.xml
  34. 25
      ht/src/main/resources/mapper_raw/HtDoctorMapper.xml
  35. 28
      ht/src/main/resources/mapper_raw/HtPatientReportMapper.xml
  36. 108
      mt/src/main/java/com/ccsens/mt/api/CompeteController.java
  37. 51
      mt/src/main/java/com/ccsens/mt/api/CompeteScoreController.java
  38. 57
      mt/src/main/java/com/ccsens/mt/api/DebugController.java
  39. 77
      mt/src/main/java/com/ccsens/mt/api/DepartmentController.java
  40. 84
      mt/src/main/java/com/ccsens/mt/api/ExcelController.java
  41. 94
      mt/src/main/java/com/ccsens/mt/api/FileController.java
  42. 10
      mt/src/main/java/com/ccsens/mt/api/LevelController.java
  43. 194
      mt/src/main/java/com/ccsens/mt/api/ProvinceController.java
  44. 3
      mt/src/main/java/com/ccsens/mt/api/ScoreController.java
  45. 56
      mt/src/main/java/com/ccsens/mt/api/VideoController.java
  46. 208
      mt/src/main/java/com/ccsens/mt/bean/dto/CompeteDto.java
  47. 33
      mt/src/main/java/com/ccsens/mt/bean/dto/LevelDto.java
  48. 143
      mt/src/main/java/com/ccsens/mt/bean/dto/ProvinceCompeteDto.java
  49. 42
      mt/src/main/java/com/ccsens/mt/bean/dto/VideoDto.java
  50. 150
      mt/src/main/java/com/ccsens/mt/bean/po/CompeteCoach.java
  51. 951
      mt/src/main/java/com/ccsens/mt/bean/po/CompeteCoachExample.java
  52. 88
      mt/src/main/java/com/ccsens/mt/bean/po/CompeteCompany.java
  53. 500
      mt/src/main/java/com/ccsens/mt/bean/po/CompeteCompanyExample.java
  54. 95
      mt/src/main/java/com/ccsens/mt/bean/po/CompeteCompanyRole.java
  55. 621
      mt/src/main/java/com/ccsens/mt/bean/po/CompeteCompanyRoleExample.java
  56. 44
      mt/src/main/java/com/ccsens/mt/bean/po/CompeteGroup.java
  57. 240
      mt/src/main/java/com/ccsens/mt/bean/po/CompeteGroupExample.java
  58. 88
      mt/src/main/java/com/ccsens/mt/bean/po/CompetePlayer.java
  59. 480
      mt/src/main/java/com/ccsens/mt/bean/po/CompetePlayerExample.java
  60. 95
      mt/src/main/java/com/ccsens/mt/bean/po/CompetePlayerFamily.java
  61. 631
      mt/src/main/java/com/ccsens/mt/bean/po/CompetePlayerFamilyExample.java
  62. 11
      mt/src/main/java/com/ccsens/mt/bean/po/CompeteProject.java
  63. 117
      mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectConfig.java
  64. 741
      mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectConfigExample.java
  65. 60
      mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectExample.java
  66. 95
      mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectGroup.java
  67. 631
      mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectGroupExample.java
  68. 22
      mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectPlayer.java
  69. 120
      mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectPlayerExample.java
  70. 44
      mt/src/main/java/com/ccsens/mt/bean/po/CompeteTeam.java
  71. 240
      mt/src/main/java/com/ccsens/mt/bean/po/CompeteTeamExample.java
  72. 150
      mt/src/main/java/com/ccsens/mt/bean/po/CompeteVideo.java
  73. 941
      mt/src/main/java/com/ccsens/mt/bean/po/CompeteVideoExample.java
  74. 225
      mt/src/main/java/com/ccsens/mt/bean/vo/CompeteVo.java
  75. 225
      mt/src/main/java/com/ccsens/mt/bean/vo/ProvinceCompeteVo.java
  76. 113
      mt/src/main/java/com/ccsens/mt/bean/vo/TableVo.java
  77. 26
      mt/src/main/java/com/ccsens/mt/bean/vo/VideoVo.java
  78. 119
      mt/src/main/java/com/ccsens/mt/persist/dao/CompeteCompanyDao.java
  79. 119
      mt/src/main/java/com/ccsens/mt/persist/dao/CompeteEnrollDao.java
  80. 61
      mt/src/main/java/com/ccsens/mt/persist/dao/CompetePlayerDao.java
  81. 13
      mt/src/main/java/com/ccsens/mt/persist/dao/CompeteTeamDao.java
  82. 10
      mt/src/main/java/com/ccsens/mt/persist/dao/CompeteTimeDao.java
  83. 11
      mt/src/main/java/com/ccsens/mt/persist/dao/LevelUpDao.java
  84. 30
      mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteCoachMapper.java
  85. 30
      mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteCompanyRoleMapper.java
  86. 30
      mt/src/main/java/com/ccsens/mt/persist/mapper/CompetePlayerFamilyMapper.java
  87. 30
      mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteProjectConfigMapper.java
  88. 30
      mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteProjectGroupMapper.java
  89. 30
      mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteVideoMapper.java
  90. 721
      mt/src/main/java/com/ccsens/mt/service/CompeteService.java
  91. 449
      mt/src/main/java/com/ccsens/mt/service/DepartmentService.java
  92. 763
      mt/src/main/java/com/ccsens/mt/service/ExcelService.java
  93. 101
      mt/src/main/java/com/ccsens/mt/service/FileService.java
  94. 67
      mt/src/main/java/com/ccsens/mt/service/ICompeteService.java
  95. 48
      mt/src/main/java/com/ccsens/mt/service/IDepartmentService.java
  96. 49
      mt/src/main/java/com/ccsens/mt/service/IExcelService.java
  97. 11
      mt/src/main/java/com/ccsens/mt/service/IFileService.java
  98. 7
      mt/src/main/java/com/ccsens/mt/service/ILevelUpService.java
  99. 141
      mt/src/main/java/com/ccsens/mt/service/IProvinceService.java
  100. 26
      mt/src/main/java/com/ccsens/mt/service/IVideoService.java

17
cloudutil/src/main/java/com/ccsens/cloudutil/aspect/LogAspect.java

@ -1,6 +1,9 @@
package com.ccsens.cloudutil.aspect;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.ccsens.cloudutil.bean.tall.dto.LogDto;
import com.ccsens.cloudutil.bean.tall.vo.UserVo;
import com.ccsens.cloudutil.feign.TallFeignClient;
import com.ccsens.util.UploadFileUtil_Servlet3;
import com.ccsens.util.WebConstant;
@ -49,7 +52,9 @@ public class LogAspect {
}
@Pointcut("execution(* com.ccsens.tall.web..*(..)) || execution(* com.ccsens.ht.api..*(..))")
@Pointcut("execution(* com.ccsens.tall.web..*(..)) || execution(* com.ccsens.ht.api..*(..))" +
" || execution(* com.ccsens.mt.api..*(..)) || execution(* com.ccsens.game.api..*(..))" +
" || execution(* com.ccsens.health.api..*(..)) || execution(* com.ccsens.pims.api..*(..))")
public void logAdvice(){
}
@ -72,6 +77,13 @@ public class LogAspect {
throw throwable;
}
if (logDto != null) {
if("/users/signin".equals(logDto.getUrl()) && result != null){
JSONObject json = JSONObject.parseObject(JSON.toJSONString(result));
if(json.getIntValue("code") == 200 && json.get("data") != null){
long userId = json.getJSONObject("data").getLongValue("id");
logDto.setUserId(userId);
}
}
String message = result == null ? null : result.toString().length() > 1000 ? result.toString().substring(0, 1000) : result.toString();
logDto.setResult(message);
tallFeignClient.log(logDto);
@ -96,9 +108,9 @@ public class LogAspect {
log.info("保存日志,不进行记录");
return null;
}
LogDto dto = new LogDto();
dto.setUrl(url);
dto.setFacility(request.getHeader("fingerprint"));
//参数
Object[] args = pjp.getArgs();
StringBuilder param = new StringBuilder();
@ -112,6 +124,7 @@ public class LogAspect {
String userId = claims == null ? null : ((Claims) claims).getSubject();
if (userId != null) {
param.append("userId:").append(userId).append("--");
dto.setUserId(Long.parseLong(userId));
}
} else if (args[i] instanceof Part) {

4
cloudutil/src/main/java/com/ccsens/cloudutil/bean/tall/dto/LogDto.java

@ -24,4 +24,8 @@ public class LogDto {
private String methodDesc;
@ApiModelProperty("接口返回值(或异常)")
private String result;
@ApiModelProperty("设备信息")
private String facility;
@ApiModelProperty("设备信息")
private Long userId;
}

2
cloudutil/src/main/java/com/ccsens/cloudutil/bean/tall/dto/WpsDto.java

@ -24,6 +24,8 @@ public class WpsDto {
private String fileName;
@ApiModelProperty("文件路径,默认在WebConstant.UPLOAD_PATH_BASE下")
private String filePath;
@ApiModelProperty("文件实际存储路径")
private String realFilePath;
@ApiModelProperty("文件大小")
private Long fileSize;
@ApiModelProperty("操作类型 值:WebConstant Wps USER_OPERATION... ")

2
cloudutil/src/main/java/com/ccsens/cloudutil/feign/TallFeignClient.java

@ -160,7 +160,7 @@ public interface TallFeignClient {
JsonResponse saveWpsFile(WpsDto.Business business);
/**
* 保存WPS业务和文件记录
* 查询WPS业务和文件记录
*/
@RequestMapping("/wps/visitUrls")
List<String> queryVisitUrls(WpsDto.VisitWpsUrl visitWpsUrl);

2
cloudutil/src/main/resources/application-util-prod.yml

@ -20,8 +20,10 @@ eureka:
service-url:
# 指定eureka server通信地址,注意/eureka/小尾巴不能少
#defaultZone: http://admin:admin@peer1:8761/eureka/,http://admin:admin@peer2:8762/eureka/
# defaultZone: http://admin:admin@81.70.54.64:7010/eureka/
defaultZone: http://admin:admin@192.144.182.42:7010/eureka/
instance:
# 是否注册IP到eureka server,如不指定或设为false,那就回注册主机名到eureka server
prefer-ip-address: true

62
cloudutil/src/main/resources/application-util-test.yml

@ -1,3 +1,65 @@
#<<<<<<< HEAD
##服务端点暴露
#management:
# endpoints:
# web:
# exposure:
# # 暴露xxx端点,如需暴露多个,用,分隔;如需暴露所有端点,用'*'
# include: auditevents,caches,conditions,flyway,health,heapdump,httptrace,info,integrationgraph,jolokia,logfile,loggers,liquibase,metrics,mappings,prometheus,scheduledtasks,sessions,shutdown,threaddump,hystrix.stream
## # 不暴露哪些端点
## exclude: env,beans,configprops
# endpoint:
# health:
# # 是否展示健康检查详情
# show-details: always
# health:
# redis:
# enabled: false
##eureka注册
#eureka:
# client:
# service-url:
# # 指定eureka server通信地址,注意/eureka/小尾巴不能少
# #defaultZone: http://admin:admin@peer1:8761/eureka/,http://admin:admin@peer2:8762/eureka/
## defaultZone: http://admin:admin@49.233.89.188:7010/eureka/
# defaultZone: http://admin:admin@192.168.0.99:7010/eureka/
# instance:
# # 是否注册IP到eureka server,如不指定或设为false,那就回注册主机名到eureka server
# prefer-ip-address: true
# metadata-map:
# management:
# context-path: ${server.servlet.context-path:}/actuator
# home-page-url-path: ${server.servlet.context-path:}/
# status-page-url-path: ${server.servlet.context-path:}/actuator/info
# health-check-url-path: ${server.servlet.context-path:}/actuator/health
#feign:
# client:
# config:
# default:
# connectTime: 5000
# readTimeout: 5000
# # NONE【性能最佳,适用于生产】:不记录任何日志(默认值)。
# # BASIC【适用于生产环境追踪问题】:仅记录请求方法、URL、响应状态代码以及执行时间。
# # HEADERS:记录BASIC级别的基础上,记录请求和响应的header。
# # FULL【比较适用于开发及测试环境定位问题】:记录请求和响应的header、body和元数据
# loggerLevel: basic
# hystrix:
# enabled: true
## sleuth
#logging:
# level:
# root: info
# org.springframework.cloud.sleuth: DEBUG
#spring:
## zipkin:
## base-url: http://49.233.89.188:9411
## sleuth:
## sampler:
## # 采样率,模式0.1,也就是10%,为了便于观察效果,改为1.0,也就是100%。生产环境建议保持默认。
## probability: 1.0
# cloud:
# inetutils:
#=======
#服务端点暴露
management:
endpoints:

3
ct/src/main/resources/druid-test.yml

@ -28,7 +28,10 @@ spring:
testOnReturn: false
testWhileIdle: true
timeBetweenEvictionRunsMillis: 60000
<<<<<<< HEAD
=======
# url: jdbc:mysql://127.0.0.1/ct?useUnicode=true&characterEncoding=UTF-8
>>>>>>> pt
url: jdbc:mysql://test.tall.wiki/ct?useUnicode=true&characterEncoding=UTF-8
username: root
validationQuery: SELECT 1 FROM DUAL

4
game/src/main/java/com/ccsens/game/config/SpringConfig.java

@ -8,7 +8,6 @@ import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@ -18,6 +17,7 @@ import org.springframework.http.converter.StringHttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.servlet.config.annotation.*;
import javax.annotation.Resource;
import javax.sql.DataSource;
import java.nio.charset.Charset;
import java.util.ArrayList;
@ -26,7 +26,7 @@ import java.util.List;
@Configuration
//public class SpringConfig extends WebMvcConfigurationSupport {
public class SpringConfig implements WebMvcConfigurer {
@Autowired
@Resource
private DruidProps druidPropsUtil;
@Value("${spring.snowflake.workerId}")
private String workerId;

24
game/src/main/java/com/ccsens/game/service/ScreenService.java

@ -131,18 +131,21 @@ public class ScreenService implements IScreenService {
gameRecord.setUrl(gameUrl + gameType.getScreenUrl() + "?id=" + gameRecord.getId());
// gameRecord.setQrCodeUrl(gameUrl + gameRecord.getId() + File.separator + gameType.getClientUrl());
if("1".equalsIgnoreCase(PropUtil.openWx)){
// if("1".equalsIgnoreCase(PropUtil.openWx)){
//生成二维码
String fileName = "/gameQrCode/" + DateUtil.today() + "/" + System.currentTimeMillis() + ".png";
String path = WebConstant.UPLOAD_PATH_BASE + fileName;
WxXcxUtil.getWxCode(WebConstant.QRCODE_GAME, "id=" + gameRecord.getId() + "&type=" + gameType.getCode(), null, path, gameType.getCode());
// WxXcxUtil.getWxCode(WebConstant.QRCODE_GAME, "id=" + gameRecord.getId() + "&type=" + gameType.getCode(), null, path, gameType.getCode());
WxXcxUtil.getWxCodeC(WebConstant.QRCODE_GAME+"?id=" + gameRecord.getId() + "&type=" + gameType.getCode(), path, gameType.getCode());
gameRecord.setQrCodeUrl(PropUtil.qrCode + fileName);
log.info("调用微信生成二维码");
} else {
log.info("测试环境,不调用生成二维码");
//给一个默认测试的
gameRecord.setQrCodeUrl(PropUtil.qrCode + "/gameQrCode/2020-08-19/1597822577181.png");
}
// } else {
// log.info("测试环境,不调用生成二维码");
// //给一个默认测试的
// gameRecord.setQrCodeUrl(PropUtil.qrCode + "/gameQrCode/2020-08-19/1597822577181.png");
// }
//查找此任务下的游戏配置表
byte businessType = 8;
@ -204,9 +207,15 @@ public class ScreenService implements IScreenService {
}
}
chromeMessageDto.setReceivers(messageUserList);
//<<<<<<< HEAD
// log.info("给所有成员发送开始游戏的消息:{}",chromeMessageDto.toString());
// messageService.sendGameMessageWithGetUrl(chromeMessageDto);
//
//=======
messageService.sendGameMessageWithGetUrl(chromeMessageDto,userIdSet);
log.info("给所有成员发送消息:{}",chromeMessageDto);
log.info("返回游戏信息:{}",urlVo);
return urlVo;
}
@ -1447,6 +1456,7 @@ public class ScreenService implements IScreenService {
business.setUserId(params.getUserId());
business.setFileName(name);
business.setFilePath(fileName);
business.setRealFilePath(path);
business.setFileSize(tmpFile.length());
business.setOperation(WebConstant.Wps.USER_OPERATION_NEW);
business.setPrivilege(WebConstant.Wps.PROJECT_PRIVILEGE_WRITE);

10
game/src/main/resources/application-test.yml

@ -8,13 +8,17 @@ spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
rabbitmq:
<<<<<<< HEAD
host: 81.70.54.64
=======
host: 127.0.0.1
>>>>>>> pt
password: 111111
port: 5672
username: admin
redis:
database: 0
host: 127.0.0.1
host: 192.168.0.99
jedis:
pool:
max-active: 200
@ -28,6 +32,9 @@ swagger:
enable: true
eureka:
instance:
<<<<<<< HEAD
ip-address: 192.168.0.99
=======
ip-address: 192.168.0.99
gatewayUrl: https://test.tall.wiki/gateway/
@ -35,3 +42,4 @@ notGatewayUrl: https://test.tall.wiki/
file:
qrCode: https://test.tall.wiki/gateway/tall/v1.0/uploads/
openWX: 0
>>>>>>> pt

4
game/src/main/resources/druid-test.yml

@ -27,6 +27,10 @@ spring:
testOnReturn: false
testWhileIdle: true
timeBetweenEvictionRunsMillis: 60000
<<<<<<< HEAD
# url: jdbc:mysql://test.tall.wiki/game?useUnicode=true&characterEncoding=UTF-8
=======
>>>>>>> pt
url: jdbc:mysql://49.233.89.188:3306/game?useUnicode=true&characterEncoding=UTF-8
username: root
validationQuery: SELECT 1 FROM DUAL

3
health/src/main/java/com/ccsens/health/api/DebugController.java

@ -21,8 +21,7 @@ public class DebugController {
})
@RequestMapping(value="",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"})
public JsonResponse debug(HttpServletRequest request) throws Exception {
return JsonResponse.newInstance().ok("测试");
return JsonResponse.newInstance().ok("测试0\\\\\\\0");
}
@ApiOperation(value = "/测试二维码",notes = "")

18
ht/src/main/java/com/ccsens/ht/api/DoctorController.java

@ -4,6 +4,7 @@ package com.ccsens.ht.api;
import com.ccsens.cloudutil.annotation.MustLogin;
import com.ccsens.ht.annotation.DoctorAudit;
import com.ccsens.ht.bean.dto.DoctorDto;
import com.ccsens.ht.bean.vo.PatientReportVo;
import com.ccsens.util.bean.dto.QueryDto;
import com.ccsens.ht.bean.vo.DoctorVo;
import com.ccsens.ht.service.IDoctorService;
@ -94,5 +95,22 @@ public class DoctorController {
return JsonResponse.newInstance().ok(dtos);
}
@MustLogin
@DoctorAudit
@ApiOperation(value = "分享编辑病友信息",notes = "分享编辑病友信息")
@ApiImplicitParams({
@ApiImplicitParam(name = "json", value = "分享编辑病友信息", required = true)
})
@RequestMapping(value="/patientFillShare", method = RequestMethod.POST)
public JsonResponse<PatientReportVo.Export> patientFillShare(@RequestBody @ApiParam @Valid QueryDto params) throws Exception {
log.info("查询其他信息请求参数:{}", params);
Long userId = params.getUserId();
String path = doctorService.getShareUrl(userId);
PatientReportVo.Export export = new PatientReportVo.Export();
export.setPath(path);
log.info("{}分享路径:{}", userId, export);
return JsonResponse.newInstance().ok(export);
}
}

3
ht/src/main/java/com/ccsens/ht/api/PatientController.java

@ -112,7 +112,7 @@ public class PatientController {
patient.setIdcard(null);
}
//设置记录值
patient.setRecorder(patient.getId() == null ? Constant.Ht.NUMBER_DEFAULT : params.getUserId());
// patient.setRecorder(patient.getId() == null ? Constant.Ht.NUMBER_DEFAULT : params.getUserId());
long id = patientService.editPatient(patient.copy(), params.getUserId());
log.info("病友编辑结果:{}", id);
if (id <= 0) {
@ -160,4 +160,5 @@ public class PatientController {
json.put("id", id);
return JsonResponse.newInstance().ok(CodeEnum.SUCCESS, json);
}
}

28
ht/src/main/java/com/ccsens/ht/api/PatientReportController.java

@ -35,6 +35,34 @@ public class PatientReportController {
@Autowired
private IPatientReportService patientReportService;
@MustLogin
@DoctorAudit
@ApiOperation(value = "忽略未完成的报告单",notes = "忽略未完成的报告单")
@ApiImplicitParams({
@ApiImplicitParam(name = "json", value = "报告单信息", required = true)
})
@RequestMapping(value="/ignoreComplete", method = RequestMethod.POST)
public JsonResponse ignoreComplete(@RequestBody @ApiParam @Valid QueryDto<PatientReportDto.Ignore> dto){
log.info("忽略未完成的报告单:{}", dto);
patientReportService.ignoreComplete(dto.getParam(), dto.getUserId());
log.info("忽略未完成的报告单已完成");
return JsonResponse.newInstance().ok();
}
@MustLogin
@DoctorAudit
@ApiOperation(value = "检查是否有未完成的报告单",notes = "检查是否有未完成的报告单")
@ApiImplicitParams({
@ApiImplicitParam(name = "json", value = "报告单信息", required = true)
})
@RequestMapping(value="/checkComplete", method = RequestMethod.POST)
public JsonResponse<PatientReportVo.Complete> checkComplete(@RequestBody @ApiParam @Valid QueryDto dto){
log.info("检查是否有未完成的报告单:{}", dto);
PatientReportVo.Complete complete = patientReportService.checkComplete(dto.getUserId());
log.info("检查是否有未完成的报告单返回:{}", complete);
return JsonResponse.newInstance().ok(complete);
}
@MustLogin
@DoctorAudit
@ApiOperation(value = "生成报告单",notes = "生成报告单")

8
ht/src/main/java/com/ccsens/ht/bean/dto/PatientReportDto.java

@ -19,6 +19,14 @@ import javax.validation.constraints.Pattern;
*/
public class PatientReportDto {
@Data
@ApiModel("忽略未完成的报告单")
public static class Ignore{
@ApiModelProperty("病人报告单ID")
@NotNull(message = "病人报告单ID不能为空")
private Long id;
}
@ApiModel("PatientReportDtoGenerate")
@Data
public static class Generate{

11
ht/src/main/java/com/ccsens/ht/bean/po/HtDoctor.java

@ -24,6 +24,8 @@ public class HtDoctor implements Serializable {
private String remark;
private String sharePatientEdit;
private Date createTime;
private Date updateTime;
@ -112,6 +114,14 @@ public class HtDoctor implements Serializable {
this.remark = remark == null ? null : remark.trim();
}
public String getSharePatientEdit() {
return sharePatientEdit;
}
public void setSharePatientEdit(String sharePatientEdit) {
this.sharePatientEdit = sharePatientEdit == null ? null : sharePatientEdit.trim();
}
public Date getCreateTime() {
return createTime;
}
@ -152,6 +162,7 @@ public class HtDoctor implements Serializable {
sb.append(", auditorId=").append(auditorId);
sb.append(", auditState=").append(auditState);
sb.append(", remark=").append(remark);
sb.append(", sharePatientEdit=").append(sharePatientEdit);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", isDel=").append(isDel);

70
ht/src/main/java/com/ccsens/ht/bean/po/HtDoctorExample.java

@ -725,6 +725,76 @@ public class HtDoctorExample {
return (Criteria) this;
}
public Criteria andSharePatientEditIsNull() {
addCriterion("share_patient_edit is null");
return (Criteria) this;
}
public Criteria andSharePatientEditIsNotNull() {
addCriterion("share_patient_edit is not null");
return (Criteria) this;
}
public Criteria andSharePatientEditEqualTo(String value) {
addCriterion("share_patient_edit =", value, "sharePatientEdit");
return (Criteria) this;
}
public Criteria andSharePatientEditNotEqualTo(String value) {
addCriterion("share_patient_edit <>", value, "sharePatientEdit");
return (Criteria) this;
}
public Criteria andSharePatientEditGreaterThan(String value) {
addCriterion("share_patient_edit >", value, "sharePatientEdit");
return (Criteria) this;
}
public Criteria andSharePatientEditGreaterThanOrEqualTo(String value) {
addCriterion("share_patient_edit >=", value, "sharePatientEdit");
return (Criteria) this;
}
public Criteria andSharePatientEditLessThan(String value) {
addCriterion("share_patient_edit <", value, "sharePatientEdit");
return (Criteria) this;
}
public Criteria andSharePatientEditLessThanOrEqualTo(String value) {
addCriterion("share_patient_edit <=", value, "sharePatientEdit");
return (Criteria) this;
}
public Criteria andSharePatientEditLike(String value) {
addCriterion("share_patient_edit like", value, "sharePatientEdit");
return (Criteria) this;
}
public Criteria andSharePatientEditNotLike(String value) {
addCriterion("share_patient_edit not like", value, "sharePatientEdit");
return (Criteria) this;
}
public Criteria andSharePatientEditIn(List<String> values) {
addCriterion("share_patient_edit in", values, "sharePatientEdit");
return (Criteria) this;
}
public Criteria andSharePatientEditNotIn(List<String> values) {
addCriterion("share_patient_edit not in", values, "sharePatientEdit");
return (Criteria) this;
}
public Criteria andSharePatientEditBetween(String value1, String value2) {
addCriterion("share_patient_edit between", value1, value2, "sharePatientEdit");
return (Criteria) this;
}
public Criteria andSharePatientEditNotBetween(String value1, String value2) {
addCriterion("share_patient_edit not between", value1, value2, "sharePatientEdit");
return (Criteria) this;
}
public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null");
return (Criteria) this;

11
ht/src/main/java/com/ccsens/ht/bean/po/HtPatientReport.java

@ -50,6 +50,8 @@ public class HtPatientReport implements Serializable {
private String hospital;
private Byte completeStatus;
private static final long serialVersionUID = 1L;
public Long getId() {
@ -236,6 +238,14 @@ public class HtPatientReport implements Serializable {
this.hospital = hospital == null ? null : hospital.trim();
}
public Byte getCompleteStatus() {
return completeStatus;
}
public void setCompleteStatus(Byte completeStatus) {
this.completeStatus = completeStatus;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -265,6 +275,7 @@ public class HtPatientReport implements Serializable {
sb.append(", isDel=").append(isDel);
sb.append(", showStatus=").append(showStatus);
sb.append(", hospital=").append(hospital);
sb.append(", completeStatus=").append(completeStatus);
sb.append("]");
return sb.toString();
}

60
ht/src/main/java/com/ccsens/ht/bean/po/HtPatientReportExample.java

@ -1604,6 +1604,66 @@ public class HtPatientReportExample {
addCriterion("hospital not between", value1, value2, "hospital");
return (Criteria) this;
}
public Criteria andCompleteStatusIsNull() {
addCriterion("complete_status is null");
return (Criteria) this;
}
public Criteria andCompleteStatusIsNotNull() {
addCriterion("complete_status is not null");
return (Criteria) this;
}
public Criteria andCompleteStatusEqualTo(Byte value) {
addCriterion("complete_status =", value, "completeStatus");
return (Criteria) this;
}
public Criteria andCompleteStatusNotEqualTo(Byte value) {
addCriterion("complete_status <>", value, "completeStatus");
return (Criteria) this;
}
public Criteria andCompleteStatusGreaterThan(Byte value) {
addCriterion("complete_status >", value, "completeStatus");
return (Criteria) this;
}
public Criteria andCompleteStatusGreaterThanOrEqualTo(Byte value) {
addCriterion("complete_status >=", value, "completeStatus");
return (Criteria) this;
}
public Criteria andCompleteStatusLessThan(Byte value) {
addCriterion("complete_status <", value, "completeStatus");
return (Criteria) this;
}
public Criteria andCompleteStatusLessThanOrEqualTo(Byte value) {
addCriterion("complete_status <=", value, "completeStatus");
return (Criteria) this;
}
public Criteria andCompleteStatusIn(List<Byte> values) {
addCriterion("complete_status in", values, "completeStatus");
return (Criteria) this;
}
public Criteria andCompleteStatusNotIn(List<Byte> values) {
addCriterion("complete_status not in", values, "completeStatus");
return (Criteria) this;
}
public Criteria andCompleteStatusBetween(Byte value1, Byte value2) {
addCriterion("complete_status between", value1, value2, "completeStatus");
return (Criteria) this;
}
public Criteria andCompleteStatusNotBetween(Byte value1, Byte value2) {
addCriterion("complete_status not between", value1, value2, "completeStatus");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {

258
ht/src/main/java/com/ccsens/ht/bean/vo/PatientReportVo.java

@ -3,6 +3,7 @@ package com.ccsens.ht.bean.vo;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.ccsens.ht.uitl.Constant;
import com.ccsens.util.PdfUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ -18,11 +19,35 @@ import java.util.*;
*/
public class PatientReportVo {
@Data
@ApiModel("报告单遗留未完成")
public static class Complete {
@ApiModelProperty("是否有未完成的项目 1:有 0:无")
private byte hasUnfinished ;
@ApiModelProperty("报告单ID")
private Long id;
@ApiModelProperty("报告单名字")
private String name;
@ApiModelProperty("病人ID")
private Long patientId;
@ApiModelProperty("病人名字")
private String patientName;
@ApiModelProperty("病人身份证号")
private String patientIdCard;
@ApiModelProperty("评测开始时间")
private Date createTime;
@ApiModelProperty("描述")
private String description;
}
@Data
@ApiModel("PatientReportVoGenerate")
public static class Generate{
@ApiModelProperty("病人报告单ID")
private Long id;
@ApiModelProperty("报告单名称")
private String name;
}
@Data
@ -108,6 +133,7 @@ public class PatientReportVo {
List<PdfUtil.Row> rows = new ArrayList<>();
//第一栏
rows.add(
fillRow(
@ -118,7 +144,7 @@ public class PatientReportVo {
//第二栏
rows.add(
fillRow(
"文化程度(年或月):" + this.educationalStatusUnit,
"文化程度:" + this.educationalStatusUnit + "年",
"编号:" + this.serialNumber,
"职业:" + careerMap.get(this.career))
);
@ -151,7 +177,12 @@ public class PatientReportVo {
for (String param: params) {
PdfUtil.Cell cell = new PdfUtil.Cell();
cell.setContent(param);
cell.setBorder(0);
// cell.setBorder(0);
cell.setCenter(false);
cell.setBorderLeft(0);
cell.setBorderRight(0);
cell.setBorderTop(0);
cell.setBorderBottom(0);
row.addCell(cell);
}
@ -198,117 +229,153 @@ public class PatientReportVo {
PdfUtil.Cell cell2 = new PdfUtil.Cell();
cell2.setContent(this.score == null ? "" : this.score + (this.totalScore > 0 ? "/" + this.totalScore : ""));
cell2.setColSpan(colNum - headNum);
cell2.setBorderRight(1);
row.addCell(cell1);
row.addCell(cell2);
rows.add(row);
} else {
String mmse = "MMSE";
String npi = "NPI";
String mmse = Constant.Ht.Report.MMSE;
String npi = Constant.Ht.Report.NPI;
if (mmse.equalsIgnoreCase(this.code) || npi.equalsIgnoreCase(this.code)) {
PdfUtil.Row row1 = new PdfUtil.Row();
PdfUtil.Cell cell = new PdfUtil.Cell();
cell.setContent(this.code + (StrUtil.isBlank(this.remark) ? "" : "("+this.remark+")"));
cell.setRowSpan(2);
cell.setColSpan(npi.equalsIgnoreCase(this.code) ? headNum : 1);
row1.addCell(cell);
//被合并cell
PdfUtil.Row row2 = new PdfUtil.Row();
// fillBlankCell(row2);
//子测评项
this.subReport.forEach(reportScore -> {
String score = (reportScore.score == null ? "" : reportScore.score) + (reportScore.getTotalScore() > 0 ? "/" + reportScore.getTotalScore() : "");
fillRow(row1,row2, reportScore.getName(), score, npi.equalsIgnoreCase(this.code) ? new int[]{3,3} : null);
});
// 总分
if (mmse.equalsIgnoreCase(this.code)) {
fillRow(row1,row2, "总分", this.score == null ? "" : this.score + (this.totalScore > 0 ? "/" + this.totalScore : ""));
}
rows.add(row1);
rows.add(row2);
fillMmseOrNpi(headNum, rows, mmse, npi);
} else {
//moca
int firstIndex = 5;
PdfUtil.Row row1 = new PdfUtil.Row();
PdfUtil.Cell cell = new PdfUtil.Cell();
cell.setContent(this.name + (StrUtil.isBlank(this.remark) ? "" : "("+this.remark+")"));
cell.setRowSpan(5);
row1.addCell(cell);
PdfUtil.Row row2 = new PdfUtil.Row();
// fillBlankCell(row2);
for (int i = 0; i < firstIndex; i++) {
ReportScore reportScore = this.subReport.get(i);
String jy = "JY";
if (jy.equalsIgnoreCase(reportScore.getCode())) {
fillRow(row1, row2, reportScore.getName(), " ", i == 0 ? new int[]{2,2}: null);
} else {
String score = (reportScore.score == null ? "" : reportScore.score) + (reportScore.getTotalScore() > 0 ? "/" + reportScore.getTotalScore() : "");
fillRow(row1, row2, reportScore.getName(), score, i == 0 ? new int[]{2,2}: null);
}
}
PdfUtil.Cell scoreNameCell = new PdfUtil.Cell();
scoreNameCell.setContent("总分");
row1.addCell(scoreNameCell);
PdfUtil.Cell scoreCell = new PdfUtil.Cell();
scoreCell.setContent(this.score == null ? "" : this.score + (this.totalScore > 0 ? "/" + this.totalScore : ""));
scoreCell.setRowSpan(4);
row2.addCell(scoreCell);
// fillBlankCell(row1, row2);
rows.add(row1);
rows.add(row2);
//下一行
PdfUtil.Row row3 = new PdfUtil.Row();
PdfUtil.Row row4 = new PdfUtil.Row();
PdfUtil.Row row5 = new PdfUtil.Row();
// fillBlankCell(row3, row4, row5);
//延迟回忆特殊处理
String ychy = "YCHY";
for (int i = firstIndex; i < this.subReport.size(); i++) {
ReportScore reportScore = this.subReport.get(i);
//设置名字
PdfUtil.Cell scoreTitleCell = new PdfUtil.Cell();
scoreTitleCell.setContent(reportScore.getName());
scoreTitleCell.setColSpan(ychy.equalsIgnoreCase(reportScore.getCode()) ? 2 : 1);
row3.addCell(scoreTitleCell);
//设置子类
if (ychy.equalsIgnoreCase(reportScore.getCode())) {
for (int j = 0; j < reportScore.subReport.size(); j++) {
ReportScore subScore = reportScore.getSubReport().get(j);
PdfUtil.Cell subCell = new PdfUtil.Cell();
subCell.setContent(subScore.name + (subScore.getScore() == null ? " " : subScore.getScore()) + subScore.getRemark());
if (j == 0 ) {
row4.addCell(subCell);
} else {
row5.addCell(subCell);
}
}
}
PdfUtil.Cell scoreScoreCell = new PdfUtil.Cell();
String score = (reportScore.score == null ? "" : reportScore.score) + (reportScore.getTotalScore() > 0 ? "/" + reportScore.getTotalScore() : "");
scoreScoreCell.setContent(score);
scoreScoreCell.setRowSpan(2);
row4.addCell(scoreScoreCell);
// fillBlankCell(row5);
}
// fillBlankCell(row3);
// fillBlankCell(row3, row4, row5);
rows.add(row3);
rows.add(row4);
rows.add(row5);
fillMoca(rows);
}
}
if (StrUtil.isBlank(this.description)) {
return rows;
}
PdfUtil.Row descRow = new PdfUtil.Row();
PdfUtil.Cell cell = new PdfUtil.Cell();
cell.setColSpan(colNum);
cell.setContent(this.description);
cell.setCenter(false);
cell.setBorderRight(1);
descRow.addCell(cell);
rows.add(descRow);
// MOCA中,视直觉单独展示
fillSzj(colNum, headNum, rows);
return rows;
}
private void fillMmseOrNpi(int headNum, List<PdfUtil.Row> rows, String mmse, String npi) {
PdfUtil.Row row1 = new PdfUtil.Row();
PdfUtil.Cell cell = new PdfUtil.Cell();
cell.setContent(this.code + (StrUtil.isBlank(this.remark) ? "" : "("+this.remark+")"));
cell.setRowSpan(2);
cell.setColSpan(npi.equalsIgnoreCase(this.code) ? headNum : 1);
cell.setBorderTop(mmse.equalsIgnoreCase(this.code) ? 1 : 0);
row1.addCell(cell);
//被合并cell
PdfUtil.Row row2 = new PdfUtil.Row();
// fillBlankCell(row2);
//子测评项
this.subReport.forEach(reportScore -> {
String score = (reportScore.score == null ? "" : reportScore.score) + (reportScore.getTotalScore() > 0 ? "/" + reportScore.getTotalScore() : "");
boolean isLast = npi.equalsIgnoreCase(this.code) && this.subReport.indexOf(reportScore) == this.subReport.size() - 1;
fillRow(row1,row2, reportScore.getName(), score, mmse.equalsIgnoreCase(this.code), isLast, npi.equalsIgnoreCase(this.code) ? new int[]{3,3} : null);
});
// 总分
if (mmse.equalsIgnoreCase(this.code)) {
fillRow(row1,row2, "总分", this.score == null ? "" : this.score + (this.totalScore > 0 ? "/" + this.totalScore : ""), mmse.equalsIgnoreCase(this.code), true);
}
rows.add(row1);
rows.add(row2);
}
private void fillMoca(List<PdfUtil.Row> rows) {
//moca
int firstIndex = 5;
PdfUtil.Row row1 = new PdfUtil.Row();
PdfUtil.Cell cell = new PdfUtil.Cell();
cell.setContent(this.name + (StrUtil.isBlank(this.remark) ? "" : "("+this.remark+")"));
cell.setRowSpan(5);
row1.addCell(cell);
PdfUtil.Row row2 = new PdfUtil.Row();
for (int i = 0; i < firstIndex; i++) {
ReportScore reportScore = this.subReport.get(i);
String jy = "JY";
if (jy.equalsIgnoreCase(reportScore.getCode())) {
fillRow(row1, row2, reportScore.getName(), " ", false, false, i == 0 ? new int[]{2,2}: null);
} else {
String score = (reportScore.score == null ? "" : reportScore.score) + (reportScore.getTotalScore() > 0 ? "/" + reportScore.getTotalScore() : "");
fillRow(row1, row2, reportScore.getName(), score, false, false, i == 0 ? new int[]{2,2}: null);
}
}
PdfUtil.Cell scoreNameCell = new PdfUtil.Cell();
scoreNameCell.setContent("总分");
scoreNameCell.setBorderRight(1);
row1.addCell(scoreNameCell);
PdfUtil.Cell scoreCell = new PdfUtil.Cell();
scoreCell.setContent(this.score == null ? "" : this.score + (this.totalScore > 0 ? "/" + this.totalScore : ""));
scoreCell.setRowSpan(4);
scoreCell.setBorderRight(1);
row2.addCell(scoreCell);
rows.add(row1);
rows.add(row2);
//下一行
PdfUtil.Row row3 = new PdfUtil.Row();
PdfUtil.Row row4 = new PdfUtil.Row();
PdfUtil.Row row5 = new PdfUtil.Row();
//延迟回忆特殊处理
String ychy = "YCHY";
int size = this.subReport.size() - 1;
for (int i = firstIndex; i < size; i++) {
ReportScore reportScore = this.subReport.get(i);
//设置名字
PdfUtil.Cell scoreTitleCell = new PdfUtil.Cell();
scoreTitleCell.setContent(reportScore.getName());
scoreTitleCell.setColSpan(ychy.equalsIgnoreCase(reportScore.getCode()) ? 3 : 1);
row3.addCell(scoreTitleCell);
//设置子类
if (ychy.equalsIgnoreCase(reportScore.getCode())) {
for (int j = 0; j < reportScore.subReport.size(); j++) {
ReportScore subScore = reportScore.getSubReport().get(j);
PdfUtil.Cell subCell = new PdfUtil.Cell();
subCell.setContent(subScore.name + (subScore.getScore() == null ? " " : subScore.getScore()) + subScore.getRemark());
if (j == 0 ) {
row4.addCell(subCell);
} else {
row5.addCell(subCell);
}
}
}
PdfUtil.Cell scoreScoreCell = new PdfUtil.Cell();
String score = (reportScore.score == null ? "" : reportScore.score) + (reportScore.getTotalScore() > 0 ? "/" + reportScore.getTotalScore() : "");
scoreScoreCell.setContent(score);
scoreScoreCell.setRowSpan(2);
scoreScoreCell.setColSpan(ychy.equalsIgnoreCase(reportScore.getCode()) ? 2 : 1);
row4.addCell(scoreScoreCell);
}
rows.add(row3);
rows.add(row4);
rows.add(row5);
}
private void fillSzj(int colNum, int headNum, List<PdfUtil.Row> rows) {
if (Constant.Ht.Report.MOCA.equalsIgnoreCase(this.code) && CollectionUtil.isNotEmpty(this.subReport)) {
ReportScore szj = this.subReport.get(this.subReport.size() - 1);
if (Constant.Ht.Report.MOCA_SJZ.equalsIgnoreCase(szj.code)) {
PdfUtil.Row sjzRow = new PdfUtil.Row();
PdfUtil.Cell titleCell = new PdfUtil.Cell();
titleCell.setColSpan(headNum);
titleCell.setContent(szj.name);
sjzRow.addCell(titleCell);
PdfUtil.Cell sjzScoreCell = new PdfUtil.Cell();
sjzScoreCell.setColSpan(colNum - headNum);
sjzScoreCell.setContent((szj.getScore() == null ? " " : szj.getScore()) + "/" + szj.getTotalScore());
sjzScoreCell.setBorderRight(1);
sjzRow.addCell(sjzScoreCell);
rows.add(sjzRow);
}
}
}
/**
* 添加一个空格
* @param rows
@ -320,10 +387,12 @@ public class PatientReportVo {
}
}
private void fillRow(PdfUtil.Row row1, PdfUtil.Row row2, String name, String score, int... colspan){
private void fillRow(PdfUtil.Row row1, PdfUtil.Row row2, String name, String score, boolean isTop, boolean isRight, int... colspan){
//名称
PdfUtil.Cell cell1 = new PdfUtil.Cell();
cell1.setContent(name);
cell1.setBorderTop(isTop? 1 : 0);
cell1.setBorderRight(isRight? 1 : 0);
cell1.setColSpan(colspan == null || colspan.length == 0 ? 1 : colspan[0]);
row1.addCell(cell1);
@ -331,6 +400,7 @@ public class PatientReportVo {
PdfUtil.Cell cell2 = new PdfUtil.Cell();
cell2.setContent(score);
cell2.setColSpan(colspan == null || colspan.length <= 1 ? 1 : colspan[1]);
cell2.setBorderRight(isRight? 1 : 0);
row2.addCell(cell2);
}
}

13
ht/src/main/java/com/ccsens/ht/persist/dao/HtPatientReportDao.java

@ -37,4 +37,17 @@ public interface HtPatientReportDao extends HtPatientReportMapper {
*/
List<Map<String, Object>> queryNPIScore(@Param("id") Long id);
/**
* 检查未完成的报告单
* @param userId
* @return
*/
PatientReportVo.Complete checkComplete(@Param("userId") Long userId);
/**
* 忽略报告单
* @param id
* @param userId
*/
void ignoreComplete(@Param("id") Long id, @Param("userId") Long userId);
}

40
ht/src/main/java/com/ccsens/ht/service/DoctorService.java

@ -1,6 +1,8 @@
package com.ccsens.ht.service;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import com.ccsens.cloudutil.bean.tall.dto.MemberRoleDto;
import com.ccsens.cloudutil.feign.TallFeignClient;
@ -13,15 +15,18 @@ import com.ccsens.ht.persist.dao.HtTitleDao;
import com.ccsens.ht.persist.mapper.HtDoctorMapper;
import com.ccsens.ht.uitl.Constant;
import com.ccsens.util.*;
import com.ccsens.util.exception.BaseException;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@ -39,16 +44,18 @@ public class DoctorService implements IDoctorService {
@Autowired
private Snowflake snowflake;
@Autowired
@Resource
private HtDoctorMapper htDoctorMapper;
@Autowired
@Resource
private HtPositionDao htPositionDao;
@Autowired
@Resource
private HtTitleDao htTitleDao;
@Autowired
@Resource
private HtDoctorAuditDao htDoctorAuditDao;
@Autowired
private TallFeignClient tallFeignClient;
@Value("${ht.project.patientUrl}")
private String patientUrl;
@ -272,6 +279,31 @@ public class DoctorService implements IDoctorService {
return htDoctorMapper.selectByExample(doctorExample);
}
@Override
public String getShareUrl(Long userId) throws Exception {
HtDoctorExample example = new HtDoctorExample();
example.createCriteria().andUserIdEqualTo(userId).andAuditStateEqualTo(Constant.Ht.Doctor.CHECK_SUCCESS);
List<HtDoctor> htDoctors = htDoctorMapper.selectByExample(example);
if (CollectionUtil.isEmpty(htDoctors)) {
log.info("没有找到{}对应的医生信息", userId);
throw new BaseException(CodeEnum.PARAM_ERROR);
}
HtDoctor doctor = htDoctors.get(0);
if (StrUtil.isNotBlank(doctor.getSharePatientEdit())) {
return doctor.getSharePatientEdit();
}
log.info("生成分享评测对象信息录入页面");
String shareUrl = patientUrl + "?userId=" + userId;
String codePath = QrCodeUtil.urlToQRCode(shareUrl, PropUtil.path);
String codeUrl = PropUtil.imgDomain + "/" + codePath;
log.info("生成的二维码路径:{}", codeUrl);
doctor.setSharePatientEdit(codeUrl);
log.info("修改医生分享评测对象信息录入页面路径");
return codeUrl;
}
@Override
public DoctorVo.Query queryDoctorStatus(Long userId) {
DoctorVo.Query query = htDoctorAuditDao.queryDoctorStatus(userId);

7
ht/src/main/java/com/ccsens/ht/service/IDoctorService.java

@ -58,4 +58,11 @@ public interface IDoctorService {
/**查询医生审核状态*/
DoctorVo.Query queryDoctorStatus(Long userId);
/**
* 医生分享病人编辑路径
* @param userId
* @return
*/
String getShareUrl(Long userId) throws Exception;
}

15
ht/src/main/java/com/ccsens/ht/service/IPatientReportService.java

@ -74,4 +74,19 @@ public interface IPatientReportService {
* @return
*/
String generateQRCode(PatientReportDto.QueryDetail queryDetail, Long userId) throws IOException;
/**
* 检查有无未完成的报告
* @param userId
* @return
*/
PatientReportVo.Complete checkComplete(Long userId);
/**
* 忽略未完成的报告单
* @param ignore
* @param userId
* @return
*/
void ignoreComplete(PatientReportDto.Ignore ignore, Long userId);
}

40
ht/src/main/java/com/ccsens/ht/service/PatientReportService.java

@ -78,9 +78,7 @@ public class PatientReportService implements IPatientReportService {
return JsonResponse.newInstance().ok(CodeEnum.PARAM_ERROR);
}
HtPatientReportExample example = new HtPatientReportExample();
example.createCriteria().andPatientIdEqualTo(htPatient.getId());
long times = htPatientReportDao.countByExample(example);
HtPatientReport htPatientReport = new HtPatientReport();
htPatientReport.setId(snowflake.nextId());
htPatientReport.setDoctorId(doctors.get(0).getId());
@ -89,7 +87,6 @@ public class PatientReportService implements IPatientReportService {
htPatientReport.setPatientAge(StrUtil.isEmpty(htPatient.getIdcard()) ? null : (byte)IdcardUtil.getAgeByIdCard(htPatient.getIdcard()));
htPatientReport.setEvaluationCode(Constant.Ht.Report.PARENT_CODE);
htPatientReport.setName(Constant.Ht.Report.PARENT_NAME + DateUtil.today());
htPatientReport.setSerialNumber(htPatient.getId() + "_" + (times + 1));
htPatientReport.setReportTime(System.currentTimeMillis());
// 查询医院信息
String hospital = htPositionDao.queryHospital(doctors.get(0).getPositionId());
@ -147,6 +144,7 @@ public class PatientReportService implements IPatientReportService {
HtPatientReport copy = patientReport.copy();
copy.setUrl(Constant.Ht.STRING_DEFAULT);
copy.setQrCodeUrl(Constant.Ht.STRING_DEFAULT);
copy.setCompleteStatus(Constant.Ht.Report.COMPLETE_OK);
htPatientReportDao.updateByPrimaryKeySelective(copy);
log.info("成功编辑报告单信息");
HtPatientReportRecord record = new HtPatientReportRecord();
@ -254,6 +252,9 @@ public class PatientReportService implements IPatientReportService {
});
scores.forEach(score -> {
if (Constant.Ht.Report.MOCA_SJZ.equalsIgnoreCase(score.getCode())) {
return;
}
sumScore(score);
});
@ -383,28 +384,47 @@ public class PatientReportService implements IPatientReportService {
content.addAll(reportScore.toRow());
});
PdfUtil.Row row = new PdfUtil.Row();
addCell(row,"初步印象",2,2);
addCell(row, detail.getPatient().getInitialImpression(), 6, 2);
PdfUtil.Cell initWordCell = addCell(row, "初步印象", 2, 2);
initWordCell.setHeight(PdfUtil.Cell.defaultHeight * 2);
PdfUtil.Cell initImplCell = addCell(row, detail.getPatient().getInitialImpression(), 6, 2);
initImplCell.setHeight(PdfUtil.Cell.defaultHeight * 2);
initImplCell.setBorderRight(1);
content.add(row);
PdfUtil.Row row2 = new PdfUtil.Row();
addCell(row2,"测评员:",4,1, 0);
addCell(row2,"报告日期:",4,1, 0);
PdfUtil.Cell doctorCell = addCell(row2, "测评员:", 4, 1, 0);
doctorCell.setBorderBottom(null);
doctorCell.setBorderLeft(null);
PdfUtil.Cell dateCell = addCell(row2, "报告日期:", 4, 1, 0);
dateCell.setBorderBottom(null);
dateCell.setBorderLeft(null);
content.add(row2);
String path = PropUtil.imgDomain + "/" + PdfUtil.credatePdf(PropUtil.path, detail.getPatient().getHospital()+Constant.Ht.Report.PARENT_NAME, detail.getPatient().toPdfRow(), content);
String path = PropUtil.imgDomain + "/" + PdfUtil.credatePdf(PropUtil.path, detail.getPatient().getHospital(), Constant.Ht.Report.PARENT_NAME, detail.getPatient().toPdfRow(), content, new PdfUtil.Margin());
report.setUrl(path);
htPatientReportDao.updateByPrimaryKeySelective(report);
log.info("生成文件路径:{}", path);
return path;
}
private void addCell(PdfUtil.Row row, String content, int colSpan, int rowSpan, int... border) {
private PdfUtil.Cell addCell(PdfUtil.Row row, String content, int colSpan, int rowSpan, int... border) {
PdfUtil.Cell cell1 = new PdfUtil.Cell();
cell1.setContent(content);
cell1.setColSpan(colSpan);
cell1.setRowSpan(rowSpan);
cell1.setBorder(border == null || border.length == 0 ? 1 : border[0]);
row.addCell(cell1);
return cell1;
}
@Override
public void ignoreComplete(PatientReportDto.Ignore ignore, Long userId) {
htPatientReportDao.ignoreComplete(ignore.getId(), userId);
}
@Override
public PatientReportVo.Complete checkComplete(Long userId) {
PatientReportVo.Complete complete = htPatientReportDao.checkComplete(userId);
return complete;
}
@Override

4
ht/src/main/java/com/ccsens/ht/service/PatientService.java

@ -179,11 +179,11 @@ public class PatientService implements IPatientService {
throw new BaseException(CodeEnum.RECORDER_NOT);
}
patient.setId(oldPatient.getId());
htPatientMapper.updateByPrimaryKeySelective(patient);
htPatientMapper.updateByPrimaryKey(patient);
} else {
patient.setId(snowflake.nextId());
patient.setRecorder(userId);
htPatientMapper.insertSelective(patient);
htPatientMapper.insert(patient);
}
return patient.getId();
}

34
ht/src/main/java/com/ccsens/ht/service/QuestionService.java

@ -216,9 +216,12 @@ public class QuestionService implements IQuestionService {
delScore.setIsDel(Constant.Ht.IS_DEL);
htPatientScoreDao.updateByExampleSelective(delScore, delExample);
//保存现在的答案
if (CollectionUtil.isNotEmpty(scores)) {
htPatientScoreDao.insertBatch(scores);
if (CollectionUtil.isEmpty(scores)) {
// 选项为空,默认0分
HtPatientScore zeroScore = getHtPatientScore(score, parentCode, report, 0);
scores.add(zeroScore);
}
htPatientScoreDao.insertBatch(scores);
// 保存答案
saveAnswerRecord(score, question);
@ -227,6 +230,21 @@ public class QuestionService implements IQuestionService {
return CodeEnum.SUCCESS;
}
private HtPatientScore getHtPatientScore(QuestionDto.Score score, String parentCode, HtPatientReport report, int i) {
HtPatientScore zeroScore = new HtPatientScore();
zeroScore.setId(snowflake.nextId());
zeroScore.setPatientReportId(score.getPatientReportId());
zeroScore.setPatientId(report.getPatientId());
zeroScore.setQuestionId(score.getQuestionId());
zeroScore.setQuestionParentCode(parentCode);
zeroScore.setOptionId((long) Constant.Ht.NUMBER_DEFAULT);
zeroScore.setOptionName(Constant.Ht.STRING_DEFAULT);
zeroScore.setScore(i);
zeroScore.setType(Constant.Ht.Score.SCORE);
zeroScore.setAnswer(Constant.Ht.STRING_DEFAULT);
return zeroScore;
}
/**
* 修改报告单显示状态
* @param report
@ -290,17 +308,7 @@ public class QuestionService implements IQuestionService {
patientScore.set(next.getIntValue(Constant.Ht.Rule.SMALL_SCORE));
}
}
HtPatientScore singleScore = new HtPatientScore();
singleScore.setId(snowflake.nextId());
singleScore.setPatientReportId(score.getPatientReportId());
singleScore.setPatientId(report.getPatientId());
singleScore.setQuestionId(score.getQuestionId());
singleScore.setQuestionParentCode(parentCode);
singleScore.setOptionId((long)Constant.Ht.NUMBER_DEFAULT);
singleScore.setOptionName(Constant.Ht.STRING_DEFAULT);
singleScore.setScore(patientScore.get());
singleScore.setType(Constant.Ht.Score.SCORE);
singleScore.setAnswer(Constant.Ht.STRING_DEFAULT);
HtPatientScore singleScore = getHtPatientScore(score, parentCode, report, patientScore.get());
scores.add(singleScore);
}

10
ht/src/main/java/com/ccsens/ht/uitl/Constant.java

@ -109,6 +109,16 @@ public class Constant {
public final static Byte TYPE_EVALUATION = 2;
public final static String IGNORE_SCORE = "[个]";
public final static String MOCA_SJZ = "SZJ";
public final static String MOCA = "MoCA";
public final static String MMSE = "MMSE";
public final static String NPI = "NPI";
/**报告单未完成*/
public final static Byte COMPLETE_NO = 0;
/**报告单已完成*/
public final static Byte COMPLETE_OK = 1;
/**忽略报告单*/
public final static Byte COMPLETE_IGNORE = 2;
/**在历史报告单中显示*/
public final static byte SHOW_HISTORY = 1;
public final static Map<String, Byte> TYPE = new HashMap<>();

4
ht/src/main/resources/application-dev.yml

@ -34,4 +34,6 @@ file:
imgDomain: http://localhost:7040/uploads
ht:
project:
name: 认知功能评测云平台系统
patientUrl: https://www.baidu.com/
name: 认知功能评测云平台系统

9
ht/src/main/resources/application-prod.yml

@ -21,7 +21,11 @@ spring:
max-idle: 10
max-wait: -1ms
min-idle: 0
<<<<<<< HEAD
password: ''
=======
password: 'areowqr!@43ef'
>>>>>>> pt
port: 6379
timeout: 1000ms
@ -34,7 +38,12 @@ file:
imgDomain: https://www.tall.wiki/gateway/ht/uploads
ht:
project:
patientUrl: https://www.tall.wiki/ht-dev/htPatientRegister
name: 认知功能评测云平台系统
eureka:
instance:
<<<<<<< HEAD
ip-address: 81.70.54.64
=======
ip-address: 71.80.54.64
>>>>>>> pt

1
ht/src/main/resources/application-test.yml

@ -35,6 +35,7 @@ file:
imgDomain: https://test.tall.wiki/gateway/ht/uploads
ht:
project:
patientUrl: https://test.tall.wiki/ht-dev/htPatientRegister
name: 认知功能评测云平台系统
eureka:
instance:

18
ht/src/main/resources/mapper_dao/HtPatientReportDao.xml

@ -56,12 +56,28 @@
GROUP BY t1.code
order by t1.type,t1.sort
</select>
<select id="queryNPIScore" resultType="Map">
<select id="queryNPIScore" resultType="java.util.Map">
select option_name as optionName, sum(score) as score
from t_ht_patient_score
where patient_report_id = #{id, jdbcType=BIGINT} and question_parent_code = 'NPI'
and option_name in ('carer','result') and is_del = 0 group by option_name;
</select>
<select id="checkComplete" resultType="com.ccsens.ht.bean.vo.PatientReportVo$Complete">
select r.id, r.name, p.id as patientId, p.name as patientName, p.idcard as patientIdCard,
r.create_time as createTime,
concat('检测到您在', r.create_time, '为患者', p.name,'的检测报告尚未完成,是否继续?') as description ,
if(r.id = null , 0, 1) as hasUnfinished
from t_ht_patient_report r, t_ht_patient p, t_ht_doctor d
where r.patient_id = p.id and r.doctor_id = d.id
and d.user_id = #{userId, jdbcType=BIGINT} and d.audit_state = 1
and r.complete_status = 0 and d.is_del = 0 and r.is_del = 0 and p.is_del = 0
order by r.create_time desc limit 1;
</select>
<select id="ignoreComplete">
update t_ht_patient_report set complete_status = 2
where id = #{id, jdbcType=BIGINT} and complete_status = 0 and is_del = 0 and doctor_id in
(select doctor_id from t_ht_doctor where user_id = #{userId, jdbcType=BIGINT} and audit_state = 1 and is_del = 0)
</select>
</mapper>

25
ht/src/main/resources/mapper_raw/HtDoctorMapper.xml

@ -12,6 +12,7 @@
<result column="auditor_id" jdbcType="BIGINT" property="auditorId" />
<result column="audit_state" jdbcType="TINYINT" property="auditState" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="share_patient_edit" jdbcType="VARCHAR" property="sharePatientEdit" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="is_del" jdbcType="TINYINT" property="isDel" />
@ -76,7 +77,7 @@
</sql>
<sql id="Base_Column_List">
id, user_id, position_id, title_id, name, sex, age, auditor_id, audit_state, remark,
create_time, update_time, is_del
share_patient_edit, create_time, update_time, is_del
</sql>
<select id="selectByExample" parameterType="com.ccsens.ht.bean.po.HtDoctorExample" resultMap="BaseResultMap">
select
@ -112,13 +113,13 @@
insert into t_ht_doctor (id, user_id, position_id,
title_id, name, sex,
age, auditor_id, audit_state,
remark, create_time, update_time,
is_del)
remark, share_patient_edit, create_time,
update_time, is_del)
values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{positionId,jdbcType=BIGINT},
#{titleId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{sex,jdbcType=TINYINT},
#{age,jdbcType=INTEGER}, #{auditorId,jdbcType=BIGINT}, #{auditState,jdbcType=TINYINT},
#{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{isDel,jdbcType=TINYINT})
#{remark,jdbcType=VARCHAR}, #{sharePatientEdit,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{isDel,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.ht.bean.po.HtDoctor">
insert into t_ht_doctor
@ -153,6 +154,9 @@
<if test="remark != null">
remark,
</if>
<if test="sharePatientEdit != null">
share_patient_edit,
</if>
<if test="createTime != null">
create_time,
</if>
@ -194,6 +198,9 @@
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="sharePatientEdit != null">
#{sharePatientEdit,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
@ -244,6 +251,9 @@
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.sharePatientEdit != null">
share_patient_edit = #{record.sharePatientEdit,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
@ -270,6 +280,7 @@
auditor_id = #{record.auditorId,jdbcType=BIGINT},
audit_state = #{record.auditState,jdbcType=TINYINT},
remark = #{record.remark,jdbcType=VARCHAR},
share_patient_edit = #{record.sharePatientEdit,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
is_del = #{record.isDel,jdbcType=TINYINT}
@ -307,6 +318,9 @@
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="sharePatientEdit != null">
share_patient_edit = #{sharePatientEdit,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
@ -330,6 +344,7 @@
auditor_id = #{auditorId,jdbcType=BIGINT},
audit_state = #{auditState,jdbcType=TINYINT},
remark = #{remark,jdbcType=VARCHAR},
share_patient_edit = #{sharePatientEdit,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
is_del = #{isDel,jdbcType=TINYINT}

28
ht/src/main/resources/mapper_raw/HtPatientReportMapper.xml

@ -25,6 +25,7 @@
<result column="is_del" jdbcType="TINYINT" property="isDel" />
<result column="show_status" jdbcType="TINYINT" property="showStatus" />
<result column="hospital" jdbcType="VARCHAR" property="hospital" />
<result column="complete_status" jdbcType="TINYINT" property="completeStatus" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
@ -87,7 +88,8 @@
<sql id="Base_Column_List">
id, name, patient_id, patient_idcard, patient_age, doctor_id, serial_number, initial_impression,
clinical_diagnosis, pasi, department, bed_number, report_time, check_time, evaluation_code,
url, qr_code_url, remark, create_time, update_time, is_del, show_status, hospital
url, qr_code_url, remark, create_time, update_time, is_del, show_status, hospital,
complete_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.ht.bean.po.HtPatientReportExample" resultMap="BaseResultMap">
select
@ -127,7 +129,8 @@
report_time, check_time, evaluation_code,
url, qr_code_url, remark,
create_time, update_time, is_del,
show_status, hospital)
show_status, hospital, complete_status
)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{patientId,jdbcType=BIGINT},
#{patientIdcard,jdbcType=VARCHAR}, #{patientAge,jdbcType=TINYINT}, #{doctorId,jdbcType=BIGINT},
#{serialNumber,jdbcType=VARCHAR}, #{initialImpression,jdbcType=VARCHAR}, #{clinicalDiagnosis,jdbcType=VARCHAR},
@ -135,7 +138,8 @@
#{reportTime,jdbcType=BIGINT}, #{checkTime,jdbcType=BIGINT}, #{evaluationCode,jdbcType=VARCHAR},
#{url,jdbcType=VARCHAR}, #{qrCodeUrl,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{isDel,jdbcType=TINYINT},
#{showStatus,jdbcType=TINYINT}, #{hospital,jdbcType=VARCHAR})
#{showStatus,jdbcType=TINYINT}, #{hospital,jdbcType=VARCHAR}, #{completeStatus,jdbcType=TINYINT}
)
</insert>
<insert id="insertSelective" parameterType="com.ccsens.ht.bean.po.HtPatientReport">
insert into t_ht_patient_report
@ -209,6 +213,9 @@
<if test="hospital != null">
hospital,
</if>
<if test="completeStatus != null">
complete_status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
@ -280,6 +287,9 @@
<if test="hospital != null">
#{hospital,jdbcType=VARCHAR},
</if>
<if test="completeStatus != null">
#{completeStatus,jdbcType=TINYINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.ht.bean.po.HtPatientReportExample" resultType="java.lang.Long">
@ -360,6 +370,9 @@
<if test="record.hospital != null">
hospital = #{record.hospital,jdbcType=VARCHAR},
</if>
<if test="record.completeStatus != null">
complete_status = #{record.completeStatus,jdbcType=TINYINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@ -389,7 +402,8 @@
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
is_del = #{record.isDel,jdbcType=TINYINT},
show_status = #{record.showStatus,jdbcType=TINYINT},
hospital = #{record.hospital,jdbcType=VARCHAR}
hospital = #{record.hospital,jdbcType=VARCHAR},
complete_status = #{record.completeStatus,jdbcType=TINYINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@ -463,6 +477,9 @@
<if test="hospital != null">
hospital = #{hospital,jdbcType=VARCHAR},
</if>
<if test="completeStatus != null">
complete_status = #{completeStatus,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
@ -489,7 +506,8 @@
update_time = #{updateTime,jdbcType=TIMESTAMP},
is_del = #{isDel,jdbcType=TINYINT},
show_status = #{showStatus,jdbcType=TINYINT},
hospital = #{hospital,jdbcType=VARCHAR}
hospital = #{hospital,jdbcType=VARCHAR},
complete_status = #{completeStatus,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

108
mt/src/main/java/com/ccsens/mt/api/CompeteController.java

@ -5,18 +5,21 @@ import com.ccsens.mt.bean.dto.CompeteDto;
import com.ccsens.mt.bean.vo.CompeteVo;
import com.ccsens.mt.service.ICompeteService;
import com.ccsens.util.JsonResponse;
import com.ccsens.util.PropUtil;
import com.ccsens.util.UploadFileUtil_Servlet3;
import com.ccsens.util.WebConstant;
import com.ccsens.util.bean.dto.QueryDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.jsonwebtoken.Claims;
import io.swagger.annotations.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.Part;
import java.io.File;
import java.io.IOException;
import java.util.List;
@ -49,6 +52,16 @@ public class CompeteController {
return JsonResponse.newInstance().ok(competeGroups);
}
@MustLogin
@ApiOperation(value = "根据项目查找组别信息 ", notes = "")
@RequestMapping(value = "/group/project", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<CompeteVo.CompeteGroup>> queryGroupByProject(@ApiParam @Validated @RequestBody QueryDto<CompeteDto.QueryGroupByProject> params) {
log.info("扫码加入团队:{}",params);
List<CompeteVo.CompeteGroup> groupByProject = competeService.queryGroupByProject(params);
return JsonResponse.newInstance().ok(groupByProject);
}
@MustLogin
@ApiOperation(value = "模糊查询参赛单位", notes = "")
@RequestMapping(value = "/company", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
@ -86,6 +99,15 @@ public class CompeteController {
return JsonResponse.newInstance().ok(competeProjects);
}
// @MustLogin
// @ApiOperation(value = "根据组别查看比赛项目 ", notes = "")
// @RequestMapping(value = "/project/group", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
// public JsonResponse<List<CompeteVo.CompeteSecondProject>> queryProjectByGroup(@ApiParam @Validated @RequestBody QueryDto<CompeteDto.QueryProjectByGroup> params) {
// log.info("扫码加入团队:{}",params);
// List<CompeteVo.CompeteSecondProject> projectByGroup = competeService.queryProjectByGroup(params);
// return JsonResponse.newInstance().ok(projectByGroup);
// }
@MustLogin
@ApiOperation(value = "提交选择的比赛项目", notes = "")
@RequestMapping(value = "/save/project", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
@ -116,7 +138,7 @@ public class CompeteController {
@MustLogin
@ApiOperation(value = "查看个人基本报名信息", notes = "")
@RequestMapping(value = "/playerInfo", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<CompeteVo.GetPlayerInfo> getCompetePlayerInfo(@ApiParam @Validated @RequestBody QueryDto params) {
public JsonResponse<CompeteVo.GetPlayerInfo> getCompetePlayerInfo(@ApiParam @Validated @RequestBody QueryDto<CompeteDto.CompeteTime> params) {
log.info("查看个人基本报名信息:{}",params);
CompeteVo.GetPlayerInfo getPlayerInfo = competeService.getCompetePlayerInfo(params);
return JsonResponse.newInstance().ok(getPlayerInfo);
@ -131,4 +153,74 @@ public class CompeteController {
CompeteVo.CompeteTeamProject competeTeamProject = competeService.joinCompeteGroup(params);
return JsonResponse.newInstance().ok(competeTeamProject);
}
@MustLogin
@ApiOperation(value = "提交报名信息和参加比赛", notes = "")
@RequestMapping(value = "/submit", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse submitProjectAndGroup(@ApiParam @Validated @RequestBody QueryDto<CompeteDto.CompetePlayerAndProject> params) {
log.info("扫码加入团队:{}",params);
competeService.submitProjectAndGroup(params);
return JsonResponse.newInstance().ok();
}
@MustLogin
@ApiOperation(value = "报名表详情表(关联wps)", notes = "")
@RequestMapping(value = "/enrollWPS", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse enrollPlayInfoWps(@ApiParam @Validated @RequestBody QueryDto<CompeteDto.CompeteType> params) throws IOException {
log.info("查询各个项目报名人员信息:{}",params);
String enrollPlayInfoList= competeService.enrollPlayInfoWps(params);
return JsonResponse.newInstance().ok(enrollPlayInfoList);
}
@ApiOperation(value = "报名表详情表下载", notes = "")
@RequestMapping(value = "/enroll", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
public JsonResponse enrollPlayInfo(@ApiParam CompeteDto.CompeteType params) throws Exception {
log.info("查询各个项目报名人员信息:{}",params);
String enrollPlayInfoList= competeService.enrollPlayInfo(params);
return JsonResponse.newInstance().ok(enrollPlayInfoList);
}
@ApiOperation(value = "报名表人数表下载", notes = "")
@RequestMapping(value = "/enrollCountDownload", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
public JsonResponse enrollPlayCountDownLoad() throws IOException {
log.info("导出各个项目报名人员信息");
String path = competeService.enrollPlayCountDownLoad();
return JsonResponse.newInstance().ok(path);
}
@MustLogin
@ApiOperation(value = "报名表人数统计", notes = "")
@RequestMapping(value = "/enrollCount", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<CompeteVo.GroupNum>> enrollPlayCount(QueryDto params) throws IOException {
log.info("查询各个项目报名人员信息");
List<CompeteVo.GroupNum> list = competeService.enrollPlayCount();
return JsonResponse.newInstance().ok(list);
}
@ApiOperation(value = "导入报名表",notes = "文件大小不能超过20M,支持后缀:.xls|.xlsx")
@RequestMapping(value = "/import", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<CompeteVo.FailPlayerInfo>> signupImport(HttpServletRequest request, HttpServletResponse response,
@RequestParam(required = true) Part file) throws Exception {
//1.上传文件
String allowedExts = "xls,xlsx";
String dir = PropUtil.path + File.separator;
String path = UploadFileUtil_Servlet3.uploadFile(file, allowedExts, dir);
log.info(dir+""+path);
//导入数据库
List<CompeteVo.FailPlayerInfo> failPlayerInfoList = competeService.signupImport(dir+""+path);
return JsonResponse.newInstance().ok(failPlayerInfoList);
}
// @MustLogin
// @ApiOperation(value = "查询比赛项目上的参赛选手列表", notes = "")
// @RequestMapping(value = "/get/players", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
// public JsonResponse<CompeteVo.QueryPlayerList> queryPlayerList(@ApiParam @Validated @RequestBody QueryDto<CompeteDto.CompeteProjectId> params) {
// log.info("查询比赛项目上的参赛选手列表:{}",params);
// CompeteVo.QueryPlayerList playerList = competeService.queryPlayerList(params);
// return JsonResponse.newInstance().ok(playerList);
// }
}

51
mt/src/main/java/com/ccsens/mt/api/CompeteScoreController.java

@ -0,0 +1,51 @@
package com.ccsens.mt.api;
import com.ccsens.cloudutil.annotation.MustLogin;
import com.ccsens.mt.bean.dto.CompeteDto;
import com.ccsens.mt.bean.vo.CompeteVo;
import com.ccsens.mt.service.ICompeteService;
import com.ccsens.util.JsonResponse;
import com.ccsens.util.bean.dto.QueryDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* @author
*/
@Slf4j
@Api(tags = "线上体育竞技比赛", description = "")
@RestController
@RequestMapping("/compete")
public class CompeteScoreController {
@Resource
private ICompeteService competeService;
@MustLogin
@ApiOperation(value = "查询比赛项目上的参赛选手列表", notes = "")
@RequestMapping(value = "/get/playerList", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<CompeteVo.QueryPlayerList> queryPlayerList(@ApiParam @Validated @RequestBody QueryDto<CompeteDto.CompeteProjectId> params) {
log.info("查询比赛项目上的参赛选手列表:{}",params);
CompeteVo.QueryPlayerList playerList = competeService.queryPlayerList(params);
return JsonResponse.newInstance().ok(playerList);
}
// @MustLogin
// @ApiOperation(value = "查看单个选手的信息和分数", notes = "")
// @RequestMapping(value = "/get/player", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
// public JsonResponse<CompeteVo.QueryPlayerList> getPlayerInfo(@ApiParam @Validated @RequestBody QueryDto<CompeteDto.CompeteProjectId> params) {
// log.info("查询比赛项目上的参赛选手列表:{}",params);
// CompeteVo.QueryPlayerList playerList = competeService.queryPlayerList(params);
// return JsonResponse.newInstance().ok(playerList);
// }
}

57
mt/src/main/java/com/ccsens/mt/api/DebugController.java

@ -1,28 +1,81 @@
package com.ccsens.mt.api;
import com.ccsens.mt.bean.dto.LevelDto;
import com.ccsens.mt.bean.po.CompetePlayer;
import com.ccsens.mt.bean.po.LevelUser;
import com.ccsens.mt.bean.vo.ProvinceCompeteVo;
import com.ccsens.mt.bean.vo.TableVo;
import com.ccsens.mt.persist.dao.CompetePlayerDao;
import com.ccsens.mt.service.ILevelUpService;
import com.ccsens.util.JsonResponse;
import com.ccsens.util.RedisUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.data.redis.core.ZSetOperations;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.Part;
import java.util.List;
import java.util.Objects;
import java.util.Set;
@Api(tags = "DEBUG" , description = "DebugController | ")
@RestController
@RequestMapping("/debug")
public class DebugController {
@Resource
private RedisUtil redisUtil;
@Resource
private ILevelUpService levelUpService;
@Resource
private CompetePlayerDao competePlayerDao;
@ApiOperation(value = "/测试",notes = "")
@ApiImplicitParams({
})
@RequestMapping(value="",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"})
public JsonResponse getSmsCode(HttpServletRequest request) throws Exception {
public JsonResponse debug(HttpServletRequest request) throws Exception {
return JsonResponse.newInstance().ok("测试");
}
@ApiOperation(value = "/测试自动晋级",notes = "")
@ApiImplicitParams({
})
@RequestMapping(value="/levelUp",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"})
public JsonResponse levelUpDebug(HttpServletRequest request) throws Exception {
//比赛结束
//查询每个选手的分数存入redis(模拟分数存入)
String key = "compete_1_6";
Set<ZSetOperations.TypedTuple<Object>> typedTuples = redisUtil.zsRevGetWithScore(key, 0, -1);
typedTuples.forEach(type ->{
LevelUser levelUser = (LevelUser) type.getValue();
if(levelUser.getPlayerId() == 1305713484796923904L){
redisUtil.zsSet(key, levelUser, 20);
}
if(levelUser.getPlayerId() == 1305772321621020672L){
redisUtil.zsSet(key, levelUser, 22);
}
});
//调用自动晋级接口
LevelDto.AutoLevelUpDto autoLevelUpDto = new LevelDto.AutoLevelUpDto(1L,"6");
levelUpService.autoLevelUp(autoLevelUpDto);
return JsonResponse.newInstance().ok("OK");
}
@ApiOperation(value = "/测试",notes = "")
@ApiImplicitParams({
})
@RequestMapping(value="/file",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"})
public JsonResponse debug() throws Exception {
List<TableVo.CompeteAllCount> competeAllCount = competePlayerDao.getTeamJoinNumByType(1L);
return JsonResponse.newInstance().ok(competeAllCount);
}
}

77
mt/src/main/java/com/ccsens/mt/api/DepartmentController.java

@ -0,0 +1,77 @@
package com.ccsens.mt.api;
import com.ccsens.cloudutil.annotation.MustLogin;
import com.ccsens.mt.bean.dto.CompeteDto;
import com.ccsens.mt.bean.vo.CompeteVo;
import com.ccsens.mt.service.IDepartmentService;
import com.ccsens.util.JsonResponse;
import com.ccsens.util.bean.dto.QueryDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
* @author
*/
@Slf4j
@Api(tags = "线上体育竞技比赛(校内报名)", description = "")
@RestController
@RequestMapping("/department")
public class DepartmentController {
@Resource
private IDepartmentService departmentService;
@MustLogin
@ApiOperation(value = "查看院系信息", notes = "")
@RequestMapping(value = "/company", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<CompeteVo.CompeteTime> getCompany(@ApiParam @Validated @RequestBody QueryDto<CompeteDto.CompeteType> params) {
log.info("查看院系信息:{}",params);
List<CompeteVo.CompeteCompany> competeCompanyList = departmentService.getCompany(params);
return JsonResponse.newInstance().ok(competeCompanyList);
}
@MustLogin
@ApiOperation(value = "查看参赛项目信息", notes = "")
@RequestMapping(value = "/project", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<CompeteVo.CompeteProject>> queryCompeteProject(@ApiParam @Validated @RequestBody QueryDto<CompeteDto.CompeteType> params) {
log.info("查看参赛项目信息:{}",params);
List<CompeteVo.CompeteProject> competeProjects = departmentService.queryCompeteProject(params);
return JsonResponse.newInstance().ok(competeProjects);
}
@MustLogin
@ApiOperation(value = "院系提交报名信息", notes = "")
@RequestMapping(value = "/save/department", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<CompeteVo.DepartmentInfo> saveDepartment(@ApiParam @Validated @RequestBody QueryDto<CompeteDto.DepartmentInfo> params) {
log.info("查看参赛项目信息:{}",params);
CompeteVo.DepartmentInfo department = departmentService.saveDepartment(params);
return JsonResponse.newInstance().ok(department);
}
@MustLogin
@ApiOperation(value = "查看院系报名信息", notes = "")
@RequestMapping(value = "/get/department", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<CompeteVo.DepartmentInfo> getDepartment(@ApiParam @Validated @RequestBody QueryDto<CompeteDto.GetDepartmentInfo> params) {
log.info("查看参赛项目信息:{}",params);
CompeteVo.DepartmentInfo department = departmentService.getDepartment(params);
return JsonResponse.newInstance().ok(department);
}
@ApiOperation(value = "导出excel表格", notes = "")
@RequestMapping(value = "/export/excel", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<CompeteVo.DepartmentInfo> exportExcel(@ApiParam @Validated @RequestBody CompeteDto.CompeteType params) {
log.info("导出excel表格:{}",params);
String excelPath = departmentService.exportExcel(params);
return JsonResponse.newInstance().ok(excelPath);
}
}

84
mt/src/main/java/com/ccsens/mt/api/ExcelController.java

@ -0,0 +1,84 @@
package com.ccsens.mt.api;
import com.ccsens.cloudutil.annotation.MustLogin;
import com.ccsens.mt.bean.dto.CompeteDto;
import com.ccsens.mt.service.ICompeteService;
import com.ccsens.mt.service.IExcelService;
import com.ccsens.util.JsonResponse;
import com.ccsens.util.bean.dto.QueryDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.io.IOException;
/**
* @author li
*/
@Slf4j
@Api(tags = "报名表格的下载", description = "")
@RestController
@RequestMapping("/down")
public class ExcelController {
@Resource
private IExcelService excelService;
@MustLogin
@ApiOperation(value = "xxx大赛报名表", notes = "")
@RequestMapping(value = "/competeJoin", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse competeJoin(@ApiParam @Validated @RequestBody QueryDto<CompeteDto.CompeteTime> params) throws IOException {
log.info("xxx大赛报名表:{}",params);
String path = excelService.competeJoin(params);
return JsonResponse.newInstance().ok(path);
}
@MustLogin
@ApiOperation(value = "参赛人数统计表", notes = "")
@RequestMapping(value = "/competeJoinCount", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse competeJoinCount(@ApiParam @Validated @RequestBody QueryDto<CompeteDto.CompeteTime> params) throws IOException {
log.info("参赛人数统计表:{}",params);
String path = excelService.competeJoinCount(params.getParam());
return JsonResponse.newInstance().ok(path);
}
@MustLogin
@ApiOperation(value = "XXX比赛报名汇总表", notes = "")
@RequestMapping(value = "/competeAllCount", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse competeAllCount(@ApiParam @Validated @RequestBody QueryDto<CompeteDto.CompeteTime> params) throws IOException {
log.info("XXX比赛报名汇总表:{}",params);
String path = excelService.competeAllCount(params.getParam());
return JsonResponse.newInstance().ok(path);
}
@MustLogin
@ApiOperation(value = "大赛参赛队伍信息表", notes = "")
@RequestMapping(value = "/competitionTeamInformationTable", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<String> dasaiduiwuxinxiWPS(@ApiParam @Validated @RequestBody QueryDto<CompeteDto.CompeteTime> params) throws IOException {
log.info("导出大赛参赛队伍信息表:{}",params);
String path = excelService.dasaiduiwuxinxiWPS(params);
return JsonResponse.newInstance().ok(path);
}
@MustLogin
@ApiOperation(value = "代表队名单", notes = "")
@RequestMapping(value = "/teamList", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<String> teamList(@ApiParam @Validated @RequestBody QueryDto<CompeteDto.CompeteTime> params) throws IOException {
log.info("导出代表队名单表:{}",params);
String path = excelService.iTeamListService(params);
return JsonResponse.newInstance().ok(path);
}
}

94
mt/src/main/java/com/ccsens/mt/api/FileController.java

@ -1,18 +1,22 @@
package com.ccsens.mt.api;
import cn.hutool.core.lang.Snowflake;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.ccsens.cloudutil.feign.TallFeignClient;
import com.ccsens.mt.bean.dto.CompeteDto;
import com.ccsens.mt.bean.po.CommonFile;
import com.ccsens.mt.bean.vo.FileVo;
import com.ccsens.mt.service.IFileService;
import com.ccsens.mt.util.Constant;
import com.ccsens.util.*;
import com.ccsens.util.bean.dto.QueryDto;
import com.ccsens.util.exception.BaseException;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.jsonwebtoken.Claims;
import io.swagger.annotations.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@ -36,6 +40,8 @@ public class FileController {
private IFileService fileService;
@Resource
private TallFeignClient tallFeignClient;
@Resource
private Snowflake snowflake;
@ApiOperation(value = "上传文件")
@ -81,4 +87,86 @@ public class FileController {
log.info("文件下载结束");
}
@ApiOperation(value = "上传图片证明文件(不大于2M)")
@ApiImplicitParams({
})
@RequestMapping(value = "/upload/photo", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<FileVo.Upload> uploadPhone(HttpServletRequest request, @RequestParam() Part file) throws Exception {
log.info("文件上传:{}", file);
String authHeader = request.getHeader(WebConstant.HEADER_KEY_TOKEN);
JsonResponse tokenRes = tallFeignClient.getUserIdByToken(authHeader);
log.info("{}查询userId返回:{}", authHeader, tokenRes);
if (tokenRes.getCode().intValue() != CodeEnum.SUCCESS.getCode().intValue()) {
return tokenRes;
}
JSONObject json = JSON.parseObject(JSON.toJSONString(tokenRes.getData()));
Long userId = json.getLong("id");
FileVo.Upload vo = fileService.uploadPhone(file,userId);
// if(ObjectUtil.isNotNull(file)) {
// //限制文件大小 2M
// if (file.getSize() > 2097152) {
// throw new BaseException(CodeEnum.PHOTO_FILE_EXCEED_2M);
// }
// String authHeader = request.getHeader(WebConstant.HEADER_KEY_TOKEN);
// JsonResponse tokenRes = tallFeignClient.getUserIdByToken(authHeader);
// log.info("{}查询userId返回:{}", authHeader, tokenRes);
// if (tokenRes.getCode().intValue() != CodeEnum.SUCCESS.getCode().intValue()) {
// return tokenRes;
// }
// JSONObject json = JSON.parseObject(JSON.toJSONString(tokenRes.getData()));
// Long userId = json.getLong("id");
// String dir = PropUtil.path + Constant.File.UPLOAD_URL;
//// List<Part> files = new ArrayList<>();
//// files.add(file);
// String allowedExt = WebConstant.IMG_TYPE + "," + WebConstant.Wps.FILE_TYPE_ALL;
//
// log.info("文件名:{}", file.getSubmittedFileName());
// String path = UploadFileUtil_Servlet3.uploadFile(file, allowedExt, dir);
// CommonFile fileDo = new CommonFile();
// String name = file.getSubmittedFileName();
// fileDo.setId(snowflake.nextId());
// fileDo.setFileName(name);
// fileDo.setLocation(dir + java.io.File.separator + path);
// fileDo.setUserId(userId);
// if (WebConstant.IMG_TYPE.contains(name.substring(name.lastIndexOf(".") + 1))) {
// fileDo.setVisitLocation(PropUtil.imgDomain + Constant.File.UPLOAD_URL + File.separator + path);
// } else {
// fileDo.setVisitLocation(PropUtil.domain + "file/download/"+fileDo.getId());
// }
// commonFileMapper.insertSelective(fileDo);
// log.info("保存文件:{}", fileDo);
// fileList.add(fileDo);
//
//// List<CommonFile> fileVos = fileService.saveFile(dir, files, userId);
//// List<FileVo.Upload> vos = FileVo.Upload.transFilePo(fileVos);
//// log.info("文件上传返回:{}", vos);
//
// if (CollectionUtil.isNotEmpty(vos)) {
// vo = vos.get(0);
// }
// }
return JsonResponse.newInstance().ok(vo);
}
@ApiOperation(value = "上传图片证明文件(不大于2M)")
@ApiImplicitParams({
})
@RequestMapping(value = "/upload/photoBase64", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<FileVo.Upload> uploadPhoneBase64(HttpServletRequest request, @ApiParam @Validated @RequestBody CompeteDto.FileBase64 params) throws Exception {
// log.info("文件上传:{}", params);
String authHeader = request.getHeader(WebConstant.HEADER_KEY_TOKEN);
JsonResponse tokenRes = tallFeignClient.getUserIdByToken(authHeader);
log.info("{}查询userId返回:{}", authHeader, tokenRes);
if (tokenRes.getCode().intValue() != CodeEnum.SUCCESS.getCode().intValue()) {
return tokenRes;
}
JSONObject json = JSON.parseObject(JSON.toJSONString(tokenRes.getData()));
Long userId = json.getLong("id");
FileVo.Upload vo = fileService.uploadPhoneBase64(params.getFileBase64(),userId);
return JsonResponse.newInstance().ok(vo);
}
}

10
mt/src/main/java/com/ccsens/mt/api/LevelController.java

@ -6,6 +6,7 @@ import com.ccsens.mt.bean.vo.LevelVo;
import com.ccsens.mt.service.ILevelUpService;
import com.ccsens.util.JsonResponse;
import com.ccsens.util.bean.dto.QueryDto;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
@ -17,13 +18,12 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
* @author
*/
@Slf4j
@Api(tags = "线上体育竞技比赛", description = "")
@Api(tags = "晋级系统", description = "")
@RestController
@RequestMapping("/level")
public class LevelController {
@ -36,16 +36,16 @@ public class LevelController {
@RequestMapping(value = "/manual", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse manualLevelUpPlayer(@ApiParam @Validated @RequestBody QueryDto<LevelDto.ManualLevelUpDto> params) {
log.info("手动晋级:{}",params);
levelUpService.manualLevelUpPlayer(params);
levelUpService.manualLevelUpPlayer(params.getParam());
return JsonResponse.newInstance().ok();
}
@MustLogin
@ApiOperation(value = "查找晋级选手信息", notes = "")
@RequestMapping(value = "/userInfo", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<LevelVo.QueryLevelUserInfo>> queryLevelUserInfo(@ApiParam @Validated @RequestBody QueryDto<LevelDto.ManualLevelUpDto> params) {
public JsonResponse<PageInfo<LevelVo.QueryLevelUserInfo>> queryLevelUserInfo(@ApiParam @Validated @RequestBody QueryDto<LevelDto.QueryLevelUserInfo> params) {
log.info("手动晋级:{}",params);
List<LevelVo.QueryLevelUserInfo> levelUserInfoList = levelUpService.queryLevelUserInfo(params);
PageInfo<LevelVo.QueryLevelUserInfo> levelUserInfoList = levelUpService.queryLevelUserInfo(params.getParam());
return JsonResponse.newInstance().ok(levelUserInfoList);
}
}

194
mt/src/main/java/com/ccsens/mt/api/ProvinceController.java

@ -0,0 +1,194 @@
package com.ccsens.mt.api;
import com.ccsens.cloudutil.annotation.MustLogin;
import com.ccsens.mt.bean.dto.CompeteDto;
import com.ccsens.mt.bean.dto.ProvinceCompeteDto;
import com.ccsens.mt.bean.vo.ProvinceCompeteVo;
import com.ccsens.mt.service.IProvinceService;
import com.ccsens.util.JsonResponse;
import com.ccsens.util.bean.dto.QueryDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
* @author
*/
@Slf4j
@Api(tags = "远程比赛省赛(集体报名)", description = "")
@RestController
@RequestMapping("/province")
public class ProvinceController {
@Resource
private IProvinceService provinceService;
@MustLogin
@ApiOperation(value = "查找当前用户填写的信息的概览", notes = "")
@RequestMapping(value = "/overview", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<ProvinceCompeteVo.CompeteOverview> getOverview(@ApiParam @Validated @RequestBody QueryDto<CompeteDto.CompeteTime> params) {
log.info("查找当前用户填写的信息的概览:{}",params);
ProvinceCompeteVo.CompeteOverview competeOverview = provinceService.getOverview(params.getParam(),params.getUserId());
log.info("查找当前用户填写的信息的概览:{}",competeOverview);
return JsonResponse.newInstance().ok(competeOverview);
}
@MustLogin
@ApiOperation(value = "根据组别查找本单位所有注册的选手", notes = "")
@RequestMapping(value = "/group/player", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<ProvinceCompeteVo.GroupAndPlayer>> queryPlayerByGroupId(
@ApiParam @Validated @RequestBody QueryDto<ProvinceCompeteDto.QueryPlayerByGroup> params) {
log.info("根据组别查找本单位所有注册的选手:{}",params);
List<ProvinceCompeteVo.GroupAndPlayer> groupAndPlayers = provinceService.queryPlayerByGroupId(params.getParam(),params.getUserId());
log.info("根据组别查找本单位所有注册的选手:{}",groupAndPlayers);
return JsonResponse.newInstance().ok(groupAndPlayers);
}
@MustLogin
@ApiOperation(value = "根据大赛id查找所有的一级项目", notes = "")
@RequestMapping(value = "/first/project", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<ProvinceCompeteVo.FirstProject>> queryFirstProjectByCompeteTimeId(
@ApiParam @Validated @RequestBody QueryDto<CompeteDto.CompeteTime> params) {
log.info("查找所有的一级项目:{}",params);
List<ProvinceCompeteVo.FirstProject> projectList = provinceService.queryFirstProjectByCompeteTimeId(params.getParam(),params.getUserId());
log.info("查找所有的一级项目:{}",projectList);
return JsonResponse.newInstance().ok(projectList);
}
@MustLogin
@ApiOperation(value = "根据一级项目id查找二级比赛项目的信息", notes = "")
@RequestMapping(value = "/second/project", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<ProvinceCompeteVo.CompeteSecondProject>> queryProjectByFirstProject(
@ApiParam @Validated @RequestBody QueryDto<ProvinceCompeteDto.FirstProject> params) {
log.info("查找二级比赛项目的信息:{}",params);
List<ProvinceCompeteVo.CompeteSecondProject> projectList = provinceService.queryProjectByFirstProject(params.getParam(),params.getUserId());
log.info("查找二级比赛项目的信息:{}",projectList);
return JsonResponse.newInstance().ok(projectList);
}
@MustLogin
@ApiOperation(value = "新加/修改参赛人员", notes = "")
@RequestMapping(value = "/save/player", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse saveOrUpdatePlayer(@ApiParam @Validated @RequestBody QueryDto<ProvinceCompeteDto.PlayerInfo> params) throws Exception {
log.info("新加/修改参赛人员:{}",params);
provinceService.saveOrUpdatePlayer(params.getParam(),params.getUserId());
return JsonResponse.newInstance().ok();
}
@MustLogin
@ApiOperation(value = "查找所有注册的选手", notes = "")
@RequestMapping(value = "/query/player", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<ProvinceCompeteVo.PlayerByCompanyId>> queryPlayerByCompanyId(@ApiParam @Validated @RequestBody QueryDto<ProvinceCompeteDto.CompanyIdVo> params) throws Exception {
log.info("查找所有注册的选手:{}",params);
List<ProvinceCompeteVo.PlayerByCompanyId> playerByCompanyIds = provinceService.queryPlayerByCompanyId(params.getParam(),params.getUserId());
log.info("查找所有注册的选手:{}",playerByCompanyIds);
return JsonResponse.newInstance().ok(playerByCompanyIds);
}
@ApiOperation(value = "查询当前用户参赛单位基本信息", notes = "")
@MustLogin
@RequestMapping(value = "/get/company", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<ProvinceCompeteVo.CompeteCompany> getCompany(@ApiParam @Validated @RequestBody QueryDto<CompeteDto.CompeteTime> params) {
log.info("查询当前用户参赛单位基本信息:{}",params);
ProvinceCompeteVo.CompeteCompany competeCompany = provinceService.getCompany(params.getParam(),params.getUserId());
log.info("查询当前用户参赛单位基本信息:{}",competeCompany);
return JsonResponse.newInstance().ok(competeCompany);
}
@MustLogin
@ApiOperation(value = "添加/修改单位信息", notes = "")
@RequestMapping(value = "/save/company", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<ProvinceCompeteVo.CompeteCompany> saveCompany(@ApiParam @Validated @RequestBody QueryDto<CompeteDto.CompeteCompany> params) {
log.info("添加/修改单位信息:{}",params);
ProvinceCompeteVo.CompeteCompany competeCompany = provinceService.changeCompany(params.getParam(),params.getUserId());
log.info("添加/修改单位信息:{}",competeCompany);
return JsonResponse.newInstance().ok(competeCompany);
}
@MustLogin
@ApiOperation(value ="添加/修改领队或教练",notes = "")
@RequestMapping(value = "/save/coach",method = RequestMethod.POST,produces = {"application/json;charset=UTF-8"})
public JsonResponse updataLeader(@ApiParam @Validated @RequestBody QueryDto<ProvinceCompeteDto.ModifyLeader> params){
log.info("添加/修改单位信息:{}",params);
provinceService.updateLeader(params.getParam());
return JsonResponse.newInstance().ok();
}
@MustLogin
@ApiOperation(value = "查找此单位的领队和教练信息", notes = "")
@RequestMapping(value = "/query/coach", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<ProvinceCompeteVo.CompeteCompanyHeadList> queryCoach(@ApiParam @Validated @RequestBody QueryDto<ProvinceCompeteDto.CompanyIdVo> params) {
log.info("查找此单位的领队和教练信息:{}",params);
ProvinceCompeteVo.CompeteCompanyHeadList competeCompanyHeadList = provinceService.queryCoach(params.getParam());
log.info("查找此单位的领队和教练信息:{}",competeCompanyHeadList);
return JsonResponse.newInstance().ok(competeCompanyHeadList);
}
@MustLogin
@ApiOperation(value = "删除领队和教练信息", notes = "")
@RequestMapping(value = "/delete/coach", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse deleteCoach(@ApiParam @Validated @RequestBody QueryDto<CompeteDto.LeaderId> params) {
log.info("删除领队和教练信息:{}",params);
provinceService.deleteCoach(params.getParam());
log.info("删除领队和教练信息:{}","删除成功");
return JsonResponse.newInstance().ok();
}
@MustLogin
@ApiOperation(value = "参加比赛", notes = "")
@RequestMapping(value = "/join", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse playerJoinProject(@ApiParam @Validated @RequestBody QueryDto<ProvinceCompeteDto.JoinProject> params) {
log.info("参加比赛:{}", params);
provinceService.playerJoinProject(params.getParam());
return JsonResponse.newInstance().ok();
}
@MustLogin
@ApiOperation(value = "删除选手信息", notes = "")
@RequestMapping(value = "/del/player", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse deletePlayer(@ApiParam @Validated @RequestBody QueryDto<CompeteDto.DelPlayer> params) {
log.info("删除选手信息:{}",params);
provinceService.deletePlayer(params.getParam());
log.info("删除选手信息:{}","删除成功");
return JsonResponse.newInstance().ok();
}
@MustLogin
@ApiOperation(value = "选手详细信息", notes = "")
@RequestMapping(value = "/playerInfo", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<ProvinceCompeteVo.PlayerInfo> getPlayerInfo(@ApiParam @Validated @RequestBody QueryDto<CompeteDto.DelPlayer> params) {
log.info("选手详细信息:{}",params);
ProvinceCompeteVo.PlayerInfo playerInfo = provinceService.getPlayerInfo(params.getParam());
log.info("选手详细信息:{}",playerInfo);
return JsonResponse.newInstance().ok(playerInfo);
}
@MustLogin
@ApiOperation(value = "查询教练或领队的详细信息", notes = "")
@RequestMapping(value = "/coachInfo", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<ProvinceCompeteVo.GetCoach> getCoachInfo(@ApiParam @Validated @RequestBody QueryDto<CompeteDto.LeaderId> params) {
log.info("查询教练或领队的详细信息:{}",params);
ProvinceCompeteVo.GetCoach coachInfo = provinceService.getCoachInfo(params.getParam());
log.info("查询教练或领队的详细信息:{}",coachInfo);
return JsonResponse.newInstance().ok(coachInfo);
}
@MustLogin
@ApiOperation(value = "查找团体比赛已报名的选手信息", notes = "")
@RequestMapping(value = "/teamProject/player", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<ProvinceCompeteVo.GroupAndPlayer>> getPlayerByTeamProject(@ApiParam @Validated @RequestBody QueryDto<ProvinceCompeteDto.GetPlayerByTeamProject> params) {
log.info("查询教练或领队的详细信息:{}",params);
List<ProvinceCompeteVo.GroupAndPlayer> groupAndPlayer = provinceService.getPlayerByTeamProject(params.getParam());
log.info("查询教练或领队的详细信息:{}",groupAndPlayer);
return JsonResponse.newInstance().ok(groupAndPlayer);
}
}

3
mt/src/main/java/com/ccsens/mt/api/ScoreController.java

@ -5,8 +5,6 @@ import com.ccsens.mt.bean.vo.ScoreVo;
import com.ccsens.mt.service.IScoreService;
import com.ccsens.mt.service.IUserService;
import com.ccsens.util.JsonResponse;
import com.ccsens.util.WebConstant;
import io.jsonwebtoken.Claims;
import io.swagger.annotations.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@ -33,7 +31,6 @@ public class ScoreController {
})
@RequestMapping(value = "/score", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<ScoreVo.ScoreInfo>> getScoreLog(HttpServletRequest request,
@RequestParam Long roleId,
@RequestParam(required = true) Long taskId) throws Exception {
//获取userId
Long userId = userService.getUserIdByToken(request);

56
mt/src/main/java/com/ccsens/mt/api/VideoController.java

@ -0,0 +1,56 @@
package com.ccsens.mt.api;
import com.ccsens.cloudutil.annotation.MustLogin;
import com.ccsens.mt.bean.dto.TopicDto;
import com.ccsens.mt.bean.dto.VideoDto;
import com.ccsens.mt.bean.vo.VideoVo;
import com.ccsens.mt.service.IVideoService;
import com.ccsens.util.JsonResponse;
import com.ccsens.util.bean.dto.QueryDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
* @author
*/
@Slf4j
@Api(tags = "报表相关api")
@RestController
@RequestMapping("/video")
public class VideoController {
@Resource
private IVideoService videoService;
@MustLogin
@ApiOperation(value = "查看选手上传的视频信息", notes = "")
@ApiImplicitParams({
})
@RequestMapping(value = "/get", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<VideoVo.GetVideoInfo>> getVideoByPlayerId(@RequestBody @ApiParam @Validated QueryDto<VideoDto.GetVideo> params) {
log.info("查看选手上传的视频信息:{}",params.toString());
List<VideoVo.GetVideoInfo> getVideoInfoList = videoService.getVideoByPlayerId(params);
return JsonResponse.newInstance().ok(getVideoInfoList);
}
@MustLogin
@ApiOperation(value = "上传视频信息", notes = "")
@ApiImplicitParams({
})
@RequestMapping(value = "/upload", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<VideoVo.GetVideoInfo>> uploadVideo(@RequestBody @ApiParam @Validated QueryDto<VideoDto.UploadVideo> params) {
log.info("查看选手上传的视频信息:{}",params.toString());
List<VideoVo.GetVideoInfo> getVideoInfoList = videoService.uploadVideo(params);
return JsonResponse.newInstance().ok(getVideoInfoList);
}
}

208
mt/src/main/java/com/ccsens/mt/bean/dto/CompeteDto.java

@ -3,9 +3,10 @@ package com.ccsens.mt.bean.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NonNull;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.*;
import java.util.List;
/**
* @author
@ -16,7 +17,7 @@ public class CompeteDto {
@ApiModel
public static class CompeteType{
@NotNull
@ApiModelProperty("比赛的类型,0跳绳比赛")
@ApiModelProperty("比赛的类型,0跳绳省赛 1跳绳校内赛 2全民赛")
private int type;
}
@ -27,6 +28,19 @@ public class CompeteDto {
@ApiModelProperty("第几届信息的id")
private Long competeTimeId;
}
@Data
@ApiModel("查询项目下的选手列表")
public static class CompeteProjectId{
@NotNull
@ApiModelProperty("第几届信息的id")
private Long competeTimeId;
@NotNull
@ApiModelProperty("比赛项目id(二级的)")
private Long competeProjectId;
}
@Data
@ApiModel
public static class CompeteProjectPlayer{
@ -73,7 +87,6 @@ public class CompeteDto {
@NotNull
@ApiModelProperty("参加的组别的id")
private Long groupId;
@NotEmpty
@ApiModelProperty("参赛单位的名字")
private String companyName;
@ApiModelProperty("身份证正面照文件的路径/户口本照片")
@ -82,6 +95,8 @@ public class CompeteDto {
private String idCardBack;
@ApiModelProperty("声明文件的路径")
private String proveImg;
@ApiModelProperty("其他参赛人员(亲子组需要)")
private String family;
}
@Data
@ -105,4 +120,189 @@ public class CompeteDto {
@ApiModelProperty("团队ID")
private Long id;
}
@Data
@ApiModel("院系提交报名信息")
public static class DepartmentInfo{
@NotNull(message="请选择院系信息")
@ApiModelProperty("院系id")
private Long id;
@NotNull
@ApiModelProperty("比赛的类型,0跳绳省赛 1跳绳校内比赛")
private int type;
@ApiModelProperty("填表人裁判等信息")
private List<DepartmentRole> roleList;
@ApiModelProperty("每个比赛项目的参赛名单")
private List<DepartmentProject> projectList;
}
@Data
@ApiModel("填表人裁判等信息")
public static class DepartmentRole{
@NotEmpty
@ApiModelProperty("名字")
private String name;
@NotEmpty
@ApiModelProperty("手机号")
private String phone;
@NotNull
@ApiModelProperty("担任的角色 0领队 1裁判 2填表人")
private int role;
}
@Data
@ApiModel("每个比赛项目的参赛名单")
public static class DepartmentProject{
@NotNull
@ApiModelProperty("比赛项目id(二级的)")
private Long competeProjectId;
@NotEmpty
@ApiModelProperty("参赛人员名单,名字中间用逗号隔开")
private String names;
@ApiModelProperty("性别组 0女 1男 2混合")
private int genderGroup;
}
@Data
@ApiModel("获取院系提交的报名信息")
public static class GetDepartmentInfo{
@NotNull
@ApiModelProperty("比赛的类型,0跳绳省赛 1跳绳校内比赛")
private int type;
}
@Data
@ApiModel
public static class QueryProjectByGroup{
@NotNull
@ApiModelProperty("比赛的类型,0跳绳省赛 1跳绳校内比赛")
private int type;
@NotNull
@ApiModelProperty("组别id")
private Long groupId;
}
@Data
@ApiModel
public static class QueryGroupByProject{
@NotNull
@ApiModelProperty("比赛的类型,0跳绳省赛 1跳绳校内比赛")
private int type;
@NotNull
@ApiModelProperty("项目id")
private Long projectId;
}
@Data
@ApiModel("提交报名基本信息")
public static class CompetePlayerAndProject{
@NotNull
@ApiModelProperty("第几届信息的id")
private Long competeTimeId;
@NotNull
@ApiModelProperty("比赛的类型,0跳绳比赛")
private int type;
@NotEmpty
@ApiModelProperty("姓名")
private String name;
@NotEmpty
@ApiModelProperty("手机号")
private String phone;
@NotEmpty
@ApiModelProperty("手机验证码")
private String smsCode;
@NotEmpty
@ApiModelProperty("身份证")
private String idCard;
// @NotNull
// @ApiModelProperty("参加的组别的id")
// private Long groupId;
@ApiModelProperty("参加的比赛信息")
List<ProjectAndGroup> projectAndGroups;
}
@Data
@ApiModel("项目id和组别id")
public static class ProjectAndGroup{
@ApiModelProperty("比赛项目id(二级的)")
private Long projectId;
@ApiModelProperty("组别id")
private Long groupId;
@ApiModelProperty("其他参赛人员(亲子组需要)")
private String family;
}
@Data
@ApiModel("添加或修改单位信息")
public static class CompeteCompany{
@NotNull
@ApiModelProperty("大赛id")
private Long competeTimeId;
@ApiModelProperty("参赛单位id")
private Long companyId;
// @NotEmpty(message = "请输入单位名称")
@Size(min =0,max = 50,message = "单位名称过长")
@ApiModelProperty("单位名称")
private String companyName;
@NotEmpty(message = "姓名不能为空")
@Size(min =0,max = 50 ,message = "联系人姓名过长")
@ApiModelProperty("主要联系人姓名")
private String contactsName;
@NotEmpty(message = "联系方式不能为空")
@Pattern(regexp="^[1]([3-9])[0-9]{9}$",message="请输入正确的手机号")
@ApiModelProperty("联系方式")
private String contactsPhone ;
@ApiModelProperty("教练的人数")
private int coachNum;
@ApiModelProperty("领队的人数")
private int guideNum;
@ApiModelProperty("参赛人员的人数")
private int playerNum;
@ApiModelProperty("是否同意安全责任书 0否 1是 只有同意才能报名")
private byte authorization;
}
// @Data
// @ApiModel("当前用户参赛单位基本信息")
// public static class AddCoach{
// @ApiModelProperty("参赛单位id")
// private Long companyId;
// @ApiModelProperty("教练或领队的id,有则修改,没有则添加")
// private Long coachId;
// @ApiModelProperty("身份: 0领队 1教练")
// private int identity;
// @ApiModelProperty("姓名")
// private String name;
// @ApiModelProperty("性别")
// private int gender;
// @ApiModelProperty("手机号")
// private String phone;
// @ApiModelProperty("身份证号")
// private String idCard;
// @ApiModelProperty("证件照(文件类型")
// private Long idPhoto;
// @ApiModelProperty("教练证(只有教练需要,文件类型")
// private Long coachCertificate;
// }
@Data
@ApiModel("领队id")
public static class LeaderId{
@NotNull
@ApiModelProperty("教练或领队的id")
private Long coachId;
}
@Data
@ApiModel("要删除的选手id")
public static class DelPlayer{
@NotNull
@ApiModelProperty("选手id")
private Long playerId;
}
@Data
@ApiModel("文件base64")
public static class FileBase64{
@ApiModelProperty("")
private String fileBase64;
}
}

33
mt/src/main/java/com/ccsens/mt/bean/dto/LevelDto.java

@ -23,6 +23,16 @@ public class LevelDto {
private String name;
@ApiModelProperty("团队id")
private Long teamId;
public LevelUserDto() {
}
public LevelUserDto(Long playerId, String avatarUrl, String name, Long teamId) {
this.playerId = playerId;
this.avatarUrl = avatarUrl;
this.name = name;
this.teamId = teamId;
}
}
@ -41,6 +51,15 @@ public class LevelDto {
private int additionScore;
@ApiModelProperty("名次")
private int ranking;
public LevelUpDto() {
}
public LevelUpDto(Long competeTimeId, String competeCode, Long playerId) {
this.competeTimeId = competeTimeId;
this.competeCode = competeCode;
this.playerId = playerId;
}
}
@Data
@ -50,6 +69,14 @@ public class LevelDto {
private Long competeTimeId;
@ApiModelProperty("比赛code")
private String competeCode;
public AutoLevelUpDto() {
}
public AutoLevelUpDto(Long competeTimeId, String competeCode) {
this.competeTimeId = competeTimeId;
this.competeCode = competeCode;
}
}
@ -68,12 +95,6 @@ public class LevelDto {
public static class ManualLevelUpPlayer{
@ApiModelProperty("选手id")
private Long playerId;
// @ApiModelProperty("分数")
// private int score;
// @ApiModelProperty("附加分数")
// private int additionScore;
// @ApiModelProperty("名次")
// private int ranking;
}
@Data
@ApiModel("查询晋级信息")

143
mt/src/main/java/com/ccsens/mt/bean/dto/ProvinceCompeteDto.java

@ -0,0 +1,143 @@
package com.ccsens.mt.bean.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.util.List;
/**
* @author
*/
@Data
public class ProvinceCompeteDto {
@Data
@ApiModel("参赛单位id")
public static class CompanyIdVo{
@NotNull(message = "请先填写基础信息")
@ApiModelProperty("参赛单位id")
private Long companyId;
}
@Data
@ApiModel("一级项目id")
public static class FirstProject{
@NotNull
@ApiModelProperty("一级项目id")
private Long firstProjectId;
}
@Data
@ApiModel("通过组别查找本单位注册的选手")
public static class QueryPlayerByGroup{
@NotNull(message = "请先填写基础信息")
@ApiModelProperty("参赛单位id")
private Long companyId;
@ApiModelProperty("组别id")
private Long groupId;
@ApiModelProperty("项目id")
private Long projectId;
}
@Data
@ApiModel("添加或修改选手")
public static class PlayerInfo{
@ApiModelProperty("选手id")
private Long playerId;
@ApiModelProperty("参赛单位id")
private Long competeId;
@ApiModelProperty("组别id")
private Long groupId;
@ApiModelProperty("组别信息 1小学、2中学、3高职院校、4本科院校、5俱乐部")
private int groupRemark;
@ApiModelProperty("选手姓名")
private String playerName;
@ApiModelProperty("性别 0女 1男")
private int gender;
@ApiModelProperty("身份证号")
private String idCard;
@ApiModelProperty("身份证正面照片")
private Long idCardFront;
@ApiModelProperty("身份证反面照片")
private Long idCardBack;
@ApiModelProperty("证件照")
private Long idPhone;
@ApiModelProperty("学籍照片")
private Long studentRecord;
@ApiModelProperty("体检证明照片")
private Long healthRecord;
@ApiModelProperty("保险证明照片")
private Long insuranceRecord;
// @ApiModelProperty("身份证正面照片")
// private Part idCardFront;
// @ApiModelProperty("身份证反面照片")
// private Part idCardBack;
// @ApiModelProperty("证件照")
// private Part idPhone;
// @ApiModelProperty("学籍照片")
// private Part studentRecord;
// @ApiModelProperty("体检证明照片")
// private Part healthRecord;
// @ApiModelProperty("保险证明照片")
// private Part insuranceRecord;
}
@Data
@ApiModel("选择选手参加项目")
public static class JoinProject{
@NotNull
@ApiModelProperty("大赛id")
private Long competeTimeId ;
@ApiModelProperty("项目id")
private Long projectId;
@ApiModelProperty("单位id")
private Long companyId;
@ApiModelProperty("选手id")
private List<JoinProjectPlayer> players;
}
@Data
@ApiModel("选手是否参加项目")
public static class JoinProjectPlayer{
@NotNull
@ApiModelProperty("选手id")
private Long playerId ;
@ApiModelProperty("是否参加此项目 0否 1是")
private int joinProject;
}
@Data
@ApiModel("添加/修改领队或教练")
public static class ModifyLeader{
@ApiModelProperty("参赛单位id")
private Long companyId; //参赛单位id
@ApiModelProperty("教练或领队的id")
private Long coachId; //教练或领队的id,有则修改,没有则添加
@ApiModelProperty("身份: 0领队 1教练")
private int identity; //身份: 0领队 1教练
@ApiModelProperty("姓名")
private String name; //姓名
@ApiModelProperty("性别")
private String gender; //性别
@ApiModelProperty("联系方式")
private String phone; //联系方式
@ApiModelProperty("身份证号")
private String idCard; //身份证号
@ApiModelProperty("证件照")
private Long idPhoto; //证件照(文件类型)
@ApiModelProperty("教练证")
private Long coachCertificate; //教练证(只有教练需要,文件类型)
}
@Data
@ApiModel("查找团队项目下已参加的选手信息")
public static class GetPlayerByTeamProject{
@NotNull(message = "请先填写基础信息")
@ApiModelProperty("参赛单位id")
private Long companyId;
@NotNull(message = "请选择项目")
@ApiModelProperty("项目id")
private Long projectId;
}
}

42
mt/src/main/java/com/ccsens/mt/bean/dto/VideoDto.java

@ -0,0 +1,42 @@
package com.ccsens.mt.bean.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author
*/
@Data
public class VideoDto {
@Data
@ApiModel("查看上传视频的信息")
public static class GetVideo{
@ApiModelProperty("大赛id")
private Long competeTimeId;
@ApiModelProperty("比赛code")
private String competeCode;
@ApiModelProperty("查询的是单人还是团队 0个人 1团队")
private byte team = 0;
@ApiModelProperty("如果查询的是单人则是选手id。查询团队则传入团队id")
private Long playerId;
}
@Data
@ApiModel("上传视频信息")
public static class UploadVideo{
@ApiModelProperty("大赛id")
private Long competeTimeId;
@ApiModelProperty("比赛code")
private String competeCode;
@ApiModelProperty("上传的是单人还是团队 0个人 1团队")
private byte team = 0;
@ApiModelProperty("如果上传的是单人则是选手id。上传团队则传入团队id")
private Long playerId;
@ApiModelProperty("视频文件id")
private Long videoFileId;
@ApiModelProperty("视频文件浏览路径")
private String videoFileUrl;
}
}

150
mt/src/main/java/com/ccsens/mt/bean/po/CompeteCoach.java

@ -0,0 +1,150 @@
package com.ccsens.mt.bean.po;
import java.io.Serializable;
import java.util.Date;
public class CompeteCoach implements Serializable {
private Long id;
private Byte identity;
private String name;
private Byte gender;
private String phone;
private String idCard;
private Long idPhoto;
private Long coachCertificate;
private Long companyId;
private Date createdAt;
private Date updatedAt;
private Byte recStatus;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Byte getIdentity() {
return identity;
}
public void setIdentity(Byte identity) {
this.identity = identity;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
public Byte getGender() {
return gender;
}
public void setGender(Byte gender) {
this.gender = gender;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone == null ? null : phone.trim();
}
public String getIdCard() {
return idCard;
}
public void setIdCard(String idCard) {
this.idCard = idCard == null ? null : idCard.trim();
}
public Long getIdPhoto() {
return idPhoto;
}
public void setIdPhoto(Long idPhoto) {
this.idPhoto = idPhoto;
}
public Long getCoachCertificate() {
return coachCertificate;
}
public void setCoachCertificate(Long coachCertificate) {
this.coachCertificate = coachCertificate;
}
public Long getCompanyId() {
return companyId;
}
public void setCompanyId(Long companyId) {
this.companyId = companyId;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public Byte getRecStatus() {
return recStatus;
}
public void setRecStatus(Byte recStatus) {
this.recStatus = recStatus;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", identity=").append(identity);
sb.append(", name=").append(name);
sb.append(", gender=").append(gender);
sb.append(", phone=").append(phone);
sb.append(", idCard=").append(idCard);
sb.append(", idPhoto=").append(idPhoto);
sb.append(", coachCertificate=").append(coachCertificate);
sb.append(", companyId=").append(companyId);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append("]");
return sb.toString();
}
}

951
mt/src/main/java/com/ccsens/mt/bean/po/CompeteCoachExample.java

@ -0,0 +1,951 @@
package com.ccsens.mt.bean.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class CompeteCoachExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public CompeteCoachExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdentityIsNull() {
addCriterion("identity is null");
return (Criteria) this;
}
public Criteria andIdentityIsNotNull() {
addCriterion("identity is not null");
return (Criteria) this;
}
public Criteria andIdentityEqualTo(Byte value) {
addCriterion("identity =", value, "identity");
return (Criteria) this;
}
public Criteria andIdentityNotEqualTo(Byte value) {
addCriterion("identity <>", value, "identity");
return (Criteria) this;
}
public Criteria andIdentityGreaterThan(Byte value) {
addCriterion("identity >", value, "identity");
return (Criteria) this;
}
public Criteria andIdentityGreaterThanOrEqualTo(Byte value) {
addCriterion("identity >=", value, "identity");
return (Criteria) this;
}
public Criteria andIdentityLessThan(Byte value) {
addCriterion("identity <", value, "identity");
return (Criteria) this;
}
public Criteria andIdentityLessThanOrEqualTo(Byte value) {
addCriterion("identity <=", value, "identity");
return (Criteria) this;
}
public Criteria andIdentityIn(List<Byte> values) {
addCriterion("identity in", values, "identity");
return (Criteria) this;
}
public Criteria andIdentityNotIn(List<Byte> values) {
addCriterion("identity not in", values, "identity");
return (Criteria) this;
}
public Criteria andIdentityBetween(Byte value1, Byte value2) {
addCriterion("identity between", value1, value2, "identity");
return (Criteria) this;
}
public Criteria andIdentityNotBetween(Byte value1, Byte value2) {
addCriterion("identity not between", value1, value2, "identity");
return (Criteria) this;
}
public Criteria andNameIsNull() {
addCriterion("name is null");
return (Criteria) this;
}
public Criteria andNameIsNotNull() {
addCriterion("name is not null");
return (Criteria) this;
}
public Criteria andNameEqualTo(String value) {
addCriterion("name =", value, "name");
return (Criteria) this;
}
public Criteria andNameNotEqualTo(String value) {
addCriterion("name <>", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThan(String value) {
addCriterion("name >", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThanOrEqualTo(String value) {
addCriterion("name >=", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThan(String value) {
addCriterion("name <", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThanOrEqualTo(String value) {
addCriterion("name <=", value, "name");
return (Criteria) this;
}
public Criteria andNameLike(String value) {
addCriterion("name like", value, "name");
return (Criteria) this;
}
public Criteria andNameNotLike(String value) {
addCriterion("name not like", value, "name");
return (Criteria) this;
}
public Criteria andNameIn(List<String> values) {
addCriterion("name in", values, "name");
return (Criteria) this;
}
public Criteria andNameNotIn(List<String> values) {
addCriterion("name not in", values, "name");
return (Criteria) this;
}
public Criteria andNameBetween(String value1, String value2) {
addCriterion("name between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andNameNotBetween(String value1, String value2) {
addCriterion("name not between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andGenderIsNull() {
addCriterion("gender is null");
return (Criteria) this;
}
public Criteria andGenderIsNotNull() {
addCriterion("gender is not null");
return (Criteria) this;
}
public Criteria andGenderEqualTo(Byte value) {
addCriterion("gender =", value, "gender");
return (Criteria) this;
}
public Criteria andGenderNotEqualTo(Byte value) {
addCriterion("gender <>", value, "gender");
return (Criteria) this;
}
public Criteria andGenderGreaterThan(Byte value) {
addCriterion("gender >", value, "gender");
return (Criteria) this;
}
public Criteria andGenderGreaterThanOrEqualTo(Byte value) {
addCriterion("gender >=", value, "gender");
return (Criteria) this;
}
public Criteria andGenderLessThan(Byte value) {
addCriterion("gender <", value, "gender");
return (Criteria) this;
}
public Criteria andGenderLessThanOrEqualTo(Byte value) {
addCriterion("gender <=", value, "gender");
return (Criteria) this;
}
public Criteria andGenderIn(List<Byte> values) {
addCriterion("gender in", values, "gender");
return (Criteria) this;
}
public Criteria andGenderNotIn(List<Byte> values) {
addCriterion("gender not in", values, "gender");
return (Criteria) this;
}
public Criteria andGenderBetween(Byte value1, Byte value2) {
addCriterion("gender between", value1, value2, "gender");
return (Criteria) this;
}
public Criteria andGenderNotBetween(Byte value1, Byte value2) {
addCriterion("gender not between", value1, value2, "gender");
return (Criteria) this;
}
public Criteria andPhoneIsNull() {
addCriterion("phone is null");
return (Criteria) this;
}
public Criteria andPhoneIsNotNull() {
addCriterion("phone is not null");
return (Criteria) this;
}
public Criteria andPhoneEqualTo(String value) {
addCriterion("phone =", value, "phone");
return (Criteria) this;
}
public Criteria andPhoneNotEqualTo(String value) {
addCriterion("phone <>", value, "phone");
return (Criteria) this;
}
public Criteria andPhoneGreaterThan(String value) {
addCriterion("phone >", value, "phone");
return (Criteria) this;
}
public Criteria andPhoneGreaterThanOrEqualTo(String value) {
addCriterion("phone >=", value, "phone");
return (Criteria) this;
}
public Criteria andPhoneLessThan(String value) {
addCriterion("phone <", value, "phone");
return (Criteria) this;
}
public Criteria andPhoneLessThanOrEqualTo(String value) {
addCriterion("phone <=", value, "phone");
return (Criteria) this;
}
public Criteria andPhoneLike(String value) {
addCriterion("phone like", value, "phone");
return (Criteria) this;
}
public Criteria andPhoneNotLike(String value) {
addCriterion("phone not like", value, "phone");
return (Criteria) this;
}
public Criteria andPhoneIn(List<String> values) {
addCriterion("phone in", values, "phone");
return (Criteria) this;
}
public Criteria andPhoneNotIn(List<String> values) {
addCriterion("phone not in", values, "phone");
return (Criteria) this;
}
public Criteria andPhoneBetween(String value1, String value2) {
addCriterion("phone between", value1, value2, "phone");
return (Criteria) this;
}
public Criteria andPhoneNotBetween(String value1, String value2) {
addCriterion("phone not between", value1, value2, "phone");
return (Criteria) this;
}
public Criteria andIdCardIsNull() {
addCriterion("id_card is null");
return (Criteria) this;
}
public Criteria andIdCardIsNotNull() {
addCriterion("id_card is not null");
return (Criteria) this;
}
public Criteria andIdCardEqualTo(String value) {
addCriterion("id_card =", value, "idCard");
return (Criteria) this;
}
public Criteria andIdCardNotEqualTo(String value) {
addCriterion("id_card <>", value, "idCard");
return (Criteria) this;
}
public Criteria andIdCardGreaterThan(String value) {
addCriterion("id_card >", value, "idCard");
return (Criteria) this;
}
public Criteria andIdCardGreaterThanOrEqualTo(String value) {
addCriterion("id_card >=", value, "idCard");
return (Criteria) this;
}
public Criteria andIdCardLessThan(String value) {
addCriterion("id_card <", value, "idCard");
return (Criteria) this;
}
public Criteria andIdCardLessThanOrEqualTo(String value) {
addCriterion("id_card <=", value, "idCard");
return (Criteria) this;
}
public Criteria andIdCardLike(String value) {
addCriterion("id_card like", value, "idCard");
return (Criteria) this;
}
public Criteria andIdCardNotLike(String value) {
addCriterion("id_card not like", value, "idCard");
return (Criteria) this;
}
public Criteria andIdCardIn(List<String> values) {
addCriterion("id_card in", values, "idCard");
return (Criteria) this;
}
public Criteria andIdCardNotIn(List<String> values) {
addCriterion("id_card not in", values, "idCard");
return (Criteria) this;
}
public Criteria andIdCardBetween(String value1, String value2) {
addCriterion("id_card between", value1, value2, "idCard");
return (Criteria) this;
}
public Criteria andIdCardNotBetween(String value1, String value2) {
addCriterion("id_card not between", value1, value2, "idCard");
return (Criteria) this;
}
public Criteria andIdPhotoIsNull() {
addCriterion("id_photo is null");
return (Criteria) this;
}
public Criteria andIdPhotoIsNotNull() {
addCriterion("id_photo is not null");
return (Criteria) this;
}
public Criteria andIdPhotoEqualTo(Long value) {
addCriterion("id_photo =", value, "idPhoto");
return (Criteria) this;
}
public Criteria andIdPhotoNotEqualTo(Long value) {
addCriterion("id_photo <>", value, "idPhoto");
return (Criteria) this;
}
public Criteria andIdPhotoGreaterThan(Long value) {
addCriterion("id_photo >", value, "idPhoto");
return (Criteria) this;
}
public Criteria andIdPhotoGreaterThanOrEqualTo(Long value) {
addCriterion("id_photo >=", value, "idPhoto");
return (Criteria) this;
}
public Criteria andIdPhotoLessThan(Long value) {
addCriterion("id_photo <", value, "idPhoto");
return (Criteria) this;
}
public Criteria andIdPhotoLessThanOrEqualTo(Long value) {
addCriterion("id_photo <=", value, "idPhoto");
return (Criteria) this;
}
public Criteria andIdPhotoIn(List<Long> values) {
addCriterion("id_photo in", values, "idPhoto");
return (Criteria) this;
}
public Criteria andIdPhotoNotIn(List<Long> values) {
addCriterion("id_photo not in", values, "idPhoto");
return (Criteria) this;
}
public Criteria andIdPhotoBetween(Long value1, Long value2) {
addCriterion("id_photo between", value1, value2, "idPhoto");
return (Criteria) this;
}
public Criteria andIdPhotoNotBetween(Long value1, Long value2) {
addCriterion("id_photo not between", value1, value2, "idPhoto");
return (Criteria) this;
}
public Criteria andCoachCertificateIsNull() {
addCriterion("coach_certificate is null");
return (Criteria) this;
}
public Criteria andCoachCertificateIsNotNull() {
addCriterion("coach_certificate is not null");
return (Criteria) this;
}
public Criteria andCoachCertificateEqualTo(Long value) {
addCriterion("coach_certificate =", value, "coachCertificate");
return (Criteria) this;
}
public Criteria andCoachCertificateNotEqualTo(Long value) {
addCriterion("coach_certificate <>", value, "coachCertificate");
return (Criteria) this;
}
public Criteria andCoachCertificateGreaterThan(Long value) {
addCriterion("coach_certificate >", value, "coachCertificate");
return (Criteria) this;
}
public Criteria andCoachCertificateGreaterThanOrEqualTo(Long value) {
addCriterion("coach_certificate >=", value, "coachCertificate");
return (Criteria) this;
}
public Criteria andCoachCertificateLessThan(Long value) {
addCriterion("coach_certificate <", value, "coachCertificate");
return (Criteria) this;
}
public Criteria andCoachCertificateLessThanOrEqualTo(Long value) {
addCriterion("coach_certificate <=", value, "coachCertificate");
return (Criteria) this;
}
public Criteria andCoachCertificateIn(List<Long> values) {
addCriterion("coach_certificate in", values, "coachCertificate");
return (Criteria) this;
}
public Criteria andCoachCertificateNotIn(List<Long> values) {
addCriterion("coach_certificate not in", values, "coachCertificate");
return (Criteria) this;
}
public Criteria andCoachCertificateBetween(Long value1, Long value2) {
addCriterion("coach_certificate between", value1, value2, "coachCertificate");
return (Criteria) this;
}
public Criteria andCoachCertificateNotBetween(Long value1, Long value2) {
addCriterion("coach_certificate not between", value1, value2, "coachCertificate");
return (Criteria) this;
}
public Criteria andCompanyIdIsNull() {
addCriterion("company_id is null");
return (Criteria) this;
}
public Criteria andCompanyIdIsNotNull() {
addCriterion("company_id is not null");
return (Criteria) this;
}
public Criteria andCompanyIdEqualTo(Long value) {
addCriterion("company_id =", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdNotEqualTo(Long value) {
addCriterion("company_id <>", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdGreaterThan(Long value) {
addCriterion("company_id >", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdGreaterThanOrEqualTo(Long value) {
addCriterion("company_id >=", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdLessThan(Long value) {
addCriterion("company_id <", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdLessThanOrEqualTo(Long value) {
addCriterion("company_id <=", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdIn(List<Long> values) {
addCriterion("company_id in", values, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdNotIn(List<Long> values) {
addCriterion("company_id not in", values, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdBetween(Long value1, Long value2) {
addCriterion("company_id between", value1, value2, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdNotBetween(Long value1, Long value2) {
addCriterion("company_id not between", value1, value2, "companyId");
return (Criteria) this;
}
public Criteria andCreatedAtIsNull() {
addCriterion("created_at is null");
return (Criteria) this;
}
public Criteria andCreatedAtIsNotNull() {
addCriterion("created_at is not null");
return (Criteria) this;
}
public Criteria andCreatedAtEqualTo(Date value) {
addCriterion("created_at =", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotEqualTo(Date value) {
addCriterion("created_at <>", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThan(Date value) {
addCriterion("created_at >", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("created_at >=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThan(Date value) {
addCriterion("created_at <", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThanOrEqualTo(Date value) {
addCriterion("created_at <=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtIn(List<Date> values) {
addCriterion("created_at in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotIn(List<Date> values) {
addCriterion("created_at not in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtBetween(Date value1, Date value2) {
addCriterion("created_at between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotBetween(Date value1, Date value2) {
addCriterion("created_at not between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNull() {
addCriterion("updated_at is null");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNotNull() {
addCriterion("updated_at is not null");
return (Criteria) this;
}
public Criteria andUpdatedAtEqualTo(Date value) {
addCriterion("updated_at =", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotEqualTo(Date value) {
addCriterion("updated_at <>", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThan(Date value) {
addCriterion("updated_at >", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("updated_at >=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThan(Date value) {
addCriterion("updated_at <", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThanOrEqualTo(Date value) {
addCriterion("updated_at <=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIn(List<Date> values) {
addCriterion("updated_at in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotIn(List<Date> values) {
addCriterion("updated_at not in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtBetween(Date value1, Date value2) {
addCriterion("updated_at between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotBetween(Date value1, Date value2) {
addCriterion("updated_at not between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andRecStatusIsNull() {
addCriterion("rec_status is null");
return (Criteria) this;
}
public Criteria andRecStatusIsNotNull() {
addCriterion("rec_status is not null");
return (Criteria) this;
}
public Criteria andRecStatusEqualTo(Byte value) {
addCriterion("rec_status =", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotEqualTo(Byte value) {
addCriterion("rec_status <>", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThan(Byte value) {
addCriterion("rec_status >", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) {
addCriterion("rec_status >=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThan(Byte value) {
addCriterion("rec_status <", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThanOrEqualTo(Byte value) {
addCriterion("rec_status <=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusIn(List<Byte> values) {
addCriterion("rec_status in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotIn(List<Byte> values) {
addCriterion("rec_status not in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusBetween(Byte value1, Byte value2) {
addCriterion("rec_status between", value1, value2, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotBetween(Byte value1, Byte value2) {
addCriterion("rec_status not between", value1, value2, "recStatus");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

88
mt/src/main/java/com/ccsens/mt/bean/po/CompeteCompany.java

@ -10,6 +10,22 @@ public class CompeteCompany implements Serializable {
private Byte type;
private Long competeTimeId;
private String contactsName;
private String contactsPhone;
private Long userId;
private Integer joinNum;
private Integer leaderNum;
private Integer coachNum;
private Byte authorization;
private Date createdAt;
private Date updatedAt;
@ -42,6 +58,70 @@ public class CompeteCompany implements Serializable {
this.type = type;
}
public Long getCompeteTimeId() {
return competeTimeId;
}
public void setCompeteTimeId(Long competeTimeId) {
this.competeTimeId = competeTimeId;
}
public String getContactsName() {
return contactsName;
}
public void setContactsName(String contactsName) {
this.contactsName = contactsName == null ? null : contactsName.trim();
}
public String getContactsPhone() {
return contactsPhone;
}
public void setContactsPhone(String contactsPhone) {
this.contactsPhone = contactsPhone == null ? null : contactsPhone.trim();
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public Integer getJoinNum() {
return joinNum;
}
public void setJoinNum(Integer joinNum) {
this.joinNum = joinNum;
}
public Integer getLeaderNum() {
return leaderNum;
}
public void setLeaderNum(Integer leaderNum) {
this.leaderNum = leaderNum;
}
public Integer getCoachNum() {
return coachNum;
}
public void setCoachNum(Integer coachNum) {
this.coachNum = coachNum;
}
public Byte getAuthorization() {
return authorization;
}
public void setAuthorization(Byte authorization) {
this.authorization = authorization;
}
public Date getCreatedAt() {
return createdAt;
}
@ -75,6 +155,14 @@ public class CompeteCompany implements Serializable {
sb.append(", id=").append(id);
sb.append(", name=").append(name);
sb.append(", type=").append(type);
sb.append(", competeTimeId=").append(competeTimeId);
sb.append(", contactsName=").append(contactsName);
sb.append(", contactsPhone=").append(contactsPhone);
sb.append(", userId=").append(userId);
sb.append(", joinNum=").append(joinNum);
sb.append(", leaderNum=").append(leaderNum);
sb.append(", coachNum=").append(coachNum);
sb.append(", authorization=").append(authorization);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);

500
mt/src/main/java/com/ccsens/mt/bean/po/CompeteCompanyExample.java

@ -295,6 +295,506 @@ public class CompeteCompanyExample {
return (Criteria) this;
}
public Criteria andCompeteTimeIdIsNull() {
addCriterion("compete_time_id is null");
return (Criteria) this;
}
public Criteria andCompeteTimeIdIsNotNull() {
addCriterion("compete_time_id is not null");
return (Criteria) this;
}
public Criteria andCompeteTimeIdEqualTo(Long value) {
addCriterion("compete_time_id =", value, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdNotEqualTo(Long value) {
addCriterion("compete_time_id <>", value, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdGreaterThan(Long value) {
addCriterion("compete_time_id >", value, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdGreaterThanOrEqualTo(Long value) {
addCriterion("compete_time_id >=", value, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdLessThan(Long value) {
addCriterion("compete_time_id <", value, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdLessThanOrEqualTo(Long value) {
addCriterion("compete_time_id <=", value, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdIn(List<Long> values) {
addCriterion("compete_time_id in", values, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdNotIn(List<Long> values) {
addCriterion("compete_time_id not in", values, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdBetween(Long value1, Long value2) {
addCriterion("compete_time_id between", value1, value2, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdNotBetween(Long value1, Long value2) {
addCriterion("compete_time_id not between", value1, value2, "competeTimeId");
return (Criteria) this;
}
public Criteria andContactsNameIsNull() {
addCriterion("contacts_name is null");
return (Criteria) this;
}
public Criteria andContactsNameIsNotNull() {
addCriterion("contacts_name is not null");
return (Criteria) this;
}
public Criteria andContactsNameEqualTo(String value) {
addCriterion("contacts_name =", value, "contactsName");
return (Criteria) this;
}
public Criteria andContactsNameNotEqualTo(String value) {
addCriterion("contacts_name <>", value, "contactsName");
return (Criteria) this;
}
public Criteria andContactsNameGreaterThan(String value) {
addCriterion("contacts_name >", value, "contactsName");
return (Criteria) this;
}
public Criteria andContactsNameGreaterThanOrEqualTo(String value) {
addCriterion("contacts_name >=", value, "contactsName");
return (Criteria) this;
}
public Criteria andContactsNameLessThan(String value) {
addCriterion("contacts_name <", value, "contactsName");
return (Criteria) this;
}
public Criteria andContactsNameLessThanOrEqualTo(String value) {
addCriterion("contacts_name <=", value, "contactsName");
return (Criteria) this;
}
public Criteria andContactsNameLike(String value) {
addCriterion("contacts_name like", value, "contactsName");
return (Criteria) this;
}
public Criteria andContactsNameNotLike(String value) {
addCriterion("contacts_name not like", value, "contactsName");
return (Criteria) this;
}
public Criteria andContactsNameIn(List<String> values) {
addCriterion("contacts_name in", values, "contactsName");
return (Criteria) this;
}
public Criteria andContactsNameNotIn(List<String> values) {
addCriterion("contacts_name not in", values, "contactsName");
return (Criteria) this;
}
public Criteria andContactsNameBetween(String value1, String value2) {
addCriterion("contacts_name between", value1, value2, "contactsName");
return (Criteria) this;
}
public Criteria andContactsNameNotBetween(String value1, String value2) {
addCriterion("contacts_name not between", value1, value2, "contactsName");
return (Criteria) this;
}
public Criteria andContactsPhoneIsNull() {
addCriterion("contacts_phone is null");
return (Criteria) this;
}
public Criteria andContactsPhoneIsNotNull() {
addCriterion("contacts_phone is not null");
return (Criteria) this;
}
public Criteria andContactsPhoneEqualTo(String value) {
addCriterion("contacts_phone =", value, "contactsPhone");
return (Criteria) this;
}
public Criteria andContactsPhoneNotEqualTo(String value) {
addCriterion("contacts_phone <>", value, "contactsPhone");
return (Criteria) this;
}
public Criteria andContactsPhoneGreaterThan(String value) {
addCriterion("contacts_phone >", value, "contactsPhone");
return (Criteria) this;
}
public Criteria andContactsPhoneGreaterThanOrEqualTo(String value) {
addCriterion("contacts_phone >=", value, "contactsPhone");
return (Criteria) this;
}
public Criteria andContactsPhoneLessThan(String value) {
addCriterion("contacts_phone <", value, "contactsPhone");
return (Criteria) this;
}
public Criteria andContactsPhoneLessThanOrEqualTo(String value) {
addCriterion("contacts_phone <=", value, "contactsPhone");
return (Criteria) this;
}
public Criteria andContactsPhoneLike(String value) {
addCriterion("contacts_phone like", value, "contactsPhone");
return (Criteria) this;
}
public Criteria andContactsPhoneNotLike(String value) {
addCriterion("contacts_phone not like", value, "contactsPhone");
return (Criteria) this;
}
public Criteria andContactsPhoneIn(List<String> values) {
addCriterion("contacts_phone in", values, "contactsPhone");
return (Criteria) this;
}
public Criteria andContactsPhoneNotIn(List<String> values) {
addCriterion("contacts_phone not in", values, "contactsPhone");
return (Criteria) this;
}
public Criteria andContactsPhoneBetween(String value1, String value2) {
addCriterion("contacts_phone between", value1, value2, "contactsPhone");
return (Criteria) this;
}
public Criteria andContactsPhoneNotBetween(String value1, String value2) {
addCriterion("contacts_phone not between", value1, value2, "contactsPhone");
return (Criteria) this;
}
public Criteria andUserIdIsNull() {
addCriterion("user_id is null");
return (Criteria) this;
}
public Criteria andUserIdIsNotNull() {
addCriterion("user_id is not null");
return (Criteria) this;
}
public Criteria andUserIdEqualTo(Long value) {
addCriterion("user_id =", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotEqualTo(Long value) {
addCriterion("user_id <>", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThan(Long value) {
addCriterion("user_id >", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("user_id >=", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLessThan(Long value) {
addCriterion("user_id <", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLessThanOrEqualTo(Long value) {
addCriterion("user_id <=", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdIn(List<Long> values) {
addCriterion("user_id in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotIn(List<Long> values) {
addCriterion("user_id not in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdBetween(Long value1, Long value2) {
addCriterion("user_id between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotBetween(Long value1, Long value2) {
addCriterion("user_id not between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andJoinNumIsNull() {
addCriterion("join_num is null");
return (Criteria) this;
}
public Criteria andJoinNumIsNotNull() {
addCriterion("join_num is not null");
return (Criteria) this;
}
public Criteria andJoinNumEqualTo(Integer value) {
addCriterion("join_num =", value, "joinNum");
return (Criteria) this;
}
public Criteria andJoinNumNotEqualTo(Integer value) {
addCriterion("join_num <>", value, "joinNum");
return (Criteria) this;
}
public Criteria andJoinNumGreaterThan(Integer value) {
addCriterion("join_num >", value, "joinNum");
return (Criteria) this;
}
public Criteria andJoinNumGreaterThanOrEqualTo(Integer value) {
addCriterion("join_num >=", value, "joinNum");
return (Criteria) this;
}
public Criteria andJoinNumLessThan(Integer value) {
addCriterion("join_num <", value, "joinNum");
return (Criteria) this;
}
public Criteria andJoinNumLessThanOrEqualTo(Integer value) {
addCriterion("join_num <=", value, "joinNum");
return (Criteria) this;
}
public Criteria andJoinNumIn(List<Integer> values) {
addCriterion("join_num in", values, "joinNum");
return (Criteria) this;
}
public Criteria andJoinNumNotIn(List<Integer> values) {
addCriterion("join_num not in", values, "joinNum");
return (Criteria) this;
}
public Criteria andJoinNumBetween(Integer value1, Integer value2) {
addCriterion("join_num between", value1, value2, "joinNum");
return (Criteria) this;
}
public Criteria andJoinNumNotBetween(Integer value1, Integer value2) {
addCriterion("join_num not between", value1, value2, "joinNum");
return (Criteria) this;
}
public Criteria andLeaderNumIsNull() {
addCriterion("leader_num is null");
return (Criteria) this;
}
public Criteria andLeaderNumIsNotNull() {
addCriterion("leader_num is not null");
return (Criteria) this;
}
public Criteria andLeaderNumEqualTo(Integer value) {
addCriterion("leader_num =", value, "leaderNum");
return (Criteria) this;
}
public Criteria andLeaderNumNotEqualTo(Integer value) {
addCriterion("leader_num <>", value, "leaderNum");
return (Criteria) this;
}
public Criteria andLeaderNumGreaterThan(Integer value) {
addCriterion("leader_num >", value, "leaderNum");
return (Criteria) this;
}
public Criteria andLeaderNumGreaterThanOrEqualTo(Integer value) {
addCriterion("leader_num >=", value, "leaderNum");
return (Criteria) this;
}
public Criteria andLeaderNumLessThan(Integer value) {
addCriterion("leader_num <", value, "leaderNum");
return (Criteria) this;
}
public Criteria andLeaderNumLessThanOrEqualTo(Integer value) {
addCriterion("leader_num <=", value, "leaderNum");
return (Criteria) this;
}
public Criteria andLeaderNumIn(List<Integer> values) {
addCriterion("leader_num in", values, "leaderNum");
return (Criteria) this;
}
public Criteria andLeaderNumNotIn(List<Integer> values) {
addCriterion("leader_num not in", values, "leaderNum");
return (Criteria) this;
}
public Criteria andLeaderNumBetween(Integer value1, Integer value2) {
addCriterion("leader_num between", value1, value2, "leaderNum");
return (Criteria) this;
}
public Criteria andLeaderNumNotBetween(Integer value1, Integer value2) {
addCriterion("leader_num not between", value1, value2, "leaderNum");
return (Criteria) this;
}
public Criteria andCoachNumIsNull() {
addCriterion("coach_num is null");
return (Criteria) this;
}
public Criteria andCoachNumIsNotNull() {
addCriterion("coach_num is not null");
return (Criteria) this;
}
public Criteria andCoachNumEqualTo(Integer value) {
addCriterion("coach_num =", value, "coachNum");
return (Criteria) this;
}
public Criteria andCoachNumNotEqualTo(Integer value) {
addCriterion("coach_num <>", value, "coachNum");
return (Criteria) this;
}
public Criteria andCoachNumGreaterThan(Integer value) {
addCriterion("coach_num >", value, "coachNum");
return (Criteria) this;
}
public Criteria andCoachNumGreaterThanOrEqualTo(Integer value) {
addCriterion("coach_num >=", value, "coachNum");
return (Criteria) this;
}
public Criteria andCoachNumLessThan(Integer value) {
addCriterion("coach_num <", value, "coachNum");
return (Criteria) this;
}
public Criteria andCoachNumLessThanOrEqualTo(Integer value) {
addCriterion("coach_num <=", value, "coachNum");
return (Criteria) this;
}
public Criteria andCoachNumIn(List<Integer> values) {
addCriterion("coach_num in", values, "coachNum");
return (Criteria) this;
}
public Criteria andCoachNumNotIn(List<Integer> values) {
addCriterion("coach_num not in", values, "coachNum");
return (Criteria) this;
}
public Criteria andCoachNumBetween(Integer value1, Integer value2) {
addCriterion("coach_num between", value1, value2, "coachNum");
return (Criteria) this;
}
public Criteria andCoachNumNotBetween(Integer value1, Integer value2) {
addCriterion("coach_num not between", value1, value2, "coachNum");
return (Criteria) this;
}
public Criteria andAuthorizationIsNull() {
addCriterion("authorization is null");
return (Criteria) this;
}
public Criteria andAuthorizationIsNotNull() {
addCriterion("authorization is not null");
return (Criteria) this;
}
public Criteria andAuthorizationEqualTo(Byte value) {
addCriterion("authorization =", value, "authorization");
return (Criteria) this;
}
public Criteria andAuthorizationNotEqualTo(Byte value) {
addCriterion("authorization <>", value, "authorization");
return (Criteria) this;
}
public Criteria andAuthorizationGreaterThan(Byte value) {
addCriterion("authorization >", value, "authorization");
return (Criteria) this;
}
public Criteria andAuthorizationGreaterThanOrEqualTo(Byte value) {
addCriterion("authorization >=", value, "authorization");
return (Criteria) this;
}
public Criteria andAuthorizationLessThan(Byte value) {
addCriterion("authorization <", value, "authorization");
return (Criteria) this;
}
public Criteria andAuthorizationLessThanOrEqualTo(Byte value) {
addCriterion("authorization <=", value, "authorization");
return (Criteria) this;
}
public Criteria andAuthorizationIn(List<Byte> values) {
addCriterion("authorization in", values, "authorization");
return (Criteria) this;
}
public Criteria andAuthorizationNotIn(List<Byte> values) {
addCriterion("authorization not in", values, "authorization");
return (Criteria) this;
}
public Criteria andAuthorizationBetween(Byte value1, Byte value2) {
addCriterion("authorization between", value1, value2, "authorization");
return (Criteria) this;
}
public Criteria andAuthorizationNotBetween(Byte value1, Byte value2) {
addCriterion("authorization not between", value1, value2, "authorization");
return (Criteria) this;
}
public Criteria andCreatedAtIsNull() {
addCriterion("created_at is null");
return (Criteria) this;

95
mt/src/main/java/com/ccsens/mt/bean/po/CompeteCompanyRole.java

@ -0,0 +1,95 @@
package com.ccsens.mt.bean.po;
import java.io.Serializable;
import java.util.Date;
public class CompeteCompanyRole implements Serializable {
private Long id;
private Long playerId;
private Long competeCompanyId;
private Byte type;
private Date createdAt;
private Date updatedAt;
private Byte recStatus;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getPlayerId() {
return playerId;
}
public void setPlayerId(Long playerId) {
this.playerId = playerId;
}
public Long getCompeteCompanyId() {
return competeCompanyId;
}
public void setCompeteCompanyId(Long competeCompanyId) {
this.competeCompanyId = competeCompanyId;
}
public Byte getType() {
return type;
}
public void setType(Byte type) {
this.type = type;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public Byte getRecStatus() {
return recStatus;
}
public void setRecStatus(Byte recStatus) {
this.recStatus = recStatus;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", playerId=").append(playerId);
sb.append(", competeCompanyId=").append(competeCompanyId);
sb.append(", type=").append(type);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append("]");
return sb.toString();
}
}

621
mt/src/main/java/com/ccsens/mt/bean/po/CompeteCompanyRoleExample.java

@ -0,0 +1,621 @@
package com.ccsens.mt.bean.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class CompeteCompanyRoleExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public CompeteCompanyRoleExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andPlayerIdIsNull() {
addCriterion("player_id is null");
return (Criteria) this;
}
public Criteria andPlayerIdIsNotNull() {
addCriterion("player_id is not null");
return (Criteria) this;
}
public Criteria andPlayerIdEqualTo(Long value) {
addCriterion("player_id =", value, "playerId");
return (Criteria) this;
}
public Criteria andPlayerIdNotEqualTo(Long value) {
addCriterion("player_id <>", value, "playerId");
return (Criteria) this;
}
public Criteria andPlayerIdGreaterThan(Long value) {
addCriterion("player_id >", value, "playerId");
return (Criteria) this;
}
public Criteria andPlayerIdGreaterThanOrEqualTo(Long value) {
addCriterion("player_id >=", value, "playerId");
return (Criteria) this;
}
public Criteria andPlayerIdLessThan(Long value) {
addCriterion("player_id <", value, "playerId");
return (Criteria) this;
}
public Criteria andPlayerIdLessThanOrEqualTo(Long value) {
addCriterion("player_id <=", value, "playerId");
return (Criteria) this;
}
public Criteria andPlayerIdIn(List<Long> values) {
addCriterion("player_id in", values, "playerId");
return (Criteria) this;
}
public Criteria andPlayerIdNotIn(List<Long> values) {
addCriterion("player_id not in", values, "playerId");
return (Criteria) this;
}
public Criteria andPlayerIdBetween(Long value1, Long value2) {
addCriterion("player_id between", value1, value2, "playerId");
return (Criteria) this;
}
public Criteria andPlayerIdNotBetween(Long value1, Long value2) {
addCriterion("player_id not between", value1, value2, "playerId");
return (Criteria) this;
}
public Criteria andCompeteCompanyIdIsNull() {
addCriterion("compete_company_id is null");
return (Criteria) this;
}
public Criteria andCompeteCompanyIdIsNotNull() {
addCriterion("compete_company_id is not null");
return (Criteria) this;
}
public Criteria andCompeteCompanyIdEqualTo(Long value) {
addCriterion("compete_company_id =", value, "competeCompanyId");
return (Criteria) this;
}
public Criteria andCompeteCompanyIdNotEqualTo(Long value) {
addCriterion("compete_company_id <>", value, "competeCompanyId");
return (Criteria) this;
}
public Criteria andCompeteCompanyIdGreaterThan(Long value) {
addCriterion("compete_company_id >", value, "competeCompanyId");
return (Criteria) this;
}
public Criteria andCompeteCompanyIdGreaterThanOrEqualTo(Long value) {
addCriterion("compete_company_id >=", value, "competeCompanyId");
return (Criteria) this;
}
public Criteria andCompeteCompanyIdLessThan(Long value) {
addCriterion("compete_company_id <", value, "competeCompanyId");
return (Criteria) this;
}
public Criteria andCompeteCompanyIdLessThanOrEqualTo(Long value) {
addCriterion("compete_company_id <=", value, "competeCompanyId");
return (Criteria) this;
}
public Criteria andCompeteCompanyIdIn(List<Long> values) {
addCriterion("compete_company_id in", values, "competeCompanyId");
return (Criteria) this;
}
public Criteria andCompeteCompanyIdNotIn(List<Long> values) {
addCriterion("compete_company_id not in", values, "competeCompanyId");
return (Criteria) this;
}
public Criteria andCompeteCompanyIdBetween(Long value1, Long value2) {
addCriterion("compete_company_id between", value1, value2, "competeCompanyId");
return (Criteria) this;
}
public Criteria andCompeteCompanyIdNotBetween(Long value1, Long value2) {
addCriterion("compete_company_id not between", value1, value2, "competeCompanyId");
return (Criteria) this;
}
public Criteria andTypeIsNull() {
addCriterion("type is null");
return (Criteria) this;
}
public Criteria andTypeIsNotNull() {
addCriterion("type is not null");
return (Criteria) this;
}
public Criteria andTypeEqualTo(Byte value) {
addCriterion("type =", value, "type");
return (Criteria) this;
}
public Criteria andTypeNotEqualTo(Byte value) {
addCriterion("type <>", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThan(Byte value) {
addCriterion("type >", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThanOrEqualTo(Byte value) {
addCriterion("type >=", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThan(Byte value) {
addCriterion("type <", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThanOrEqualTo(Byte value) {
addCriterion("type <=", value, "type");
return (Criteria) this;
}
public Criteria andTypeIn(List<Byte> values) {
addCriterion("type in", values, "type");
return (Criteria) this;
}
public Criteria andTypeNotIn(List<Byte> values) {
addCriterion("type not in", values, "type");
return (Criteria) this;
}
public Criteria andTypeBetween(Byte value1, Byte value2) {
addCriterion("type between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andTypeNotBetween(Byte value1, Byte value2) {
addCriterion("type not between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andCreatedAtIsNull() {
addCriterion("created_at is null");
return (Criteria) this;
}
public Criteria andCreatedAtIsNotNull() {
addCriterion("created_at is not null");
return (Criteria) this;
}
public Criteria andCreatedAtEqualTo(Date value) {
addCriterion("created_at =", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotEqualTo(Date value) {
addCriterion("created_at <>", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThan(Date value) {
addCriterion("created_at >", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("created_at >=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThan(Date value) {
addCriterion("created_at <", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThanOrEqualTo(Date value) {
addCriterion("created_at <=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtIn(List<Date> values) {
addCriterion("created_at in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotIn(List<Date> values) {
addCriterion("created_at not in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtBetween(Date value1, Date value2) {
addCriterion("created_at between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotBetween(Date value1, Date value2) {
addCriterion("created_at not between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNull() {
addCriterion("updated_at is null");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNotNull() {
addCriterion("updated_at is not null");
return (Criteria) this;
}
public Criteria andUpdatedAtEqualTo(Date value) {
addCriterion("updated_at =", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotEqualTo(Date value) {
addCriterion("updated_at <>", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThan(Date value) {
addCriterion("updated_at >", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("updated_at >=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThan(Date value) {
addCriterion("updated_at <", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThanOrEqualTo(Date value) {
addCriterion("updated_at <=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIn(List<Date> values) {
addCriterion("updated_at in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotIn(List<Date> values) {
addCriterion("updated_at not in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtBetween(Date value1, Date value2) {
addCriterion("updated_at between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotBetween(Date value1, Date value2) {
addCriterion("updated_at not between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andRecStatusIsNull() {
addCriterion("rec_status is null");
return (Criteria) this;
}
public Criteria andRecStatusIsNotNull() {
addCriterion("rec_status is not null");
return (Criteria) this;
}
public Criteria andRecStatusEqualTo(Byte value) {
addCriterion("rec_status =", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotEqualTo(Byte value) {
addCriterion("rec_status <>", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThan(Byte value) {
addCriterion("rec_status >", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) {
addCriterion("rec_status >=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThan(Byte value) {
addCriterion("rec_status <", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThanOrEqualTo(Byte value) {
addCriterion("rec_status <=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusIn(List<Byte> values) {
addCriterion("rec_status in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotIn(List<Byte> values) {
addCriterion("rec_status not in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusBetween(Byte value1, Byte value2) {
addCriterion("rec_status between", value1, value2, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotBetween(Byte value1, Byte value2) {
addCriterion("rec_status not between", value1, value2, "recStatus");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

44
mt/src/main/java/com/ccsens/mt/bean/po/CompeteGroup.java

@ -24,6 +24,14 @@ public class CompeteGroup implements Serializable {
private Byte recStatus;
private Byte sex;
private Byte maxAge;
private Byte minAge;
private Byte groupRemark;
private static final long serialVersionUID = 1L;
public Long getId() {
@ -106,6 +114,38 @@ public class CompeteGroup implements Serializable {
this.recStatus = recStatus;
}
public Byte getSex() {
return sex;
}
public void setSex(Byte sex) {
this.sex = sex;
}
public Byte getMaxAge() {
return maxAge;
}
public void setMaxAge(Byte maxAge) {
this.maxAge = maxAge;
}
public Byte getMinAge() {
return minAge;
}
public void setMinAge(Byte minAge) {
this.minAge = minAge;
}
public Byte getGroupRemark() {
return groupRemark;
}
public void setGroupRemark(Byte groupRemark) {
this.groupRemark = groupRemark;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -122,6 +162,10 @@ public class CompeteGroup implements Serializable {
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append(", sex=").append(sex);
sb.append(", maxAge=").append(maxAge);
sb.append(", minAge=").append(minAge);
sb.append(", groupRemark=").append(groupRemark);
sb.append("]");
return sb.toString();
}

240
mt/src/main/java/com/ccsens/mt/bean/po/CompeteGroupExample.java

@ -724,6 +724,246 @@ public class CompeteGroupExample {
addCriterion("rec_status not between", value1, value2, "recStatus");
return (Criteria) this;
}
public Criteria andSexIsNull() {
addCriterion("sex is null");
return (Criteria) this;
}
public Criteria andSexIsNotNull() {
addCriterion("sex is not null");
return (Criteria) this;
}
public Criteria andSexEqualTo(Byte value) {
addCriterion("sex =", value, "sex");
return (Criteria) this;
}
public Criteria andSexNotEqualTo(Byte value) {
addCriterion("sex <>", value, "sex");
return (Criteria) this;
}
public Criteria andSexGreaterThan(Byte value) {
addCriterion("sex >", value, "sex");
return (Criteria) this;
}
public Criteria andSexGreaterThanOrEqualTo(Byte value) {
addCriterion("sex >=", value, "sex");
return (Criteria) this;
}
public Criteria andSexLessThan(Byte value) {
addCriterion("sex <", value, "sex");
return (Criteria) this;
}
public Criteria andSexLessThanOrEqualTo(Byte value) {
addCriterion("sex <=", value, "sex");
return (Criteria) this;
}
public Criteria andSexIn(List<Byte> values) {
addCriterion("sex in", values, "sex");
return (Criteria) this;
}
public Criteria andSexNotIn(List<Byte> values) {
addCriterion("sex not in", values, "sex");
return (Criteria) this;
}
public Criteria andSexBetween(Byte value1, Byte value2) {
addCriterion("sex between", value1, value2, "sex");
return (Criteria) this;
}
public Criteria andSexNotBetween(Byte value1, Byte value2) {
addCriterion("sex not between", value1, value2, "sex");
return (Criteria) this;
}
public Criteria andMaxAgeIsNull() {
addCriterion("max_age is null");
return (Criteria) this;
}
public Criteria andMaxAgeIsNotNull() {
addCriterion("max_age is not null");
return (Criteria) this;
}
public Criteria andMaxAgeEqualTo(Byte value) {
addCriterion("max_age =", value, "maxAge");
return (Criteria) this;
}
public Criteria andMaxAgeNotEqualTo(Byte value) {
addCriterion("max_age <>", value, "maxAge");
return (Criteria) this;
}
public Criteria andMaxAgeGreaterThan(Byte value) {
addCriterion("max_age >", value, "maxAge");
return (Criteria) this;
}
public Criteria andMaxAgeGreaterThanOrEqualTo(Byte value) {
addCriterion("max_age >=", value, "maxAge");
return (Criteria) this;
}
public Criteria andMaxAgeLessThan(Byte value) {
addCriterion("max_age <", value, "maxAge");
return (Criteria) this;
}
public Criteria andMaxAgeLessThanOrEqualTo(Byte value) {
addCriterion("max_age <=", value, "maxAge");
return (Criteria) this;
}
public Criteria andMaxAgeIn(List<Byte> values) {
addCriterion("max_age in", values, "maxAge");
return (Criteria) this;
}
public Criteria andMaxAgeNotIn(List<Byte> values) {
addCriterion("max_age not in", values, "maxAge");
return (Criteria) this;
}
public Criteria andMaxAgeBetween(Byte value1, Byte value2) {
addCriterion("max_age between", value1, value2, "maxAge");
return (Criteria) this;
}
public Criteria andMaxAgeNotBetween(Byte value1, Byte value2) {
addCriterion("max_age not between", value1, value2, "maxAge");
return (Criteria) this;
}
public Criteria andMinAgeIsNull() {
addCriterion("min_age is null");
return (Criteria) this;
}
public Criteria andMinAgeIsNotNull() {
addCriterion("min_age is not null");
return (Criteria) this;
}
public Criteria andMinAgeEqualTo(Byte value) {
addCriterion("min_age =", value, "minAge");
return (Criteria) this;
}
public Criteria andMinAgeNotEqualTo(Byte value) {
addCriterion("min_age <>", value, "minAge");
return (Criteria) this;
}
public Criteria andMinAgeGreaterThan(Byte value) {
addCriterion("min_age >", value, "minAge");
return (Criteria) this;
}
public Criteria andMinAgeGreaterThanOrEqualTo(Byte value) {
addCriterion("min_age >=", value, "minAge");
return (Criteria) this;
}
public Criteria andMinAgeLessThan(Byte value) {
addCriterion("min_age <", value, "minAge");
return (Criteria) this;
}
public Criteria andMinAgeLessThanOrEqualTo(Byte value) {
addCriterion("min_age <=", value, "minAge");
return (Criteria) this;
}
public Criteria andMinAgeIn(List<Byte> values) {
addCriterion("min_age in", values, "minAge");
return (Criteria) this;
}
public Criteria andMinAgeNotIn(List<Byte> values) {
addCriterion("min_age not in", values, "minAge");
return (Criteria) this;
}
public Criteria andMinAgeBetween(Byte value1, Byte value2) {
addCriterion("min_age between", value1, value2, "minAge");
return (Criteria) this;
}
public Criteria andMinAgeNotBetween(Byte value1, Byte value2) {
addCriterion("min_age not between", value1, value2, "minAge");
return (Criteria) this;
}
public Criteria andGroupRemarkIsNull() {
addCriterion("group_remark is null");
return (Criteria) this;
}
public Criteria andGroupRemarkIsNotNull() {
addCriterion("group_remark is not null");
return (Criteria) this;
}
public Criteria andGroupRemarkEqualTo(Byte value) {
addCriterion("group_remark =", value, "groupRemark");
return (Criteria) this;
}
public Criteria andGroupRemarkNotEqualTo(Byte value) {
addCriterion("group_remark <>", value, "groupRemark");
return (Criteria) this;
}
public Criteria andGroupRemarkGreaterThan(Byte value) {
addCriterion("group_remark >", value, "groupRemark");
return (Criteria) this;
}
public Criteria andGroupRemarkGreaterThanOrEqualTo(Byte value) {
addCriterion("group_remark >=", value, "groupRemark");
return (Criteria) this;
}
public Criteria andGroupRemarkLessThan(Byte value) {
addCriterion("group_remark <", value, "groupRemark");
return (Criteria) this;
}
public Criteria andGroupRemarkLessThanOrEqualTo(Byte value) {
addCriterion("group_remark <=", value, "groupRemark");
return (Criteria) this;
}
public Criteria andGroupRemarkIn(List<Byte> values) {
addCriterion("group_remark in", values, "groupRemark");
return (Criteria) this;
}
public Criteria andGroupRemarkNotIn(List<Byte> values) {
addCriterion("group_remark not in", values, "groupRemark");
return (Criteria) this;
}
public Criteria andGroupRemarkBetween(Byte value1, Byte value2) {
addCriterion("group_remark between", value1, value2, "groupRemark");
return (Criteria) this;
}
public Criteria andGroupRemarkNotBetween(Byte value1, Byte value2) {
addCriterion("group_remark not between", value1, value2, "groupRemark");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {

88
mt/src/main/java/com/ccsens/mt/bean/po/CompetePlayer.java

@ -34,6 +34,22 @@ public class CompetePlayer implements Serializable {
private Byte recStatus;
private Long competeTimeId;
private Long idCardFrontFile;
private Long idCardBackFile;
private Long idPhotoFile;
private Long studentRecordFile;
private Long healthRecordFile;
private Long insuranceRecordFile;
private Byte groupRemark;
private static final long serialVersionUID = 1L;
public Long getId() {
@ -156,6 +172,70 @@ public class CompetePlayer implements Serializable {
this.recStatus = recStatus;
}
public Long getCompeteTimeId() {
return competeTimeId;
}
public void setCompeteTimeId(Long competeTimeId) {
this.competeTimeId = competeTimeId;
}
public Long getIdCardFrontFile() {
return idCardFrontFile;
}
public void setIdCardFrontFile(Long idCardFrontFile) {
this.idCardFrontFile = idCardFrontFile;
}
public Long getIdCardBackFile() {
return idCardBackFile;
}
public void setIdCardBackFile(Long idCardBackFile) {
this.idCardBackFile = idCardBackFile;
}
public Long getIdPhotoFile() {
return idPhotoFile;
}
public void setIdPhotoFile(Long idPhotoFile) {
this.idPhotoFile = idPhotoFile;
}
public Long getStudentRecordFile() {
return studentRecordFile;
}
public void setStudentRecordFile(Long studentRecordFile) {
this.studentRecordFile = studentRecordFile;
}
public Long getHealthRecordFile() {
return healthRecordFile;
}
public void setHealthRecordFile(Long healthRecordFile) {
this.healthRecordFile = healthRecordFile;
}
public Long getInsuranceRecordFile() {
return insuranceRecordFile;
}
public void setInsuranceRecordFile(Long insuranceRecordFile) {
this.insuranceRecordFile = insuranceRecordFile;
}
public Byte getGroupRemark() {
return groupRemark;
}
public void setGroupRemark(Byte groupRemark) {
this.groupRemark = groupRemark;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -177,6 +257,14 @@ public class CompetePlayer implements Serializable {
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append(", competeTimeId=").append(competeTimeId);
sb.append(", idCardFrontFile=").append(idCardFrontFile);
sb.append(", idCardBackFile=").append(idCardBackFile);
sb.append(", idPhotoFile=").append(idPhotoFile);
sb.append(", studentRecordFile=").append(studentRecordFile);
sb.append(", healthRecordFile=").append(healthRecordFile);
sb.append(", insuranceRecordFile=").append(insuranceRecordFile);
sb.append(", groupRemark=").append(groupRemark);
sb.append("]");
return sb.toString();
}

480
mt/src/main/java/com/ccsens/mt/bean/po/CompetePlayerExample.java

@ -1064,6 +1064,486 @@ public class CompetePlayerExample {
addCriterion("rec_status not between", value1, value2, "recStatus");
return (Criteria) this;
}
public Criteria andCompeteTimeIdIsNull() {
addCriterion("compete_time_id is null");
return (Criteria) this;
}
public Criteria andCompeteTimeIdIsNotNull() {
addCriterion("compete_time_id is not null");
return (Criteria) this;
}
public Criteria andCompeteTimeIdEqualTo(Long value) {
addCriterion("compete_time_id =", value, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdNotEqualTo(Long value) {
addCriterion("compete_time_id <>", value, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdGreaterThan(Long value) {
addCriterion("compete_time_id >", value, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdGreaterThanOrEqualTo(Long value) {
addCriterion("compete_time_id >=", value, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdLessThan(Long value) {
addCriterion("compete_time_id <", value, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdLessThanOrEqualTo(Long value) {
addCriterion("compete_time_id <=", value, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdIn(List<Long> values) {
addCriterion("compete_time_id in", values, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdNotIn(List<Long> values) {
addCriterion("compete_time_id not in", values, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdBetween(Long value1, Long value2) {
addCriterion("compete_time_id between", value1, value2, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdNotBetween(Long value1, Long value2) {
addCriterion("compete_time_id not between", value1, value2, "competeTimeId");
return (Criteria) this;
}
public Criteria andIdCardFrontFileIsNull() {
addCriterion("id_card_front_file is null");
return (Criteria) this;
}
public Criteria andIdCardFrontFileIsNotNull() {
addCriterion("id_card_front_file is not null");
return (Criteria) this;
}
public Criteria andIdCardFrontFileEqualTo(Long value) {
addCriterion("id_card_front_file =", value, "idCardFrontFile");
return (Criteria) this;
}
public Criteria andIdCardFrontFileNotEqualTo(Long value) {
addCriterion("id_card_front_file <>", value, "idCardFrontFile");
return (Criteria) this;
}
public Criteria andIdCardFrontFileGreaterThan(Long value) {
addCriterion("id_card_front_file >", value, "idCardFrontFile");
return (Criteria) this;
}
public Criteria andIdCardFrontFileGreaterThanOrEqualTo(Long value) {
addCriterion("id_card_front_file >=", value, "idCardFrontFile");
return (Criteria) this;
}
public Criteria andIdCardFrontFileLessThan(Long value) {
addCriterion("id_card_front_file <", value, "idCardFrontFile");
return (Criteria) this;
}
public Criteria andIdCardFrontFileLessThanOrEqualTo(Long value) {
addCriterion("id_card_front_file <=", value, "idCardFrontFile");
return (Criteria) this;
}
public Criteria andIdCardFrontFileIn(List<Long> values) {
addCriterion("id_card_front_file in", values, "idCardFrontFile");
return (Criteria) this;
}
public Criteria andIdCardFrontFileNotIn(List<Long> values) {
addCriterion("id_card_front_file not in", values, "idCardFrontFile");
return (Criteria) this;
}
public Criteria andIdCardFrontFileBetween(Long value1, Long value2) {
addCriterion("id_card_front_file between", value1, value2, "idCardFrontFile");
return (Criteria) this;
}
public Criteria andIdCardFrontFileNotBetween(Long value1, Long value2) {
addCriterion("id_card_front_file not between", value1, value2, "idCardFrontFile");
return (Criteria) this;
}
public Criteria andIdCardBackFileIsNull() {
addCriterion("id_card_back_file is null");
return (Criteria) this;
}
public Criteria andIdCardBackFileIsNotNull() {
addCriterion("id_card_back_file is not null");
return (Criteria) this;
}
public Criteria andIdCardBackFileEqualTo(Long value) {
addCriterion("id_card_back_file =", value, "idCardBackFile");
return (Criteria) this;
}
public Criteria andIdCardBackFileNotEqualTo(Long value) {
addCriterion("id_card_back_file <>", value, "idCardBackFile");
return (Criteria) this;
}
public Criteria andIdCardBackFileGreaterThan(Long value) {
addCriterion("id_card_back_file >", value, "idCardBackFile");
return (Criteria) this;
}
public Criteria andIdCardBackFileGreaterThanOrEqualTo(Long value) {
addCriterion("id_card_back_file >=", value, "idCardBackFile");
return (Criteria) this;
}
public Criteria andIdCardBackFileLessThan(Long value) {
addCriterion("id_card_back_file <", value, "idCardBackFile");
return (Criteria) this;
}
public Criteria andIdCardBackFileLessThanOrEqualTo(Long value) {
addCriterion("id_card_back_file <=", value, "idCardBackFile");
return (Criteria) this;
}
public Criteria andIdCardBackFileIn(List<Long> values) {
addCriterion("id_card_back_file in", values, "idCardBackFile");
return (Criteria) this;
}
public Criteria andIdCardBackFileNotIn(List<Long> values) {
addCriterion("id_card_back_file not in", values, "idCardBackFile");
return (Criteria) this;
}
public Criteria andIdCardBackFileBetween(Long value1, Long value2) {
addCriterion("id_card_back_file between", value1, value2, "idCardBackFile");
return (Criteria) this;
}
public Criteria andIdCardBackFileNotBetween(Long value1, Long value2) {
addCriterion("id_card_back_file not between", value1, value2, "idCardBackFile");
return (Criteria) this;
}
public Criteria andIdPhotoFileIsNull() {
addCriterion("id_photo_file is null");
return (Criteria) this;
}
public Criteria andIdPhotoFileIsNotNull() {
addCriterion("id_photo_file is not null");
return (Criteria) this;
}
public Criteria andIdPhotoFileEqualTo(Long value) {
addCriterion("id_photo_file =", value, "idPhotoFile");
return (Criteria) this;
}
public Criteria andIdPhotoFileNotEqualTo(Long value) {
addCriterion("id_photo_file <>", value, "idPhotoFile");
return (Criteria) this;
}
public Criteria andIdPhotoFileGreaterThan(Long value) {
addCriterion("id_photo_file >", value, "idPhotoFile");
return (Criteria) this;
}
public Criteria andIdPhotoFileGreaterThanOrEqualTo(Long value) {
addCriterion("id_photo_file >=", value, "idPhotoFile");
return (Criteria) this;
}
public Criteria andIdPhotoFileLessThan(Long value) {
addCriterion("id_photo_file <", value, "idPhotoFile");
return (Criteria) this;
}
public Criteria andIdPhotoFileLessThanOrEqualTo(Long value) {
addCriterion("id_photo_file <=", value, "idPhotoFile");
return (Criteria) this;
}
public Criteria andIdPhotoFileIn(List<Long> values) {
addCriterion("id_photo_file in", values, "idPhotoFile");
return (Criteria) this;
}
public Criteria andIdPhotoFileNotIn(List<Long> values) {
addCriterion("id_photo_file not in", values, "idPhotoFile");
return (Criteria) this;
}
public Criteria andIdPhotoFileBetween(Long value1, Long value2) {
addCriterion("id_photo_file between", value1, value2, "idPhotoFile");
return (Criteria) this;
}
public Criteria andIdPhotoFileNotBetween(Long value1, Long value2) {
addCriterion("id_photo_file not between", value1, value2, "idPhotoFile");
return (Criteria) this;
}
public Criteria andStudentRecordFileIsNull() {
addCriterion("student_record_file is null");
return (Criteria) this;
}
public Criteria andStudentRecordFileIsNotNull() {
addCriterion("student_record_file is not null");
return (Criteria) this;
}
public Criteria andStudentRecordFileEqualTo(Long value) {
addCriterion("student_record_file =", value, "studentRecordFile");
return (Criteria) this;
}
public Criteria andStudentRecordFileNotEqualTo(Long value) {
addCriterion("student_record_file <>", value, "studentRecordFile");
return (Criteria) this;
}
public Criteria andStudentRecordFileGreaterThan(Long value) {
addCriterion("student_record_file >", value, "studentRecordFile");
return (Criteria) this;
}
public Criteria andStudentRecordFileGreaterThanOrEqualTo(Long value) {
addCriterion("student_record_file >=", value, "studentRecordFile");
return (Criteria) this;
}
public Criteria andStudentRecordFileLessThan(Long value) {
addCriterion("student_record_file <", value, "studentRecordFile");
return (Criteria) this;
}
public Criteria andStudentRecordFileLessThanOrEqualTo(Long value) {
addCriterion("student_record_file <=", value, "studentRecordFile");
return (Criteria) this;
}
public Criteria andStudentRecordFileIn(List<Long> values) {
addCriterion("student_record_file in", values, "studentRecordFile");
return (Criteria) this;
}
public Criteria andStudentRecordFileNotIn(List<Long> values) {
addCriterion("student_record_file not in", values, "studentRecordFile");
return (Criteria) this;
}
public Criteria andStudentRecordFileBetween(Long value1, Long value2) {
addCriterion("student_record_file between", value1, value2, "studentRecordFile");
return (Criteria) this;
}
public Criteria andStudentRecordFileNotBetween(Long value1, Long value2) {
addCriterion("student_record_file not between", value1, value2, "studentRecordFile");
return (Criteria) this;
}
public Criteria andHealthRecordFileIsNull() {
addCriterion("health_record_file is null");
return (Criteria) this;
}
public Criteria andHealthRecordFileIsNotNull() {
addCriterion("health_record_file is not null");
return (Criteria) this;
}
public Criteria andHealthRecordFileEqualTo(Long value) {
addCriterion("health_record_file =", value, "healthRecordFile");
return (Criteria) this;
}
public Criteria andHealthRecordFileNotEqualTo(Long value) {
addCriterion("health_record_file <>", value, "healthRecordFile");
return (Criteria) this;
}
public Criteria andHealthRecordFileGreaterThan(Long value) {
addCriterion("health_record_file >", value, "healthRecordFile");
return (Criteria) this;
}
public Criteria andHealthRecordFileGreaterThanOrEqualTo(Long value) {
addCriterion("health_record_file >=", value, "healthRecordFile");
return (Criteria) this;
}
public Criteria andHealthRecordFileLessThan(Long value) {
addCriterion("health_record_file <", value, "healthRecordFile");
return (Criteria) this;
}
public Criteria andHealthRecordFileLessThanOrEqualTo(Long value) {
addCriterion("health_record_file <=", value, "healthRecordFile");
return (Criteria) this;
}
public Criteria andHealthRecordFileIn(List<Long> values) {
addCriterion("health_record_file in", values, "healthRecordFile");
return (Criteria) this;
}
public Criteria andHealthRecordFileNotIn(List<Long> values) {
addCriterion("health_record_file not in", values, "healthRecordFile");
return (Criteria) this;
}
public Criteria andHealthRecordFileBetween(Long value1, Long value2) {
addCriterion("health_record_file between", value1, value2, "healthRecordFile");
return (Criteria) this;
}
public Criteria andHealthRecordFileNotBetween(Long value1, Long value2) {
addCriterion("health_record_file not between", value1, value2, "healthRecordFile");
return (Criteria) this;
}
public Criteria andInsuranceRecordFileIsNull() {
addCriterion("insurance_record_file is null");
return (Criteria) this;
}
public Criteria andInsuranceRecordFileIsNotNull() {
addCriterion("insurance_record_file is not null");
return (Criteria) this;
}
public Criteria andInsuranceRecordFileEqualTo(Long value) {
addCriterion("insurance_record_file =", value, "insuranceRecordFile");
return (Criteria) this;
}
public Criteria andInsuranceRecordFileNotEqualTo(Long value) {
addCriterion("insurance_record_file <>", value, "insuranceRecordFile");
return (Criteria) this;
}
public Criteria andInsuranceRecordFileGreaterThan(Long value) {
addCriterion("insurance_record_file >", value, "insuranceRecordFile");
return (Criteria) this;
}
public Criteria andInsuranceRecordFileGreaterThanOrEqualTo(Long value) {
addCriterion("insurance_record_file >=", value, "insuranceRecordFile");
return (Criteria) this;
}
public Criteria andInsuranceRecordFileLessThan(Long value) {
addCriterion("insurance_record_file <", value, "insuranceRecordFile");
return (Criteria) this;
}
public Criteria andInsuranceRecordFileLessThanOrEqualTo(Long value) {
addCriterion("insurance_record_file <=", value, "insuranceRecordFile");
return (Criteria) this;
}
public Criteria andInsuranceRecordFileIn(List<Long> values) {
addCriterion("insurance_record_file in", values, "insuranceRecordFile");
return (Criteria) this;
}
public Criteria andInsuranceRecordFileNotIn(List<Long> values) {
addCriterion("insurance_record_file not in", values, "insuranceRecordFile");
return (Criteria) this;
}
public Criteria andInsuranceRecordFileBetween(Long value1, Long value2) {
addCriterion("insurance_record_file between", value1, value2, "insuranceRecordFile");
return (Criteria) this;
}
public Criteria andInsuranceRecordFileNotBetween(Long value1, Long value2) {
addCriterion("insurance_record_file not between", value1, value2, "insuranceRecordFile");
return (Criteria) this;
}
public Criteria andGroupRemarkIsNull() {
addCriterion("group_remark is null");
return (Criteria) this;
}
public Criteria andGroupRemarkIsNotNull() {
addCriterion("group_remark is not null");
return (Criteria) this;
}
public Criteria andGroupRemarkEqualTo(Byte value) {
addCriterion("group_remark =", value, "groupRemark");
return (Criteria) this;
}
public Criteria andGroupRemarkNotEqualTo(Byte value) {
addCriterion("group_remark <>", value, "groupRemark");
return (Criteria) this;
}
public Criteria andGroupRemarkGreaterThan(Byte value) {
addCriterion("group_remark >", value, "groupRemark");
return (Criteria) this;
}
public Criteria andGroupRemarkGreaterThanOrEqualTo(Byte value) {
addCriterion("group_remark >=", value, "groupRemark");
return (Criteria) this;
}
public Criteria andGroupRemarkLessThan(Byte value) {
addCriterion("group_remark <", value, "groupRemark");
return (Criteria) this;
}
public Criteria andGroupRemarkLessThanOrEqualTo(Byte value) {
addCriterion("group_remark <=", value, "groupRemark");
return (Criteria) this;
}
public Criteria andGroupRemarkIn(List<Byte> values) {
addCriterion("group_remark in", values, "groupRemark");
return (Criteria) this;
}
public Criteria andGroupRemarkNotIn(List<Byte> values) {
addCriterion("group_remark not in", values, "groupRemark");
return (Criteria) this;
}
public Criteria andGroupRemarkBetween(Byte value1, Byte value2) {
addCriterion("group_remark between", value1, value2, "groupRemark");
return (Criteria) this;
}
public Criteria andGroupRemarkNotBetween(Byte value1, Byte value2) {
addCriterion("group_remark not between", value1, value2, "groupRemark");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {

95
mt/src/main/java/com/ccsens/mt/bean/po/CompetePlayerFamily.java

@ -0,0 +1,95 @@
package com.ccsens.mt.bean.po;
import java.io.Serializable;
import java.util.Date;
public class CompetePlayerFamily implements Serializable {
private Long id;
private Long playerId;
private Long childrenId;
private String description;
private Date createdAt;
private Date updatedAt;
private Byte recStatus;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getPlayerId() {
return playerId;
}
public void setPlayerId(Long playerId) {
this.playerId = playerId;
}
public Long getChildrenId() {
return childrenId;
}
public void setChildrenId(Long childrenId) {
this.childrenId = childrenId;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description == null ? null : description.trim();
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public Byte getRecStatus() {
return recStatus;
}
public void setRecStatus(Byte recStatus) {
this.recStatus = recStatus;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", playerId=").append(playerId);
sb.append(", childrenId=").append(childrenId);
sb.append(", description=").append(description);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append("]");
return sb.toString();
}
}

631
mt/src/main/java/com/ccsens/mt/bean/po/CompetePlayerFamilyExample.java

@ -0,0 +1,631 @@
package com.ccsens.mt.bean.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class CompetePlayerFamilyExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public CompetePlayerFamilyExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andPlayerIdIsNull() {
addCriterion("player_id is null");
return (Criteria) this;
}
public Criteria andPlayerIdIsNotNull() {
addCriterion("player_id is not null");
return (Criteria) this;
}
public Criteria andPlayerIdEqualTo(Long value) {
addCriterion("player_id =", value, "playerId");
return (Criteria) this;
}
public Criteria andPlayerIdNotEqualTo(Long value) {
addCriterion("player_id <>", value, "playerId");
return (Criteria) this;
}
public Criteria andPlayerIdGreaterThan(Long value) {
addCriterion("player_id >", value, "playerId");
return (Criteria) this;
}
public Criteria andPlayerIdGreaterThanOrEqualTo(Long value) {
addCriterion("player_id >=", value, "playerId");
return (Criteria) this;
}
public Criteria andPlayerIdLessThan(Long value) {
addCriterion("player_id <", value, "playerId");
return (Criteria) this;
}
public Criteria andPlayerIdLessThanOrEqualTo(Long value) {
addCriterion("player_id <=", value, "playerId");
return (Criteria) this;
}
public Criteria andPlayerIdIn(List<Long> values) {
addCriterion("player_id in", values, "playerId");
return (Criteria) this;
}
public Criteria andPlayerIdNotIn(List<Long> values) {
addCriterion("player_id not in", values, "playerId");
return (Criteria) this;
}
public Criteria andPlayerIdBetween(Long value1, Long value2) {
addCriterion("player_id between", value1, value2, "playerId");
return (Criteria) this;
}
public Criteria andPlayerIdNotBetween(Long value1, Long value2) {
addCriterion("player_id not between", value1, value2, "playerId");
return (Criteria) this;
}
public Criteria andChildrenIdIsNull() {
addCriterion("children_id is null");
return (Criteria) this;
}
public Criteria andChildrenIdIsNotNull() {
addCriterion("children_id is not null");
return (Criteria) this;
}
public Criteria andChildrenIdEqualTo(Long value) {
addCriterion("children_id =", value, "childrenId");
return (Criteria) this;
}
public Criteria andChildrenIdNotEqualTo(Long value) {
addCriterion("children_id <>", value, "childrenId");
return (Criteria) this;
}
public Criteria andChildrenIdGreaterThan(Long value) {
addCriterion("children_id >", value, "childrenId");
return (Criteria) this;
}
public Criteria andChildrenIdGreaterThanOrEqualTo(Long value) {
addCriterion("children_id >=", value, "childrenId");
return (Criteria) this;
}
public Criteria andChildrenIdLessThan(Long value) {
addCriterion("children_id <", value, "childrenId");
return (Criteria) this;
}
public Criteria andChildrenIdLessThanOrEqualTo(Long value) {
addCriterion("children_id <=", value, "childrenId");
return (Criteria) this;
}
public Criteria andChildrenIdIn(List<Long> values) {
addCriterion("children_id in", values, "childrenId");
return (Criteria) this;
}
public Criteria andChildrenIdNotIn(List<Long> values) {
addCriterion("children_id not in", values, "childrenId");
return (Criteria) this;
}
public Criteria andChildrenIdBetween(Long value1, Long value2) {
addCriterion("children_id between", value1, value2, "childrenId");
return (Criteria) this;
}
public Criteria andChildrenIdNotBetween(Long value1, Long value2) {
addCriterion("children_id not between", value1, value2, "childrenId");
return (Criteria) this;
}
public Criteria andDescriptionIsNull() {
addCriterion("description is null");
return (Criteria) this;
}
public Criteria andDescriptionIsNotNull() {
addCriterion("description is not null");
return (Criteria) this;
}
public Criteria andDescriptionEqualTo(String value) {
addCriterion("description =", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionNotEqualTo(String value) {
addCriterion("description <>", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionGreaterThan(String value) {
addCriterion("description >", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionGreaterThanOrEqualTo(String value) {
addCriterion("description >=", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionLessThan(String value) {
addCriterion("description <", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionLessThanOrEqualTo(String value) {
addCriterion("description <=", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionLike(String value) {
addCriterion("description like", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionNotLike(String value) {
addCriterion("description not like", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionIn(List<String> values) {
addCriterion("description in", values, "description");
return (Criteria) this;
}
public Criteria andDescriptionNotIn(List<String> values) {
addCriterion("description not in", values, "description");
return (Criteria) this;
}
public Criteria andDescriptionBetween(String value1, String value2) {
addCriterion("description between", value1, value2, "description");
return (Criteria) this;
}
public Criteria andDescriptionNotBetween(String value1, String value2) {
addCriterion("description not between", value1, value2, "description");
return (Criteria) this;
}
public Criteria andCreatedAtIsNull() {
addCriterion("created_at is null");
return (Criteria) this;
}
public Criteria andCreatedAtIsNotNull() {
addCriterion("created_at is not null");
return (Criteria) this;
}
public Criteria andCreatedAtEqualTo(Date value) {
addCriterion("created_at =", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotEqualTo(Date value) {
addCriterion("created_at <>", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThan(Date value) {
addCriterion("created_at >", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("created_at >=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThan(Date value) {
addCriterion("created_at <", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThanOrEqualTo(Date value) {
addCriterion("created_at <=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtIn(List<Date> values) {
addCriterion("created_at in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotIn(List<Date> values) {
addCriterion("created_at not in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtBetween(Date value1, Date value2) {
addCriterion("created_at between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotBetween(Date value1, Date value2) {
addCriterion("created_at not between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNull() {
addCriterion("updated_at is null");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNotNull() {
addCriterion("updated_at is not null");
return (Criteria) this;
}
public Criteria andUpdatedAtEqualTo(Date value) {
addCriterion("updated_at =", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotEqualTo(Date value) {
addCriterion("updated_at <>", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThan(Date value) {
addCriterion("updated_at >", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("updated_at >=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThan(Date value) {
addCriterion("updated_at <", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThanOrEqualTo(Date value) {
addCriterion("updated_at <=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIn(List<Date> values) {
addCriterion("updated_at in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotIn(List<Date> values) {
addCriterion("updated_at not in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtBetween(Date value1, Date value2) {
addCriterion("updated_at between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotBetween(Date value1, Date value2) {
addCriterion("updated_at not between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andRecStatusIsNull() {
addCriterion("rec_status is null");
return (Criteria) this;
}
public Criteria andRecStatusIsNotNull() {
addCriterion("rec_status is not null");
return (Criteria) this;
}
public Criteria andRecStatusEqualTo(Byte value) {
addCriterion("rec_status =", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotEqualTo(Byte value) {
addCriterion("rec_status <>", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThan(Byte value) {
addCriterion("rec_status >", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) {
addCriterion("rec_status >=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThan(Byte value) {
addCriterion("rec_status <", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThanOrEqualTo(Byte value) {
addCriterion("rec_status <=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusIn(List<Byte> values) {
addCriterion("rec_status in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotIn(List<Byte> values) {
addCriterion("rec_status not in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusBetween(Byte value1, Byte value2) {
addCriterion("rec_status between", value1, value2, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotBetween(Byte value1, Byte value2) {
addCriterion("rec_status not between", value1, value2, "recStatus");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

11
mt/src/main/java/com/ccsens/mt/bean/po/CompeteProject.java

@ -30,6 +30,8 @@ public class CompeteProject implements Serializable {
private Byte recStatus;
private Long competeTimeId;
private static final long serialVersionUID = 1L;
public Long getId() {
@ -136,6 +138,14 @@ public class CompeteProject implements Serializable {
this.recStatus = recStatus;
}
public Long getCompeteTimeId() {
return competeTimeId;
}
public void setCompeteTimeId(Long competeTimeId) {
this.competeTimeId = competeTimeId;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -155,6 +165,7 @@ public class CompeteProject implements Serializable {
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append(", competeTimeId=").append(competeTimeId);
sb.append("]");
return sb.toString();
}

117
mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectConfig.java

@ -0,0 +1,117 @@
package com.ccsens.mt.bean.po;
import java.io.Serializable;
import java.util.Date;
public class CompeteProjectConfig implements Serializable {
private Long id;
private Long projectId;
private Integer siteNum;
private Long startTime;
private Long endTime;
private Date createdAt;
private Date updatedAt;
private Byte recStatus;
private Long projectDuration;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getProjectId() {
return projectId;
}
public void setProjectId(Long projectId) {
this.projectId = projectId;
}
public Integer getSiteNum() {
return siteNum;
}
public void setSiteNum(Integer siteNum) {
this.siteNum = siteNum;
}
public Long getStartTime() {
return startTime;
}
public void setStartTime(Long startTime) {
this.startTime = startTime;
}
public Long getEndTime() {
return endTime;
}
public void setEndTime(Long endTime) {
this.endTime = endTime;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public Byte getRecStatus() {
return recStatus;
}
public void setRecStatus(Byte recStatus) {
this.recStatus = recStatus;
}
public Long getProjectDuration() {
return projectDuration;
}
public void setProjectDuration(Long projectDuration) {
this.projectDuration = projectDuration;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", projectId=").append(projectId);
sb.append(", siteNum=").append(siteNum);
sb.append(", startTime=").append(startTime);
sb.append(", endTime=").append(endTime);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append(", projectDuration=").append(projectDuration);
sb.append("]");
return sb.toString();
}
}

741
mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectConfigExample.java

@ -0,0 +1,741 @@
package com.ccsens.mt.bean.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class CompeteProjectConfigExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public CompeteProjectConfigExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andProjectIdIsNull() {
addCriterion("project_id is null");
return (Criteria) this;
}
public Criteria andProjectIdIsNotNull() {
addCriterion("project_id is not null");
return (Criteria) this;
}
public Criteria andProjectIdEqualTo(Long value) {
addCriterion("project_id =", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdNotEqualTo(Long value) {
addCriterion("project_id <>", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdGreaterThan(Long value) {
addCriterion("project_id >", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdGreaterThanOrEqualTo(Long value) {
addCriterion("project_id >=", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdLessThan(Long value) {
addCriterion("project_id <", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdLessThanOrEqualTo(Long value) {
addCriterion("project_id <=", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdIn(List<Long> values) {
addCriterion("project_id in", values, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdNotIn(List<Long> values) {
addCriterion("project_id not in", values, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdBetween(Long value1, Long value2) {
addCriterion("project_id between", value1, value2, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdNotBetween(Long value1, Long value2) {
addCriterion("project_id not between", value1, value2, "projectId");
return (Criteria) this;
}
public Criteria andSiteNumIsNull() {
addCriterion("site_num is null");
return (Criteria) this;
}
public Criteria andSiteNumIsNotNull() {
addCriterion("site_num is not null");
return (Criteria) this;
}
public Criteria andSiteNumEqualTo(Integer value) {
addCriterion("site_num =", value, "siteNum");
return (Criteria) this;
}
public Criteria andSiteNumNotEqualTo(Integer value) {
addCriterion("site_num <>", value, "siteNum");
return (Criteria) this;
}
public Criteria andSiteNumGreaterThan(Integer value) {
addCriterion("site_num >", value, "siteNum");
return (Criteria) this;
}
public Criteria andSiteNumGreaterThanOrEqualTo(Integer value) {
addCriterion("site_num >=", value, "siteNum");
return (Criteria) this;
}
public Criteria andSiteNumLessThan(Integer value) {
addCriterion("site_num <", value, "siteNum");
return (Criteria) this;
}
public Criteria andSiteNumLessThanOrEqualTo(Integer value) {
addCriterion("site_num <=", value, "siteNum");
return (Criteria) this;
}
public Criteria andSiteNumIn(List<Integer> values) {
addCriterion("site_num in", values, "siteNum");
return (Criteria) this;
}
public Criteria andSiteNumNotIn(List<Integer> values) {
addCriterion("site_num not in", values, "siteNum");
return (Criteria) this;
}
public Criteria andSiteNumBetween(Integer value1, Integer value2) {
addCriterion("site_num between", value1, value2, "siteNum");
return (Criteria) this;
}
public Criteria andSiteNumNotBetween(Integer value1, Integer value2) {
addCriterion("site_num not between", value1, value2, "siteNum");
return (Criteria) this;
}
public Criteria andStartTimeIsNull() {
addCriterion("start_time is null");
return (Criteria) this;
}
public Criteria andStartTimeIsNotNull() {
addCriterion("start_time is not null");
return (Criteria) this;
}
public Criteria andStartTimeEqualTo(Long value) {
addCriterion("start_time =", value, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeNotEqualTo(Long value) {
addCriterion("start_time <>", value, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeGreaterThan(Long value) {
addCriterion("start_time >", value, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeGreaterThanOrEqualTo(Long value) {
addCriterion("start_time >=", value, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeLessThan(Long value) {
addCriterion("start_time <", value, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeLessThanOrEqualTo(Long value) {
addCriterion("start_time <=", value, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeIn(List<Long> values) {
addCriterion("start_time in", values, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeNotIn(List<Long> values) {
addCriterion("start_time not in", values, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeBetween(Long value1, Long value2) {
addCriterion("start_time between", value1, value2, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeNotBetween(Long value1, Long value2) {
addCriterion("start_time not between", value1, value2, "startTime");
return (Criteria) this;
}
public Criteria andEndTimeIsNull() {
addCriterion("end_time is null");
return (Criteria) this;
}
public Criteria andEndTimeIsNotNull() {
addCriterion("end_time is not null");
return (Criteria) this;
}
public Criteria andEndTimeEqualTo(Long value) {
addCriterion("end_time =", value, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeNotEqualTo(Long value) {
addCriterion("end_time <>", value, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeGreaterThan(Long value) {
addCriterion("end_time >", value, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeGreaterThanOrEqualTo(Long value) {
addCriterion("end_time >=", value, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeLessThan(Long value) {
addCriterion("end_time <", value, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeLessThanOrEqualTo(Long value) {
addCriterion("end_time <=", value, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeIn(List<Long> values) {
addCriterion("end_time in", values, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeNotIn(List<Long> values) {
addCriterion("end_time not in", values, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeBetween(Long value1, Long value2) {
addCriterion("end_time between", value1, value2, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeNotBetween(Long value1, Long value2) {
addCriterion("end_time not between", value1, value2, "endTime");
return (Criteria) this;
}
public Criteria andCreatedAtIsNull() {
addCriterion("created_at is null");
return (Criteria) this;
}
public Criteria andCreatedAtIsNotNull() {
addCriterion("created_at is not null");
return (Criteria) this;
}
public Criteria andCreatedAtEqualTo(Date value) {
addCriterion("created_at =", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotEqualTo(Date value) {
addCriterion("created_at <>", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThan(Date value) {
addCriterion("created_at >", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("created_at >=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThan(Date value) {
addCriterion("created_at <", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThanOrEqualTo(Date value) {
addCriterion("created_at <=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtIn(List<Date> values) {
addCriterion("created_at in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotIn(List<Date> values) {
addCriterion("created_at not in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtBetween(Date value1, Date value2) {
addCriterion("created_at between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotBetween(Date value1, Date value2) {
addCriterion("created_at not between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNull() {
addCriterion("updated_at is null");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNotNull() {
addCriterion("updated_at is not null");
return (Criteria) this;
}
public Criteria andUpdatedAtEqualTo(Date value) {
addCriterion("updated_at =", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotEqualTo(Date value) {
addCriterion("updated_at <>", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThan(Date value) {
addCriterion("updated_at >", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("updated_at >=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThan(Date value) {
addCriterion("updated_at <", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThanOrEqualTo(Date value) {
addCriterion("updated_at <=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIn(List<Date> values) {
addCriterion("updated_at in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotIn(List<Date> values) {
addCriterion("updated_at not in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtBetween(Date value1, Date value2) {
addCriterion("updated_at between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotBetween(Date value1, Date value2) {
addCriterion("updated_at not between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andRecStatusIsNull() {
addCriterion("rec_status is null");
return (Criteria) this;
}
public Criteria andRecStatusIsNotNull() {
addCriterion("rec_status is not null");
return (Criteria) this;
}
public Criteria andRecStatusEqualTo(Byte value) {
addCriterion("rec_status =", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotEqualTo(Byte value) {
addCriterion("rec_status <>", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThan(Byte value) {
addCriterion("rec_status >", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) {
addCriterion("rec_status >=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThan(Byte value) {
addCriterion("rec_status <", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThanOrEqualTo(Byte value) {
addCriterion("rec_status <=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusIn(List<Byte> values) {
addCriterion("rec_status in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotIn(List<Byte> values) {
addCriterion("rec_status not in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusBetween(Byte value1, Byte value2) {
addCriterion("rec_status between", value1, value2, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotBetween(Byte value1, Byte value2) {
addCriterion("rec_status not between", value1, value2, "recStatus");
return (Criteria) this;
}
public Criteria andProjectDurationIsNull() {
addCriterion("project_duration is null");
return (Criteria) this;
}
public Criteria andProjectDurationIsNotNull() {
addCriterion("project_duration is not null");
return (Criteria) this;
}
public Criteria andProjectDurationEqualTo(Long value) {
addCriterion("project_duration =", value, "projectDuration");
return (Criteria) this;
}
public Criteria andProjectDurationNotEqualTo(Long value) {
addCriterion("project_duration <>", value, "projectDuration");
return (Criteria) this;
}
public Criteria andProjectDurationGreaterThan(Long value) {
addCriterion("project_duration >", value, "projectDuration");
return (Criteria) this;
}
public Criteria andProjectDurationGreaterThanOrEqualTo(Long value) {
addCriterion("project_duration >=", value, "projectDuration");
return (Criteria) this;
}
public Criteria andProjectDurationLessThan(Long value) {
addCriterion("project_duration <", value, "projectDuration");
return (Criteria) this;
}
public Criteria andProjectDurationLessThanOrEqualTo(Long value) {
addCriterion("project_duration <=", value, "projectDuration");
return (Criteria) this;
}
public Criteria andProjectDurationIn(List<Long> values) {
addCriterion("project_duration in", values, "projectDuration");
return (Criteria) this;
}
public Criteria andProjectDurationNotIn(List<Long> values) {
addCriterion("project_duration not in", values, "projectDuration");
return (Criteria) this;
}
public Criteria andProjectDurationBetween(Long value1, Long value2) {
addCriterion("project_duration between", value1, value2, "projectDuration");
return (Criteria) this;
}
public Criteria andProjectDurationNotBetween(Long value1, Long value2) {
addCriterion("project_duration not between", value1, value2, "projectDuration");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

60
mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectExample.java

@ -894,6 +894,66 @@ public class CompeteProjectExample {
addCriterion("rec_status not between", value1, value2, "recStatus");
return (Criteria) this;
}
public Criteria andCompeteTimeIdIsNull() {
addCriterion("compete_time_id is null");
return (Criteria) this;
}
public Criteria andCompeteTimeIdIsNotNull() {
addCriterion("compete_time_id is not null");
return (Criteria) this;
}
public Criteria andCompeteTimeIdEqualTo(Long value) {
addCriterion("compete_time_id =", value, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdNotEqualTo(Long value) {
addCriterion("compete_time_id <>", value, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdGreaterThan(Long value) {
addCriterion("compete_time_id >", value, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdGreaterThanOrEqualTo(Long value) {
addCriterion("compete_time_id >=", value, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdLessThan(Long value) {
addCriterion("compete_time_id <", value, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdLessThanOrEqualTo(Long value) {
addCriterion("compete_time_id <=", value, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdIn(List<Long> values) {
addCriterion("compete_time_id in", values, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdNotIn(List<Long> values) {
addCriterion("compete_time_id not in", values, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdBetween(Long value1, Long value2) {
addCriterion("compete_time_id between", value1, value2, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdNotBetween(Long value1, Long value2) {
addCriterion("compete_time_id not between", value1, value2, "competeTimeId");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {

95
mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectGroup.java

@ -0,0 +1,95 @@
package com.ccsens.mt.bean.po;
import java.io.Serializable;
import java.util.Date;
public class CompeteProjectGroup implements Serializable {
private Long id;
private Long projectId;
private Long groupId;
private String description;
private Date createdAt;
private Date updatedAt;
private Byte recStatus;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getProjectId() {
return projectId;
}
public void setProjectId(Long projectId) {
this.projectId = projectId;
}
public Long getGroupId() {
return groupId;
}
public void setGroupId(Long groupId) {
this.groupId = groupId;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description == null ? null : description.trim();
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public Byte getRecStatus() {
return recStatus;
}
public void setRecStatus(Byte recStatus) {
this.recStatus = recStatus;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", projectId=").append(projectId);
sb.append(", groupId=").append(groupId);
sb.append(", description=").append(description);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append("]");
return sb.toString();
}
}

631
mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectGroupExample.java

@ -0,0 +1,631 @@
package com.ccsens.mt.bean.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class CompeteProjectGroupExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public CompeteProjectGroupExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andProjectIdIsNull() {
addCriterion("project_id is null");
return (Criteria) this;
}
public Criteria andProjectIdIsNotNull() {
addCriterion("project_id is not null");
return (Criteria) this;
}
public Criteria andProjectIdEqualTo(Long value) {
addCriterion("project_id =", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdNotEqualTo(Long value) {
addCriterion("project_id <>", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdGreaterThan(Long value) {
addCriterion("project_id >", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdGreaterThanOrEqualTo(Long value) {
addCriterion("project_id >=", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdLessThan(Long value) {
addCriterion("project_id <", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdLessThanOrEqualTo(Long value) {
addCriterion("project_id <=", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdIn(List<Long> values) {
addCriterion("project_id in", values, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdNotIn(List<Long> values) {
addCriterion("project_id not in", values, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdBetween(Long value1, Long value2) {
addCriterion("project_id between", value1, value2, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdNotBetween(Long value1, Long value2) {
addCriterion("project_id not between", value1, value2, "projectId");
return (Criteria) this;
}
public Criteria andGroupIdIsNull() {
addCriterion("group_id is null");
return (Criteria) this;
}
public Criteria andGroupIdIsNotNull() {
addCriterion("group_id is not null");
return (Criteria) this;
}
public Criteria andGroupIdEqualTo(Long value) {
addCriterion("group_id =", value, "groupId");
return (Criteria) this;
}
public Criteria andGroupIdNotEqualTo(Long value) {
addCriterion("group_id <>", value, "groupId");
return (Criteria) this;
}
public Criteria andGroupIdGreaterThan(Long value) {
addCriterion("group_id >", value, "groupId");
return (Criteria) this;
}
public Criteria andGroupIdGreaterThanOrEqualTo(Long value) {
addCriterion("group_id >=", value, "groupId");
return (Criteria) this;
}
public Criteria andGroupIdLessThan(Long value) {
addCriterion("group_id <", value, "groupId");
return (Criteria) this;
}
public Criteria andGroupIdLessThanOrEqualTo(Long value) {
addCriterion("group_id <=", value, "groupId");
return (Criteria) this;
}
public Criteria andGroupIdIn(List<Long> values) {
addCriterion("group_id in", values, "groupId");
return (Criteria) this;
}
public Criteria andGroupIdNotIn(List<Long> values) {
addCriterion("group_id not in", values, "groupId");
return (Criteria) this;
}
public Criteria andGroupIdBetween(Long value1, Long value2) {
addCriterion("group_id between", value1, value2, "groupId");
return (Criteria) this;
}
public Criteria andGroupIdNotBetween(Long value1, Long value2) {
addCriterion("group_id not between", value1, value2, "groupId");
return (Criteria) this;
}
public Criteria andDescriptionIsNull() {
addCriterion("description is null");
return (Criteria) this;
}
public Criteria andDescriptionIsNotNull() {
addCriterion("description is not null");
return (Criteria) this;
}
public Criteria andDescriptionEqualTo(String value) {
addCriterion("description =", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionNotEqualTo(String value) {
addCriterion("description <>", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionGreaterThan(String value) {
addCriterion("description >", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionGreaterThanOrEqualTo(String value) {
addCriterion("description >=", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionLessThan(String value) {
addCriterion("description <", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionLessThanOrEqualTo(String value) {
addCriterion("description <=", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionLike(String value) {
addCriterion("description like", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionNotLike(String value) {
addCriterion("description not like", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionIn(List<String> values) {
addCriterion("description in", values, "description");
return (Criteria) this;
}
public Criteria andDescriptionNotIn(List<String> values) {
addCriterion("description not in", values, "description");
return (Criteria) this;
}
public Criteria andDescriptionBetween(String value1, String value2) {
addCriterion("description between", value1, value2, "description");
return (Criteria) this;
}
public Criteria andDescriptionNotBetween(String value1, String value2) {
addCriterion("description not between", value1, value2, "description");
return (Criteria) this;
}
public Criteria andCreatedAtIsNull() {
addCriterion("created_at is null");
return (Criteria) this;
}
public Criteria andCreatedAtIsNotNull() {
addCriterion("created_at is not null");
return (Criteria) this;
}
public Criteria andCreatedAtEqualTo(Date value) {
addCriterion("created_at =", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotEqualTo(Date value) {
addCriterion("created_at <>", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThan(Date value) {
addCriterion("created_at >", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("created_at >=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThan(Date value) {
addCriterion("created_at <", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThanOrEqualTo(Date value) {
addCriterion("created_at <=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtIn(List<Date> values) {
addCriterion("created_at in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotIn(List<Date> values) {
addCriterion("created_at not in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtBetween(Date value1, Date value2) {
addCriterion("created_at between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotBetween(Date value1, Date value2) {
addCriterion("created_at not between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNull() {
addCriterion("updated_at is null");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNotNull() {
addCriterion("updated_at is not null");
return (Criteria) this;
}
public Criteria andUpdatedAtEqualTo(Date value) {
addCriterion("updated_at =", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotEqualTo(Date value) {
addCriterion("updated_at <>", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThan(Date value) {
addCriterion("updated_at >", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("updated_at >=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThan(Date value) {
addCriterion("updated_at <", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThanOrEqualTo(Date value) {
addCriterion("updated_at <=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIn(List<Date> values) {
addCriterion("updated_at in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotIn(List<Date> values) {
addCriterion("updated_at not in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtBetween(Date value1, Date value2) {
addCriterion("updated_at between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotBetween(Date value1, Date value2) {
addCriterion("updated_at not between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andRecStatusIsNull() {
addCriterion("rec_status is null");
return (Criteria) this;
}
public Criteria andRecStatusIsNotNull() {
addCriterion("rec_status is not null");
return (Criteria) this;
}
public Criteria andRecStatusEqualTo(Byte value) {
addCriterion("rec_status =", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotEqualTo(Byte value) {
addCriterion("rec_status <>", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThan(Byte value) {
addCriterion("rec_status >", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) {
addCriterion("rec_status >=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThan(Byte value) {
addCriterion("rec_status <", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThanOrEqualTo(Byte value) {
addCriterion("rec_status <=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusIn(List<Byte> values) {
addCriterion("rec_status in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotIn(List<Byte> values) {
addCriterion("rec_status not in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusBetween(Byte value1, Byte value2) {
addCriterion("rec_status between", value1, value2, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotBetween(Byte value1, Byte value2) {
addCriterion("rec_status not between", value1, value2, "recStatus");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

22
mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectPlayer.java

@ -22,6 +22,10 @@ public class CompeteProjectPlayer implements Serializable {
private Byte recStatus;
private Long competeGroupId;
private Byte success;
private static final long serialVersionUID = 1L;
public Long getId() {
@ -96,6 +100,22 @@ public class CompeteProjectPlayer implements Serializable {
this.recStatus = recStatus;
}
public Long getCompeteGroupId() {
return competeGroupId;
}
public void setCompeteGroupId(Long competeGroupId) {
this.competeGroupId = competeGroupId;
}
public Byte getSuccess() {
return success;
}
public void setSuccess(Byte success) {
this.success = success;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -111,6 +131,8 @@ public class CompeteProjectPlayer implements Serializable {
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append(", competeGroupId=").append(competeGroupId);
sb.append(", success=").append(success);
sb.append("]");
return sb.toString();
}

120
mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectPlayerExample.java

@ -644,6 +644,126 @@ public class CompeteProjectPlayerExample {
addCriterion("rec_status not between", value1, value2, "recStatus");
return (Criteria) this;
}
public Criteria andCompeteGroupIdIsNull() {
addCriterion("compete_group_id is null");
return (Criteria) this;
}
public Criteria andCompeteGroupIdIsNotNull() {
addCriterion("compete_group_id is not null");
return (Criteria) this;
}
public Criteria andCompeteGroupIdEqualTo(Long value) {
addCriterion("compete_group_id =", value, "competeGroupId");
return (Criteria) this;
}
public Criteria andCompeteGroupIdNotEqualTo(Long value) {
addCriterion("compete_group_id <>", value, "competeGroupId");
return (Criteria) this;
}
public Criteria andCompeteGroupIdGreaterThan(Long value) {
addCriterion("compete_group_id >", value, "competeGroupId");
return (Criteria) this;
}
public Criteria andCompeteGroupIdGreaterThanOrEqualTo(Long value) {
addCriterion("compete_group_id >=", value, "competeGroupId");
return (Criteria) this;
}
public Criteria andCompeteGroupIdLessThan(Long value) {
addCriterion("compete_group_id <", value, "competeGroupId");
return (Criteria) this;
}
public Criteria andCompeteGroupIdLessThanOrEqualTo(Long value) {
addCriterion("compete_group_id <=", value, "competeGroupId");
return (Criteria) this;
}
public Criteria andCompeteGroupIdIn(List<Long> values) {
addCriterion("compete_group_id in", values, "competeGroupId");
return (Criteria) this;
}
public Criteria andCompeteGroupIdNotIn(List<Long> values) {
addCriterion("compete_group_id not in", values, "competeGroupId");
return (Criteria) this;
}
public Criteria andCompeteGroupIdBetween(Long value1, Long value2) {
addCriterion("compete_group_id between", value1, value2, "competeGroupId");
return (Criteria) this;
}
public Criteria andCompeteGroupIdNotBetween(Long value1, Long value2) {
addCriterion("compete_group_id not between", value1, value2, "competeGroupId");
return (Criteria) this;
}
public Criteria andSuccessIsNull() {
addCriterion("success is null");
return (Criteria) this;
}
public Criteria andSuccessIsNotNull() {
addCriterion("success is not null");
return (Criteria) this;
}
public Criteria andSuccessEqualTo(Byte value) {
addCriterion("success =", value, "success");
return (Criteria) this;
}
public Criteria andSuccessNotEqualTo(Byte value) {
addCriterion("success <>", value, "success");
return (Criteria) this;
}
public Criteria andSuccessGreaterThan(Byte value) {
addCriterion("success >", value, "success");
return (Criteria) this;
}
public Criteria andSuccessGreaterThanOrEqualTo(Byte value) {
addCriterion("success >=", value, "success");
return (Criteria) this;
}
public Criteria andSuccessLessThan(Byte value) {
addCriterion("success <", value, "success");
return (Criteria) this;
}
public Criteria andSuccessLessThanOrEqualTo(Byte value) {
addCriterion("success <=", value, "success");
return (Criteria) this;
}
public Criteria andSuccessIn(List<Byte> values) {
addCriterion("success in", values, "success");
return (Criteria) this;
}
public Criteria andSuccessNotIn(List<Byte> values) {
addCriterion("success not in", values, "success");
return (Criteria) this;
}
public Criteria andSuccessBetween(Byte value1, Byte value2) {
addCriterion("success between", value1, value2, "success");
return (Criteria) this;
}
public Criteria andSuccessNotBetween(Byte value1, Byte value2) {
addCriterion("success not between", value1, value2, "success");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {

44
mt/src/main/java/com/ccsens/mt/bean/po/CompeteTeam.java

@ -24,6 +24,14 @@ public class CompeteTeam implements Serializable {
private Byte recStatus;
private Long competeGroupId;
private Byte success;
private Long companyId;
private Byte groupRemark;
private static final long serialVersionUID = 1L;
public Long getId() {
@ -106,6 +114,38 @@ public class CompeteTeam implements Serializable {
this.recStatus = recStatus;
}
public Long getCompeteGroupId() {
return competeGroupId;
}
public void setCompeteGroupId(Long competeGroupId) {
this.competeGroupId = competeGroupId;
}
public Byte getSuccess() {
return success;
}
public void setSuccess(Byte success) {
this.success = success;
}
public Long getCompanyId() {
return companyId;
}
public void setCompanyId(Long companyId) {
this.companyId = companyId;
}
public Byte getGroupRemark() {
return groupRemark;
}
public void setGroupRemark(Byte groupRemark) {
this.groupRemark = groupRemark;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -122,6 +162,10 @@ public class CompeteTeam implements Serializable {
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append(", competeGroupId=").append(competeGroupId);
sb.append(", success=").append(success);
sb.append(", companyId=").append(companyId);
sb.append(", groupRemark=").append(groupRemark);
sb.append("]");
return sb.toString();
}

240
mt/src/main/java/com/ccsens/mt/bean/po/CompeteTeamExample.java

@ -714,6 +714,246 @@ public class CompeteTeamExample {
addCriterion("rec_status not between", value1, value2, "recStatus");
return (Criteria) this;
}
public Criteria andCompeteGroupIdIsNull() {
addCriterion("compete_group_id is null");
return (Criteria) this;
}
public Criteria andCompeteGroupIdIsNotNull() {
addCriterion("compete_group_id is not null");
return (Criteria) this;
}
public Criteria andCompeteGroupIdEqualTo(Long value) {
addCriterion("compete_group_id =", value, "competeGroupId");
return (Criteria) this;
}
public Criteria andCompeteGroupIdNotEqualTo(Long value) {
addCriterion("compete_group_id <>", value, "competeGroupId");
return (Criteria) this;
}
public Criteria andCompeteGroupIdGreaterThan(Long value) {
addCriterion("compete_group_id >", value, "competeGroupId");
return (Criteria) this;
}
public Criteria andCompeteGroupIdGreaterThanOrEqualTo(Long value) {
addCriterion("compete_group_id >=", value, "competeGroupId");
return (Criteria) this;
}
public Criteria andCompeteGroupIdLessThan(Long value) {
addCriterion("compete_group_id <", value, "competeGroupId");
return (Criteria) this;
}
public Criteria andCompeteGroupIdLessThanOrEqualTo(Long value) {
addCriterion("compete_group_id <=", value, "competeGroupId");
return (Criteria) this;
}
public Criteria andCompeteGroupIdIn(List<Long> values) {
addCriterion("compete_group_id in", values, "competeGroupId");
return (Criteria) this;
}
public Criteria andCompeteGroupIdNotIn(List<Long> values) {
addCriterion("compete_group_id not in", values, "competeGroupId");
return (Criteria) this;
}
public Criteria andCompeteGroupIdBetween(Long value1, Long value2) {
addCriterion("compete_group_id between", value1, value2, "competeGroupId");
return (Criteria) this;
}
public Criteria andCompeteGroupIdNotBetween(Long value1, Long value2) {
addCriterion("compete_group_id not between", value1, value2, "competeGroupId");
return (Criteria) this;
}
public Criteria andSuccessIsNull() {
addCriterion("success is null");
return (Criteria) this;
}
public Criteria andSuccessIsNotNull() {
addCriterion("success is not null");
return (Criteria) this;
}
public Criteria andSuccessEqualTo(Byte value) {
addCriterion("success =", value, "success");
return (Criteria) this;
}
public Criteria andSuccessNotEqualTo(Byte value) {
addCriterion("success <>", value, "success");
return (Criteria) this;
}
public Criteria andSuccessGreaterThan(Byte value) {
addCriterion("success >", value, "success");
return (Criteria) this;
}
public Criteria andSuccessGreaterThanOrEqualTo(Byte value) {
addCriterion("success >=", value, "success");
return (Criteria) this;
}
public Criteria andSuccessLessThan(Byte value) {
addCriterion("success <", value, "success");
return (Criteria) this;
}
public Criteria andSuccessLessThanOrEqualTo(Byte value) {
addCriterion("success <=", value, "success");
return (Criteria) this;
}
public Criteria andSuccessIn(List<Byte> values) {
addCriterion("success in", values, "success");
return (Criteria) this;
}
public Criteria andSuccessNotIn(List<Byte> values) {
addCriterion("success not in", values, "success");
return (Criteria) this;
}
public Criteria andSuccessBetween(Byte value1, Byte value2) {
addCriterion("success between", value1, value2, "success");
return (Criteria) this;
}
public Criteria andSuccessNotBetween(Byte value1, Byte value2) {
addCriterion("success not between", value1, value2, "success");
return (Criteria) this;
}
public Criteria andCompanyIdIsNull() {
addCriterion("company_id is null");
return (Criteria) this;
}
public Criteria andCompanyIdIsNotNull() {
addCriterion("company_id is not null");
return (Criteria) this;
}
public Criteria andCompanyIdEqualTo(Long value) {
addCriterion("company_id =", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdNotEqualTo(Long value) {
addCriterion("company_id <>", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdGreaterThan(Long value) {
addCriterion("company_id >", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdGreaterThanOrEqualTo(Long value) {
addCriterion("company_id >=", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdLessThan(Long value) {
addCriterion("company_id <", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdLessThanOrEqualTo(Long value) {
addCriterion("company_id <=", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdIn(List<Long> values) {
addCriterion("company_id in", values, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdNotIn(List<Long> values) {
addCriterion("company_id not in", values, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdBetween(Long value1, Long value2) {
addCriterion("company_id between", value1, value2, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdNotBetween(Long value1, Long value2) {
addCriterion("company_id not between", value1, value2, "companyId");
return (Criteria) this;
}
public Criteria andGroupRemarkIsNull() {
addCriterion("group_remark is null");
return (Criteria) this;
}
public Criteria andGroupRemarkIsNotNull() {
addCriterion("group_remark is not null");
return (Criteria) this;
}
public Criteria andGroupRemarkEqualTo(Byte value) {
addCriterion("group_remark =", value, "groupRemark");
return (Criteria) this;
}
public Criteria andGroupRemarkNotEqualTo(Byte value) {
addCriterion("group_remark <>", value, "groupRemark");
return (Criteria) this;
}
public Criteria andGroupRemarkGreaterThan(Byte value) {
addCriterion("group_remark >", value, "groupRemark");
return (Criteria) this;
}
public Criteria andGroupRemarkGreaterThanOrEqualTo(Byte value) {
addCriterion("group_remark >=", value, "groupRemark");
return (Criteria) this;
}
public Criteria andGroupRemarkLessThan(Byte value) {
addCriterion("group_remark <", value, "groupRemark");
return (Criteria) this;
}
public Criteria andGroupRemarkLessThanOrEqualTo(Byte value) {
addCriterion("group_remark <=", value, "groupRemark");
return (Criteria) this;
}
public Criteria andGroupRemarkIn(List<Byte> values) {
addCriterion("group_remark in", values, "groupRemark");
return (Criteria) this;
}
public Criteria andGroupRemarkNotIn(List<Byte> values) {
addCriterion("group_remark not in", values, "groupRemark");
return (Criteria) this;
}
public Criteria andGroupRemarkBetween(Byte value1, Byte value2) {
addCriterion("group_remark between", value1, value2, "groupRemark");
return (Criteria) this;
}
public Criteria andGroupRemarkNotBetween(Byte value1, Byte value2) {
addCriterion("group_remark not between", value1, value2, "groupRemark");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {

150
mt/src/main/java/com/ccsens/mt/bean/po/CompeteVideo.java

@ -0,0 +1,150 @@
package com.ccsens.mt.bean.po;
import java.io.Serializable;
import java.util.Date;
public class CompeteVideo implements Serializable {
private Long id;
private Long competeTimeId;
private String competeCode;
private Byte team;
private Long playerId;
private Long fileId;
private String videoUrl;
private Long time;
private Long uploadUserId;
private Date createdAt;
private Date updatedAt;
private Byte recStatus;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getCompeteTimeId() {
return competeTimeId;
}
public void setCompeteTimeId(Long competeTimeId) {
this.competeTimeId = competeTimeId;
}
public String getCompeteCode() {
return competeCode;
}
public void setCompeteCode(String competeCode) {
this.competeCode = competeCode == null ? null : competeCode.trim();
}
public Byte getTeam() {
return team;
}
public void setTeam(Byte team) {
this.team = team;
}
public Long getPlayerId() {
return playerId;
}
public void setPlayerId(Long playerId) {
this.playerId = playerId;
}
public Long getFileId() {
return fileId;
}
public void setFileId(Long fileId) {
this.fileId = fileId;
}
public String getVideoUrl() {
return videoUrl;
}
public void setVideoUrl(String videoUrl) {
this.videoUrl = videoUrl == null ? null : videoUrl.trim();
}
public Long getTime() {
return time;
}
public void setTime(Long time) {
this.time = time;
}
public Long getUploadUserId() {
return uploadUserId;
}
public void setUploadUserId(Long uploadUserId) {
this.uploadUserId = uploadUserId;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public Byte getRecStatus() {
return recStatus;
}
public void setRecStatus(Byte recStatus) {
this.recStatus = recStatus;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", competeTimeId=").append(competeTimeId);
sb.append(", competeCode=").append(competeCode);
sb.append(", team=").append(team);
sb.append(", playerId=").append(playerId);
sb.append(", fileId=").append(fileId);
sb.append(", videoUrl=").append(videoUrl);
sb.append(", time=").append(time);
sb.append(", uploadUserId=").append(uploadUserId);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append("]");
return sb.toString();
}
}

941
mt/src/main/java/com/ccsens/mt/bean/po/CompeteVideoExample.java

@ -0,0 +1,941 @@
package com.ccsens.mt.bean.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class CompeteVideoExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public CompeteVideoExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andCompeteTimeIdIsNull() {
addCriterion("compete_time_id is null");
return (Criteria) this;
}
public Criteria andCompeteTimeIdIsNotNull() {
addCriterion("compete_time_id is not null");
return (Criteria) this;
}
public Criteria andCompeteTimeIdEqualTo(Long value) {
addCriterion("compete_time_id =", value, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdNotEqualTo(Long value) {
addCriterion("compete_time_id <>", value, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdGreaterThan(Long value) {
addCriterion("compete_time_id >", value, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdGreaterThanOrEqualTo(Long value) {
addCriterion("compete_time_id >=", value, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdLessThan(Long value) {
addCriterion("compete_time_id <", value, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdLessThanOrEqualTo(Long value) {
addCriterion("compete_time_id <=", value, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdIn(List<Long> values) {
addCriterion("compete_time_id in", values, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdNotIn(List<Long> values) {
addCriterion("compete_time_id not in", values, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdBetween(Long value1, Long value2) {
addCriterion("compete_time_id between", value1, value2, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdNotBetween(Long value1, Long value2) {
addCriterion("compete_time_id not between", value1, value2, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteCodeIsNull() {
addCriterion("compete_code is null");
return (Criteria) this;
}
public Criteria andCompeteCodeIsNotNull() {
addCriterion("compete_code is not null");
return (Criteria) this;
}
public Criteria andCompeteCodeEqualTo(String value) {
addCriterion("compete_code =", value, "competeCode");
return (Criteria) this;
}
public Criteria andCompeteCodeNotEqualTo(String value) {
addCriterion("compete_code <>", value, "competeCode");
return (Criteria) this;
}
public Criteria andCompeteCodeGreaterThan(String value) {
addCriterion("compete_code >", value, "competeCode");
return (Criteria) this;
}
public Criteria andCompeteCodeGreaterThanOrEqualTo(String value) {
addCriterion("compete_code >=", value, "competeCode");
return (Criteria) this;
}
public Criteria andCompeteCodeLessThan(String value) {
addCriterion("compete_code <", value, "competeCode");
return (Criteria) this;
}
public Criteria andCompeteCodeLessThanOrEqualTo(String value) {
addCriterion("compete_code <=", value, "competeCode");
return (Criteria) this;
}
public Criteria andCompeteCodeLike(String value) {
addCriterion("compete_code like", value, "competeCode");
return (Criteria) this;
}
public Criteria andCompeteCodeNotLike(String value) {
addCriterion("compete_code not like", value, "competeCode");
return (Criteria) this;
}
public Criteria andCompeteCodeIn(List<String> values) {
addCriterion("compete_code in", values, "competeCode");
return (Criteria) this;
}
public Criteria andCompeteCodeNotIn(List<String> values) {
addCriterion("compete_code not in", values, "competeCode");
return (Criteria) this;
}
public Criteria andCompeteCodeBetween(String value1, String value2) {
addCriterion("compete_code between", value1, value2, "competeCode");
return (Criteria) this;
}
public Criteria andCompeteCodeNotBetween(String value1, String value2) {
addCriterion("compete_code not between", value1, value2, "competeCode");
return (Criteria) this;
}
public Criteria andTeamIsNull() {
addCriterion("team is null");
return (Criteria) this;
}
public Criteria andTeamIsNotNull() {
addCriterion("team is not null");
return (Criteria) this;
}
public Criteria andTeamEqualTo(Byte value) {
addCriterion("team =", value, "team");
return (Criteria) this;
}
public Criteria andTeamNotEqualTo(Byte value) {
addCriterion("team <>", value, "team");
return (Criteria) this;
}
public Criteria andTeamGreaterThan(Byte value) {
addCriterion("team >", value, "team");
return (Criteria) this;
}
public Criteria andTeamGreaterThanOrEqualTo(Byte value) {
addCriterion("team >=", value, "team");
return (Criteria) this;
}
public Criteria andTeamLessThan(Byte value) {
addCriterion("team <", value, "team");
return (Criteria) this;
}
public Criteria andTeamLessThanOrEqualTo(Byte value) {
addCriterion("team <=", value, "team");
return (Criteria) this;
}
public Criteria andTeamIn(List<Byte> values) {
addCriterion("team in", values, "team");
return (Criteria) this;
}
public Criteria andTeamNotIn(List<Byte> values) {
addCriterion("team not in", values, "team");
return (Criteria) this;
}
public Criteria andTeamBetween(Byte value1, Byte value2) {
addCriterion("team between", value1, value2, "team");
return (Criteria) this;
}
public Criteria andTeamNotBetween(Byte value1, Byte value2) {
addCriterion("team not between", value1, value2, "team");
return (Criteria) this;
}
public Criteria andPlayerIdIsNull() {
addCriterion("player_id is null");
return (Criteria) this;
}
public Criteria andPlayerIdIsNotNull() {
addCriterion("player_id is not null");
return (Criteria) this;
}
public Criteria andPlayerIdEqualTo(Long value) {
addCriterion("player_id =", value, "playerId");
return (Criteria) this;
}
public Criteria andPlayerIdNotEqualTo(Long value) {
addCriterion("player_id <>", value, "playerId");
return (Criteria) this;
}
public Criteria andPlayerIdGreaterThan(Long value) {
addCriterion("player_id >", value, "playerId");
return (Criteria) this;
}
public Criteria andPlayerIdGreaterThanOrEqualTo(Long value) {
addCriterion("player_id >=", value, "playerId");
return (Criteria) this;
}
public Criteria andPlayerIdLessThan(Long value) {
addCriterion("player_id <", value, "playerId");
return (Criteria) this;
}
public Criteria andPlayerIdLessThanOrEqualTo(Long value) {
addCriterion("player_id <=", value, "playerId");
return (Criteria) this;
}
public Criteria andPlayerIdIn(List<Long> values) {
addCriterion("player_id in", values, "playerId");
return (Criteria) this;
}
public Criteria andPlayerIdNotIn(List<Long> values) {
addCriterion("player_id not in", values, "playerId");
return (Criteria) this;
}
public Criteria andPlayerIdBetween(Long value1, Long value2) {
addCriterion("player_id between", value1, value2, "playerId");
return (Criteria) this;
}
public Criteria andPlayerIdNotBetween(Long value1, Long value2) {
addCriterion("player_id not between", value1, value2, "playerId");
return (Criteria) this;
}
public Criteria andFileIdIsNull() {
addCriterion("file_id is null");
return (Criteria) this;
}
public Criteria andFileIdIsNotNull() {
addCriterion("file_id is not null");
return (Criteria) this;
}
public Criteria andFileIdEqualTo(Long value) {
addCriterion("file_id =", value, "fileId");
return (Criteria) this;
}
public Criteria andFileIdNotEqualTo(Long value) {
addCriterion("file_id <>", value, "fileId");
return (Criteria) this;
}
public Criteria andFileIdGreaterThan(Long value) {
addCriterion("file_id >", value, "fileId");
return (Criteria) this;
}
public Criteria andFileIdGreaterThanOrEqualTo(Long value) {
addCriterion("file_id >=", value, "fileId");
return (Criteria) this;
}
public Criteria andFileIdLessThan(Long value) {
addCriterion("file_id <", value, "fileId");
return (Criteria) this;
}
public Criteria andFileIdLessThanOrEqualTo(Long value) {
addCriterion("file_id <=", value, "fileId");
return (Criteria) this;
}
public Criteria andFileIdIn(List<Long> values) {
addCriterion("file_id in", values, "fileId");
return (Criteria) this;
}
public Criteria andFileIdNotIn(List<Long> values) {
addCriterion("file_id not in", values, "fileId");
return (Criteria) this;
}
public Criteria andFileIdBetween(Long value1, Long value2) {
addCriterion("file_id between", value1, value2, "fileId");
return (Criteria) this;
}
public Criteria andFileIdNotBetween(Long value1, Long value2) {
addCriterion("file_id not between", value1, value2, "fileId");
return (Criteria) this;
}
public Criteria andVideoUrlIsNull() {
addCriterion("video_url is null");
return (Criteria) this;
}
public Criteria andVideoUrlIsNotNull() {
addCriterion("video_url is not null");
return (Criteria) this;
}
public Criteria andVideoUrlEqualTo(String value) {
addCriterion("video_url =", value, "videoUrl");
return (Criteria) this;
}
public Criteria andVideoUrlNotEqualTo(String value) {
addCriterion("video_url <>", value, "videoUrl");
return (Criteria) this;
}
public Criteria andVideoUrlGreaterThan(String value) {
addCriterion("video_url >", value, "videoUrl");
return (Criteria) this;
}
public Criteria andVideoUrlGreaterThanOrEqualTo(String value) {
addCriterion("video_url >=", value, "videoUrl");
return (Criteria) this;
}
public Criteria andVideoUrlLessThan(String value) {
addCriterion("video_url <", value, "videoUrl");
return (Criteria) this;
}
public Criteria andVideoUrlLessThanOrEqualTo(String value) {
addCriterion("video_url <=", value, "videoUrl");
return (Criteria) this;
}
public Criteria andVideoUrlLike(String value) {
addCriterion("video_url like", value, "videoUrl");
return (Criteria) this;
}
public Criteria andVideoUrlNotLike(String value) {
addCriterion("video_url not like", value, "videoUrl");
return (Criteria) this;
}
public Criteria andVideoUrlIn(List<String> values) {
addCriterion("video_url in", values, "videoUrl");
return (Criteria) this;
}
public Criteria andVideoUrlNotIn(List<String> values) {
addCriterion("video_url not in", values, "videoUrl");
return (Criteria) this;
}
public Criteria andVideoUrlBetween(String value1, String value2) {
addCriterion("video_url between", value1, value2, "videoUrl");
return (Criteria) this;
}
public Criteria andVideoUrlNotBetween(String value1, String value2) {
addCriterion("video_url not between", value1, value2, "videoUrl");
return (Criteria) this;
}
public Criteria andTimeIsNull() {
addCriterion("time is null");
return (Criteria) this;
}
public Criteria andTimeIsNotNull() {
addCriterion("time is not null");
return (Criteria) this;
}
public Criteria andTimeEqualTo(Long value) {
addCriterion("time =", value, "time");
return (Criteria) this;
}
public Criteria andTimeNotEqualTo(Long value) {
addCriterion("time <>", value, "time");
return (Criteria) this;
}
public Criteria andTimeGreaterThan(Long value) {
addCriterion("time >", value, "time");
return (Criteria) this;
}
public Criteria andTimeGreaterThanOrEqualTo(Long value) {
addCriterion("time >=", value, "time");
return (Criteria) this;
}
public Criteria andTimeLessThan(Long value) {
addCriterion("time <", value, "time");
return (Criteria) this;
}
public Criteria andTimeLessThanOrEqualTo(Long value) {
addCriterion("time <=", value, "time");
return (Criteria) this;
}
public Criteria andTimeIn(List<Long> values) {
addCriterion("time in", values, "time");
return (Criteria) this;
}
public Criteria andTimeNotIn(List<Long> values) {
addCriterion("time not in", values, "time");
return (Criteria) this;
}
public Criteria andTimeBetween(Long value1, Long value2) {
addCriterion("time between", value1, value2, "time");
return (Criteria) this;
}
public Criteria andTimeNotBetween(Long value1, Long value2) {
addCriterion("time not between", value1, value2, "time");
return (Criteria) this;
}
public Criteria andUploadUserIdIsNull() {
addCriterion("upload_user_id is null");
return (Criteria) this;
}
public Criteria andUploadUserIdIsNotNull() {
addCriterion("upload_user_id is not null");
return (Criteria) this;
}
public Criteria andUploadUserIdEqualTo(Long value) {
addCriterion("upload_user_id =", value, "uploadUserId");
return (Criteria) this;
}
public Criteria andUploadUserIdNotEqualTo(Long value) {
addCriterion("upload_user_id <>", value, "uploadUserId");
return (Criteria) this;
}
public Criteria andUploadUserIdGreaterThan(Long value) {
addCriterion("upload_user_id >", value, "uploadUserId");
return (Criteria) this;
}
public Criteria andUploadUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("upload_user_id >=", value, "uploadUserId");
return (Criteria) this;
}
public Criteria andUploadUserIdLessThan(Long value) {
addCriterion("upload_user_id <", value, "uploadUserId");
return (Criteria) this;
}
public Criteria andUploadUserIdLessThanOrEqualTo(Long value) {
addCriterion("upload_user_id <=", value, "uploadUserId");
return (Criteria) this;
}
public Criteria andUploadUserIdIn(List<Long> values) {
addCriterion("upload_user_id in", values, "uploadUserId");
return (Criteria) this;
}
public Criteria andUploadUserIdNotIn(List<Long> values) {
addCriterion("upload_user_id not in", values, "uploadUserId");
return (Criteria) this;
}
public Criteria andUploadUserIdBetween(Long value1, Long value2) {
addCriterion("upload_user_id between", value1, value2, "uploadUserId");
return (Criteria) this;
}
public Criteria andUploadUserIdNotBetween(Long value1, Long value2) {
addCriterion("upload_user_id not between", value1, value2, "uploadUserId");
return (Criteria) this;
}
public Criteria andCreatedAtIsNull() {
addCriterion("created_at is null");
return (Criteria) this;
}
public Criteria andCreatedAtIsNotNull() {
addCriterion("created_at is not null");
return (Criteria) this;
}
public Criteria andCreatedAtEqualTo(Date value) {
addCriterion("created_at =", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotEqualTo(Date value) {
addCriterion("created_at <>", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThan(Date value) {
addCriterion("created_at >", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("created_at >=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThan(Date value) {
addCriterion("created_at <", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThanOrEqualTo(Date value) {
addCriterion("created_at <=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtIn(List<Date> values) {
addCriterion("created_at in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotIn(List<Date> values) {
addCriterion("created_at not in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtBetween(Date value1, Date value2) {
addCriterion("created_at between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotBetween(Date value1, Date value2) {
addCriterion("created_at not between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNull() {
addCriterion("updated_at is null");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNotNull() {
addCriterion("updated_at is not null");
return (Criteria) this;
}
public Criteria andUpdatedAtEqualTo(Date value) {
addCriterion("updated_at =", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotEqualTo(Date value) {
addCriterion("updated_at <>", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThan(Date value) {
addCriterion("updated_at >", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("updated_at >=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThan(Date value) {
addCriterion("updated_at <", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThanOrEqualTo(Date value) {
addCriterion("updated_at <=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIn(List<Date> values) {
addCriterion("updated_at in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotIn(List<Date> values) {
addCriterion("updated_at not in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtBetween(Date value1, Date value2) {
addCriterion("updated_at between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotBetween(Date value1, Date value2) {
addCriterion("updated_at not between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andRecStatusIsNull() {
addCriterion("rec_status is null");
return (Criteria) this;
}
public Criteria andRecStatusIsNotNull() {
addCriterion("rec_status is not null");
return (Criteria) this;
}
public Criteria andRecStatusEqualTo(Byte value) {
addCriterion("rec_status =", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotEqualTo(Byte value) {
addCriterion("rec_status <>", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThan(Byte value) {
addCriterion("rec_status >", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) {
addCriterion("rec_status >=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThan(Byte value) {
addCriterion("rec_status <", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThanOrEqualTo(Byte value) {
addCriterion("rec_status <=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusIn(List<Byte> values) {
addCriterion("rec_status in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotIn(List<Byte> values) {
addCriterion("rec_status not in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusBetween(Byte value1, Byte value2) {
addCriterion("rec_status between", value1, value2, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotBetween(Byte value1, Byte value2) {
addCriterion("rec_status not between", value1, value2, "recStatus");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

225
mt/src/main/java/com/ccsens/mt/bean/vo/CompeteVo.java

@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
/**
@ -43,6 +44,13 @@ public class CompeteVo {
@ApiModelProperty("描述")
private String groupDescription;
}
@Data
@ApiModel
public static class CompeteC{
@ApiModelProperty("参赛队伍")
private String cansaiduiName;
}
@Data
@ApiModel("模糊查询参赛单位")
@ -115,6 +123,8 @@ public class CompeteVo {
private String secondProjectName;
@ApiModelProperty("是否通级 0否 1是")
private byte certificate;
@ApiModelProperty("组别名")
private String groupName;
}
@Data
@ -140,20 +150,11 @@ public class CompeteVo {
private int memberNums;
@ApiModelProperty("二维码信息")
private String qrCode;
@ApiModelProperty("组别名")
private String groupName;
@ApiModelProperty("团队内的成员")
private List<CompeteTeamProjectMember> members;
//
// public CompeteTeamProject(Long teamId, byte type, String parentProjectName, String secondProjectName, byte certificate, byte creator, int memberMin, int memberMax, String qrCode) {
// this.teamId = teamId;
// this.type = type;
// this.parentProjectName = parentProjectName;
// this.secondProjectName = secondProjectName;
// this.certificate = certificate;
// this.creator = creator;
// this.memberMin = memberMin;
// this.memberMax = memberMax;
// this.qrCode = qrCode;
// }
public CompeteTeamProject() {
}
@ -195,7 +196,7 @@ public class CompeteVo {
private String parentProjectName;
@ApiModelProperty("比赛的类型,0跳绳比赛")
private byte type;
@ApiModelProperty("比赛的类型,0跳绳比赛")
@ApiModelProperty("二级项目信息")
private List<CompeteSecondProject> secondProjects;
}
@Data
@ -253,4 +254,202 @@ public class CompeteVo {
private String proveImg;
}
@Data
@ApiModel("院系报名信息表")
public static class DepartmentInfo {
@ApiModelProperty("院系id")
private Long id;
@ApiModelProperty("院系名")
private String name;
@ApiModelProperty("返回的填表人裁判等信息")
private List<DepartmentRole> departmentRoles;
@ApiModelProperty("返回每个比赛项目的参赛名单")
private List<DepartmentProject> departmentProjects;
}
@Data
@ApiModel("返回的填表人裁判等信息")
public static class DepartmentRole{
@ApiModelProperty("人员的id")
private String id;
@ApiModelProperty("名字")
private String name;
@ApiModelProperty("手机号")
private String phone;
@ApiModelProperty("担任的角色 0领队 1裁判 2填表人")
private int role;
}
@Data
@ApiModel("查找比赛项目报名信息")
public static class DepartmentProject {
@ApiModelProperty("一级项目id")
private Long parentProjectId;
@ApiModelProperty("一级项目名字")
private String parentProjectName;
@ApiModelProperty("比赛的类型,0跳绳比赛")
private byte type;
@ApiModelProperty("二级项目报名人员信息")
private List<DepartmentSecondProject> secondProjects;
}
@Data
@ApiModel("返回每个比赛项目的参赛名单")
public static class DepartmentSecondProject{
@ApiModelProperty("比赛项目id(二级的)")
private Long competeProjectId;
@ApiModelProperty("比赛项目名字")
private String competeProjectName;
@ApiModelProperty("是否是团队项目 0否 1是")
private byte team;
@ApiModelProperty("男子参赛名单")
private String manName;
@ApiModelProperty("女子参赛名单")
private String womanName;
@ApiModelProperty("混合名单")
private String mixedName;
}
@Data
@ApiModel("查询项目下的选手列表")
public static class QueryPlayerList{
@ApiModelProperty("个人信息")
private List<PlayerInfoByProject> playerList;
@ApiModelProperty("团队信息")
private List<TeamInfoByProject> teamList;
}
@Data
@ApiModel("比赛项目下的个人信息")
public static class PlayerInfoByProject{
@ApiModelProperty("id")
private Long playerId;
@ApiModelProperty("姓名")
private String name;
@ApiModelProperty("性别 0女 1男")
private int gender;
@ApiModelProperty("手机号")
private String phone;
@ApiModelProperty("参加的组别的id")
private Long groupId;
@ApiModelProperty("参加的组别的名字")
private String groupName;
@ApiModelProperty("参赛单位的名字")
private String companyName;
@ApiModelProperty("是否通级 0否 1是")
private byte certificate;
@ApiModelProperty("录播视频信息")
private List<VideoVo.GetVideoInfo> videoInfoList;
@ApiModelProperty("分数")
private BigDecimal score;
}
@Data
@ApiModel("比赛项目下团队信息")
public static class TeamInfoByProject{
@ApiModelProperty("团队表Id")
private Long teamId;
@ApiModelProperty("创建者id")
private Long creatorId;
@ApiModelProperty("创建者姓名")
private String creatorName;
@ApiModelProperty("是否通级 0否 1是")
private byte certificate;
@ApiModelProperty("当前人数")
private int memberNums;
@ApiModelProperty("团队内的成员")
private List<CompeteTeamProjectMember> members;
@ApiModelProperty("录播视频信息")
private List<VideoVo.GetVideoInfo> videoInfoList;
@ApiModelProperty("分数")
private BigDecimal score;
}
@Data
@ApiModel("所有项目参赛者信息")
public static class EnrollPlayInfo{
@ApiModelProperty("比赛项目名字")
private String name;
@ApiModelProperty("参加的组别的名字")
private String groupName;
@ApiModelProperty("名字")
private String username;
@ApiModelProperty("身份证")
private String idCard;
@ApiModelProperty("手机号")
private String phone;
@ApiModelProperty("其他参赛者姓名")
private String othersName;
}
@Data
@ApiModel("参加的项目信息")
public static class ProjectInfo{
@ApiModelProperty("项目id")
private Long id;
@ApiModelProperty("比赛项目名字")
private String name;
@ApiModelProperty("比赛类型:0个人 1团队")
private byte team;
}
@Data
@ApiModel("某项目下参赛者id和组别id")
public static class ProjectPlayer{
@ApiModelProperty("参赛者id")
private Long player_id;
@ApiModelProperty("参赛组别id")
private Long compete_group_id;
}
@Data
@ApiModel("参赛队伍信息")
public static class Team{
@ApiModelProperty("参赛团队id")
private Long id;
@ApiModelProperty("团队下的参与者id")
private long player_id;
}
@Data
@ApiModel("参赛各组别数信息")
public static class Count{
@ApiModelProperty("组别名")
private String group_name;
@ApiModelProperty("某组别人数")
private int count;
@ApiModelProperty("组别id")
private Long compete_group_id;
@ApiModelProperty("团队id")
private long team_id;
}
@Data
@ApiModel("参赛项目中组别人数信息")
public static class GroupNum{
@ApiModelProperty("项目名")
private String name;
@ApiModelProperty("参赛各组别数信息")
private List<CompeteVo.Count> countList;
}
@Data
@ApiModel("group中的组别id")
public static class GroupIdAndName{
@ApiModelProperty("项目id")
private int id;
@ApiModelProperty("组别名")
private String group_name;
}
@Data
@ApiModel("导入失败的报名信息")
public static class FailPlayerInfo{
@ApiModelProperty("单位名称")
private String companyName;
@ApiModelProperty("项目名")
private String projectName;
@ApiModelProperty("组别名")
private String groupName;
@ApiModelProperty("报名人")
private String playerName;
@ApiModelProperty("身份证号")
private String idCard;
@ApiModelProperty("手机号")
private String phone;
@ApiModelProperty("其他参赛人员")
private String otherPlayerName;
}
}

225
mt/src/main/java/com/ccsens/mt/bean/vo/ProvinceCompeteVo.java

@ -0,0 +1,225 @@
package com.ccsens.mt.bean.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @author
*/
@Data
public class ProvinceCompeteVo {
@Data
@ApiModel("查看首页概览")
public static class CompeteOverview{
@ApiModelProperty("参赛公司id")
private Long companyId;
@ApiModelProperty("参赛公司id")
private String companyName;
@ApiModelProperty("当前添加的教练的人数")
private int coachNum;
@ApiModelProperty("当前添加的领队的人数")
private int guideNum;
@ApiModelProperty("当前添加的参赛人员的人数")
private int playerNum;
@ApiModelProperty("当前报名的项目数量")
private int projectNum;
}
@Data
@ApiModel("查找单位内的参赛选手列表")
public static class PlayerByCompanyId{
@ApiModelProperty("选手id")
private Long playerId;
@ApiModelProperty("组别名字")
private String playerName;
@ApiModelProperty("组别名字")
private String groupName;
}
@Data
@ApiModel("查找组别和组别下的选手信息")
public static class GroupAndPlayer{
@ApiModelProperty("组别id")
private Long groupId;
@ApiModelProperty("组别名字")
private String groupName;
@ApiModelProperty("选手信息")
private List<PlayerInfoByGroup> playerList;
}
@Data
@ApiModel("组别下选手信息")
public static class PlayerInfoByGroup{
@ApiModelProperty("选手id")
private Long playerId;
@ApiModelProperty("选手名称")
private String playerName;
@ApiModelProperty("是否参加了本项目")
private int joinProject;
}
@Data
@ApiModel("查找一级比赛项目信息")
public static class FirstProject {
@ApiModelProperty("一级项目id")
private Long projectId;
@ApiModelProperty("一级项目名字")
private String projectName;
}
@Data
@ApiModel("根据一级项目id查找二级项目id")
public static class CompeteSecondProject {
@ApiModelProperty("项目id")
private Long id;
@ApiModelProperty("名字")
private String name;
@ApiModelProperty("是否是团队项目 0否 1是")
private byte team;
@ApiModelProperty("最少人数")
private int memberMin;
@ApiModelProperty("最多人数")
private int memberMax;
@ApiModelProperty("当前参赛人数")
private int joinNum;
}
@Data
@ApiModel("查询当前用户参赛单位基本信息")
public static class CompeteCompany {
@ApiModelProperty("参赛单位id")
private Long companyId;
@ApiModelProperty("单位名称")
private String companyName;
@ApiModelProperty("主要联系人姓名")
private String contactsName ;
@ApiModelProperty("联系方式")
private String contactsPhone ;
@ApiModelProperty("教练的人数")
private int coachNum ;
@ApiModelProperty("领队的人数")
private int guideNum ;
@ApiModelProperty("参赛人员的人数")
private int playerNum;
}
@Data
@ApiModel("查询教练信息")
public static class CompeteCompanyCoach {
@ApiModelProperty("教练id")
private Long coachId;
@ApiModelProperty("教练名字")
private String coachName;
@ApiModelProperty("性别")
private int gender;
@ApiModelProperty("联系方式")
private String phone;
}
@Data
@ApiModel("查询领队信息")
public static class CompeteCompanyLeader {
@ApiModelProperty("领队id")
private Long guideId;
@ApiModelProperty("领队名字")
private String guideName;
@ApiModelProperty("性别")
private int gender;
@ApiModelProperty("联系方式")
private String phone;
}
@Data
@ApiModel("查询当前用户参赛单位基本信息")
public static class CompeteCompanyHeadList {
@ApiModelProperty("教练集合")
private List<CompeteCompanyCoach> competeCompanyCoachList;
@ApiModelProperty("领队集合")
private List<CompeteCompanyLeader> competeCompanyLeadersList;
}
@Data
@ApiModel("查询当前用户参赛单位基本信息")
public static class PlayerInfo {
@ApiModelProperty("选手id")
private Long playerId ;
@ApiModelProperty("参赛单位id")
private Long competeId;
@ApiModelProperty("组别id")
private Long groupId;
@ApiModelProperty("组别信息")
private int groupRemark;
@ApiModelProperty("选手姓名")
private String playerName;
@ApiModelProperty("性别")
private int gender;
@ApiModelProperty("身份证号")
private String idCard;
@ApiModelProperty("身份证正面照片 或户口本照片id")
private Long idCardFrontId;
@ApiModelProperty("身份证正面照片 或户口本照片 (浏览路径)")
private String idCardFront ;
@ApiModelProperty("身份证反面照片ID")
private Long idCardBackId;
@ApiModelProperty("身份证反面照片(浏览路径)")
private String idCardBack;
@ApiModelProperty("一寸证件照id")
private Long idPhoneId;
@ApiModelProperty("一寸证件照(浏览路径)")
private String idPhone;
@ApiModelProperty("学籍证明id")
private Long studentRecordId;
@ApiModelProperty("学籍证明(浏览路径)")
private String studentRecord;
@ApiModelProperty("体检证明id")
private Long healthRecordId;
@ApiModelProperty("体检证明(浏览路径)")
private String healthRecord;
@ApiModelProperty("保险证明id")
private Long insuranceRecordId;
@ApiModelProperty("保险证明(浏览路径)")
private String insuranceRecord;
}
@Data
@ApiModel("查找性对或教练的详细基本信息")
public static class GetCoach{
@ApiModelProperty("教练或领队的id,有则修改,没有则添加")
private Long coachId;
@ApiModelProperty("参赛单位id")
private Long companyId;
@ApiModelProperty("身份: 0领队 1教练")
private int identity;
@ApiModelProperty("姓名")
private String name;
@ApiModelProperty("性别")
private int gender;
@ApiModelProperty("手机号")
private String phone;
@ApiModelProperty("身份证号")
private String idCard;
@ApiModelProperty("证件照id")
private Long idPhotoId;
@ApiModelProperty("证件照(浏览路径)")
private String idPhoto;
@ApiModelProperty("教练证id")
private Long coachCertificateId;
@ApiModelProperty("教练证(浏览路径)")
private String coachCertificate;
}
@Data
public static class TeamGroupRemark{
private int sexGroup;
private String groupRemark = "123";
}
}

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

@ -0,0 +1,113 @@
package com.ccsens.mt.bean.vo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* @author li
*/
@Data
public class TableVo {
@Data
@ApiModel("XXXX大赛报名表")
public static class CompeteJoin{
@ApiModelProperty("参赛项目")
private String competeProject;
@ApiModelProperty("组别")
private String competeGroup;
@ApiModelProperty("姓名")
private String name;
@ApiModelProperty("性别")
private String gender;
@ApiModelProperty("年龄")
private int age;
@ApiModelProperty("身份证号")
private String idCard;
@ApiModelProperty("身份证明")
private String idCardPromise;
@ApiModelProperty("一寸证件照")
private String picture;
@ApiModelProperty("学籍证明/俱乐部证明")
private String studentPromise;
@ApiModelProperty("体检证明")
private String bodyTest;
@ApiModelProperty("人身意外伤害保险证明")
private String bodyProtect;
@ApiModelProperty("参赛队伍")
private String joinTeam;
}
@Data
@ApiModel("参赛人数统计表")
public static class CompeteOverview{
@ApiModelProperty("参赛队伍名称")
private String companyName;
@ApiModelProperty("当前添加的教练的人数")
private int coachNum;
@ApiModelProperty("当前添加的领队的人数")
private int guideNum;
@ApiModelProperty("当前添加的参赛人员的人数")
private int playerNum;
@ApiModelProperty("队伍总人数")
private int sum;
}
// @Data
// @ApiModel("XXX比赛报名汇总表")
// public static class CompeteAllCount{
// @ApiModelProperty("参赛项目")
// private String projectName;
// @ApiModelProperty("小学男子组")
// private int primaryMale;
// @ApiModelProperty("小学女子组")
// private int primaryFemale;
// @ApiModelProperty("小学混合组")
// private int primary;
// @ApiModelProperty("中学男子组")
// private int middleMale;
// @ApiModelProperty("中学女子组")
// private int middleFemale;
// @ApiModelProperty("中学混合组")
// private int middle;
// @ApiModelProperty("高职院校男子组")
// private int highMale;
// @ApiModelProperty("高职院校女子组")
// private int highFemale;
// @ApiModelProperty("高职院校混合组")
// private int high;
// @ApiModelProperty("本科院校男子组")
// private int collegeMale;
// @ApiModelProperty("本科院校女子组")
// private int collegeFemale;
// @ApiModelProperty("本科院校混合组")
// private int college;
// @ApiModelProperty("俱乐部男子组(14岁及以下)")
// private int clubMale;
// @ApiModelProperty("俱乐部女子组(14岁及以下)")
// private int clubFemale;
// @ApiModelProperty("俱乐部混合组(14岁及以下)")
// private int club;
// }
@Data
@ApiModel("XXX比赛报名汇总表")
@JsonIgnoreProperties(value = { "handler" })
public static class CompeteAllCount{
@ApiModelProperty("参赛id")
private String projectId;
@ApiModelProperty("参赛项目")
private String projectName;
@ApiModelProperty("参赛人数 顺序:小学(女男混)→中学(女男混)→高职院校(女男混)→本科院校(女男混)→俱乐部(女男混)")
private List<Integer> nums = new ArrayList<>();
}
}

26
mt/src/main/java/com/ccsens/mt/bean/vo/VideoVo.java

@ -0,0 +1,26 @@
package com.ccsens.mt.bean.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author
*/
@Data
public class VideoVo {
@Data
@ApiModel("查看选手上传的视频的信息")
public static class GetVideoInfo{
@ApiModelProperty("选手上传视频记录id")
private Long videoId;
@ApiModelProperty("文件id")
private Long fileId;
@ApiModelProperty("视频地址")
private String videoUrl;
@ApiModelProperty("上传时间")
private Long uploadTime;
}
}

119
mt/src/main/java/com/ccsens/mt/persist/dao/CompeteCompanyDao.java

@ -0,0 +1,119 @@
package com.ccsens.mt.persist.dao;
import com.ccsens.mt.bean.dto.ProvinceCompeteDto;
import com.ccsens.mt.bean.po.CompeteCoach;
import com.ccsens.mt.bean.po.CompeteCompany;
import com.ccsens.mt.bean.vo.CompeteVo;
import com.ccsens.mt.bean.vo.ProvinceCompeteVo;
import com.ccsens.mt.persist.mapper.CompeteCompanyMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* @author
*/
@Repository
public interface CompeteCompanyDao extends CompeteCompanyMapper {
/**
* 查找当前用户填写的信息的概览
* @param competeTimeId 大赛id
* @param userId userId
* @return 返回信息概览
*/
ProvinceCompeteVo.CompeteOverview getCompanyOverview(@Param("competeTimeId")Long competeTimeId, @Param("userId")Long userId);
/**
* 通过组别id查询选手信息
* @param companyId 单位id
* @param groupId 组别id
* @param projectId 项目id
* @return 返回选手信息
*/
List<ProvinceCompeteVo.GroupAndPlayer> queryPlayerByGroupId(@Param("type")int type,@Param("companyId")Long companyId,@Param("groupId")Long groupId,@Param("projectId")Long projectId);
/**
* 查找大赛所有的比赛项目
* @param competeTimeId 大赛id
* @return 返回所有比赛项目信息
*/
List<CompeteVo.CompeteProject> queryProjectByCompeteTimeId(@Param("competeTimeId")Long competeTimeId);
/**
* 查找一级项目
* @param type 比赛类型
* @return 返回一级项目信息
*/
List<ProvinceCompeteVo.FirstProject> queryFirstProjectByCompeteTimeId(@Param("type")int type);
/**
* 查找二级项目
* @param firstProjectId 一级项目id
* @return 返回二级项目信息
*/
List<ProvinceCompeteVo.CompeteSecondProject> queryProjectByFirstProject(@Param("firstProjectId")Long firstProjectId);
/**
* 查找单位
* @param
* @return 返回单位信息
*/
ProvinceCompeteVo.CompeteCompany getCompany(@Param("competeTimeId")Long competeTimeId,@Param("userId")Long userId);
/**
* 查看单位报名的项目的数量
* @param companyId 单位id
* @return 返回单位参加的项目的数量
*/
int getJoinProjectNum(@Param("companyId")Long companyId);
/**
* 查找单位在某项目下的某个组别的参赛数量个人项目
* @param projectId 项目id
* @param companyId 单位id
* @param groupId 组别id
* @return 返回参加的数量
*/
int getNumByCompanyAndGroup(@Param("projectId")Long projectId, @Param("companyId")Long companyId, @Param("groupId")Long groupId,@Param("competeTimeId")Long competeTimeId);
/**
* 查看此用户在这届大赛参加了几个团队项目
* @param competeTimeId 大赛id
* @param playerId 选手id
* @return 参加的数量
*/
int getTeamNumByPlayerId(@Param("competeTimeId")Long competeTimeId, @Param("playerId")Long playerId);
/**
* 查看教练或领队的详细信息
* @param coachId 教练或领队的id
* @return 返回详细信息
*/
ProvinceCompeteVo.GetCoach getCoachInfo(@Param("coachId")Long coachId);
/**
* 查找团队项目下的参赛选手信息
* @param projectId
* @param type
* @return
*/
List<ProvinceCompeteVo.GroupAndPlayer> getPlayerByTeamProject(@Param("projectId")Long projectId, @Param("type")Byte type);
/**
* 根据大赛id查看当前大赛所有队伍信息,以及联系人的信息
* @param CompeteTimeId 大赛CompeteTimeId
* @return 返回参赛队伍详细信息
*/
List<CompeteCompany> selectByCompeteTimeId(Long CompeteTimeId);
/**
* 根据查出来得大赛得单位的id查询教练和领队得信息
* @param companyId 单位id
* @return
*/
List<CompeteCoach> selectByCompanyId(@Param("companyId")Long companyId);
}

119
mt/src/main/java/com/ccsens/mt/persist/dao/CompeteEnrollDao.java

@ -0,0 +1,119 @@
package com.ccsens.mt.persist.dao;
import com.ccsens.mt.bean.po.CompeteProjectPlayer;
import com.ccsens.mt.bean.vo.CompeteVo;
import com.ccsens.mt.persist.mapper.CompetePlayerMapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 参赛选手信息
*/
public interface CompeteEnrollDao extends CompetePlayerMapper {
/**
* 查询项目信息
* @param type 项目类型
* @return 项目信息
*/
List<CompeteVo.ProjectInfo> getProject(@Param("type")int type);
/**
* 查询项目信息
* @param projectId 项目id
* @return 项目参与者id和组别id
*/
List<CompeteVo.ProjectPlayer> getProjectPlayer(@Param("projectId")long projectId);
/**
* 查询项目信息
* @param playerId 参赛者id
* @return 项目参与者信息nameidcardphone,groupname
*/
CompeteVo.EnrollPlayInfo getPlayerAndProject(@Param("playerId")long playerId);
/**
* 查询项目信息
* @param player_id 团队id
* @return 团队参赛的组别
*/
CompeteVo.EnrollPlayInfo getPlayerAndProjectForTeam(@Param("teamId")long teamId,@Param("player_id")long player_id);
/**
* 查询参赛团队id
* @param projectId 项目id
* @return 参赛团队id
*/
List<CompeteVo.Team> getTeamId(@Param("projectId")long projectId);
/**
* 查询参赛团队id
* @param teamId 团队id
* @return 团队成员id
*/
List<CompeteVo.Team> getTeamPlayerId(@Param("teamId")long teamId);
/**
* 查询个人项目的每个组别id和组别名
* @param projectId 项目id
* @return 组别id
*/
List<CompeteVo.Count> getGroupCount(@Param("projectId")long projectId);
/**
* 查询个人项目的每个组别人数
* @param competeGroupId 组别id
* @return 团队成员id
*/
int getGroupPlayCount(@Param("competeGroupId")long competeGroupId);
/**
* 查询个人项目的每个组别id和组别名
* @param projectId xiangmu id
* @return 团队成员id
*/
List<CompeteVo.Count> getGroupIdFroPlayer(@Param("projectId")long projectId);
/**
* 查询团队项目的每个组别id和组别名
* @param projectId xiangmu id
* @return 团队成员id
*/
List<CompeteVo.Count> getGroupIdFroTeam(@Param("projectId")long projectId);
/**
* 查询团队项目的每个组别id和组别名
* @param competeGroupId 组别id
* @return 团队id
*/
List<CompeteVo.Count> getTeamIdByCompeteGroupId(@Param("competeGroupId")long competeGroupId);
/**
* 查询团队项目组别下的人数
* @param teamId 组别id
* @return renshu
*/
int getCountByTeamId(@Param("teamId")long teamId);
/**
* 查询团队项目的每个组别参赛队伍数
* @param competeGroupId 组别id
* @return 团队成员id
*/
int getTeamCount(@Param("competeGroupId")long competeGroupId);
/**
* 查询团队项目的每个组别参赛队伍数
* @param type 组别id
* @return 团队成员id
*/
List<CompeteVo.Count> getGroupIdNameFromGroup(@Param("type")long type);
/**
* 查询项目信息
* @param projectId 团队id
* @return 单人项目选手信息
*/
CompeteProjectPlayer getPlayerInfoSingle(@Param("project_id")long projectId);
}

61
mt/src/main/java/com/ccsens/mt/persist/dao/CompetePlayerDao.java

@ -1,9 +1,14 @@
package com.ccsens.mt.persist.dao;
import com.ccsens.mt.bean.po.CompetePlayer;
import com.ccsens.mt.bean.vo.CompeteVo;
import com.ccsens.mt.bean.vo.ProvinceCompeteVo;
import com.ccsens.mt.bean.vo.TableVo;
import com.ccsens.mt.persist.mapper.CompetePlayerMapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 参赛选手信息
*/
@ -13,5 +18,59 @@ public interface CompetePlayerDao extends CompetePlayerMapper {
* @param userId 用户ID
* @return 选手信息
*/
CompeteVo.GetPlayerInfo getInfo(@Param("userId") Long userId);
CompeteVo.GetPlayerInfo getInfo(@Param("userId") Long userId,@Param("competeTimeId")Long competeTimeId);
/**
* 查询院系信息和裁判领队填表人的信息
* @param id 院系id
* @return 返回
*/
CompeteVo.DepartmentInfo getDepartment(@Param("id") Long id);
/**
* 查询项目信息
* @param type
* @return
*/
List<CompeteVo.DepartmentProject> getDepartmentProject(@Param("type")int type);
/**
* 获取单人项目参赛人员名单用逗号分隔
* @param competeProjectId 项目id
* @return 返回名字
*/
String getMemberNamesByProjectId(@Param("companyId")Long companyId,@Param("competeProjectId")Long competeProjectId,@Param("genderGroup")int genderGroup);
/**
* 获取团队项目参赛人员名单用逗号分隔
* @param competeProjectId 项目id
* @return 返回名字
*/
String getTeamMemberNamesByProjectId(@Param("companyId")Long companyId,@Param("competeProjectId")Long competeProjectId,@Param("genderGroup")int genderGroup);
Long getCompanyIdByUser(@Param("userId")Long userId);
/**
* 查找单位内的成员列表
* @param companyId 单位id
* @return 返回成员列表
*/
List<ProvinceCompeteVo.PlayerByCompanyId> queryPlayerByCompanyId(@Param("companyId")Long companyId);
/**
* 查找选手详细信息
* @param playerId 选手id
* @return 返回详细信息
*/
ProvinceCompeteVo.PlayerInfo getPlayerByPlayerId(@Param("playerId")Long playerId);
/**
* 查找团队的性别组和组别信息备注
* @param teamId 团队id
* @return 返回性别组和备注
*/
ProvinceCompeteVo.TeamGroupRemark getTeamGroupRemark(@Param("teamId")Long teamId);
List<TableVo.CompeteAllCount> getTeamJoinNumByType(@Param("timeId")Long timeId);
List<Integer> getTeamJoinNumByProjectId(@Param("projectId")Long projectId);
}

13
mt/src/main/java/com/ccsens/mt/persist/dao/CompeteTeamDao.java

@ -67,4 +67,17 @@ public interface CompeteTeamDao extends CompeteTeamMapper {
* @return
*/
long countTiwnTeam(@Param("playerId") Long playerId, @Param("competeTimeId") Long competeTimeId);
/**
* 通过比赛项目id查找项目下的团队信息
* @param competeProjectId
* @return
*/
List<CompeteVo.TeamInfoByProject> getTeamByProjectId(@Param("competeProjectId")Long competeProjectId,@Param("competeTimeId")Long competeTimeId);
/**
* 通过比赛项目id查找项目下的选手id
* @param competeProjectId
* @return
*/
List<CompeteVo.PlayerInfoByProject> getPlayerByProjectId(@Param("competeProjectId")Long competeProjectId, @Param("competeTimeId")Long competeTimeId);
}

10
mt/src/main/java/com/ccsens/mt/persist/dao/CompeteTimeDao.java

@ -40,4 +40,14 @@ public interface CompeteTimeDao extends CompeteTimeMapper {
* @return 参赛项目信息
*/
List<CompeteVo.CompeteProject> queryCompeteProjectByType(@Param("type") int type);
/**
* 通过项目查看组别信息
* @param type 比赛类型
* @param projectId 项目id
* @return 返回组别信息
*/
List<CompeteVo.CompeteGroup> queryGroupByProject(@Param("type") int type, @Param("projectId") Long projectId);
}

11
mt/src/main/java/com/ccsens/mt/persist/dao/LevelUpDao.java

@ -1,9 +1,12 @@
package com.ccsens.mt.persist.dao;
import com.ccsens.mt.bean.vo.LevelVo;
import com.ccsens.mt.persist.mapper.LevelUpMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* @author
*/
@ -16,4 +19,12 @@ public interface LevelUpDao extends LevelUpMapper{
* @return 返回晋级信息id
*/
Long getByLevelUserIdAndCode(@Param("levelUserId") Long levelUserId, @Param("competeCode")String competeCode);
/**
* 查找项目的晋级人员信息
* @param competeCode 比赛code
* @param competeTimeId competeTimeId
* @return 返回晋级的人员信息
*/
List<LevelVo.QueryLevelUserInfo> queryLevelUserInfo(@Param("competeCode") String competeCode, @Param("competeTimeId") Long competeTimeId);
}

30
mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteCoachMapper.java

@ -0,0 +1,30 @@
package com.ccsens.mt.persist.mapper;
import com.ccsens.mt.bean.po.CompeteCoach;
import com.ccsens.mt.bean.po.CompeteCoachExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface CompeteCoachMapper {
long countByExample(CompeteCoachExample example);
int deleteByExample(CompeteCoachExample example);
int deleteByPrimaryKey(Long id);
int insert(CompeteCoach record);
int insertSelective(CompeteCoach record);
List<CompeteCoach> selectByExample(CompeteCoachExample example);
CompeteCoach selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") CompeteCoach record, @Param("example") CompeteCoachExample example);
int updateByExample(@Param("record") CompeteCoach record, @Param("example") CompeteCoachExample example);
int updateByPrimaryKeySelective(CompeteCoach record);
int updateByPrimaryKey(CompeteCoach record);
}

30
mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteCompanyRoleMapper.java

@ -0,0 +1,30 @@
package com.ccsens.mt.persist.mapper;
import com.ccsens.mt.bean.po.CompeteCompanyRole;
import com.ccsens.mt.bean.po.CompeteCompanyRoleExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface CompeteCompanyRoleMapper {
long countByExample(CompeteCompanyRoleExample example);
int deleteByExample(CompeteCompanyRoleExample example);
int deleteByPrimaryKey(Long id);
int insert(CompeteCompanyRole record);
int insertSelective(CompeteCompanyRole record);
List<CompeteCompanyRole> selectByExample(CompeteCompanyRoleExample example);
CompeteCompanyRole selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") CompeteCompanyRole record, @Param("example") CompeteCompanyRoleExample example);
int updateByExample(@Param("record") CompeteCompanyRole record, @Param("example") CompeteCompanyRoleExample example);
int updateByPrimaryKeySelective(CompeteCompanyRole record);
int updateByPrimaryKey(CompeteCompanyRole record);
}

30
mt/src/main/java/com/ccsens/mt/persist/mapper/CompetePlayerFamilyMapper.java

@ -0,0 +1,30 @@
package com.ccsens.mt.persist.mapper;
import com.ccsens.mt.bean.po.CompetePlayerFamily;
import com.ccsens.mt.bean.po.CompetePlayerFamilyExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface CompetePlayerFamilyMapper {
long countByExample(CompetePlayerFamilyExample example);
int deleteByExample(CompetePlayerFamilyExample example);
int deleteByPrimaryKey(Long id);
int insert(CompetePlayerFamily record);
int insertSelective(CompetePlayerFamily record);
List<CompetePlayerFamily> selectByExample(CompetePlayerFamilyExample example);
CompetePlayerFamily selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") CompetePlayerFamily record, @Param("example") CompetePlayerFamilyExample example);
int updateByExample(@Param("record") CompetePlayerFamily record, @Param("example") CompetePlayerFamilyExample example);
int updateByPrimaryKeySelective(CompetePlayerFamily record);
int updateByPrimaryKey(CompetePlayerFamily record);
}

30
mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteProjectConfigMapper.java

@ -0,0 +1,30 @@
package com.ccsens.mt.persist.mapper;
import com.ccsens.mt.bean.po.CompeteProjectConfig;
import com.ccsens.mt.bean.po.CompeteProjectConfigExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface CompeteProjectConfigMapper {
long countByExample(CompeteProjectConfigExample example);
int deleteByExample(CompeteProjectConfigExample example);
int deleteByPrimaryKey(Long id);
int insert(CompeteProjectConfig record);
int insertSelective(CompeteProjectConfig record);
List<CompeteProjectConfig> selectByExample(CompeteProjectConfigExample example);
CompeteProjectConfig selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") CompeteProjectConfig record, @Param("example") CompeteProjectConfigExample example);
int updateByExample(@Param("record") CompeteProjectConfig record, @Param("example") CompeteProjectConfigExample example);
int updateByPrimaryKeySelective(CompeteProjectConfig record);
int updateByPrimaryKey(CompeteProjectConfig record);
}

30
mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteProjectGroupMapper.java

@ -0,0 +1,30 @@
package com.ccsens.mt.persist.mapper;
import com.ccsens.mt.bean.po.CompeteProjectGroup;
import com.ccsens.mt.bean.po.CompeteProjectGroupExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface CompeteProjectGroupMapper {
long countByExample(CompeteProjectGroupExample example);
int deleteByExample(CompeteProjectGroupExample example);
int deleteByPrimaryKey(Long id);
int insert(CompeteProjectGroup record);
int insertSelective(CompeteProjectGroup record);
List<CompeteProjectGroup> selectByExample(CompeteProjectGroupExample example);
CompeteProjectGroup selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") CompeteProjectGroup record, @Param("example") CompeteProjectGroupExample example);
int updateByExample(@Param("record") CompeteProjectGroup record, @Param("example") CompeteProjectGroupExample example);
int updateByPrimaryKeySelective(CompeteProjectGroup record);
int updateByPrimaryKey(CompeteProjectGroup record);
}

30
mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteVideoMapper.java

@ -0,0 +1,30 @@
package com.ccsens.mt.persist.mapper;
import com.ccsens.mt.bean.po.CompeteVideo;
import com.ccsens.mt.bean.po.CompeteVideoExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface CompeteVideoMapper {
long countByExample(CompeteVideoExample example);
int deleteByExample(CompeteVideoExample example);
int deleteByPrimaryKey(Long id);
int insert(CompeteVideo record);
int insertSelective(CompeteVideo record);
List<CompeteVideo> selectByExample(CompeteVideoExample example);
CompeteVideo selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") CompeteVideo record, @Param("example") CompeteVideoExample example);
int updateByExample(@Param("record") CompeteVideo record, @Param("example") CompeteVideoExample example);
int updateByPrimaryKeySelective(CompeteVideo record);
int updateByPrimaryKey(CompeteVideo record);
}

721
mt/src/main/java/com/ccsens/mt/service/CompeteService.java

@ -2,11 +2,19 @@ package com.ccsens.mt.service;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.IdcardUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.ccsens.cloudutil.bean.tall.dto.WpsDto;
import com.ccsens.cloudutil.feign.TallFeignClient;
import com.ccsens.mt.bean.dto.CompeteDto;
import com.ccsens.mt.bean.dto.LevelDto;
import com.ccsens.mt.bean.po.*;
import com.ccsens.mt.bean.vo.CompeteVo;
import com.ccsens.mt.bean.vo.TableVo;
import com.ccsens.mt.persist.dao.CompeteEnrollDao;
import com.ccsens.mt.persist.dao.CompetePlayerDao;
import com.ccsens.mt.persist.dao.CompeteTeamDao;
import com.ccsens.mt.persist.dao.CompeteTimeDao;
@ -16,14 +24,24 @@ import com.ccsens.util.*;
import com.ccsens.util.bean.dto.QueryDto;
import com.ccsens.util.exception.BaseException;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFRow;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.core.io.DefaultResourceLoader;
import org.springframework.core.io.ResourceLoader;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.io.IOException;
import java.io.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author
@ -31,7 +49,7 @@ import java.util.List;
@Slf4j
@Service
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public class CompeteService implements ICompeteService{
public class CompeteService implements ICompeteService {
@Resource
private CompeteTimeDao competeTimeDao;
@Resource
@ -52,7 +70,18 @@ public class CompeteService implements ICompeteService{
private CompeteProjectPlayerMapper competeProjectPlayerMapper;
@Resource
private CompeteGroupMapper competeGroupMapper;
@Resource
private ILevelUpService levelUpService;
@Resource
private CompetePlayerFamilyMapper competePlayerFamilyMapper;
@Resource
private CompeteProjectGroupMapper competeProjectGroupMapper;
@Resource
private CompeteEnrollDao competeEnrollDao;
@Resource
private TallFeignClient tallFeignClient;
@Resource
private CommonFileMapper commonFileMapper;
/**
* 查看第几届
@ -60,7 +89,7 @@ public class CompeteService implements ICompeteService{
@Override
public CompeteVo.CompeteTime getCompeteTime(QueryDto<CompeteDto.CompeteType> params) {
CompeteDto.CompeteType competeType = params.getParam();
return competeTimeDao.getCompeteTimeByType(competeType.getType(),System.currentTimeMillis());
return competeTimeDao.getCompeteTimeByType(competeType.getType(), System.currentTimeMillis());
}
/**
@ -72,6 +101,24 @@ public class CompeteService implements ICompeteService{
return competeTimeDao.queryCompeteGroupByType(competeType.getType());
}
@Override
public List<CompeteVo.CompeteGroup> queryGroupByProject(QueryDto<CompeteDto.QueryGroupByProject> params) {
CompeteDto.QueryGroupByProject competeType = params.getParam();
List<CompeteVo.CompeteGroup> competeGroups = competeTimeDao.queryGroupByProject(competeType.getType(), competeType.getProjectId());
//
//
// CompeteDto.QueryGroupByProject competeType = params.getParam();
// List<CompeteVo.CompeteGroup> competeGroups = competeTimeDao.queryCompeteGroupByType(competeType.getType());
// competeGroups.forEach(competeGroup -> {
// CompeteProjectGroupExample competeProjectGroupExample = new CompeteProjectGroupExample();
// competeProjectGroupExample.createCriteria().andGroupIdEqualTo(competeGroup.getGroupId()).andProjectIdEqualTo(competeType.getProjectId());
// if(competeProjectGroupMapper.1ByExample(competeProjectGroupExample) == 0){
// competeGroups.remove(competeGroup);
// }
// });
return competeGroups;
}
/**
* 模糊查询参赛单位
*/
@ -79,12 +126,12 @@ public class CompeteService implements ICompeteService{
public List<CompeteVo.CompeteCompany> queryCompeteCompany(QueryDto<CompeteDto.CompeteTypeAndKey> params) {
CompeteDto.CompeteTypeAndKey competeTypeAndKey = params.getParam();
String key = competeTypeAndKey.getType() + Constant.Redis.COMPETE_COMPANY;
Object list = redisUtil.lGet(key,0,-1);
Object list = redisUtil.lGet(key, 0, -1);
List<CompeteVo.CompeteCompany> competeCompanyList = (List<CompeteVo.CompeteCompany>) list;
List<CompeteVo.CompeteCompany> companyList = new ArrayList<>();
competeCompanyList.forEach(competeCompany -> {
if(competeCompany.getGroupName().contains(competeTypeAndKey.getKey())){
if (competeCompany.getGroupName().contains(competeTypeAndKey.getKey())) {
companyList.add(competeCompany);
}
});
@ -102,8 +149,8 @@ public class CompeteService implements ICompeteService{
redisUtil.del(key);
//根据type查找数据库内所有参赛单位
List<CompeteVo.CompeteCompany> competeCompanyList = competeTimeDao.queryCompeteCompanyByType(competeType.getType());
if(CollectionUtil.isNotEmpty(competeCompanyList)){
competeCompanyList.forEach(competeCompany -> redisUtil.lSet(key,competeCompany,Constant.Redis.COMPETE_COMPANY_TIME));
if (CollectionUtil.isNotEmpty(competeCompanyList)) {
competeCompanyList.forEach(competeCompany -> redisUtil.lSet(key, competeCompany, Constant.Redis.COMPETE_COMPANY_TIME));
}
}
@ -125,44 +172,74 @@ public class CompeteService implements ICompeteService{
//检查此用户是否已经报名
CompetePlayerExample playerExample = new CompetePlayerExample();
playerExample.createCriteria().andUserIdEqualTo(userId);
if(competePlayerDao.countByExample(playerExample) != 0){
if (competePlayerDao.countByExample(playerExample) != 0) {
throw new BaseException(CodeEnum.PLAYER_INFO_ALREADY);
}
//检查组别是否存在
CompeteGroup group = competeGroupMapper.selectByPrimaryKey(competePlayerInfo.getGroupId());
if(ObjectUtil.isNull(group)){
if (ObjectUtil.isNull(group)) {
throw new BaseException(CodeEnum.PARAM_ERROR);
}
//检查参赛单位是否存在,不存在则添加
CompeteCompany company;
CompeteCompanyExample competeCompanyExample = new CompeteCompanyExample();
competeCompanyExample.createCriteria().andNameEqualTo(competePlayerInfo.getCompanyName());
List<CompeteCompany> companyList = competeCompanyMapper.selectByExample(competeCompanyExample);
if(CollectionUtil.isEmpty(companyList)){
company = new CompeteCompany();
company.setId(snowflake.nextId());
company.setType((byte) competePlayerInfo.getType());
company.setName(competePlayerInfo.getCompanyName());
competeCompanyMapper.insertSelective(company);
//更新缓存
String key = competePlayerInfo.getType() + Constant.Redis.COMPETE_COMPANY;
CompeteVo.CompeteCompany competeCompany = new CompeteVo.CompeteCompany();
competeCompany.setGroupId(company.getId());
competeCompany.setGroupName(company.getName());
redisUtil.lSet(key,competeCompany,Constant.Redis.COMPETE_COMPANY_TIME);
}else {
company = companyList.get(0);
CompeteCompany company = new CompeteCompany();
if (StrUtil.isNotEmpty(competePlayerInfo.getCompanyName())) {
CompeteCompanyExample competeCompanyExample = new CompeteCompanyExample();
competeCompanyExample.createCriteria().andNameEqualTo(competePlayerInfo.getCompanyName());
List<CompeteCompany> companyList = competeCompanyMapper.selectByExample(competeCompanyExample);
if (CollectionUtil.isEmpty(companyList)) {
company.setId(snowflake.nextId());
company.setType((byte) competePlayerInfo.getType());
company.setName(competePlayerInfo.getCompanyName());
competeCompanyMapper.insertSelective(company);
//更新缓存
String key = competePlayerInfo.getType() + Constant.Redis.COMPETE_COMPANY;
CompeteVo.CompeteCompany competeCompany = new CompeteVo.CompeteCompany();
competeCompany.setGroupId(company.getId());
competeCompany.setGroupName(company.getName());
redisUtil.lSet(key, competeCompany, Constant.Redis.COMPETE_COMPANY_TIME);
} else {
company = companyList.get(0);
}
}
//添加基本信息
CompetePlayer player = new CompetePlayer();
BeanUtil.copyProperties(competePlayerInfo,player);
BeanUtil.copyProperties(competePlayerInfo, player);
player.setId(snowflake.nextId());
player.setUserId(userId);
player.setCompeteTimeId(competePlayerInfo.getCompeteTimeId());
player.setCompeteGroupId(competePlayerInfo.getGroupId());
player.setCompanyId(company.getId());
if (ObjectUtil.isNotNull(company)) {
player.setCompanyId(company.getId());
}
competePlayerDao.insertSelective(player);
//添加亲子组其他参赛人员信息
if (StrUtil.isNotEmpty(competePlayerInfo.getFamily())) {
String names = StringUtil.replaceComma(competePlayerInfo.getFamily());
String[] familyNames = names.split(",");
if (ObjectUtil.isNotNull(familyNames)) {
for (String familyName : familyNames) {
CompetePlayer family = new CompetePlayer();
family.setId(snowflake.nextId());
family.setName(familyName);
family.setCompeteGroupId(competePlayerInfo.getGroupId());
competePlayerDao.insertSelective(family);
//添加选手和其他参赛选手的关联信息
CompetePlayerFamily competePlayerFamily = new CompetePlayerFamily();
competePlayerFamily.setId(snowflake.nextId());
competePlayerFamily.setPlayerId(player.getId());
competePlayerFamily.setChildrenId(family.getId());
competePlayerFamilyMapper.insertSelective(competePlayerFamily);
}
}
}
return new CompeteVo.CompetePlayerInfo(player, group, company,getCompeteProjectAll(params.getUserId(), params.getParam().getCompeteTimeId()));
// TODO
LevelDto.LevelUserDto levelUserDto = new LevelDto.LevelUserDto(player.getId(), null, player.getName(), null);
log.info("将选手信息储存在晋级系统中:{}", levelUserDto);
levelUpService.saveLevelUser(levelUserDto);
return new CompeteVo.CompetePlayerInfo(player, group, company, getCompeteProjectAll(params.getUserId(), params.getParam().getCompeteTimeId()));
}
/**
@ -174,6 +251,33 @@ public class CompeteService implements ICompeteService{
return competeTimeDao.queryCompeteProjectByType(competeType.getType());
}
/**
* 根据组别查看比赛项目信息
*/
@Override
public List<CompeteVo.CompeteSecondProject> queryProjectByGroup(QueryDto<CompeteDto.QueryProjectByGroup> params) {
CompeteDto.QueryProjectByGroup competeType = params.getParam();
List<CompeteVo.CompeteSecondProject> competeSecondProjects = new ArrayList<>();
CompeteProjectExample projectExample = new CompeteProjectExample();
projectExample.createCriteria().andTypeEqualTo((byte) competeType.getType()).andLevelEqualTo((byte) 2);
List<CompeteProject> competeProjectList = competeProjectMapper.selectByExample(projectExample);
if (CollectionUtil.isNotEmpty(competeProjectList)) {
competeProjectList.forEach(competeProject -> {
CompeteProjectGroupExample projectGroupExample = new CompeteProjectGroupExample();
projectGroupExample.createCriteria().andProjectIdEqualTo(competeProject.getId())
.andGroupIdEqualTo(competeType.getGroupId());
if (competeProjectGroupMapper.countByExample(projectGroupExample) != 0) {
competeProjectList.remove(competeProject);
} else {
CompeteVo.CompeteSecondProject secondProject = new CompeteVo.CompeteSecondProject();
BeanUtil.copyProperties(competeProject, secondProject);
competeSecondProjects.add(secondProject);
}
});
}
return competeSecondProjects;
}
/**
* 提交选择的比赛项目
*/
@ -192,9 +296,9 @@ public class CompeteService implements ICompeteService{
// 个人赛
long joinedNum = competeTeamDao.countTiwnTeam(player.getId(), params.getParam().getCompeteTimeId());
log.info("个人赛参赛数量:{}", joinedNum);
if (joinedNum >= Constant.Compete.TIWN_MAX_NUM) {
throw new BaseException(CodeEnum.JOINED_MORE);
}
// if (joinedNum >= Constant.Compete.TIWN_MAX_NUM) {
// throw new BaseException(CodeEnum.JOINED_MORE);
// }
CompeteProjectPlayer projectPlayer = new CompeteProjectPlayer();
projectPlayer.setId(snowflake.nextId());
projectPlayer.setPlayerId(player.getId());
@ -206,7 +310,7 @@ public class CompeteService implements ICompeteService{
} else {
// 团体赛
pageJoinedTeam(project, player, params.getParam().getCompeteTimeId(), null ,false);
pageJoinedTeam(project, player, params.getParam().getCompeteTimeId(), null, false);
// 创建团队
CompeteTeam team = new CompeteTeam();
team.setId(snowflake.nextId());
@ -215,7 +319,9 @@ public class CompeteService implements ICompeteService{
team.setCompeteTimeId(params.getParam().getCompeteTimeId());
team.setCertificate(params.getParam().getCertificate());
team.setGenderGroup(player.getGender());
String qrCode = PropUtil.signUpUrl + "home?teamId=" + team.getId();
String url = PropUtil.signUpUrl + "home?teamId=" + team.getId();
String qrCode = WebConstant.Wx.getAuthedUrl(url, WebConstant.WxGzhAuthType.SNSAPI_USERINFO
, (String) redisUtil.get(WebConstant.Wx.ACCOUNT_WX_APPID));
String qrCodeVisit = QrCodeUtil.urlToQRCode(qrCode, PropUtil.path);
team.setQrCode(qrCodeVisit);
competeTeamDao.insertSelective(team);
@ -229,11 +335,13 @@ public class CompeteService implements ICompeteService{
}
CompeteGroup group = competeGroupMapper.selectByPrimaryKey(player.getCompeteGroupId());
CompeteCompany company = competeCompanyMapper.selectByPrimaryKey(player.getCompanyId());
CompeteVo.CompetePlayerInfo info = new CompeteVo.CompetePlayerInfo(player, group, company,getCompeteProjectAll(params.getUserId(), params.getParam().getCompeteTimeId()));
CompeteVo.CompetePlayerInfo info = new CompeteVo.CompetePlayerInfo(player, group, company, getCompeteProjectAll(params.getUserId(), params.getParam().getCompeteTimeId()));
LevelDto.LevelUpDto levelUpDto = new LevelDto.LevelUpDto(params.getParam().getCompeteTimeId(), params.getParam().getCompeteProjectId().toString(), player.getId());
log.info("添加晋级表信息,{}", levelUpDto);
levelUpService.joinCompete(levelUpDto);
log.info("{}参加返回:{}", params.getUserId(), info);
return info;
@ -258,7 +366,7 @@ public class CompeteService implements ICompeteService{
return getCompeteProjectAll(params.getUserId(), params.getParam().getCompeteTimeId());
}
private CompeteVo.CompeteProjectAllByUser getCompeteProjectAll(Long userId, Long competeTimeId){
private CompeteVo.CompeteProjectAllByUser getCompeteProjectAll(Long userId, Long competeTimeId) {
List<CompeteVo.CompeteTiwnProject> competeTiwnProjects = competeTeamDao.queryTiwn(userId, competeTimeId);
List<CompeteVo.CompeteTeamProject> competeTeamProjects = competeTeamDao.queryTeam(userId, competeTimeId);
//封装队员信息和总队员数
@ -280,15 +388,15 @@ public class CompeteService implements ICompeteService{
*/
@Override
public String getQrCodeByTeamId(QueryDto<CompeteDto.CompeteProjectPlayer> params) {
return competeTeamDao.getQrCodeByTeamId(params.getParam().getProjectPlayerId());
return PropUtil.imgDomain + competeTeamDao.getQrCodeByTeamId(params.getParam().getProjectPlayerId());
}
/**
* 查看个人基本报名信息
*/
@Override
public CompeteVo.GetPlayerInfo getCompetePlayerInfo(QueryDto params) {
return competePlayerDao.getInfo(params.getUserId());
public CompeteVo.GetPlayerInfo getCompetePlayerInfo(QueryDto<CompeteDto.CompeteTime> params) {
return competePlayerDao.getInfo(params.getUserId(), params.getParam().getCompeteTimeId());
}
/**
@ -310,7 +418,7 @@ public class CompeteService implements ICompeteService{
// 项目信息
CompeteProject project = competeProjectMapper.selectByPrimaryKey(team.getProjectId());
// 判断是否已加入其他团队
pageJoinedTeam(project, player, team.getCompeteTimeId(), creator, true);
pageJoinedTeam(project, player, team.getCompeteTimeId(), creator, true);
// 判断团队人数
CompeteTeamMemberExample teamMemberExample = new CompeteTeamMemberExample();
teamMemberExample.createCriteria().andCompeteTeamIdEqualTo(team.getId());
@ -341,16 +449,17 @@ public class CompeteService implements ICompeteService{
parent = competeProjectMapper.selectByPrimaryKey(project.getParentId());
}
CompeteVo.CompeteTeamProject teamProject = new CompeteVo.CompeteTeamProject(team, Constant.Compete.TEAM_LEADER_NO, project, parent == null ? "" : parent.getName(), members);
CompeteVo.CompeteTeamProject teamProject = new CompeteVo.CompeteTeamProject(team, Constant.Compete.TEAM_LEADER_NO, project, parent == null ? "" : parent.getName(), members);
return teamProject;
}
/**
* 判断是否已加入其他团队
* @param project 项目信息
*
* @param project 项目信息
* @param competeTimeId 比赛ID
* @param player 选手信息
* @param creator 队长信息
* @param player 选手信息
* @param creator 队长信息
*/
private void pageJoinedTeam(CompeteProject project, CompetePlayer player, Long competeTimeId, CompetePlayer creator, boolean pageLeader) {
long joinedTeam = 0;
@ -359,11 +468,11 @@ public class CompeteService implements ICompeteService{
// 1.与队长同单位且同组别
if (pageLeader) {
if (!player.getCompanyId().equals(creator.getCompanyId())) {
log.info("单位不一样:{},{}",player.getCompanyId(), creator.getCompanyId());
log.info("单位不一样:{},{}", player.getCompanyId(), creator.getCompanyId());
throw new BaseException(CodeEnum.TEAM_COMPANY_NOT_SAME);
}
if (player.getCompeteGroupId().longValue() != creator.getCompeteGroupId().longValue()) {
log.info("组别不一样:{},{}",player.getCompanyId(), creator.getCompanyId());
log.info("组别不一样:{},{}", player.getCompanyId(), creator.getCompanyId());
throw new BaseException(CodeEnum.TEAM_GROUP_NOT_SAME);
}
}
@ -389,4 +498,518 @@ public class CompeteService implements ICompeteService{
throw new BaseException(CodeEnum.JOINED_SAME);
}
}
@Override
public CompeteVo.QueryPlayerList queryPlayerList(QueryDto<CompeteDto.CompeteProjectId> params) {
CompeteDto.CompeteProjectId competeTimeAndType = params.getParam();
CompeteVo.QueryPlayerList queryPlayerList = new CompeteVo.QueryPlayerList();
//查找项目信息
CompeteProject competeProject = competeProjectMapper.selectByPrimaryKey(competeTimeAndType.getCompeteProjectId());
if (ObjectUtil.isNull(competeProject)) {
throw new BaseException(CodeEnum.PARAM_ERROR);
}
if (competeProject.getTeam() == 0) {
List<CompeteVo.PlayerInfoByProject> playerInfoByProjectList =
competeTeamDao.getPlayerByProjectId(competeTimeAndType.getCompeteProjectId(), competeTimeAndType.getCompeteTimeId());
queryPlayerList.setPlayerList(playerInfoByProjectList);
} else {
List<CompeteVo.TeamInfoByProject> teamInfoByProjectList =
competeTeamDao.getTeamByProjectId(competeTimeAndType.getCompeteProjectId(), competeTimeAndType.getCompeteTimeId());
queryPlayerList.setTeamList(teamInfoByProjectList);
}
return queryPlayerList;
}
@Override
public void submitProjectAndGroup(QueryDto<CompeteDto.CompetePlayerAndProject> params) {
Long userId = params.getUserId();
CompeteDto.CompetePlayerAndProject playerAndProject = params.getParam();
//检查验证码是否正确
if (!redisUtil.hasKey(RedisKeyManager.getSigninSmsKey(playerAndProject.getPhone()))) {
throw new BaseException(CodeEnum.SMS_CODE_CORRECT);
}
if (!playerAndProject.getSmsCode().equals(redisUtil.get(RedisKeyManager.getSigninSmsKey(playerAndProject.getPhone())).toString())) {
throw new BaseException(CodeEnum.SMS_CODE_CORRECT);
}
//查找此用户是否注册过此身份信息
CompetePlayer player;
CompetePlayerExample playerExample = new CompetePlayerExample();
playerExample.createCriteria().andUserIdEqualTo(userId).andIdCardEqualTo(playerAndProject.getIdCard());
List<CompetePlayer> playerList = competePlayerDao.selectByExample(playerExample);
if (CollectionUtil.isNotEmpty(playerList)) {
//有则直接使用
player = playerList.get(0);
} else {
//没有则添加
player = new CompetePlayer();
BeanUtil.copyProperties(playerAndProject, player);
player.setId(snowflake.nextId());
player.setUserId(userId);
player.setCompeteTimeId(playerAndProject.getCompeteTimeId());
competePlayerDao.insertSelective(player);
}
//读取项目信息
if (CollectionUtil.isNotEmpty(playerAndProject.getProjectAndGroups())) {
playerAndProject.getProjectAndGroups().forEach(projectAndGroup -> {
CompeteProject project = competeProjectMapper.selectByPrimaryKey(projectAndGroup.getProjectId());
log.info("项目信息:{}", project);
if (project == null) {
throw new BaseException(CodeEnum.PARAM_ERROR);
}
CompeteProjectGroupExample projectGroupExample = new CompeteProjectGroupExample();
projectGroupExample.createCriteria().andProjectIdEqualTo(project.getId()).andGroupIdEqualTo(projectAndGroup.getGroupId());
if (competeProjectGroupMapper.countByExample(projectGroupExample) == 0) {
throw new BaseException(CodeEnum.PARAM_ERROR);
}
//单人项目直接添加信息和分组
if (project.getTeam() == Constant.Compete.TEAM_NO) {
// 个人赛
CompeteProjectPlayer projectPlayer = new CompeteProjectPlayer();
projectPlayer.setId(snowflake.nextId());
projectPlayer.setPlayerId(player.getId());
projectPlayer.setProjectId(project.getId());
projectPlayer.setCompeteTimeId(playerAndProject.getCompeteTimeId());
projectPlayer.setCompeteGroupId(projectAndGroup.getGroupId());
competeProjectPlayerMapper.insertSelective(projectPlayer);
} else {
//团队项目创建团队
CompeteTeam team = new CompeteTeam();
team.setId(snowflake.nextId());
team.setCreator(player.getId());
team.setProjectId(project.getId());
team.setCompeteTimeId(playerAndProject.getCompeteTimeId());
team.setCompeteGroupId(projectAndGroup.getGroupId());
competeTeamDao.insertSelective(team);
//将当前选手加入团队
CompeteTeamMember teamMember = new CompeteTeamMember();
teamMember.setId(snowflake.nextId());
teamMember.setPlayerId(player.getId());
teamMember.setCompeteTeamId(team.getId());
teamMember.setCaptain(Constant.Compete.TEAM_LEADER_YES);
competeTeamMemberMapper.insertSelective(teamMember);
//读取其他参赛人员的姓名,并添加为选手
if (StrUtil.isNotEmpty(projectAndGroup.getFamily())) {
String names = StringUtil.replaceComma(projectAndGroup.getFamily());
String[] familyNames = names.split(",");
if (ObjectUtil.isNotNull(familyNames)) {
for (String familyName : familyNames) {
CompetePlayer familyPlayer = new CompetePlayer();
familyPlayer.setId(snowflake.nextId());
familyPlayer.setName(familyName);
competePlayerDao.insertSelective(familyPlayer);
//将其他参赛人员添加至此团队
CompeteTeamMember member = new CompeteTeamMember();
member.setId(snowflake.nextId());
member.setPlayerId(familyPlayer.getId());
member.setCompeteTeamId(team.getId());
member.setCaptain(Constant.Compete.TEAM_LEADER_NO);
competeTeamMemberMapper.insertSelective(member);
}
}
}
}
});
}
}
@Override
public String enrollPlayInfo(CompeteDto.CompeteType params) throws Exception {
List<CompeteVo.EnrollPlayInfo> arrayList = getEnrollPlayInfos(params);
String path = getExcelFilePath(arrayList);
return PropUtil.domain + "file/download/know?path="+path;
}
private String getExcelFilePath(List<CompeteVo.EnrollPlayInfo> arrayList) throws IOException {
//7:将数据放入excel表格
List<List<PoiUtil.PoiUtilCell>> list = new ArrayList<>();
List<PoiUtil.PoiUtilCell> title = new ArrayList<>();
title.add(new PoiUtil.PoiUtilCell("序号"));
title.add(new PoiUtil.PoiUtilCell("比赛项目名称"));
title.add(new PoiUtil.PoiUtilCell("组别"));
title.add(new PoiUtil.PoiUtilCell("报名人姓名"));
title.add(new PoiUtil.PoiUtilCell("身份证号"));
title.add(new PoiUtil.PoiUtilCell("手机号"));
title.add(new PoiUtil.PoiUtilCell("其他参赛人员"));
list.add(title);
Workbook workbook = new XSSFWorkbook();
int i = 1;
for (CompeteVo.EnrollPlayInfo enrollPlayInfo : arrayList) {
//行对象
List<PoiUtil.PoiUtilCell> cells = new ArrayList<>();
cells.add(new PoiUtil.PoiUtilCell(i + "", 1, 1, 300, 18));
//单元格对象
PoiUtil.PoiUtilCell poiUtilCel = new PoiUtil.PoiUtilCell(enrollPlayInfo.getName());
cells.add(poiUtilCel);
PoiUtil.PoiUtilCell poiUtilCell = new PoiUtil.PoiUtilCell(enrollPlayInfo.getGroupName());
cells.add(poiUtilCell);
PoiUtil.PoiUtilCell poiUtilCel2 = new PoiUtil.PoiUtilCell(enrollPlayInfo.getUsername());
cells.add(poiUtilCel2);
PoiUtil.PoiUtilCell poiUtilCel3 = new PoiUtil.PoiUtilCell(enrollPlayInfo.getIdCard());
cells.add(poiUtilCel3);
PoiUtil.PoiUtilCell poiUtilCel4 = new PoiUtil.PoiUtilCell(enrollPlayInfo.getPhone());
cells.add(poiUtilCel4);
if (StrUtil.isNotEmpty(enrollPlayInfo.getOthersName())) {
PoiUtil.PoiUtilCell poiUtilCel5 = new PoiUtil.PoiUtilCell(enrollPlayInfo.getOthersName());
cells.add(poiUtilCel5);
}
list.add(cells);
i++;
}
//生成excel表格对象,并将数据放入
Workbook wbs = PoiUtil.exportWB("总表", list, workbook);
//8:关联金山在线文档
String name = "跳绳比赛报名表" + ".xlsx";
String filepath = "mt/" + DateUtil.today() + "/" + System.currentTimeMillis() + ".xlsx";
String path = PropUtil.path + filepath;
File tmpFile = new File(path);
if (!tmpFile.getParentFile().exists()) {
tmpFile.getParentFile().mkdirs();
}
//PropUtil.path获取配置文件中的path属性,拼接生成写入信息的文件名,
File file = new File(path);
OutputStream stream = new FileOutputStream(file);
wbs.write(stream);
stream.close();
return path;
}
private ArrayList<CompeteVo.EnrollPlayInfo> getEnrollPlayInfos(CompeteDto.CompeteType competeType) {
//查询报名信息
int typeId = competeType.getType();
ArrayList<CompeteVo.EnrollPlayInfo> arrayList = new ArrayList();
List<String> string = null;
//1:查询该类型下所有项目的id,name,team信息,排除level为1的
List<CompeteVo.ProjectInfo> projectInfoList = competeEnrollDao.getProject(typeId);
//2:根据team字段判断是否为团队项目
Map<Long, CompeteVo.EnrollPlayInfo> map = new HashMap<>();
for (CompeteVo.ProjectInfo projectInfo : projectInfoList) {
long team = projectInfo.getTeam();
//3:若是单人项目,在t_compete_project_player表中根据传进来的项目名的项目id查询该项目下所有play_id-参赛选手id和该选手的所在组别id
if (team == 0) {
List<CompeteVo.ProjectPlayer> projectPlayerList = competeEnrollDao.getProjectPlayer(projectInfo.getId());
for (CompeteVo.ProjectPlayer projectPlayer : projectPlayerList) {
//4:然后根据查出来的play_id查询t_compete_player中play_id=id的所有信息,包括姓名,身份证,手机号;通过组别id,在t_compete_group中查找组别名称;单人项目不涉及同组参赛者
CompeteVo.EnrollPlayInfo enrollPlayInfo = map.get(projectPlayer.getPlayer_id());
if (ObjectUtil.isNull(enrollPlayInfo)) {
enrollPlayInfo = competeEnrollDao.getPlayerAndProject(projectPlayer.getPlayer_id());
map.put(projectPlayer.getPlayer_id(), enrollPlayInfo);
}
if (enrollPlayInfo != null) {
CompeteVo.EnrollPlayInfo enrollPlayInfo1 = new CompeteVo.EnrollPlayInfo();
BeanUtil.copyProperties(enrollPlayInfo, enrollPlayInfo1);
enrollPlayInfo1.setName(projectInfo.getName());
arrayList.add(enrollPlayInfo1);
}
}
} else {
//5:若是团队项目,t_compete_team表中根据传进来的项目id拿到该表的id字段,即参加该项目的团队集合,
List<CompeteVo.Team> teamList = competeEnrollDao.getTeamId(projectInfo.getId());
for (CompeteVo.Team team1 : teamList) {
//6:获取团队下队员的详细信息
CompeteVo.EnrollPlayInfo enrollPlayInfo = competeEnrollDao.getPlayerAndProjectForTeam(team1.getId(),team1.getPlayer_id());
if (ObjectUtil.isNotNull(enrollPlayInfo)) {
enrollPlayInfo.setName(projectInfo.getName());
arrayList.add(enrollPlayInfo);
}
}
}
}
return arrayList;
}
@Override
public String enrollPlayInfoWps(QueryDto<CompeteDto.CompeteType> params) throws IOException {
CompeteDto.CompeteType competeType = params.getParam();
List<CompeteVo.EnrollPlayInfo> arrayList = getEnrollPlayInfos(competeType);
String path = getExcelFilePath(arrayList);
File file = new File(path);
CompeteVo.CompeteTime competeTimeByType = competeTimeDao.getCompeteTimeByType(competeType.getType(), System.currentTimeMillis());
//关联wps
WpsDto.Business business = new WpsDto.Business();
business.setBusinessId(competeTimeByType.getId());
business.setBusinessType((byte) 11);
business.setFileName(file.getName());
business.setFilePath(path);
business.setRealFilePath(path);
business.setFileSize(file.length());
business.setUserId(params.getUserId());
business.setOperation(WebConstant.Wps.USER_OPERATION_NEW);
business.setPrivilege(WebConstant.Wps.PROJECT_PRIVILEGE_READ);
log.info("跳绳比赛报名表关联wps:{}", business);
tallFeignClient.saveWpsFile(business);
//查询wps
WpsDto.VisitWpsUrl visitWpsUrl = new WpsDto.VisitWpsUrl();
visitWpsUrl.setBusinessId(competeTimeByType.getId());
visitWpsUrl.setBusinessType((byte) 11);
visitWpsUrl.setUserId(params.getUserId());
return tallFeignClient.queryVisitUrls(visitWpsUrl).get(0);
}
@Override
public String enrollPlayCountDownLoad() throws IOException {
List<CompeteVo.GroupNum> list1 = enrollPlayCount();
//7:将数据放入excel表格
ResourceLoader resourceLoader = new DefaultResourceLoader();
InputStream is = resourceLoader.getResource("classpath:template/competeCount.xlsx").getInputStream();
Workbook workbook = new XSSFWorkbook(is);
//生成excel表格对象,并将数据放入
List<List<PoiUtil.PoiUtilCell>> list = new ArrayList<>();
//生成行对象
List<PoiUtil.PoiUtilCell> poiUtilCellList1 = new ArrayList<>();
List<PoiUtil.PoiUtilCell> poiUtilCellList2 = new ArrayList<>();
List<PoiUtil.PoiUtilCell> poiUtilCellList3 = new ArrayList<>();
list.add(poiUtilCellList1);
list.add(poiUtilCellList2);
list.add(poiUtilCellList3);
list1.forEach(excelList -> {
List<PoiUtil.PoiUtilCell> title = new ArrayList<>();
title.add(new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null));
title.add(new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null));
title.add(new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null));
excelList.getCountList().forEach(count -> {
PoiUtil.PoiUtilCell poiUtilCell = new PoiUtil.PoiUtilCell();
poiUtilCell.setValue(String.valueOf(count.getCount()));
poiUtilCell.setHeight(null);
poiUtilCell.setWight(null);
poiUtilCell.setNum((byte) 1);
title.add(poiUtilCell);
});
list.add(title);
});
Workbook wbs = PoiUtil.exportWB("统计表", list, workbook);
String name = "跳绳比赛报名人数统计表" + ".xlsx";
String filepath = "mt/" + DateUtil.today() + "/" + System.currentTimeMillis() + ".xlsx";
String path = PropUtil.path + filepath;
File tmpFile = new File(path);
if (!tmpFile.getParentFile().exists()) {
tmpFile.getParentFile().mkdirs();
}
File file = new File(path);
try {
OutputStream outputStream = new FileOutputStream(file);
wbs.write(outputStream);
outputStream.close();
} catch (IOException e) {
e.printStackTrace();
}
return PropUtil.domain + "file/download/know?path="+path;
}
@Override
public List<CompeteVo.GroupNum> enrollPlayCount() {
//查询该类型下所有项目的id,name,team信息,排除level为1的的集合
int typeId = 2;
//放总数据集合
List<CompeteVo.GroupNum> list1 = new ArrayList<>();
//根据type 查项目
List<CompeteVo.ProjectInfo> projectInfoList = competeEnrollDao.getProject(typeId);
//根据type 查组别id,组别名
List<CompeteVo.Count> groupIdAndNameList = competeEnrollDao.getGroupIdNameFromGroup(typeId);
for (CompeteVo.ProjectInfo projectInfo : projectInfoList) {
CompeteVo.GroupNum groupNum = new CompeteVo.GroupNum();
groupNum.setName(projectInfo.getName());
List<CompeteVo.Count> countList = new ArrayList<>();
if (CollectionUtil.isNotEmpty(groupIdAndNameList)) {
for (CompeteVo.Count groupIdAndName : groupIdAndNameList) {
CompeteVo.Count count1 = new CompeteVo.Count();
count1.setGroup_name(groupIdAndName.getGroup_name());
if (projectInfo.getTeam() == 0) {
CompeteProjectPlayerExample projectPlayerExample = new CompeteProjectPlayerExample();
projectPlayerExample.createCriteria().andProjectIdEqualTo(projectInfo.getId()).andCompeteGroupIdEqualTo(groupIdAndName.getCompete_group_id());
long count = competeProjectPlayerMapper.countByExample(projectPlayerExample);
count1.setCount((int) count);
} else {
CompeteTeamExample teamExample = new CompeteTeamExample();
teamExample.createCriteria().andProjectIdEqualTo(projectInfo.getId()).andCompeteGroupIdEqualTo(groupIdAndName.getCompete_group_id());
long count = competeTeamDao.countByExample(teamExample);
count1.setCount((int) count);
}
countList.add(count1);
}
}
groupNum.setCountList(countList);
list1.add(groupNum);
}
return list1;
}
/**
* 导入报名表
* @param path 报名表路径
* @return
*/
@Override
public List<CompeteVo.FailPlayerInfo> signupImport(String path) throws Exception {
List<CompeteVo.FailPlayerInfo> failPlayerInfoList = new ArrayList<>();
//获取报名表文件
InputStream is = new FileInputStream(new File(path));
XSSFWorkbook workbook = new XSSFWorkbook(is);
if(ObjectUtil.isNull(workbook)){
throw new BaseException(CodeEnum.PARAM_ERROR);
}
XSSFSheet sheet = workbook.getSheet("报名表");
if(ObjectUtil.isNull(sheet)){
throw new BaseException(CodeEnum.PARAM_ERROR);
}
for (int i = 3; i <= sheet.getLastRowNum(); i++) {
XSSFRow row = sheet.getRow(i);
if(ObjectUtil.isNull(row)){
continue;
}
//参赛单位
String companyName = ExcelUtil.getCellValue(row.getCell(1));
//比赛项目名
String projectName = ExcelUtil.getCellValue(row.getCell(2));
//组别名
String groupName = ExcelUtil.getCellValue(row.getCell(3));
//选手名
String playerName = ExcelUtil.getCellValue(row.getCell(4));
//身份证
String idCard = ExcelUtil.getCellValue(row.getCell(5));
//手机号
String phone = ExcelUtil.getCellValue(row.getCell(6));
//其他参赛人员
String otherPlayerName = ExcelUtil.getCellValue(row.getCell(7));
//验证数据是否正确,正确的添加数据库
boolean flag = saveSignup(companyName,projectName,groupName,playerName,idCard,phone,otherPlayerName);
if(!flag){
CompeteVo.FailPlayerInfo failPlayerInfo = new CompeteVo.FailPlayerInfo();
failPlayerInfo.setCompanyName(companyName);
failPlayerInfo.setGroupName(groupName);
failPlayerInfo.setProjectName(projectName);
failPlayerInfo.setPlayerName(playerName);
failPlayerInfo.setIdCard(idCard);
failPlayerInfo.setPhone(phone);
failPlayerInfo.setOtherPlayerName(otherPlayerName);
failPlayerInfoList.add(failPlayerInfo);
log.info("报名信息不正确:{}",failPlayerInfo);
}
}
return failPlayerInfoList;
}
/**
* 验证数据的正确性存入数据库
*/
private boolean saveSignup(String companyName,String projectName,String groupName,
String playerName,String idCard,String phone,String otherPlayerName){
String family = "亲子组(年龄不设限制)";
//单位名称不能为空
if(StrUtil.isEmpty(companyName)){return false;}
//项目名不能为空
if(StrUtil.isEmpty(projectName)){return false;}
//根据名字查找项目,查不到返回空
CompeteProjectExample projectExample = new CompeteProjectExample();
projectExample.createCriteria().andNameEqualTo(projectName).andTypeEqualTo((byte) 2).andLevelEqualTo((byte) 2);
List<CompeteProject> projectList = competeProjectMapper.selectByExample(projectExample);
if(CollectionUtil.isEmpty(projectList)){return false;}
CompeteProject project = projectList.get(0);
//分组名不能为空
if(StrUtil.isEmpty(groupName)){return false;}
//根据名字查找分组
CompeteGroupExample groupExample = new CompeteGroupExample();
groupExample.createCriteria().andGroupNameEqualTo(groupName).andTypeEqualTo((byte) 2);
List<CompeteGroup> groupList = competeGroupMapper.selectByExample(groupExample);
if(CollectionUtil.isEmpty(groupList)){return false;}
CompeteGroup group = groupList.get(0);
//检查该分组是否可以报名此项目
CompeteProjectGroupExample projectGroupExample = new CompeteProjectGroupExample();
projectGroupExample.createCriteria().andProjectIdEqualTo(project.getId()).andGroupIdEqualTo(group.getId());
if(competeProjectGroupMapper.countByExample(projectGroupExample) == 0){return false;}
//选手名不能为空
if(StrUtil.isEmpty(playerName)){return false;}
//身份证不能为空,且正确
if(StrUtil.isEmpty(idCard) || !IdcardUtil.isValidCard(idCard)){return false;}
//手机号不能为空,且正确
if(StrUtil.isEmpty(phone) || !phone.matches(WebConstant.REGEX_PHONE)){return false;}
//其他参赛人员
if(StrUtil.isEmpty(otherPlayerName) && family.equals(groupName)){return false;}
if(StrUtil.isNotEmpty(otherPlayerName) && !family.equals(groupName)){return false;}
//查找单位
CompeteCompany company;
CompeteCompanyExample companyExample = new CompeteCompanyExample();
companyExample.createCriteria().andNameEqualTo(companyName).andTypeEqualTo((byte) 2);
List<CompeteCompany> companyList = competeCompanyMapper.selectByExample(companyExample);
if(CollectionUtil.isNotEmpty(companyList)){
company = companyList.get(0);
}else {
company = new CompeteCompany();
company.setId(snowflake.nextId());
company.setName(companyName);
company.setType((byte) 2);
competeCompanyMapper.insertSelective(company);
}
//添加选手信息
CompetePlayer player = new CompetePlayer();
player.setId(snowflake.nextId());
player.setName(playerName);
player.setCompeteTimeId((long) 3);
player.setCompanyId(company.getId());
player.setPhone(phone);
player.setCompeteGroupId(group.getId());
player.setIdCard(idCard);
competePlayerDao.insertSelective(player);
//参加比赛
if(project.getTeam() == 0){
//个人赛报名
CompeteProjectPlayer projectPlayer = new CompeteProjectPlayer();
projectPlayer.setId(snowflake.nextId());
projectPlayer.setCompeteGroupId(group.getId());
projectPlayer.setPlayerId(player.getId());
projectPlayer.setProjectId(project.getId());
projectPlayer.setCompeteTimeId(3L);
competeProjectPlayerMapper.insertSelective(projectPlayer);
}else {
//团队项目创建团队
CompeteTeam team = new CompeteTeam();
team.setId(snowflake.nextId());
team.setProjectId(project.getId());
team.setCreator(player.getId());
team.setCompeteTimeId(3L);
team.setCompeteGroupId(group.getId());
competeTeamDao.insertSelective(team);
//将当前选手加入团队
CompeteTeamMember teamMember = new CompeteTeamMember();
teamMember.setId(snowflake.nextId());
teamMember.setCompeteTeamId(team.getId());
teamMember.setPlayerId(player.getId());
teamMember.setCaptain(Constant.Compete.TEAM_LEADER_YES);
competeTeamMemberMapper.insertSelective(teamMember);
//读取其他参赛人员的姓名,并添加为选手
if (StrUtil.isNotEmpty(otherPlayerName)) {
String[] familyNames = StringUtil.replaceComma(otherPlayerName).split(",");
if (ObjectUtil.isNotNull(familyNames)) {
for (String familyName : familyNames) {
CompetePlayer familyPlayer = new CompetePlayer();
familyPlayer.setId(snowflake.nextId());
familyPlayer.setName(familyName);
competePlayerDao.insertSelective(familyPlayer);
//将其他参赛人员添加至此团队
CompeteTeamMember member = new CompeteTeamMember();
member.setId(snowflake.nextId());
member.setCompeteTeamId(team.getId());
member.setPlayerId(familyPlayer.getId());
member.setCaptain(Constant.Compete.TEAM_LEADER_NO);
competeTeamMemberMapper.insertSelective(member);
}
}
}
}
return true;
}
}

449
mt/src/main/java/com/ccsens/mt/service/DepartmentService.java

@ -0,0 +1,449 @@
package com.ccsens.mt.service;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.ccsens.mt.bean.dto.CompeteDto;
import com.ccsens.mt.bean.po.*;
import com.ccsens.mt.bean.vo.CompeteVo;
import com.ccsens.mt.persist.dao.CompetePlayerDao;
import com.ccsens.mt.persist.dao.CompeteTeamDao;
import com.ccsens.mt.persist.dao.CompeteTimeDao;
import com.ccsens.mt.persist.mapper.*;
import com.ccsens.util.*;
import com.ccsens.util.bean.dto.QueryDto;
import com.ccsens.util.exception.BaseException;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.io.File;
import java.io.FileOutputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.List;
/**
* @author
*/
@Slf4j
@Service
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public class DepartmentService implements IDepartmentService{
@Resource
private CompeteCompanyMapper competeCompanyMapper;
@Resource
private CompeteTimeDao competeTimeDao;
@Resource
private Snowflake snowflake;
@Resource
private CompetePlayerDao competePlayerDao;
@Resource
private CompeteCompanyRoleMapper competeCompanyRoleMapper;
@Resource
private CompeteProjectMapper competeProjectMapper;
@Resource
private CompeteProjectPlayerMapper competeProjectPlayerMapper;
@Resource
private CompeteTeamDao competeTeamDao;
@Resource
private CompeteTeamMemberMapper competeTeamMemberMapper;
/**
* 查看院系信息
*/
@Override
public List<CompeteVo.CompeteCompany> getCompany(QueryDto<CompeteDto.CompeteType> params) {
CompeteDto.CompeteType competeType = params.getParam();
List<CompeteVo.CompeteCompany> competeCompanyList = new ArrayList<>();
//根据类型查找所有单位(院系)信息
CompeteCompanyExample competeCompanyExample = new CompeteCompanyExample();
competeCompanyExample.createCriteria().andTypeEqualTo((byte) competeType.getType());
List<CompeteCompany> companyList = competeCompanyMapper.selectByExample(competeCompanyExample);
if(CollectionUtil.isNotEmpty(companyList)){
companyList.forEach(company -> {
CompeteVo.CompeteCompany competeCompany = new CompeteVo.CompeteCompany();
competeCompany.setGroupId(company.getId());
competeCompany.setGroupName(company.getName());
competeCompanyList.add(competeCompany);
});
}
return competeCompanyList;
}
/**
* 查看比赛项目
*/
@Override
public List<CompeteVo.CompeteProject> queryCompeteProject(QueryDto<CompeteDto.CompeteType> params) {
CompeteDto.CompeteType competeType = params.getParam();
return competeTimeDao.queryCompeteProjectByType(competeType.getType());
}
@Override
public CompeteVo.DepartmentInfo saveDepartment(QueryDto<CompeteDto.DepartmentInfo> params) {
CompeteDto.DepartmentInfo departmentInfo = params.getParam();
Long userId = params.getUserId();
//查看该院系的报名信息
Long companyId = competePlayerDao.getCompanyIdByUser(params.getUserId());
log.info("查看该用户的院系:{}",companyId);
if(ObjectUtil.isNotNull(companyId)){
throw new BaseException(CodeEnum.PLAYER_INFO_ALREADY);
}
CompeteCompanyRoleExample companyRoleExample = new CompeteCompanyRoleExample();
companyRoleExample.createCriteria().andCompeteCompanyIdEqualTo(departmentInfo.getId()).andTypeEqualTo((byte)2);
if(competeCompanyRoleMapper.countByExample(companyRoleExample) == 0) {
//检查报名时间是否符合
CompeteVo.CompeteTime competeTime = competeTimeDao.getCompeteTimeByType(departmentInfo.getType(),System.currentTimeMillis());
log.info("检查报名时间是否符合:{}",competeTime);
if(ObjectUtil.isNotNull(competeTime)){
if(competeTime.getSignUpStartTime() > System.currentTimeMillis()){
throw new BaseException(CodeEnum.SIGN_UP_TIME_NOT_START);
}
if(competeTime.getSignUpEndTime() < System.currentTimeMillis()){
throw new BaseException(CodeEnum.SIGN_UP_TIME_FINISHED);
}
}
//添加裁判领队等信息
if (CollectionUtil.isNotEmpty(departmentInfo.getRoleList())) {
log.info("添加裁判领队等信息:{}",departmentInfo.getRoleList());
departmentInfo.getRoleList().forEach(departmentRole -> {
//添加player信息
CompetePlayer competePlayer = new CompetePlayer();
competePlayer.setId(snowflake.nextId());
competePlayer.setName(departmentRole.getName());
competePlayer.setPhone(departmentRole.getPhone());
competePlayer.setCompanyId(departmentInfo.getId());
if (departmentRole.getRole() == 2) {
competePlayer.setUserId(userId);
}
competePlayerDao.insertSelective(competePlayer);
//添加院系内担任的角色信息
CompeteCompanyRole competeCompanyRole = new CompeteCompanyRole();
competeCompanyRole.setId(snowflake.nextId());
competeCompanyRole.setType((byte) departmentRole.getRole());
competeCompanyRole.setCompeteCompanyId(departmentInfo.getId());
competeCompanyRole.setPlayerId(competePlayer.getId());
competeCompanyRoleMapper.insertSelective(competeCompanyRole);
});
}
//添加比赛报名信息
if (CollectionUtil.isNotEmpty(departmentInfo.getProjectList())) {
log.info("添加比赛报名信息:{}",departmentInfo.getProjectList());
departmentInfo.getProjectList().forEach(departmentProject -> {
CompeteProject competeProject = competeProjectMapper.selectByPrimaryKey(departmentProject.getCompeteProjectId());
if (ObjectUtil.isNotNull(competeProject)) {
if (competeProject.getTeam() == 0) {
//不是团队比赛
log.info("不是团队比赛:{}",competeProject);
String names = StringUtil.replaceComma(departmentProject.getNames());
String[] playerNames = names.split(",");
// String[] playerNames = names.split("、");
if (ObjectUtil.isNotNull(playerNames)) {
for (String playerName : playerNames) {
//直接添加选手
CompetePlayer competePlayer = new CompetePlayer();
competePlayer.setId(snowflake.nextId());
competePlayer.setName(playerName);
competePlayer.setCompanyId(departmentInfo.getId());
competePlayerDao.insertSelective(competePlayer);
//添加选手比赛关联信息
CompeteProjectPlayer competeProjectPlayer = new CompeteProjectPlayer();
competeProjectPlayer.setId(snowflake.nextId());
competeProjectPlayer.setProjectId(departmentProject.getCompeteProjectId());
competeProjectPlayer.setPlayerId(competePlayer.getId());
competeProjectPlayer.setGenderGroup((byte) departmentProject.getGenderGroup());
competeProjectPlayerMapper.insertSelective(competeProjectPlayer);
}
}
} else if (competeProject.getTeam() == 1) {
//创建一个团队
log.info("创建一个团队:{}",competeProject);
CompeteTeam competeTeam = new CompeteTeam();
competeTeam.setId(snowflake.nextId());
competeTeam.setProjectId(departmentProject.getCompeteProjectId());
competeTeam.setGenderGroup((byte) departmentProject.getGenderGroup());
competeTeamDao.insertSelective(competeTeam);
String names = StringUtil.replaceComma(departmentProject.getNames());
String[] playerNames = names.split(",");
if(playerNames.length > competeProject.getMemberMax()){
throw new BaseException(CodeEnum.TEAM_MEMBER_ERROR);
}
if (ObjectUtil.isNotNull(playerNames)) {
for (String playerName : playerNames) {
//直接添加选手
CompetePlayer competePlayer = new CompetePlayer();
competePlayer.setId(snowflake.nextId());
competePlayer.setName(playerName);
competePlayer.setCompanyId(departmentInfo.getId());
competePlayerDao.insertSelective(competePlayer);
//将选手加进团队
CompeteTeamMember competeTeamMember = new CompeteTeamMember();
competeTeamMember.setId(snowflake.nextId());
competeTeamMember.setPlayerId(competePlayer.getId());
competeTeamMember.setCompeteTeamId(competeTeam.getId());
competeTeamMemberMapper.insertSelective(competeTeamMember);
}
}
}
}
});
}
}
return getDepartmentInfo(departmentInfo.getId(),departmentInfo.getType());
}
@Override
public CompeteVo.DepartmentInfo getDepartment(QueryDto<CompeteDto.GetDepartmentInfo> params) {
CompeteDto.GetDepartmentInfo getDepartmentInfo = params.getParam();
//查询该用户的院系,默认用户只提交了一个院系的信息,只取一条数据
Long companyId = competePlayerDao.getCompanyIdByUser(params.getUserId());
//查询院系信息和裁判领队填表人的信息
return getDepartmentInfo(companyId,getDepartmentInfo.getType());
}
private CompeteVo.DepartmentInfo getDepartmentInfo(Long companyId,int competeType) {
CompeteVo.DepartmentInfo departmentInfo = competePlayerDao.getDepartment(companyId);
if(ObjectUtil.isNotNull(departmentInfo)) {
//查找每个项目的参赛人员
List<CompeteVo.DepartmentProject> departmentProject = competePlayerDao.getDepartmentProject(competeType);
if (CollectionUtil.isNotEmpty(departmentProject)) {
departmentProject.forEach(project -> {
if (CollectionUtil.isNotEmpty(project.getSecondProjects())) {
project.getSecondProjects().forEach(secondProject -> {
if (secondProject.getTeam() == 0) {
//不是团队比赛
secondProject.setManName(competePlayerDao.getMemberNamesByProjectId(companyId,secondProject.getCompeteProjectId(), 1));
secondProject.setWomanName(competePlayerDao.getMemberNamesByProjectId(companyId,secondProject.getCompeteProjectId(), 0));
secondProject.setMixedName(competePlayerDao.getMemberNamesByProjectId(companyId,secondProject.getCompeteProjectId(), 2));
} else {
secondProject.setManName(competePlayerDao.getTeamMemberNamesByProjectId(companyId,secondProject.getCompeteProjectId(), 1));
secondProject.setWomanName(competePlayerDao.getTeamMemberNamesByProjectId(companyId,secondProject.getCompeteProjectId(), 0));
secondProject.setMixedName(competePlayerDao.getTeamMemberNamesByProjectId(companyId,secondProject.getCompeteProjectId(), 2));
}
});
}
});
}
departmentInfo.setDepartmentProjects(departmentProject);
}
return departmentInfo;
}
/**
* 导出报名信息表
*/
@Override
public String exportExcel(CompeteDto.CompeteType competeType) {
// CompeteDto.CompeteType competeType = params.getParam();
Workbook wb = new XSSFWorkbook();
String path = null;
//查找所有院系信息
CompeteCompanyExample companyExample = new CompeteCompanyExample();
companyExample.createCriteria().andTypeEqualTo((byte) competeType.getType());
List<CompeteCompany> companyList = competeCompanyMapper.selectByExample(companyExample);
log.info("查询所有院系:{}",companyList);
if(CollectionUtil.isNotEmpty(companyList)){
for(CompeteCompany company : companyList) {
CompeteVo.DepartmentInfo departmentInfo = getDepartmentInfo(company.getId(), competeType.getType());
log.info("查询院系的报名详细信息:{}", departmentInfo);
if (ObjectUtil.isNotNull(departmentInfo)) {
//生成写入的数据
List<List<PoiUtil.PoiUtilCell>> list = generatePoiUtilCell(departmentInfo);
//写入excel
try {
path = writeExcel(wb, departmentInfo.getName(), list);
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
return path;
}
private List<List<PoiUtil.PoiUtilCell>> generatePoiUtilCell(CompeteVo.DepartmentInfo departmentInfo) {
List<List<PoiUtil.PoiUtilCell>> list = new ArrayList<>();
//标题
List<PoiUtil.PoiUtilCell> title = new ArrayList<>();
title.add(new PoiUtil.PoiUtilCell(departmentInfo.getName(),3,1));
list.add(title);
//表头
List<PoiUtil.PoiUtilCell> header = new ArrayList<>();
header.add(new PoiUtil.PoiUtilCell("比赛项目"));
header.add(new PoiUtil.PoiUtilCell("分组"));
header.add(new PoiUtil.PoiUtilCell("参赛人员"));
list.add(header);
if(CollectionUtil.isNotEmpty(departmentInfo.getDepartmentProjects())){
departmentInfo.getDepartmentProjects().forEach(departmentProject -> {
if(CollectionUtil.isNotEmpty(departmentProject.getSecondProjects())){
for (int i = 0; i < departmentProject.getSecondProjects().size(); i++) {
int secondRows = 0;
CompeteVo.DepartmentSecondProject secondProject = departmentProject.getSecondProjects().get(i);
List<PoiUtil.PoiUtilCell> project = new ArrayList<>();
project.add(new PoiUtil.PoiUtilCell(departmentProject.getParentProjectName()+":"+secondProject.getCompeteProjectName()));
list.add(project);
if(secondProject.getTeam() == 0){
if(ObjectUtil.isNotNull(secondProject.getManName())) {
secondRows++;
project.add(new PoiUtil.PoiUtilCell("男子组"));
project.add(new PoiUtil.PoiUtilCell(secondProject.getManName()));
if(ObjectUtil.isNotNull(secondProject.getWomanName())) {
secondRows++;
List<PoiUtil.PoiUtilCell> group = new ArrayList<>();
group.add(new PoiUtil.PoiUtilCell());
group.add(new PoiUtil.PoiUtilCell("女子组"));
group.add(new PoiUtil.PoiUtilCell(secondProject.getWomanName()));
list.add(group);
}
if(ObjectUtil.isNotNull(secondProject.getMixedName())) {
secondRows++;
List<PoiUtil.PoiUtilCell> group = new ArrayList<>();
group.add(new PoiUtil.PoiUtilCell());
group.add(new PoiUtil.PoiUtilCell("男女混合组"));
group.add(new PoiUtil.PoiUtilCell(secondProject.getMixedName()));
list.add(group);
}
}else if(ObjectUtil.isNotNull(secondProject.getWomanName())){
secondRows++;
project.add(new PoiUtil.PoiUtilCell("女子组"));
project.add(new PoiUtil.PoiUtilCell(secondProject.getWomanName()));
if(ObjectUtil.isNotNull(secondProject.getMixedName())) {
secondRows++;
List<PoiUtil.PoiUtilCell> group = new ArrayList<>();
group.add(new PoiUtil.PoiUtilCell());
group.add(new PoiUtil.PoiUtilCell("男女混合组"));
group.add(new PoiUtil.PoiUtilCell(secondProject.getMixedName()));
list.add(group);
}
}else if(ObjectUtil.isNotNull(secondProject.getMixedName())){
secondRows++;
project.add(new PoiUtil.PoiUtilCell("男女混合组"));
project.add(new PoiUtil.PoiUtilCell(secondProject.getMixedName()));
}
}else {
secondRows++;
project.add(new PoiUtil.PoiUtilCell());
String playerNames = secondProject.getManName() == null ? "" : secondProject.getManName();
if(StrUtil.isNotEmpty(playerNames) && StrUtil.isNotEmpty(secondProject.getWomanName())){
playerNames += "、" + secondProject.getWomanName();
}else {
playerNames += secondProject.getWomanName() == null ? "" : secondProject.getWomanName();
}
if(StrUtil.isNotEmpty(playerNames) && StrUtil.isNotEmpty(secondProject.getMixedName())){
playerNames += "、" + secondProject.getMixedName();
}else {
playerNames += secondProject.getMixedName() == null ? "" : secondProject.getMixedName();
}
project.add(new PoiUtil.PoiUtilCell(playerNames));
}
// if(ObjectUtil.isNotNull(secondProject.getManName())) {
// secondRows++;
// project.add(new PoiUtil.PoiUtilCell("男子组"));
// project.add(new PoiUtil.PoiUtilCell(secondProject.getManName()));
// if(ObjectUtil.isNotNull(secondProject.getWomanName())) {
// secondRows++;
// List<PoiUtil.PoiUtilCell> group = new ArrayList<>();
// group.add(new PoiUtil.PoiUtilCell());
// group.add(new PoiUtil.PoiUtilCell("女子组"));
// group.add(new PoiUtil.PoiUtilCell(secondProject.getWomanName()));
// list.add(group);
// }
// if(ObjectUtil.isNotNull(secondProject.getMixedName())) {
// secondRows++;
// List<PoiUtil.PoiUtilCell> group = new ArrayList<>();
// group.add(new PoiUtil.PoiUtilCell());
// group.add(new PoiUtil.PoiUtilCell("男女混合组"));
// group.add(new PoiUtil.PoiUtilCell(secondProject.getMixedName()));
// list.add(group);
// }
// }else if(ObjectUtil.isNotNull(secondProject.getWomanName())){
// secondRows++;
// project.add(new PoiUtil.PoiUtilCell("女子组"));
// project.add(new PoiUtil.PoiUtilCell(secondProject.getWomanName()));
// if(ObjectUtil.isNotNull(secondProject.getMixedName())) {
// secondRows++;
// List<PoiUtil.PoiUtilCell> group = new ArrayList<>();
// group.add(new PoiUtil.PoiUtilCell());
// group.add(new PoiUtil.PoiUtilCell("男女混合组"));
// group.add(new PoiUtil.PoiUtilCell(secondProject.getMixedName()));
// list.add(group);
// }
// }else if(ObjectUtil.isNotNull(secondProject.getMixedName())){
// secondRows++;
// project.add(new PoiUtil.PoiUtilCell("男女混合组"));
// project.add(new PoiUtil.PoiUtilCell(secondProject.getMixedName()));
// }
PoiUtil.PoiUtilCell poiUtilCell = project.get(0);
poiUtilCell.setRowspan(secondRows);
}
}
});
}
List<PoiUtil.PoiUtilCell> blank = new ArrayList<>();
blank.add(new PoiUtil.PoiUtilCell("",3,1));
list.add(blank);
//领队裁判等信息
if(CollectionUtil.isNotEmpty(departmentInfo.getDepartmentRoles())){
List<PoiUtil.PoiUtilCell> role1 = new ArrayList<>();
List<PoiUtil.PoiUtilCell> role2 = new ArrayList<>();
List<PoiUtil.PoiUtilCell> role3 = new ArrayList<>();
departmentInfo.getDepartmentRoles().forEach(departmentRole -> {
if(departmentRole.getRole() == 0){
role1.add(new PoiUtil.PoiUtilCell("领队",1,1,666,28));
role1.add(new PoiUtil.PoiUtilCell("姓名:" + departmentRole.getName()));
role1.add(new PoiUtil.PoiUtilCell("手机号:" + departmentRole.getPhone(),1,1,666,42));
}
if(departmentRole.getRole() == 1){
role2.add(new PoiUtil.PoiUtilCell("裁判",1,1,666,28));
role2.add(new PoiUtil.PoiUtilCell("姓名:" + departmentRole.getName()));
role2.add(new PoiUtil.PoiUtilCell("手机号:" + departmentRole.getPhone(),1,1,666,42));
}
if(departmentRole.getRole() == 2){
role3.add(new PoiUtil.PoiUtilCell("填表人",1,1,666,28));
role3.add(new PoiUtil.PoiUtilCell("姓名:" + departmentRole.getName()));
role3.add(new PoiUtil.PoiUtilCell("手机号:" + departmentRole.getPhone(),1,1,666,42));
}
});
list.add(role1);
list.add(role2);
list.add(role3);
}
return list;
}
private String writeExcel(Workbook wb,String sheetName, List<List<PoiUtil.PoiUtilCell>> list) throws Exception {
PoiUtil.exportWB(sheetName, list, wb);
//生成文件
String fileName = "department/" + DateUtil.today() + "/" + System.currentTimeMillis() + ".xlsx";
String path = PropUtil.path + File.separator + fileName;
File tmpFile = new File(path);
if (!tmpFile.getParentFile().exists()) {
boolean mkdirs = tmpFile.getParentFile().mkdirs();
}
OutputStream stream = new FileOutputStream(tmpFile);
wb.write(stream);
stream.close();
return PropUtil.imgDomain + fileName;
}
}

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

@ -0,0 +1,763 @@
package com.ccsens.mt.service;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdcardUtil;
import cn.hutool.core.util.ObjectUtil;
import com.ccsens.mt.bean.dto.CompeteDto;
import com.ccsens.mt.bean.po.*;
import com.ccsens.mt.bean.vo.TableVo;
import com.ccsens.mt.persist.dao.*;
import com.ccsens.mt.persist.mapper.*;
import com.ccsens.util.CodeEnum;
import com.ccsens.util.PoiUtil;
import com.ccsens.util.PropUtil;
import com.ccsens.util.RedisUtil;
import com.ccsens.util.WebConstant;
import com.ccsens.util.bean.dto.QueryDto;
import com.ccsens.util.exception.BaseException;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.List;
@Slf4j
@Service
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public class ExcelService implements IExcelService {
@Resource
private CompeteCompanyDao competeCompanyDao;
@Resource
private CompeteTimeDao competeTimeDao;
@Resource
private CompeteCompanyMapper competeCompanyMapper;
@Resource
private CompeteTeamDao competeTeamDao;
@Resource
private CompetePlayerDao competePlayerDao;
@Resource
private CompeteTeamMemberMapper competeTeamMemberMapper;
@Resource
private CompeteProjectMapper competeProjectMapper;
@Resource
private CompeteProjectPlayerMapper competeProjectPlayerMapper;
@Resource
private CompeteGroupMapper competeGroupMapper;
@Resource
private CommonFileMapper commonFileMapper;
@Resource
private IProvinceService provinceService;
@Resource
CompeteCoachMapper competeCoachMapper;
@Resource
private CompetePlayerMapper competePlayerMapper;
@Override
public String dasaiduiwuxinxiWPS(QueryDto<CompeteDto.CompeteTime> params) {
//这个里面包含联系人得信息
List<CompeteCompany> competeCompanyList= competeCompanyDao.selectByCompeteTimeId(params.getParam().getCompeteTimeId());
List<CompeteCoach> competeCoachList =new ArrayList<CompeteCoach>();
for (CompeteCompany com:competeCompanyList) {
//再根据单位id查询,领队和教练信息,返回list集合
competeCoachList.addAll(competeCompanyDao.selectByCompanyId(com.getId()));
}
List<List<PoiUtil.PoiUtilCell>> biao = new ArrayList<>();
//先把联系人的都添加进去
List<PoiUtil.PoiUtilCell> biaotou=new ArrayList<>();
PoiUtil.PoiUtilCell biaotouName=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 8, 1, null, null);
biaotouName.setValue(competeTimeDao.selectByPrimaryKey(params.getParam().getCompeteTimeId()).getName());
biaotou.add(biaotouName);
biao.add(biaotou);
List<PoiUtil.PoiUtilCell> hangTou=new ArrayList<>();
PoiUtil.PoiUtilCell xuhaoTou=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null);
xuhaoTou.setValue("序号");
hangTou.add(xuhaoTou);
PoiUtil.PoiUtilCell cansaiduiwuTou=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null);
cansaiduiwuTou.setValue("参赛队伍");
hangTou.add(cansaiduiwuTou);
PoiUtil.PoiUtilCell lianxirenTou=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null);
lianxirenTou.setValue("联系人/领队/教练");
hangTou.add(lianxirenTou);
PoiUtil.PoiUtilCell nameTou=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null);
nameTou.setValue("姓名");
hangTou.add(nameTou);
PoiUtil.PoiUtilCell sexTou=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null);
sexTou.setValue("性别");
hangTou.add(sexTou);
PoiUtil.PoiUtilCell lianxifangshiTou=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null);
lianxifangshiTou.setValue("联系方式");
hangTou.add(lianxifangshiTou);
PoiUtil.PoiUtilCell shenfenzhengTou=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null);
shenfenzhengTou.setValue("身份证号");
hangTou.add(shenfenzhengTou);
PoiUtil.PoiUtilCell beizhuTou=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null);
beizhuTou.setValue("备注");
hangTou.add(beizhuTou);
biao.add(hangTou);
int i=1;
for(CompeteCompany competeCompany:competeCompanyList){
List<PoiUtil.PoiUtilCell> hang=new ArrayList<>();
PoiUtil.PoiUtilCell xuhao=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null);
xuhao.setValue(String.valueOf(i++));
hang.add(xuhao);
PoiUtil.PoiUtilCell cansaiduiwu=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null);
cansaiduiwu.setValue(competeCompany.getName());
hang.add(cansaiduiwu);
PoiUtil.PoiUtilCell renyuanleibei=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null);
renyuanleibei.setValue("联系人");
hang.add(renyuanleibei);
PoiUtil.PoiUtilCell name=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null);
name.setValue(competeCompany.getContactsName());
hang.add(name);
PoiUtil.PoiUtilCell sex=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null);
sex.setValue("/");
hang.add(sex);
PoiUtil.PoiUtilCell pho=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null);
pho.setValue(String.valueOf(competeCompany.getContactsPhone()));
hang.add(pho);
PoiUtil.PoiUtilCell idCardNum=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null);
idCardNum.setValue("/");
hang.add(idCardNum);
PoiUtil.PoiUtilCell beizhu=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null);
beizhu.setValue("无");
hang.add(beizhu);
biao.add(hang);
for (CompeteCoach competeCoach:competeCoachList){
if(competeCoach.getCompanyId().equals(competeCompany.getId())){
List<PoiUtil.PoiUtilCell> hanghou=new ArrayList<>();
PoiUtil.PoiUtilCell xuhaoCach=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null);
xuhaoCach.setValue(String.valueOf(i++));
hanghou.add(xuhaoCach);
PoiUtil.PoiUtilCell cansaiduiwuCach=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null);
cansaiduiwuCach.setValue(competeCompany.getName());
hanghou.add(cansaiduiwuCach);
PoiUtil.PoiUtilCell renyuanleibeiCach=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null);
if (competeCoach.getIdentity().equals((byte) 0)){
renyuanleibeiCach.setValue("领队");
}else {
renyuanleibeiCach.setValue("教练");
}
hanghou.add(renyuanleibeiCach);
PoiUtil.PoiUtilCell nameCach=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null);
nameCach.setValue(competeCoach.getName());
hanghou.add(nameCach);
PoiUtil.PoiUtilCell sexCach=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null);
sexCach.setValue(competeCoach.getGender().equals((byte) 0)?"女":"男");
hanghou.add(sexCach);
PoiUtil.PoiUtilCell phoCach=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null);
phoCach.setValue(String.valueOf(competeCoach.getPhone()));
hanghou.add(phoCach);
PoiUtil.PoiUtilCell idCardNumCach=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null);
idCardNumCach.setValue(String.valueOf(competeCoach.getIdPhoto()));
hanghou.add(idCardNumCach);
PoiUtil.PoiUtilCell beizhuCach=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null);
beizhuCach.setValue("无");
hanghou.add(beizhuCach);
biao.add(hanghou);
}
}
}
Workbook workbook = new XSSFWorkbook();
PoiUtil.exportWB("参赛队伍信息表",biao,workbook);
//String name = "跳绳比赛报名人数统计表" + ".xlsx";
String filepath = "mt/" + DateUtil.today() + "/" + System.currentTimeMillis() + ".xlsx";
String path = PropUtil.path + filepath;
String path1="C:/d/"+filepath;//本地的路径
File tmpFile = new File(path);
if (!tmpFile.getParentFile().exists()) {
tmpFile.getParentFile().mkdirs();
}
File file = new File(path);
try {
OutputStream outputStream = new FileOutputStream(file);
workbook.write(outputStream);
outputStream.close();
} catch (IOException e) {
e.printStackTrace();
}
return PropUtil.domain + "file/download/know?path="+path;
}
@Override
public String iTeamListService(QueryDto<CompeteDto.CompeteTime> params) {
//查出所有的单位的id
List<CompeteCompany> competeCompanyList= competeCompanyDao.selectByCompeteTimeId(params.getParam().getCompeteTimeId());
List<List<PoiUtil.PoiUtilCell>> biao = new ArrayList<>();
List<PoiUtil.PoiUtilCell> biaoti=new ArrayList<>();
PoiUtil.PoiUtilCell biaotouName=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 2, 1, null, null);
biaotouName.setValue("代表队名单");
biaoti.add(biaotouName);
biao.add(biaoti);
for (CompeteCompany com:competeCompanyList) {
//查出教练和领队的list
List<CompeteCoach> jLandLD=competeCompanyDao.selectByCompanyId(com.getId());
CompetePlayerExample competePlayerExample=new CompetePlayerExample();
competePlayerExample.createCriteria().andCompanyIdEqualTo(com.getId());
//运动员list
List<CompetePlayer> competePlayerList = competePlayerMapper.selectByExample(competePlayerExample);
List<PoiUtil.PoiUtilCell> daibiaodui=new ArrayList<>();
PoiUtil.PoiUtilCell daibiaoduiName=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 2, 1, null, null);
daibiaoduiName.setValue(com.getName());
daibiaodui.add(daibiaoduiName);
biao.add(daibiaodui);
//领队和教练
List<PoiUtil.PoiUtilCell> lingduiList=new ArrayList<>();
PoiUtil.PoiUtilCell lingdui=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1);
lingdui.setValue("领 队:");
lingduiList.add(lingdui);
biao.add(lingduiList);
StringBuffer lingduiName=new StringBuffer("");
StringBuffer jiaolianName=new StringBuffer("");
jLandLD.forEach(jLD->{
if (jLD.getIdentity().equals((byte) 0)) {
lingduiName.append(jLD.getName()+'、');
} else {
jiaolianName.append(jLD.getName()+'、');
}
});
if(lingduiName.length()>0){
lingduiName.deleteCharAt(lingduiName.length() - 1) ;
}
if(jiaolianName.length()>0){
jiaolianName.deleteCharAt(jiaolianName.length() - 1) ;
}
PoiUtil.PoiUtilCell lingduiNameHang=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1);
lingduiNameHang.setValue(String.valueOf(lingduiName));
lingduiList.add(lingduiNameHang);
biao.add(lingduiList);
List<PoiUtil.PoiUtilCell> jiaolianList=new ArrayList<>();
PoiUtil.PoiUtilCell jiaoling=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1);
jiaoling.setValue("教 练:");
jiaolianList.add(jiaoling);
PoiUtil.PoiUtilCell jiaolianHang= new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1);
jiaolianHang.setValue(String.valueOf(jiaolianName));
jiaolianList.add(jiaolianHang);
biao.add(jiaolianList);
//再放运动员
StringBuffer yDYLN=new StringBuffer("");
competePlayerList.forEach(cpL->{
yDYLN.append(cpL.getName());
yDYLN.append("(");
yDYLN.append(cpL.getGender().equals((byte) 0)?"女":"男");
yDYLN.append(")、");
});
if (yDYLN.length()>0){
yDYLN.deleteCharAt(yDYLN.length()-1);
}
List<PoiUtil.PoiUtilCell> yundongyuanList=new ArrayList<>();
PoiUtil.PoiUtilCell yuandongyuan=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1);
yuandongyuan.setValue("运动员");
yundongyuanList.add(yuandongyuan);
PoiUtil.PoiUtilCell yuandongyuanName=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1);
yuandongyuanName.setValue(String.valueOf(yDYLN));
yundongyuanList.add(yuandongyuanName);
biao.add(yundongyuanList);
biao.add(yundongyuanList);
List<PoiUtil.PoiUtilCell> entryList=new ArrayList<>();
PoiUtil.PoiUtilCell enter= new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 2, 1);
entryList.add(enter);
biao.add(entryList);
}
biao.remove(biaoti.size()-1);
Workbook workbook = new XSSFWorkbook();
PoiUtil.exportWB("代表队名单",biao,workbook);
String filepath = "mt/" + DateUtil.today() + "/" + System.currentTimeMillis() + ".xlsx";
String path = PropUtil.path + filepath;
String path1="C:/d/"+filepath;//本地的路径
File tmpFile = new File(path);
if (!tmpFile.getParentFile().exists()) {
tmpFile.getParentFile().mkdirs();
}
File file = new File(path);
try {
OutputStream outputStream = new FileOutputStream(file);
workbook.write(outputStream);
outputStream.close();
} catch (IOException e) {
e.printStackTrace();
}
return PropUtil.domain + "file/download/know?path="+path;
}
@Override
public String competeJoin(QueryDto<CompeteDto.CompeteTime> params) throws IOException {
CompeteDto.CompeteTime competeTime = params.getParam();
List<TableVo.CompeteJoin> competeJoinList = getCompeteJoin(competeTime);
String path = getExcelFilePathForCompeteJoin(competeJoinList);
return path;
}
private List<TableVo.CompeteJoin> getCompeteJoin(CompeteDto.CompeteTime params) {
List<TableVo.CompeteJoin> competeJoinList = new ArrayList<>();
Long competeTimeId = params.getCompeteTimeId();
CompeteTime competeTime = competeTimeDao.selectByPrimaryKey(competeTimeId);
int type = competeTime.getType();
Byte level = 2;
CompeteProjectExample competeProjectExample = new CompeteProjectExample();
competeProjectExample.createCriteria().andTypeEqualTo((byte) type).andLevelEqualTo(level);
//获取参赛项目集合
List<CompeteProject> competeProjectList = competeProjectMapper.selectByExample(competeProjectExample);
for (CompeteProject competeProject : competeProjectList) {
String projectName = competeProject.getName();
if (competeProject.getTeam() == 0) {
//如果不是团队项目,查询该项目下报名人数集合
CompeteProjectPlayerExample competeProjectPlayerExample = new CompeteProjectPlayerExample();
competeProjectPlayerExample.createCriteria().andProjectIdEqualTo(competeProject.getId());
List<CompeteProjectPlayer> competeProjectPlayerList = competeProjectPlayerMapper.selectByExample(competeProjectPlayerExample);
for (CompeteProjectPlayer competeProjectPlayer : competeProjectPlayerList) {
//查询每个报名人的详细信息下
CompetePlayer competePlayer = competePlayerDao.selectByPrimaryKey(competeProjectPlayer.getPlayerId());
TableVo.CompeteJoin competeJoin = new TableVo.CompeteJoin();
//姓名
competeJoin.setName(competePlayer.getName());
//身份证号
competeJoin.setIdCard(competePlayer.getIdCard());
//根据身份证获取选手年龄并赋值
String idCard = competeJoin.getIdCard();
int ageByIdCard = IdcardUtil.getAgeByIdCard(idCard);
competeJoin.setAge(ageByIdCard);
Byte gender = competePlayer.getGender();
if (gender == 0) {
competeJoin.setGender("女");
} else {
competeJoin.setGender("男");
}
//查询单位,并赋值
CompeteCompany competeCompany = competeCompanyMapper.selectByPrimaryKey(competePlayer.getCompanyId());
if (ObjectUtil.isNotNull(competeCompany)) {
competeJoin.setJoinTeam(competeCompany.getName());
}
//查询组别,并赋值
CompeteGroup competeGroup = competeGroupMapper.selectByPrimaryKey(competePlayer.getCompeteGroupId());
if (ObjectUtil.isNotNull(competeGroup)) {
competeJoin.setCompeteGroup(competePlayer.getName());
}
// //身份证明查询,并赋值
// CommonFile commonFile = commonFileMapper.selectByPrimaryKey(competePlayer.getIdCardFrontFile());
// if (ObjectUtil.isNotNull(commonFile)) {
// competeJoin.setIdCardPromise(commonFile.getVisitLocation());
// }
// //一寸证件照查询赋值
// CommonFile commonFile1 = commonFileMapper.selectByPrimaryKey(competePlayer.getIdPhotoFile());
// if (ObjectUtil.isNotNull(commonFile1)) {
// competeJoin.setPicture(commonFile1.getVisitLocation());
// }
// //学籍证明/俱乐部证明
// CommonFile commonFile2 = commonFileMapper.selectByPrimaryKey(competePlayer.getStudentRecordFile());
// if (ObjectUtil.isNotNull(commonFile2)) {
// competeJoin.setStudentPromise(commonFile2.getVisitLocation());
// }
// //体检证明
// CommonFile commonFile3 = commonFileMapper.selectByPrimaryKey(competePlayer.getHealthRecordFile());
// if (ObjectUtil.isNotNull(commonFile3)) {
// competeJoin.setBodyTest(commonFile3.getVisitLocation());
// }
// //人身意外伤害保险证明
// CommonFile commonFile4 = commonFileMapper.selectByPrimaryKey(competePlayer.getInsuranceRecordFile());
// if (ObjectUtil.isNotNull(commonFile4)) {
// competeJoin.setBodyProtect(commonFile4.getVisitLocation());
// }
//参赛项目名赋值
competeJoin.setCompeteProject(projectName);
competeJoinList.add(competeJoin);
}
} else { //团队项目
//获取参赛队伍集合
CompeteTeamExample competeTeamExample = new CompeteTeamExample();
competeTeamExample.createCriteria().andProjectIdEqualTo(competeProject.getId());
List<CompeteTeam> competeTeamList = competeTeamDao.selectByExample(competeTeamExample);
for (CompeteTeam competeTeam : competeTeamList) {
//获取队伍下的成员集合
CompeteTeamMemberExample competeTeamMemberExample = new CompeteTeamMemberExample();
competeTeamMemberExample.createCriteria().andCompeteTeamIdEqualTo(competeTeam.getId());
List<CompeteTeamMember> competeTeamMemberList = competeTeamMemberMapper.selectByExample(competeTeamMemberExample);
for (CompeteTeamMember competeTeamMember : competeTeamMemberList) {
//查询成员详细信息
CompetePlayer competePlayer = competePlayerDao.selectByPrimaryKey(competeTeamMember.getPlayerId());
TableVo.CompeteJoin competeJoin = new TableVo.CompeteJoin();
//姓名
competeJoin.setName(competePlayer.getName());
//身份证号
competeJoin.setIdCard(competePlayer.getIdCard());
//根据身份证获取选手年龄并赋值
String idCard = competeJoin.getIdCard();
int ageByIdCard = IdcardUtil.getAgeByIdCard(idCard);
competeJoin.setAge(ageByIdCard);
//性别
Byte gender = competePlayer.getGender();
if (gender == 0) {
competeJoin.setGender("女");
} else {
competeJoin.setGender("男");
}
//查询单位,并赋值
CompeteCompany competeCompany = competeCompanyMapper.selectByPrimaryKey(competePlayer.getCompanyId());
if (ObjectUtil.isNotNull(competeCompany)) {
competeJoin.setJoinTeam(competeCompany.getName());
}
//查询组别,并赋值
CompeteGroup competeGroup = competeGroupMapper.selectByPrimaryKey(competePlayer.getCompeteGroupId());
if (ObjectUtil.isNotNull(competeGroup)) {
competeJoin.setCompeteGroup(competePlayer.getName());
}
// //身份证明查询,并赋值
// CommonFile commonFile = commonFileMapper.selectByPrimaryKey(competePlayer.getIdCardFrontFile());
// if (ObjectUtil.isNotNull(commonFile)){
// competeJoin.setIdCardPromise(commonFile.getVisitLocation());
// }
// //一寸证件照查询赋值
// CommonFile commonFile1 = commonFileMapper.selectByPrimaryKey(competePlayer.getIdPhotoFile());
// if (ObjectUtil.isNotNull(commonFile1)){
// competeJoin.setPicture(commonFile1.getVisitLocation());
// }
// //学籍证明/俱乐部证明
// CommonFile commonFile2 = commonFileMapper.selectByPrimaryKey(competePlayer.getStudentRecordFile());
// if (ObjectUtil.isNotNull(commonFile2)){
// competeJoin.setStudentPromise(commonFile2.getVisitLocation());
// }
// //体检证明
// CommonFile commonFile3 = commonFileMapper.selectByPrimaryKey(competePlayer.getHealthRecordFile());
// if (ObjectUtil.isNotNull(commonFile3)){
// competeJoin.setBodyTest(commonFile3.getVisitLocation());
// }
// //人身意外伤害保险证明
// CommonFile commonFile4 = commonFileMapper.selectByPrimaryKey(competePlayer.getInsuranceRecordFile());
// if (ObjectUtil.isNotNull(commonFile4)){
// competeJoin.setBodyProtect(commonFile4.getVisitLocation());
// }
//参赛项目名赋值
competeJoin.setCompeteProject(projectName);
competeJoinList.add(competeJoin);
}
}
}
}
return competeJoinList;
}
private String getExcelFilePathForCompeteJoin(List<TableVo.CompeteJoin> arrayList) throws IOException {
//创建excle表格对象
List<List<PoiUtil.PoiUtilCell>> list = new ArrayList<>();
//创建行对象
List<PoiUtil.PoiUtilCell> title = new ArrayList<>();
//给首行单元格赋值
title.add(new PoiUtil.PoiUtilCell("序号"));
title.add(new PoiUtil.PoiUtilCell("参赛项目"));
title.add(new PoiUtil.PoiUtilCell("组别"));
title.add(new PoiUtil.PoiUtilCell("参赛队伍"));
title.add(new PoiUtil.PoiUtilCell("姓名"));
title.add(new PoiUtil.PoiUtilCell("性别"));
title.add(new PoiUtil.PoiUtilCell("年龄"));
title.add(new PoiUtil.PoiUtilCell("身份证号"));
// title.add(new PoiUtil.PoiUtilCell("身份证明"));
// title.add(new PoiUtil.PoiUtilCell("一寸证件照"));
// title.add(new PoiUtil.PoiUtilCell("学籍证明/俱乐部证明"));
// title.add(new PoiUtil.PoiUtilCell("体检证明"));
// title.add(new PoiUtil.PoiUtilCell("人身意外伤害保险证明"));
title.add(new PoiUtil.PoiUtilCell("备注"));
list.add(title);
//创建整个excel表格对象
Workbook workbook = new XSSFWorkbook();
int i = 1;
for (TableVo.CompeteJoin competeJoin : arrayList) {
//行对象
List<PoiUtil.PoiUtilCell> cells = new ArrayList<>();
cells.add(new PoiUtil.PoiUtilCell(i + "", 1, 1, 300, 18));
//单元格对象
PoiUtil.PoiUtilCell poiUtilCel = new PoiUtil.PoiUtilCell(competeJoin.getCompeteProject());
cells.add(poiUtilCel);
PoiUtil.PoiUtilCell poiUtilCell = new PoiUtil.PoiUtilCell(competeJoin.getCompeteGroup());
cells.add(poiUtilCell);
PoiUtil.PoiUtilCell poiUtilCel2 = new PoiUtil.PoiUtilCell(competeJoin.getJoinTeam());
cells.add(poiUtilCel2);
PoiUtil.PoiUtilCell poiUtilCel3 = new PoiUtil.PoiUtilCell(competeJoin.getName());
cells.add(poiUtilCel3);
PoiUtil.PoiUtilCell poiUtilCel4 = new PoiUtil.PoiUtilCell(String.valueOf(competeJoin.getGender()));
cells.add(poiUtilCel4);
PoiUtil.PoiUtilCell poiUtilCel5 = new PoiUtil.PoiUtilCell(String.valueOf(competeJoin.getAge()));
cells.add(poiUtilCel5);
PoiUtil.PoiUtilCell poiUtilCel6 = new PoiUtil.PoiUtilCell(competeJoin.getIdCard());
cells.add(poiUtilCel6);
// PoiUtil.PoiUtilCell poiUtilCel7 = new PoiUtil.PoiUtilCell(competeJoin.getIdCardPromise());
// cells.add(poiUtilCel7);
// PoiUtil.PoiUtilCell poiUtilCel8 = new PoiUtil.PoiUtilCell(competeJoin.getPicture());
// cells.add(poiUtilCel8);
// PoiUtil.PoiUtilCell poiUtilCel9 = new PoiUtil.PoiUtilCell(competeJoin.getStudentPromise());
// cells.add(poiUtilCel9);
// PoiUtil.PoiUtilCell poiUtilCel10 = new PoiUtil.PoiUtilCell(competeJoin.getBodyTest());
// cells.add(poiUtilCel10);
// PoiUtil.PoiUtilCell poiUtilCel11 = new PoiUtil.PoiUtilCell(competeJoin.getBodyProtect());
// cells.add(poiUtilCel11);
list.add(cells);
i++;
}
//生成excel表格对象,并将数据放入
Workbook wbs = PoiUtil.exportWB("报名表", list, workbook);
//8:关联金山在线文档
String name = "XXXX大赛报名表" + ".xlsx";
String filepath = "mt/" + DateUtil.today() + "/" + System.currentTimeMillis() + ".xlsx";
String path = PropUtil.path + filepath;
// String path = filepath;
File tmpFile = new File(path);
if (!tmpFile.getParentFile().exists()) {
tmpFile.getParentFile().mkdirs();
}
//PropUtil.path获取配置文件中的path属性,拼接生成写入信息的文件名,
File file = new File(path);
OutputStream stream = new FileOutputStream(file);
wbs.write(stream);
stream.close();
return path;
}
@Override
public String competeJoinCount(CompeteDto.CompeteTime params) throws IOException {
List<TableVo.CompeteOverview> competeOverviewList = competeJoinCountList(params);
String path = getExcelFilePathForCompeteJoinCount(competeOverviewList);
return path;
}
private List<TableVo.CompeteOverview> competeJoinCountList(CompeteDto.CompeteTime params) {
CompeteCompanyExample competeCompanyExample = new CompeteCompanyExample();
competeCompanyExample.createCriteria().andCompeteTimeIdEqualTo(params.getCompeteTimeId());
//根据大赛id查公司集合
List<CompeteCompany> competeCompanyList = competeCompanyMapper.selectByExample(competeCompanyExample);
List<TableVo.CompeteOverview> competeOverview2List = new ArrayList<>();
for (CompeteCompany competeCompany : competeCompanyList) {
//每个公司的教练数量
int leader = 1;
int coach = 0;
CompeteCoachExample competeCoachExample = new CompeteCoachExample();
competeCoachExample.createCriteria().andCompanyIdEqualTo(competeCompany.getId()).andIdentityEqualTo((byte) coach);
long count = competeCoachMapper.countByExample(competeCoachExample);
//每个公司的领队数量
CompeteCoachExample competeCoachExample1 = new CompeteCoachExample();
competeCoachExample1.createCriteria().andCompanyIdEqualTo(competeCompany.getId()).andIdentityEqualTo((byte) leader);
long count1 = competeCoachMapper.countByExample(competeCoachExample1);
//每个公司运动员人数
CompetePlayerExample competePlayerExample2 = new CompetePlayerExample();
competePlayerExample2.createCriteria().andCompanyIdEqualTo(competeCompany.getId());
long count2 = competePlayerDao.countByExample(competePlayerExample2);
//总人数
long sum = count + count1 + count2;
TableVo.CompeteOverview CompeteOverview2 = new TableVo.CompeteOverview();
CompeteOverview2.setCompanyName(competeCompany.getName());
CompeteOverview2.setCoachNum((int) count);
CompeteOverview2.setGuideNum((int) count1);
CompeteOverview2.setPlayerNum((int) count2);
CompeteOverview2.setSum((int) sum);
competeOverview2List.add(CompeteOverview2);
}
return competeOverview2List;
}
private String getExcelFilePathForCompeteJoinCount(List<TableVo.CompeteOverview> arrayList) throws IOException {
//创建excle表格对象
List<List<PoiUtil.PoiUtilCell>> list = new ArrayList<>();
//创建行对象
List<PoiUtil.PoiUtilCell> title = new ArrayList<>();
//给首行单元格赋值
title.add(new PoiUtil.PoiUtilCell("序号"));
title.add(new PoiUtil.PoiUtilCell("单位"));
title.add(new PoiUtil.PoiUtilCell("领队"));
title.add(new PoiUtil.PoiUtilCell("教练"));
title.add(new PoiUtil.PoiUtilCell("运动员"));
title.add(new PoiUtil.PoiUtilCell("总人数"));
list.add(title);
//创建整个excel表格对象
Workbook workbook = new XSSFWorkbook();
int i = 1;
for (TableVo.CompeteOverview competeOverview : arrayList) {
//行对象
List<PoiUtil.PoiUtilCell> cells = new ArrayList<>();
cells.add(new PoiUtil.PoiUtilCell(i + "", 1, 1, 300, 18));
//单元格对象
PoiUtil.PoiUtilCell poiUtilCel = new PoiUtil.PoiUtilCell(competeOverview.getCompanyName());
cells.add(poiUtilCel);
PoiUtil.PoiUtilCell poiUtilCell = new PoiUtil.PoiUtilCell(String.valueOf(competeOverview.getGuideNum()));
cells.add(poiUtilCell);
PoiUtil.PoiUtilCell poiUtilCel2 = new PoiUtil.PoiUtilCell(String.valueOf(competeOverview.getCoachNum()));
cells.add(poiUtilCel2);
PoiUtil.PoiUtilCell poiUtilCel3 = new PoiUtil.PoiUtilCell(String.valueOf(competeOverview.getPlayerNum()));
cells.add(poiUtilCel3);
PoiUtil.PoiUtilCell poiUtilCel4 = new PoiUtil.PoiUtilCell(String.valueOf(competeOverview.getSum()));
cells.add(poiUtilCel4);
list.add(cells);
i++;
}
//生成excel表格对象,并将数据放入
Workbook wbs = PoiUtil.exportWB("参赛人数统计表", list, workbook);
//8:关联金山在线文档
String name = "参赛人数统计表" + ".xlsx";
String filepath = "mt/" + DateUtil.today() + "/" + System.currentTimeMillis() + ".xlsx";
String path = PropUtil.path + filepath;
// String path = filepath;
File tmpFile = new File(path);
if (!tmpFile.getParentFile().exists()) {
tmpFile.getParentFile().mkdirs();
}
//PropUtil.path获取配置文件中的path属性,拼接生成写入信息的文件名,
File file = new File(path);
OutputStream stream = new FileOutputStream(file);
wbs.write(stream);
stream.close();
return path;
}
@Override
public String competeAllCount(CompeteDto.CompeteTime params) throws IOException {
List<TableVo.CompeteAllCount> competeAllCountList = competeAllCountList(params);
String path = getExcelFilePathForCompeteAllCount(competeAllCountList);
return path;
}
// private List<TableVo.CompeteAllCount> competeAllCountList(CompeteDto.CompeteTime params){
// //根据大赛查类型
// Long competeTimeId = params.getCompeteTimeId();
// CompeteTime competeTime = competeTimeDao.selectByPrimaryKey(competeTimeId);
// int type = competeTime.getType();
// Byte level = 2;
// CompeteProjectExample competeProjectExample = new CompeteProjectExample();
// competeProjectExample.createCriteria().andTypeEqualTo((byte) type).andLevelEqualTo(level);
// //获取参赛项目集合
// List<CompeteProject> competeProjectList = competeProjectMapper.selectByExample(competeProjectExample);
// CompeteGroupExample competeGroupExample = new CompeteGroupExample();
// competeGroupExample.createCriteria().andTypeEqualTo((byte) type);
// //获取组别集合
// List<CompeteGroup> competeGroupList = competeGroupMapper.selectByExample(competeGroupExample);
// for (CompeteProject competeProject : competeProjectList){
// //若不是团队项目
// if (competeProject.getTeam() == 0){
// TableVo.CompeteAllCount competeAllCount = new TableVo.CompeteAllCount();
// //项目名赋值
// competeAllCount.setProjectName(competeProject.getName());
// //遍历组别集合
// int i = 0;
// for(CompeteGroup competeGroup : competeGroupList){
// CompetePlayerExample competePlayerExample = new CompetePlayerExample();
// competePlayerExample.createCriteria().andCompeteGroupIdEqualTo(competeGroup.getId());
// //计算每个组别人数
// long count = competePlayerDao.countByExample(competePlayerExample);
// }
// }
// }
// return null;
// }
private List<TableVo.CompeteAllCount> competeAllCountList(CompeteDto.CompeteTime params){
return competePlayerDao.getTeamJoinNumByType(params.getCompeteTimeId());
}
private String getExcelFilePathForCompeteAllCount(List<TableVo.CompeteAllCount> arrayList) throws IOException {
//创建excle表格对象
List<List<PoiUtil.PoiUtilCell>> list = new ArrayList<>();
//创建行对象
List<PoiUtil.PoiUtilCell> title = new ArrayList<>();
//给首行单元格赋值
title.add(new PoiUtil.PoiUtilCell("序号"));
title.add(new PoiUtil.PoiUtilCell("参赛项目"));
title.add(new PoiUtil.PoiUtilCell("小学男子组"));
title.add(new PoiUtil.PoiUtilCell("小学女子组"));
title.add(new PoiUtil.PoiUtilCell("小学混合组"));
title.add(new PoiUtil.PoiUtilCell("中学男子组"));
title.add(new PoiUtil.PoiUtilCell("中学女子组"));
title.add(new PoiUtil.PoiUtilCell("中学混合组"));
title.add(new PoiUtil.PoiUtilCell("高职院校男子组"));
title.add(new PoiUtil.PoiUtilCell("高职院校女子组"));
title.add(new PoiUtil.PoiUtilCell("高职院校混合组"));
title.add(new PoiUtil.PoiUtilCell("本科院校男子组"));
title.add(new PoiUtil.PoiUtilCell("本科院校女子组"));
title.add(new PoiUtil.PoiUtilCell("本科院校混合组"));
title.add(new PoiUtil.PoiUtilCell("俱乐部男子组(14岁及以下)"));
title.add(new PoiUtil.PoiUtilCell("俱乐部女子组(14岁及以下)"));
title.add(new PoiUtil.PoiUtilCell("俱乐部混合组(14岁及以下)"));
title.add(new PoiUtil.PoiUtilCell("合计"));
list.add(title);
//创建整个excel表格对象
Workbook workbook = new XSSFWorkbook();
int i = 1;
for (TableVo.CompeteAllCount competeAllCount : arrayList) {
//行对象
List<PoiUtil.PoiUtilCell> cells = new ArrayList<>();
cells.add(new PoiUtil.PoiUtilCell(i + "", 1, 1, 300, 18));
//单元格对象
PoiUtil.PoiUtilCell poiUtilCel15 = new PoiUtil.PoiUtilCell(competeAllCount.getProjectName());
cells.add(poiUtilCel15);
PoiUtil.PoiUtilCell poiUtilCel = new PoiUtil.PoiUtilCell(String.valueOf(competeAllCount.getNums().get(0)));
cells.add(poiUtilCel);
PoiUtil.PoiUtilCell poiUtilCell = new PoiUtil.PoiUtilCell(String.valueOf(competeAllCount.getNums().get(1)));
cells.add(poiUtilCell);
PoiUtil.PoiUtilCell poiUtilCel2 = new PoiUtil.PoiUtilCell(String.valueOf(competeAllCount.getNums().get(2)));
cells.add(poiUtilCel2);
PoiUtil.PoiUtilCell poiUtilCel3 = new PoiUtil.PoiUtilCell(String.valueOf(competeAllCount.getNums().get(3)));
cells.add(poiUtilCel3);
PoiUtil.PoiUtilCell poiUtilCel4 = new PoiUtil.PoiUtilCell(String.valueOf(competeAllCount.getNums().get(4)));
cells.add(poiUtilCel4);
PoiUtil.PoiUtilCell poiUtilCel5 = new PoiUtil.PoiUtilCell(String.valueOf(competeAllCount.getNums().get(5)));
cells.add(poiUtilCel5);
PoiUtil.PoiUtilCell poiUtilCel6 = new PoiUtil.PoiUtilCell(String.valueOf(competeAllCount.getNums().get(6)));
cells.add(poiUtilCel6);
PoiUtil.PoiUtilCell poiUtilCel7 = new PoiUtil.PoiUtilCell(String.valueOf(competeAllCount.getNums().get(7)));
cells.add(poiUtilCel7);
PoiUtil.PoiUtilCell poiUtilCel8 = new PoiUtil.PoiUtilCell(String.valueOf(competeAllCount.getNums().get(8)));
cells.add(poiUtilCel8);
PoiUtil.PoiUtilCell poiUtilCel9 = new PoiUtil.PoiUtilCell(String.valueOf(competeAllCount.getNums().get(9)));
cells.add(poiUtilCel9);
PoiUtil.PoiUtilCell poiUtilCel10 = new PoiUtil.PoiUtilCell(String.valueOf(competeAllCount.getNums().get(10)));
cells.add(poiUtilCel10);
PoiUtil.PoiUtilCell poiUtilCel11 = new PoiUtil.PoiUtilCell(String.valueOf(competeAllCount.getNums().get(11)));
cells.add(poiUtilCel11);
PoiUtil.PoiUtilCell poiUtilCel12 = new PoiUtil.PoiUtilCell(String.valueOf(competeAllCount.getNums().get(12)));
cells.add(poiUtilCel12);
PoiUtil.PoiUtilCell poiUtilCel13 = new PoiUtil.PoiUtilCell(String.valueOf(competeAllCount.getNums().get(13)));
cells.add(poiUtilCel13);
PoiUtil.PoiUtilCell poiUtilCel14 = new PoiUtil.PoiUtilCell(String.valueOf(competeAllCount.getNums().get(14)));
cells.add(poiUtilCel14);
list.add(cells);
i++;
}
//生成excel表格对象,并将数据放入
Workbook wbs = PoiUtil.exportWB("XXX比赛报名汇总表", list, workbook);
//8:关联金山在线文档
String name = "参赛人数统计表" + ".xlsx";
String filepath = "mt/" + DateUtil.today() + "/" + System.currentTimeMillis() + ".xlsx";
String path = PropUtil.path + filepath;
// String path = filepath;
File tmpFile = new File(path);
if (!tmpFile.getParentFile().exists()) {
tmpFile.getParentFile().mkdirs();
}
//PropUtil.path获取配置文件中的path属性,拼接生成写入信息的文件名,
File file = new File(path);
OutputStream stream = new FileOutputStream(file);
wbs.write(stream);
stream.close();
return path;
}
}

101
mt/src/main/java/com/ccsens/mt/service/FileService.java

@ -1,13 +1,22 @@
package com.ccsens.mt.service;
import cn.hutool.core.codec.Base64;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ImageUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.ccsens.mt.bean.po.CommonFile;
import com.ccsens.mt.bean.vo.FileVo;
import com.ccsens.mt.persist.mapper.CommonFileMapper;
import com.ccsens.mt.util.Constant;
import com.ccsens.util.NotSupportedFileTypeException;
import com.ccsens.util.PropUtil;
import com.ccsens.util.UploadFileUtil_Servlet3;
import com.ccsens.util.WebConstant;
import com.ccsens.util.*;
import com.ccsens.util.exception.BaseException;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
@ -16,9 +25,13 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import javax.servlet.http.Part;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Random;
/**
* @description: 文件操作
@ -41,6 +54,7 @@ public class FileService implements IFileService {
List<CommonFile> fileList = new ArrayList<>();
String allowedExt = WebConstant.IMG_TYPE + "," + WebConstant.Wps.FILE_TYPE_ALL;
for (Part file: files) {
log.info("文件名:{}", file.getSubmittedFileName());
String path = UploadFileUtil_Servlet3.uploadFile(file, allowedExt, dir);
CommonFile fileDo = new CommonFile();
@ -66,4 +80,83 @@ public class FileService implements IFileService {
public CommonFile getById(Long id) {
return commonFileMapper.selectByPrimaryKey(id);
}
@Override
public FileVo.Upload uploadPhone(Part file,Long userId) throws IOException, NotSupportedFileTypeException {
FileVo.Upload vo = new FileVo.Upload();
if(ObjectUtil.isNotNull(file)) {
//限制文件大小 2M
if (file.getSize() > 2097152) {
throw new BaseException(CodeEnum.PHOTO_FILE_EXCEED_2M);
}
String dir = PropUtil.path + Constant.File.UPLOAD_URL;
String allowedExt = WebConstant.IMG_TYPE;
log.info("文件名:{}", file.getSubmittedFileName());
String path = UploadFileUtil_Servlet3.uploadFile(file, allowedExt, dir);
CommonFile fileDo = new CommonFile();
String name = file.getSubmittedFileName();
fileDo.setId(snowflake.nextId());
fileDo.setFileName(name);
fileDo.setLocation(dir + java.io.File.separator + path);
fileDo.setUserId(userId);
fileDo.setVisitLocation(PropUtil.imgDomain + Constant.File.UPLOAD_URL + File.separator + path);
commonFileMapper.insertSelective(fileDo);
log.info("保存文件:{}", fileDo);
vo.setId(fileDo.getId());
vo.setName(fileDo.getFileName());
vo.setVisitUrl(fileDo.getVisitLocation());
}
return vo;
}
@Override
public FileVo.Upload uploadPhoneBase64(String fileBas64, Long userId) throws Exception {
FileVo.Upload vo = new FileVo.Upload();
if(ObjectUtil.isNotNull(fileBas64)) {
log.info("-------------解析base64");
//获取后缀 data:image/png;base64,xxxxxx
String suffix = fileBas64.substring(fileBas64.indexOf("/")+1, fileBas64.indexOf(";"));
String dir = PropUtil.path + Constant.File.UPLOAD_URL + File.separator;
Random random = new Random();
String randomStr = String.valueOf(System.currentTimeMillis()) + random.nextInt(100) + "." + suffix;
String fileName = DateUtil.today() + "/" + randomStr;
File file = new File(dir + fileName);
if (!file.getParentFile().exists()) {
file.getParentFile().mkdirs();
}
// 截取base64,后面的字符串
String base64flag = "base64,";
int index = fileBas64.indexOf(base64flag);
String str = index < 0 ? fileBas64 : fileBas64.substring(index + base64flag.length());
byte[] decode = Base64.decode(str);
FileOutputStream out = new FileOutputStream(file);
out.write(decode);
out.close();
if (file.length() > 2097152) {
// throw new BaseException(CodeEnum.PHOTO_FILE_EXCEED_2M);
}
String name = file.getName();
CommonFile fileDo = new CommonFile();
fileDo.setId(snowflake.nextId());
fileDo.setFileName(name);
fileDo.setLocation(dir + fileName);
fileDo.setUserId(userId);
fileDo.setVisitLocation(PropUtil.imgDomain + Constant.File.UPLOAD_URL + File.separator + fileName);
commonFileMapper.insertSelective(fileDo);
log.info("保存文件:{}", fileDo);
vo.setId(fileDo.getId());
vo.setName(fileDo.getFileName());
vo.setVisitUrl(fileDo.getVisitLocation());
}
return vo;
}
}

67
mt/src/main/java/com/ccsens/mt/service/ICompeteService.java

@ -4,6 +4,7 @@ import com.ccsens.mt.bean.dto.CompeteDto;
import com.ccsens.mt.bean.vo.CompeteVo;
import com.ccsens.util.bean.dto.QueryDto;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.List;
@ -78,7 +79,7 @@ public interface ICompeteService {
* @param params
* @return
*/
CompeteVo.GetPlayerInfo getCompetePlayerInfo(QueryDto params);
CompeteVo.GetPlayerInfo getCompetePlayerInfo(QueryDto<CompeteDto.CompeteTime> params);
/**
* 扫码加入团队
@ -86,4 +87,68 @@ public interface ICompeteService {
* @return
*/
CompeteVo.CompeteTeamProject joinCompeteGroup(QueryDto<CompeteDto.CompeteGroup> params);
/**
* 查询比赛项目下的参赛人员列表
* @param params 大赛id和比赛项目id
* @return 返回参赛人员或团队的列表
*/
CompeteVo.QueryPlayerList queryPlayerList(QueryDto<CompeteDto.CompeteProjectId> params);
/**
* 根据组别查找比赛项目信息
* @param params 类型和组别
* @return 返回比赛项目没有一级项目直接二级
*/
List<CompeteVo.CompeteSecondProject> queryProjectByGroup(QueryDto<CompeteDto.QueryProjectByGroup> params);
/**
* 根据项目查询组别信息
* @param params 项目信息
* @return 返回组别信息
*/
List<CompeteVo.CompeteGroup> queryGroupByProject(QueryDto<CompeteDto.QueryGroupByProject> params);
/**
* 同时提交基本信息和参赛项目
* @param params
* @return
*/
void submitProjectAndGroup(QueryDto<CompeteDto.CompetePlayerAndProject> params);
/**
* 根据项目类型查询参赛者信息
* @param params 项目类型信息
* @return 返回参赛者的详细信息
*/
String enrollPlayInfo(CompeteDto.CompeteType params) throws IOException, Exception;
/**
* 根据项目类型查询参赛者信息
* @return 返回参赛者数量下载表
*/
String enrollPlayCountDownLoad() throws IOException;
/**
* 根据项目类型查询参赛者信息
* @return 返回参赛者数量统计
*/
List<CompeteVo.GroupNum> enrollPlayCount() throws IOException;
/**
* 根据项目类型查询参赛者信息(关联wps)
* @param params 项目类型信息
* @return 返回参赛者的详细信息
*/
String enrollPlayInfoWps(QueryDto<CompeteDto.CompeteType> params) throws IOException;
/**
* 导入报名表
* @param path 报名表路径
* @return 返回失败的信息
*/
List<CompeteVo.FailPlayerInfo> signupImport(String path) throws FileNotFoundException, Exception;
}

48
mt/src/main/java/com/ccsens/mt/service/IDepartmentService.java

@ -0,0 +1,48 @@
package com.ccsens.mt.service;
import com.ccsens.mt.bean.dto.CompeteDto;
import com.ccsens.mt.bean.vo.CompeteVo;
import com.ccsens.util.bean.dto.QueryDto;
import java.util.List;
/**
* @author
*/
public interface IDepartmentService {
/**
* 查询院系信息
* @param params 比赛类型
* @return 返回院系信息
*/
List<CompeteVo.CompeteCompany> getCompany(QueryDto<CompeteDto.CompeteType> params);
/**
* 查看参赛项目
* @param params 比赛类型
* @return 返回比赛项目
*/
List<CompeteVo.CompeteProject> queryCompeteProject(QueryDto<CompeteDto.CompeteType> params);
/**
* 提交院系报名信息
* @param params 院系报名信息
* @return 返回报名信息
*/
CompeteVo.DepartmentInfo saveDepartment(QueryDto<CompeteDto.DepartmentInfo> params);
/**
* 获取院系报名的信息
* @param params 院系id和比赛类型id
* @return 返回报名信息
*/
CompeteVo.DepartmentInfo getDepartment(QueryDto<CompeteDto.GetDepartmentInfo> params);
/**
* 导出报名信息表
* @param params
* @return
*/
String exportExcel(CompeteDto.CompeteType params);
}

49
mt/src/main/java/com/ccsens/mt/service/IExcelService.java

@ -0,0 +1,49 @@
package com.ccsens.mt.service;
import com.ccsens.mt.bean.dto.CompeteDto;
import com.ccsens.util.bean.dto.QueryDto;
import com.ccsens.mt.bean.dto.CompeteDto;
import com.ccsens.util.bean.dto.QueryDto;
import java.io.IOException;
public interface IExcelService {
/**
* 导出大赛队伍信息表
* @param params
* @return
*/
String dasaiduiwuxinxiWPS(QueryDto<CompeteDto.CompeteTime> params);
/**
*导出代表队名单
* @param params
* @return
*/
String iTeamListService(QueryDto<CompeteDto.CompeteTime> params);
/**
* XXXX大赛报名表
* @param params 大赛id
* @return 返回失败的信息
*/
String competeJoin(QueryDto<CompeteDto.CompeteTime> params) throws IOException;
/**
* XXXX大赛报名表
* @param params 大赛id
* @return 返回失败的信息
*/
String competeJoinCount(CompeteDto.CompeteTime params) throws IOException;
/**
* XXX比赛报名汇总表
* @param params 大赛id
* @return 返回失败的信息
*/
String competeAllCount(CompeteDto.CompeteTime params) throws IOException;
}

11
mt/src/main/java/com/ccsens/mt/service/IFileService.java

@ -1,9 +1,11 @@
package com.ccsens.mt.service;
import com.ccsens.mt.bean.po.CommonFile;
import com.ccsens.mt.bean.vo.FileVo;
import com.ccsens.util.NotSupportedFileTypeException;
import javax.servlet.http.Part;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.List;
@ -29,4 +31,13 @@ public interface IFileService {
* @return 文件
*/
CommonFile getById(Long id);
/**
* 上传图片文件不能超过2M
* @param file
* @return
*/
FileVo.Upload uploadPhone(Part file,Long userId) throws IOException, NotSupportedFileTypeException;
FileVo.Upload uploadPhoneBase64(String file, Long userId) throws FileNotFoundException, Exception;
}

7
mt/src/main/java/com/ccsens/mt/service/ILevelUpService.java

@ -3,8 +3,7 @@ package com.ccsens.mt.service;
import com.ccsens.mt.bean.dto.LevelDto;
import com.ccsens.mt.bean.vo.LevelVo;
import com.ccsens.util.bean.dto.QueryDto;
import java.util.List;
import com.github.pagehelper.PageInfo;
/**
* @author
@ -33,12 +32,12 @@ public interface ILevelUpService {
* 手动晋级
* @param params 比赛信息和晋级的选手信息
*/
void manualLevelUpPlayer(QueryDto<LevelDto.ManualLevelUpDto> params);
void manualLevelUpPlayer(LevelDto.ManualLevelUpDto params);
/**
* 查询比赛内晋级的选手信息
* @param params 比赛id和分页信息
* @return 返回查到的比赛下所有晋级的选手的信息
*/
List<LevelVo.QueryLevelUserInfo> queryLevelUserInfo(QueryDto<LevelDto.ManualLevelUpDto> params);
PageInfo<LevelVo.QueryLevelUserInfo> queryLevelUserInfo(LevelDto.QueryLevelUserInfo params);
}

141
mt/src/main/java/com/ccsens/mt/service/IProvinceService.java

@ -0,0 +1,141 @@
package com.ccsens.mt.service;
import com.ccsens.mt.bean.dto.CompeteDto;
import com.ccsens.mt.bean.dto.ProvinceCompeteDto;
import com.ccsens.mt.bean.vo.ProvinceCompeteVo;
import java.util.List;
/**
* @author
*/
public interface IProvinceService {
/**
* 查找当前用户填写的信息的概览
* @param param 大赛id
* @param userId userId
* @return 返回当前用户填写的信息的概览
*/
ProvinceCompeteVo.CompeteOverview getOverview(CompeteDto.CompeteTime param, Long userId);
/**
* 通过组别查找当前单位的选手
* @param param 组别单位信息
* @param userId userId
* @return 返回选手id姓名和是否参赛的信息
*/
List<ProvinceCompeteVo.GroupAndPlayer> queryPlayerByGroupId(ProvinceCompeteDto.QueryPlayerByGroup param, Long userId);
/**
* 查找一级项目
* @param param 大赛id
* @param userId userId
* @return 返回一级项目
*/
List<ProvinceCompeteVo.FirstProject> queryFirstProjectByCompeteTimeId(CompeteDto.CompeteTime param, Long userId);
/**
* 查找二级项目信息
* @param param 二级项目信息
* @param userId userId
* @return 返回二级项目信息
*/
List<ProvinceCompeteVo.CompeteSecondProject> queryProjectByFirstProject(ProvinceCompeteDto.FirstProject param, Long userId);
/**
* 添加或修改选手
* @param param 选手信息
* @param userId userId
*/
void saveOrUpdatePlayer(ProvinceCompeteDto.PlayerInfo param, Long userId) throws Exception;
/**
* 查找单位内已注册的成员列表
* @param param 单位id
* @param userId userId
* @return 返回成员列表
*/
List<ProvinceCompeteVo.PlayerByCompanyId> queryPlayerByCompanyId(ProvinceCompeteDto.CompanyIdVo param, Long userId);
/**
* 查询当前用户参赛单位基本信息
* @param
* @param
* @return
*/
ProvinceCompeteVo.CompeteCompany getCompany(CompeteDto.CompeteTime param, Long userId);
/**
* 添加或者修改参赛单位信息
* @param
* @param
* @return
*/
ProvinceCompeteVo.CompeteCompany changeCompany(CompeteDto.CompeteCompany param, Long userId);
/**
* 添加/修改领队或教练
* @param param
*/
void updateLeader(ProvinceCompeteDto.ModifyLeader param);
/**
* 查找此单位的领队和教练信息
* @param
* @param
* @return
*/
ProvinceCompeteVo.CompeteCompanyHeadList queryCoach(ProvinceCompeteDto.CompanyIdVo param);
// /**
// * 添加领队和教练信息
// * @param
// * @param
// * @return
// */
// void saveCoach(CompeteDto.AddCoach param);
/**
* 删除领队和教练信息
* @param
* @param
* @return
*/
void deleteCoach(CompeteDto.LeaderId param);
/**
* 选择选手参加比赛
* @param param 选手id和项目id
*/
void playerJoinProject(ProvinceCompeteDto.JoinProject param);
/**
* 删除选手信息
* @param
* @param
* @return
*/
void deletePlayer(CompeteDto.DelPlayer param);
/**
* 查看选手信息
* @param
* @param
* @return
*/
ProvinceCompeteVo.PlayerInfo getPlayerInfo(CompeteDto.DelPlayer param);
/**
* 查看领队或教练的详细信息
* @param param 领队或教练的id
* @return 返回详细信息
*/
ProvinceCompeteVo.GetCoach getCoachInfo(CompeteDto.LeaderId param);
/**
* 查找团队项目下已参加的选手信息
* @param param 单位id和团体项目id
* @return 返回参加的选手的详细信息按组别分类
*/
List<ProvinceCompeteVo.GroupAndPlayer> getPlayerByTeamProject(ProvinceCompeteDto.GetPlayerByTeamProject param);
}

26
mt/src/main/java/com/ccsens/mt/service/IVideoService.java

@ -0,0 +1,26 @@
package com.ccsens.mt.service;
import com.ccsens.mt.bean.dto.VideoDto;
import com.ccsens.mt.bean.vo.VideoVo;
import com.ccsens.util.bean.dto.QueryDto;
import java.util.List;
/**
* @author
*/
public interface IVideoService {
/**
* 查看某个用户上传的比赛视频信息
* @param params 比赛id和选手id
* @return 返回上传到视频文件信息
*/
List<VideoVo.GetVideoInfo> getVideoByPlayerId(QueryDto<VideoDto.GetVideo> params);
/**
* 选手或团队上传视频
* @param params 选手id或团队id
* @return 返回上传的文件信息
*/
List<VideoVo.GetVideoInfo> uploadVideo(QueryDto<VideoDto.UploadVideo> params);
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save