From 7fb36d2fc5d493b703f458ef50965ce489b1b788 Mon Sep 17 00:00:00 2001 From: typ Date: Sun, 3 Nov 2024 19:54:07 +0800 Subject: [PATCH] start.. --- .DS_Store | Bin 0 -> 6148 bytes .gitignore | 34 ++++++++++++++++++++++++++++++++++ .mvn/wrapper/MavenWrapperDownloader.java | 118 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .mvn/wrapper/maven-wrapper.jar | Bin 0 -> 50710 bytes .mvn/wrapper/maven-wrapper.properties | 2 ++ mvnw | 310 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ mvnw.cmd | 182 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ pom.xml | 210 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/.DS_Store | Bin 0 -> 6148 bytes src/main/.DS_Store | Bin 0 -> 6148 bytes src/main/java/.DS_Store | Bin 0 -> 6148 bytes src/main/java/com/.DS_Store | Bin 0 -> 6148 bytes src/main/java/com/zhongzhi/.DS_Store | Bin 0 -> 6148 bytes src/main/java/com/zhongzhi/ZhongzhiApplication.java | 17 +++++++++++++++++ src/main/java/com/zhongzhi/common/configure/AliyunSmsProperties.java | 28 ++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/common/configure/MybatisPlusConfig.java | 36 ++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/common/configure/RemoteProperties.java | 36 ++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/common/configure/SwaggerConfig.java | 38 ++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/common/configure/VODConfig.java | 27 +++++++++++++++++++++++++++ src/main/java/com/zhongzhi/common/configure/WebConfig.java | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/common/constant/Code.java | 33 +++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/common/constant/MemberType.java | 21 +++++++++++++++++++++ src/main/java/com/zhongzhi/common/constant/PDFCheckBox.java | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/common/constant/Platform.java | 32 ++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/common/constant/ProjectProgress.java | 9 +++++++++ src/main/java/com/zhongzhi/common/constant/ProjectReview.java | 30 ++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/common/constant/ProjectSchedule.java | 24 ++++++++++++++++++++++++ src/main/java/com/zhongzhi/common/constant/ProjectStatus.java | 32 ++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/common/constant/ProjectType.java | 32 ++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/common/constant/SMSTemplate.java | 31 +++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/common/constant/SmsCode.java | 30 ++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/common/exception/GlobalExceptionHandler.java | 121 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/common/exception/HttpException.java | 45 +++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/common/generator/CodeGenerator.java | 126 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/common/handler/MetaHandler.java | 27 +++++++++++++++++++++++++++ src/main/java/com/zhongzhi/common/interceptor/AuthenticationInterceptor.java | 127 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/common/utils/AliyunSmsUtil.java | 216 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/common/utils/ApplicationContextUtil.java | 25 +++++++++++++++++++++++++ src/main/java/com/zhongzhi/common/utils/DateFormatUtil.java | 187 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/common/utils/ExcelColumn.java | 13 +++++++++++++ src/main/java/com/zhongzhi/common/utils/ExcelUtil.java | 336 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/common/utils/IpAddressUtil.java | 36 ++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/common/utils/JwtUtil.java | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/common/utils/Localstorage.java | 33 +++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/common/utils/LoginRequired.java | 21 +++++++++++++++++++++ src/main/java/com/zhongzhi/common/utils/PDFUtil.java | 1073 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/common/utils/RandomUtil.java | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/common/utils/ResponseData.java | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/common/utils/SMSSendUtils.java | 208 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/common/utils/Signature.java | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/common/utils/SysLog.java | 19 +++++++++++++++++++ src/main/java/com/zhongzhi/common/utils/VodUtil.java | 116 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/controller/AdministerController.java | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/controller/AdministerPermissionController.java | 20 ++++++++++++++++++++ src/main/java/com/zhongzhi/controller/CollegesDictController.java | 278 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/controller/CourseDictController.java | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/controller/FinalMatchMemberController.java | 20 ++++++++++++++++++++ src/main/java/com/zhongzhi/controller/FundDictController.java | 22 ++++++++++++++++++++++ src/main/java/com/zhongzhi/controller/ItemFieldDictController.java | 27 +++++++++++++++++++++++++++ src/main/java/com/zhongzhi/controller/MajorDictController.java | 45 +++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/controller/MatchCollegePdfController.java | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/controller/MatchDictController.java | 178 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/controller/MatchScheduleController.java | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/controller/MessageController.java | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/controller/OssController.java | 211 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/controller/PermissionsController.java | 20 ++++++++++++++++++++ src/main/java/com/zhongzhi/controller/ProjectAwardController.java | 20 ++++++++++++++++++++ src/main/java/com/zhongzhi/controller/ProjectController.java | 665 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/controller/ProjectCopyrightController.java | 20 ++++++++++++++++++++ src/main/java/com/zhongzhi/controller/ProjectJudgeController.java | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/controller/ProjectMaterialsController.java | 20 ++++++++++++++++++++ src/main/java/com/zhongzhi/controller/ProjectMemberController.java | 20 ++++++++++++++++++++ src/main/java/com/zhongzhi/controller/ProjectOwnershipStructureController.java | 20 ++++++++++++++++++++ src/main/java/com/zhongzhi/controller/ProjectPaperController.java | 20 ++++++++++++++++++++ src/main/java/com/zhongzhi/controller/ProjectPatentController.java | 20 ++++++++++++++++++++ src/main/java/com/zhongzhi/controller/ProjectReviewController.java | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/controller/ProjectReviewPeriodController.java | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/controller/ProjectScheduleRecordController.java | 41 +++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/controller/ProjectTrademarkController.java | 20 ++++++++++++++++++++ src/main/java/com/zhongzhi/controller/ProjectWorksController.java | 20 ++++++++++++++++++++ src/main/java/com/zhongzhi/controller/SmsCodeController.java | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/controller/SmsNoticeController.java | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/controller/StudentController.java | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/controller/VodDictController.java | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/controller/YearDictController.java | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/dao/AdministerDAO.java | 18 ++++++++++++++++++ src/main/java/com/zhongzhi/dao/AdministerPermissionDAO.java | 18 ++++++++++++++++++ src/main/java/com/zhongzhi/dao/CollegesDictDAO.java | 30 ++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/dao/CourseDictDAO.java | 22 ++++++++++++++++++++++ src/main/java/com/zhongzhi/dao/FinalMatchMemberDAO.java | 38 ++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/dao/FundDictDAO.java | 18 ++++++++++++++++++ src/main/java/com/zhongzhi/dao/ItemFieldDictDAO.java | 18 ++++++++++++++++++ src/main/java/com/zhongzhi/dao/MajorDictDAO.java | 18 ++++++++++++++++++ src/main/java/com/zhongzhi/dao/MatchCollegePdfMapper.java | 9 +++++++++ src/main/java/com/zhongzhi/dao/MatchDictDAO.java | 27 +++++++++++++++++++++++++++ src/main/java/com/zhongzhi/dao/MatchScheduleDAO.java | 18 ++++++++++++++++++ src/main/java/com/zhongzhi/dao/MessageDAO.java | 18 ++++++++++++++++++ src/main/java/com/zhongzhi/dao/PermissionsDAO.java | 22 ++++++++++++++++++++++ src/main/java/com/zhongzhi/dao/ProjectAwardMapper.java | 18 ++++++++++++++++++ src/main/java/com/zhongzhi/dao/ProjectCopyrightMapper.java | 18 ++++++++++++++++++ src/main/java/com/zhongzhi/dao/ProjectDAO.java | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/dao/ProjectJudgeDAO.java | 25 +++++++++++++++++++++++++ src/main/java/com/zhongzhi/dao/ProjectMaterialsDAO.java | 18 ++++++++++++++++++ src/main/java/com/zhongzhi/dao/ProjectMemberDAO.java | 25 +++++++++++++++++++++++++ src/main/java/com/zhongzhi/dao/ProjectOwnershipStructureDAO.java | 18 ++++++++++++++++++ src/main/java/com/zhongzhi/dao/ProjectPaperMapper.java | 18 ++++++++++++++++++ src/main/java/com/zhongzhi/dao/ProjectPatentMapper.java | 18 ++++++++++++++++++ src/main/java/com/zhongzhi/dao/ProjectReviewDAO.java | 26 ++++++++++++++++++++++++++ src/main/java/com/zhongzhi/dao/ProjectReviewPeriodMapper.java | 18 ++++++++++++++++++ src/main/java/com/zhongzhi/dao/ProjectScheduleRecordDAO.java | 27 +++++++++++++++++++++++++++ src/main/java/com/zhongzhi/dao/ProjectTrademarkMapper.java | 18 ++++++++++++++++++ src/main/java/com/zhongzhi/dao/ProjectWorksMapper.java | 18 ++++++++++++++++++ src/main/java/com/zhongzhi/dao/SmsCodeDAO.java | 19 +++++++++++++++++++ src/main/java/com/zhongzhi/dao/SmsNoticeMapper.java | 23 +++++++++++++++++++++++ src/main/java/com/zhongzhi/dao/StudentDAO.java | 18 ++++++++++++++++++ src/main/java/com/zhongzhi/dao/VodDictDAO.java | 27 +++++++++++++++++++++++++++ src/main/java/com/zhongzhi/dao/YearDictDAO.java | 18 ++++++++++++++++++ src/main/java/com/zhongzhi/dto/administer/AdministerPageDTO.java | 15 +++++++++++++++ src/main/java/com/zhongzhi/dto/administer/LoginDTO.java | 11 +++++++++++ src/main/java/com/zhongzhi/dto/college/AddProjectMemberDTO.java | 17 +++++++++++++++++ src/main/java/com/zhongzhi/dto/college/AwardedListDTO.java | 17 +++++++++++++++++ src/main/java/com/zhongzhi/dto/college/CollegesDOT.java | 20 ++++++++++++++++++++ src/main/java/com/zhongzhi/dto/college/CollegesDictDTO.java | 11 +++++++++++ src/main/java/com/zhongzhi/dto/college/CollegesPageDTO.java | 13 +++++++++++++ src/main/java/com/zhongzhi/dto/college/DownloadErrorDataDTO.java | 11 +++++++++++ src/main/java/com/zhongzhi/dto/college/ExportCollegeDTO.java | 41 +++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/dto/college/LoginDTO.java | 11 +++++++++++ src/main/java/com/zhongzhi/dto/college/LoginStatusDTO.java | 13 +++++++++++++ src/main/java/com/zhongzhi/dto/college/RegisterMembersDTO.java | 16 ++++++++++++++++ src/main/java/com/zhongzhi/dto/college/UpdatePwdDTO.java | 9 +++++++++ src/main/java/com/zhongzhi/dto/course/ChangeOrdersDTO.java | 12 ++++++++++++ src/main/java/com/zhongzhi/dto/course/CoursesDTO.java | 15 +++++++++++++++ src/main/java/com/zhongzhi/dto/course/VodsDTO.java | 13 +++++++++++++ src/main/java/com/zhongzhi/dto/judge/ProjectJudgePageDTO.java | 21 +++++++++++++++++++++ src/main/java/com/zhongzhi/dto/match/MatchDictDTO.java | 45 +++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/dto/match/SelectListPageDTO.java | 11 +++++++++++ src/main/java/com/zhongzhi/dto/member/CreateProjectMemberDTO.java | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/dto/member/MentorDTO.java | 39 +++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/dto/member/TeamMemberDTO.java | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/dto/message/MessagePageDTO.java | 11 +++++++++++ src/main/java/com/zhongzhi/dto/notice/SmsNoticeDTO.java | 20 ++++++++++++++++++++ src/main/java/com/zhongzhi/dto/notice/SmsNoticePageDTO.java | 15 +++++++++++++++ src/main/java/com/zhongzhi/dto/period/ProjectReviewPeriodDTO.java | 15 +++++++++++++++ src/main/java/com/zhongzhi/dto/project/ApproveDTO.java | 15 +++++++++++++++ src/main/java/com/zhongzhi/dto/project/BatchRollbackDTO.java | 9 +++++++++ src/main/java/com/zhongzhi/dto/project/CollegeProjectDTO.java | 11 +++++++++++ src/main/java/com/zhongzhi/dto/project/CreateMainTrackProjectDTO.java | 140 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/dto/project/CreateSeedTrackProjectDTO.java | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/dto/project/CreateVocationalProjectDTO.java | 198 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/dto/project/DataOverviewDTO.java | 11 +++++++++++ src/main/java/com/zhongzhi/dto/project/EditStatusDTO.java | 19 +++++++++++++++++++ src/main/java/com/zhongzhi/dto/project/ExportDTO.java | 14 ++++++++++++++ src/main/java/com/zhongzhi/dto/project/ExportProjectDTO.java | 44 ++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/dto/project/ImportVocationalProjectDTO.java | 15 +++++++++++++++ src/main/java/com/zhongzhi/dto/project/PrintAttachmentDTO.java | 15 +++++++++++++++ src/main/java/com/zhongzhi/dto/project/ProjectCollegeListDTO.java | 19 +++++++++++++++++++ src/main/java/com/zhongzhi/dto/project/ProjectListPageDTO.java | 25 +++++++++++++++++++++++++ src/main/java/com/zhongzhi/dto/project/ReviewListDTO.java | 36 ++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/dto/project/ReviewVocationalNumDTO.java | 15 +++++++++++++++ src/main/java/com/zhongzhi/dto/project/SeedTrackProjectNumDTO.java | 13 +++++++++++++ src/main/java/com/zhongzhi/dto/project/StudentProjectDTO.java | 11 +++++++++++ src/main/java/com/zhongzhi/dto/projectJudge/ImportJudge.java | 29 +++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/dto/review/CancelReviewDTO.java | 15 +++++++++++++++ src/main/java/com/zhongzhi/dto/review/ProjectReviewDTO.java | 9 +++++++++ src/main/java/com/zhongzhi/dto/review/ProjectReviewPageDTO.java | 25 +++++++++++++++++++++++++ src/main/java/com/zhongzhi/dto/review/ProjectReviewScoreDTO.java | 21 +++++++++++++++++++++ src/main/java/com/zhongzhi/dto/review/ReviewScoreDTO.java | 13 +++++++++++++ src/main/java/com/zhongzhi/dto/review/SetReviewDTO.java | 17 +++++++++++++++++ src/main/java/com/zhongzhi/dto/review/SubmittedDTO.java | 11 +++++++++++ src/main/java/com/zhongzhi/dto/scheduleRecord/ProjectScheduleRecordDTO.java | 13 +++++++++++++ src/main/java/com/zhongzhi/dto/student/LoginDTO.java | 11 +++++++++++ src/main/java/com/zhongzhi/dto/student/RegisterDTO.java | 25 +++++++++++++++++++++++++ src/main/java/com/zhongzhi/model/AdministerDO.java | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/model/AdministerPermissionDO.java | 41 +++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/model/CollegesDictDO.java | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/model/CourseDictDO.java | 32 ++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/model/FinalMatchMemberDO.java | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/model/FundDictDO.java | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/model/ItemFieldDictDO.java | 35 +++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/model/MajorDictDO.java | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/model/MatchCollegePdfDO.java | 36 ++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/model/MatchDictDO.java | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/model/MatchScheduleDO.java | 47 +++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/model/MessageDO.java | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/model/PermissionsDO.java | 41 +++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/model/ProjectAwardDO.java | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/model/ProjectCopyrightDO.java | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/model/ProjectDO.java | 262 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/model/ProjectJudgeDO.java | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/model/ProjectMaterialsDO.java | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/model/ProjectMemberDO.java | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/model/ProjectOwnershipStructureDO.java | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/model/ProjectPaperDO.java | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/model/ProjectPatentDO.java | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/model/ProjectReviewDO.java | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/model/ProjectReviewPeriodDO.java | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/model/ProjectScheduleRecordDO.java | 42 ++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/model/ProjectTrademarkDO.java | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/model/ProjectWorksDO.java | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/model/SmsCodeDO.java | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/model/SmsNoticeDO.java | 46 ++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/model/StudentDO.java | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/model/VodDictDO.java | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/model/YearDictDO.java | 43 +++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/model/base/BaseModel.java | 35 +++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/service/.DS_Store | Bin 0 -> 6148 bytes src/main/java/com/zhongzhi/service/AdministerPermissionService.java | 16 ++++++++++++++++ src/main/java/com/zhongzhi/service/AdministerService.java | 23 +++++++++++++++++++++++ src/main/java/com/zhongzhi/service/CollegesDictService.java | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/service/CourseDictService.java | 31 +++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/service/FinalMatchMemberService.java | 16 ++++++++++++++++ src/main/java/com/zhongzhi/service/FundDictService.java | 16 ++++++++++++++++ src/main/java/com/zhongzhi/service/ItemFieldDictService.java | 16 ++++++++++++++++ src/main/java/com/zhongzhi/service/MajorDictService.java | 16 ++++++++++++++++ src/main/java/com/zhongzhi/service/MatchCollegePdfService.java | 22 ++++++++++++++++++++++ src/main/java/com/zhongzhi/service/MatchDictService.java | 42 ++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/service/MatchScheduleService.java | 16 ++++++++++++++++ src/main/java/com/zhongzhi/service/MessageService.java | 21 +++++++++++++++++++++ src/main/java/com/zhongzhi/service/PermissionsService.java | 20 ++++++++++++++++++++ src/main/java/com/zhongzhi/service/ProjectAwardService.java | 16 ++++++++++++++++ src/main/java/com/zhongzhi/service/ProjectCopyrightService.java | 16 ++++++++++++++++ src/main/java/com/zhongzhi/service/ProjectJudgeService.java | 37 +++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/service/ProjectMaterialsService.java | 16 ++++++++++++++++ src/main/java/com/zhongzhi/service/ProjectMemberService.java | 16 ++++++++++++++++ src/main/java/com/zhongzhi/service/ProjectOwnershipStructureService.java | 16 ++++++++++++++++ src/main/java/com/zhongzhi/service/ProjectPaperService.java | 16 ++++++++++++++++ src/main/java/com/zhongzhi/service/ProjectPatentService.java | 16 ++++++++++++++++ src/main/java/com/zhongzhi/service/ProjectReviewPeriodService.java | 21 +++++++++++++++++++++ src/main/java/com/zhongzhi/service/ProjectReviewService.java | 37 +++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/service/ProjectScheduleRecordService.java | 24 ++++++++++++++++++++++++ src/main/java/com/zhongzhi/service/ProjectService.java | 167 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/service/ProjectTrademarkService.java | 16 ++++++++++++++++ src/main/java/com/zhongzhi/service/ProjectWorksService.java | 16 ++++++++++++++++ src/main/java/com/zhongzhi/service/SmsCodeService.java | 26 ++++++++++++++++++++++++++ src/main/java/com/zhongzhi/service/SmsNoticeService.java | 24 ++++++++++++++++++++++++ src/main/java/com/zhongzhi/service/StudentService.java | 24 ++++++++++++++++++++++++ src/main/java/com/zhongzhi/service/VodDictService.java | 36 ++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/service/YearDictService.java | 23 +++++++++++++++++++++++ src/main/java/com/zhongzhi/service/impl/AdministerPermissionServiceImpl.java | 20 ++++++++++++++++++++ src/main/java/com/zhongzhi/service/impl/AdministerServiceImpl.java | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/service/impl/CollegesDictServiceImpl.java | 601 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/service/impl/CourseDictServiceImpl.java | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/service/impl/FinalMatchMemberServiceImpl.java | 20 ++++++++++++++++++++ src/main/java/com/zhongzhi/service/impl/FundDictServiceImpl.java | 20 ++++++++++++++++++++ src/main/java/com/zhongzhi/service/impl/ItemFieldDictServiceImpl.java | 20 ++++++++++++++++++++ src/main/java/com/zhongzhi/service/impl/MajorDictServiceImpl.java | 20 ++++++++++++++++++++ src/main/java/com/zhongzhi/service/impl/MatchCollegePdfServiceImpl.java | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/service/impl/MatchDictServiceImpl.java | 177 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/service/impl/MatchScheduleServiceImpl.java | 20 ++++++++++++++++++++ src/main/java/com/zhongzhi/service/impl/MessageServiceImpl.java | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/service/impl/PermissionsServiceImpl.java | 27 +++++++++++++++++++++++++++ src/main/java/com/zhongzhi/service/impl/ProjectAwardServiceImpl.java | 20 ++++++++++++++++++++ src/main/java/com/zhongzhi/service/impl/ProjectCopyrightServiceImpl.java | 20 ++++++++++++++++++++ src/main/java/com/zhongzhi/service/impl/ProjectJudgeServiceImpl.java | 182 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/service/impl/ProjectMaterialsServiceImpl.java | 20 ++++++++++++++++++++ src/main/java/com/zhongzhi/service/impl/ProjectMemberServiceImpl.java | 20 ++++++++++++++++++++ src/main/java/com/zhongzhi/service/impl/ProjectOwnershipStructureServiceImpl.java | 20 ++++++++++++++++++++ src/main/java/com/zhongzhi/service/impl/ProjectPaperServiceImpl.java | 20 ++++++++++++++++++++ src/main/java/com/zhongzhi/service/impl/ProjectPatentServiceImpl.java | 20 ++++++++++++++++++++ src/main/java/com/zhongzhi/service/impl/ProjectReviewPeriodServiceImpl.java | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/service/impl/ProjectReviewServiceImpl.java | 304 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/service/impl/ProjectScheduleRecordServiceImpl.java | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/service/impl/ProjectServiceImpl.java | 4800 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/service/impl/ProjectTrademarkServiceImpl.java | 20 ++++++++++++++++++++ src/main/java/com/zhongzhi/service/impl/ProjectWorksServiceImpl.java | 20 ++++++++++++++++++++ src/main/java/com/zhongzhi/service/impl/SmsCodeServiceImpl.java | 180 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/service/impl/SmsNoticeServiceImpl.java | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/service/impl/StudentServiceImpl.java | 129 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/service/impl/VodDictServiceImpl.java | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/service/impl/YearDictServiceImpl.java | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/vo/ExcelFieldVO.java | 11 +++++++++++ src/main/java/com/zhongzhi/vo/ResponseVO.java | 21 +++++++++++++++++++++ src/main/java/com/zhongzhi/vo/administer/AdministerVO.java | 22 ++++++++++++++++++++++ src/main/java/com/zhongzhi/vo/college/AwardedListVO.java | 40 ++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/vo/college/CollegePageVO.java | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/vo/college/CollegesVO.java | 37 +++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/vo/college/DetailVO.java | 11 +++++++++++ src/main/java/com/zhongzhi/vo/college/ExportListVO.java | 28 ++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/vo/college/RegisterMembersVO.java | 28 ++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/vo/college/SchoolsVO.java | 14 ++++++++++++++ src/main/java/com/zhongzhi/vo/course/CourseVodsVO.java | 13 +++++++++++++ src/main/java/com/zhongzhi/vo/course/CoursesVO.java | 14 ++++++++++++++ src/main/java/com/zhongzhi/vo/course/SignatureVO.java | 10 ++++++++++ src/main/java/com/zhongzhi/vo/course/VodsVO.java | 12 ++++++++++++ src/main/java/com/zhongzhi/vo/judge/JudgeInfoVO.java | 17 +++++++++++++++++ src/main/java/com/zhongzhi/vo/judge/ProjectJudgePageVO.java | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/vo/judge/ProjectReviewVO.java | 11 +++++++++++ src/main/java/com/zhongzhi/vo/match/MatchDictVO.java | 27 +++++++++++++++++++++++++++ src/main/java/com/zhongzhi/vo/member/ProjectMemberVO.java | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/vo/message/MessageVO.java | 26 ++++++++++++++++++++++++++ src/main/java/com/zhongzhi/vo/notice/SmsNoticeVO.java | 18 ++++++++++++++++++ src/main/java/com/zhongzhi/vo/oss/GetSecretVO.java | 13 +++++++++++++ src/main/java/com/zhongzhi/vo/oss/UploadFileVO.java | 10 ++++++++++ src/main/java/com/zhongzhi/vo/permission/PermissionVO.java | 17 +++++++++++++++++ src/main/java/com/zhongzhi/vo/project/CollegeProjectVO.java | 29 +++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/vo/project/MainTrackProjectDetailVO.java | 183 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/vo/project/MainTrackProjectPageVO.java | 33 +++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/vo/project/ProjectAssignNumVO.java | 39 +++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/vo/project/ProjectDataOverview.java | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/vo/project/ProjectInfoVO.java | 203 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/vo/project/ProjectJudgeVO.java | 26 ++++++++++++++++++++++++++ src/main/java/com/zhongzhi/vo/project/ProjectNumVO.java | 40 ++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/vo/project/ProjectPageVO.java | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/vo/project/QueryPdfStatusVO.java | 10 ++++++++++ src/main/java/com/zhongzhi/vo/project/ReviewListVO.java | 27 +++++++++++++++++++++++++++ src/main/java/com/zhongzhi/vo/project/SeedTrackProjectDetailVO.java | 299 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/vo/project/SeedTrackProjectNumVO.java | 13 +++++++++++++ src/main/java/com/zhongzhi/vo/project/SeedTrackProjectPageVO.java | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/vo/project/SeedTrackProjectVO.java | 46 ++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/vo/project/VocationalNumVO.java | 27 +++++++++++++++++++++++++++ src/main/java/com/zhongzhi/vo/project/VocationalProjectInfoVO.java | 263 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/vo/project/VocationalProjectNum.java | 39 +++++++++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/vo/project/VocationalProjectVO.java | 29 +++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/vo/project/VocationalReviewNumVO.java | 33 +++++++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/vo/projectReviewPeriod/ProjectReviewPeriodVO.java | 13 +++++++++++++ src/main/java/com/zhongzhi/vo/review/FinalsReviewVO.java | 24 ++++++++++++++++++++++++ src/main/java/com/zhongzhi/vo/review/ReMatchReviewVO.java | 24 ++++++++++++++++++++++++ src/main/java/com/zhongzhi/vo/review/SchoolReviewVO.java | 29 +++++++++++++++++++++++++++++ src/main/java/com/zhongzhi/vo/review/SendNoticeVO.java | 13 +++++++++++++ src/main/java/com/zhongzhi/vo/scheduleRecord/ProjectScheduleRecordVO.java | 17 +++++++++++++++++ src/main/java/com/zhongzhi/vo/student/StudentInfoVO.java | 37 +++++++++++++++++++++++++++++++++++++ src/main/resources/application-dev.properties | 24 ++++++++++++++++++++++++ src/main/resources/application-pre.properties | 24 ++++++++++++++++++++++++ src/main/resources/application-prod.properties | 24 ++++++++++++++++++++++++ src/main/resources/application.properties | 40 ++++++++++++++++++++++++++++++++++++++++ src/main/resources/banner.txt | 7 +++++++ src/main/resources/code.properties | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/resources/logback-spring.xml | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/resources/mapper/AdministerDAO.xml | 22 ++++++++++++++++++++++ src/main/resources/mapper/AdministerPermissionDAO.xml | 20 ++++++++++++++++++++ src/main/resources/mapper/CollegesDictDAO.xml | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/resources/mapper/CourseDictDAO.xml | 38 ++++++++++++++++++++++++++++++++++++++ src/main/resources/mapper/FinalMatchMemberMapper.xml | 145 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/resources/mapper/FundDictDAO.xml | 21 +++++++++++++++++++++ src/main/resources/mapper/ItemFieldDictDAO.xml | 19 +++++++++++++++++++ src/main/resources/mapper/MajorDictDAO.xml | 21 +++++++++++++++++++++ src/main/resources/mapper/MatchCollegePdfMapper.xml | 5 +++++ src/main/resources/mapper/MatchDictDAO.xml | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/resources/mapper/MatchScheduleDAO.xml | 24 ++++++++++++++++++++++++ src/main/resources/mapper/MessageDAO.xml | 30 ++++++++++++++++++++++++++++++ src/main/resources/mapper/PermissionsDAO.xml | 30 ++++++++++++++++++++++++++++++ src/main/resources/mapper/ProjectAwardMapper.xml | 27 +++++++++++++++++++++++++++ src/main/resources/mapper/ProjectCopyrightMapper.xml | 30 ++++++++++++++++++++++++++++++ src/main/resources/mapper/ProjectDAO.xml | 424 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/resources/mapper/ProjectJudgeDAO.xml | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/resources/mapper/ProjectMaterialsDAO.xml | 26 ++++++++++++++++++++++++++ src/main/resources/mapper/ProjectMemberDAO.xml | 23 +++++++++++++++++++++++ src/main/resources/mapper/ProjectOwnershipStructureDAO.xml | 25 +++++++++++++++++++++++++ src/main/resources/mapper/ProjectPaperMapper.xml | 28 ++++++++++++++++++++++++++++ src/main/resources/mapper/ProjectPatentMapper.xml | 33 +++++++++++++++++++++++++++++++++ src/main/resources/mapper/ProjectReviewDAO.xml | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/resources/mapper/ProjectReviewPeriodMapper.xml | 26 ++++++++++++++++++++++++++ src/main/resources/mapper/ProjectScheduleRecordDAO.xml | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/resources/mapper/ProjectTrademarkMapper.xml | 29 +++++++++++++++++++++++++++++ src/main/resources/mapper/ProjectWorksMapper.xml | 29 +++++++++++++++++++++++++++++ src/main/resources/mapper/SmsCodeDAO.xml | 37 +++++++++++++++++++++++++++++++++++++ src/main/resources/mapper/SmsNoticeMapper.xml | 47 +++++++++++++++++++++++++++++++++++++++++++++++ src/main/resources/mapper/StudentDAO.xml | 28 ++++++++++++++++++++++++++++ src/main/resources/mapper/VodDictDAO.xml | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/resources/mapper/YearDictDAO.xml | 5 +++++ src/main/resources/mybatis-generator.properties | 12 ++++++++++++ src/main/resources/templates/controller.java.ftl | 39 +++++++++++++++++++++++++++++++++++++++ src/main/resources/templates/entity.java.ftl | 156 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/resources/templates/mapper.java.ftl | 20 ++++++++++++++++++++ src/main/resources/templates/mapper.xml.ftl | 39 +++++++++++++++++++++++++++++++++++++++ src/main/resources/templates/service.java.ftl | 20 ++++++++++++++++++++ src/main/resources/templates/serviceImpl.java.ftl | 26 ++++++++++++++++++++++++++ 367 files changed, 24039 insertions(+) create mode 100644 .DS_Store create mode 100644 .gitignore create mode 100644 .mvn/wrapper/MavenWrapperDownloader.java create mode 100644 .mvn/wrapper/maven-wrapper.jar create mode 100644 .mvn/wrapper/maven-wrapper.properties create mode 100644 mvnw create mode 100644 mvnw.cmd create mode 100644 pom.xml create mode 100644 src/.DS_Store create mode 100644 src/main/.DS_Store create mode 100644 src/main/java/.DS_Store create mode 100644 src/main/java/com/.DS_Store create mode 100644 src/main/java/com/zhongzhi/.DS_Store create mode 100644 src/main/java/com/zhongzhi/ZhongzhiApplication.java create mode 100644 src/main/java/com/zhongzhi/common/configure/AliyunSmsProperties.java create mode 100644 src/main/java/com/zhongzhi/common/configure/MybatisPlusConfig.java create mode 100644 src/main/java/com/zhongzhi/common/configure/RemoteProperties.java create mode 100644 src/main/java/com/zhongzhi/common/configure/SwaggerConfig.java create mode 100644 src/main/java/com/zhongzhi/common/configure/VODConfig.java create mode 100644 src/main/java/com/zhongzhi/common/configure/WebConfig.java create mode 100644 src/main/java/com/zhongzhi/common/constant/Code.java create mode 100644 src/main/java/com/zhongzhi/common/constant/MemberType.java create mode 100644 src/main/java/com/zhongzhi/common/constant/PDFCheckBox.java create mode 100644 src/main/java/com/zhongzhi/common/constant/Platform.java create mode 100644 src/main/java/com/zhongzhi/common/constant/ProjectProgress.java create mode 100644 src/main/java/com/zhongzhi/common/constant/ProjectReview.java create mode 100644 src/main/java/com/zhongzhi/common/constant/ProjectSchedule.java create mode 100644 src/main/java/com/zhongzhi/common/constant/ProjectStatus.java create mode 100644 src/main/java/com/zhongzhi/common/constant/ProjectType.java create mode 100644 src/main/java/com/zhongzhi/common/constant/SMSTemplate.java create mode 100644 src/main/java/com/zhongzhi/common/constant/SmsCode.java create mode 100644 src/main/java/com/zhongzhi/common/exception/GlobalExceptionHandler.java create mode 100644 src/main/java/com/zhongzhi/common/exception/HttpException.java create mode 100644 src/main/java/com/zhongzhi/common/generator/CodeGenerator.java create mode 100644 src/main/java/com/zhongzhi/common/handler/MetaHandler.java create mode 100644 src/main/java/com/zhongzhi/common/interceptor/AuthenticationInterceptor.java create mode 100644 src/main/java/com/zhongzhi/common/utils/AliyunSmsUtil.java create mode 100644 src/main/java/com/zhongzhi/common/utils/ApplicationContextUtil.java create mode 100644 src/main/java/com/zhongzhi/common/utils/DateFormatUtil.java create mode 100644 src/main/java/com/zhongzhi/common/utils/ExcelColumn.java create mode 100644 src/main/java/com/zhongzhi/common/utils/ExcelUtil.java create mode 100644 src/main/java/com/zhongzhi/common/utils/IpAddressUtil.java create mode 100644 src/main/java/com/zhongzhi/common/utils/JwtUtil.java create mode 100644 src/main/java/com/zhongzhi/common/utils/Localstorage.java create mode 100644 src/main/java/com/zhongzhi/common/utils/LoginRequired.java create mode 100644 src/main/java/com/zhongzhi/common/utils/PDFUtil.java create mode 100644 src/main/java/com/zhongzhi/common/utils/RandomUtil.java create mode 100644 src/main/java/com/zhongzhi/common/utils/ResponseData.java create mode 100644 src/main/java/com/zhongzhi/common/utils/SMSSendUtils.java create mode 100644 src/main/java/com/zhongzhi/common/utils/Signature.java create mode 100644 src/main/java/com/zhongzhi/common/utils/SysLog.java create mode 100644 src/main/java/com/zhongzhi/common/utils/VodUtil.java create mode 100644 src/main/java/com/zhongzhi/controller/AdministerController.java create mode 100644 src/main/java/com/zhongzhi/controller/AdministerPermissionController.java create mode 100644 src/main/java/com/zhongzhi/controller/CollegesDictController.java create mode 100644 src/main/java/com/zhongzhi/controller/CourseDictController.java create mode 100644 src/main/java/com/zhongzhi/controller/FinalMatchMemberController.java create mode 100644 src/main/java/com/zhongzhi/controller/FundDictController.java create mode 100644 src/main/java/com/zhongzhi/controller/ItemFieldDictController.java create mode 100644 src/main/java/com/zhongzhi/controller/MajorDictController.java create mode 100644 src/main/java/com/zhongzhi/controller/MatchCollegePdfController.java create mode 100644 src/main/java/com/zhongzhi/controller/MatchDictController.java create mode 100644 src/main/java/com/zhongzhi/controller/MatchScheduleController.java create mode 100644 src/main/java/com/zhongzhi/controller/MessageController.java create mode 100644 src/main/java/com/zhongzhi/controller/OssController.java create mode 100644 src/main/java/com/zhongzhi/controller/PermissionsController.java create mode 100644 src/main/java/com/zhongzhi/controller/ProjectAwardController.java create mode 100644 src/main/java/com/zhongzhi/controller/ProjectController.java create mode 100644 src/main/java/com/zhongzhi/controller/ProjectCopyrightController.java create mode 100644 src/main/java/com/zhongzhi/controller/ProjectJudgeController.java create mode 100644 src/main/java/com/zhongzhi/controller/ProjectMaterialsController.java create mode 100644 src/main/java/com/zhongzhi/controller/ProjectMemberController.java create mode 100644 src/main/java/com/zhongzhi/controller/ProjectOwnershipStructureController.java create mode 100644 src/main/java/com/zhongzhi/controller/ProjectPaperController.java create mode 100644 src/main/java/com/zhongzhi/controller/ProjectPatentController.java create mode 100644 src/main/java/com/zhongzhi/controller/ProjectReviewController.java create mode 100644 src/main/java/com/zhongzhi/controller/ProjectReviewPeriodController.java create mode 100644 src/main/java/com/zhongzhi/controller/ProjectScheduleRecordController.java create mode 100644 src/main/java/com/zhongzhi/controller/ProjectTrademarkController.java create mode 100644 src/main/java/com/zhongzhi/controller/ProjectWorksController.java create mode 100644 src/main/java/com/zhongzhi/controller/SmsCodeController.java create mode 100644 src/main/java/com/zhongzhi/controller/SmsNoticeController.java create mode 100644 src/main/java/com/zhongzhi/controller/StudentController.java create mode 100644 src/main/java/com/zhongzhi/controller/VodDictController.java create mode 100644 src/main/java/com/zhongzhi/controller/YearDictController.java create mode 100644 src/main/java/com/zhongzhi/dao/AdministerDAO.java create mode 100644 src/main/java/com/zhongzhi/dao/AdministerPermissionDAO.java create mode 100644 src/main/java/com/zhongzhi/dao/CollegesDictDAO.java create mode 100644 src/main/java/com/zhongzhi/dao/CourseDictDAO.java create mode 100644 src/main/java/com/zhongzhi/dao/FinalMatchMemberDAO.java create mode 100644 src/main/java/com/zhongzhi/dao/FundDictDAO.java create mode 100644 src/main/java/com/zhongzhi/dao/ItemFieldDictDAO.java create mode 100644 src/main/java/com/zhongzhi/dao/MajorDictDAO.java create mode 100644 src/main/java/com/zhongzhi/dao/MatchCollegePdfMapper.java create mode 100644 src/main/java/com/zhongzhi/dao/MatchDictDAO.java create mode 100644 src/main/java/com/zhongzhi/dao/MatchScheduleDAO.java create mode 100644 src/main/java/com/zhongzhi/dao/MessageDAO.java create mode 100644 src/main/java/com/zhongzhi/dao/PermissionsDAO.java create mode 100644 src/main/java/com/zhongzhi/dao/ProjectAwardMapper.java create mode 100644 src/main/java/com/zhongzhi/dao/ProjectCopyrightMapper.java create mode 100644 src/main/java/com/zhongzhi/dao/ProjectDAO.java create mode 100644 src/main/java/com/zhongzhi/dao/ProjectJudgeDAO.java create mode 100644 src/main/java/com/zhongzhi/dao/ProjectMaterialsDAO.java create mode 100644 src/main/java/com/zhongzhi/dao/ProjectMemberDAO.java create mode 100644 src/main/java/com/zhongzhi/dao/ProjectOwnershipStructureDAO.java create mode 100644 src/main/java/com/zhongzhi/dao/ProjectPaperMapper.java create mode 100644 src/main/java/com/zhongzhi/dao/ProjectPatentMapper.java create mode 100644 src/main/java/com/zhongzhi/dao/ProjectReviewDAO.java create mode 100644 src/main/java/com/zhongzhi/dao/ProjectReviewPeriodMapper.java create mode 100644 src/main/java/com/zhongzhi/dao/ProjectScheduleRecordDAO.java create mode 100644 src/main/java/com/zhongzhi/dao/ProjectTrademarkMapper.java create mode 100644 src/main/java/com/zhongzhi/dao/ProjectWorksMapper.java create mode 100644 src/main/java/com/zhongzhi/dao/SmsCodeDAO.java create mode 100644 src/main/java/com/zhongzhi/dao/SmsNoticeMapper.java create mode 100644 src/main/java/com/zhongzhi/dao/StudentDAO.java create mode 100644 src/main/java/com/zhongzhi/dao/VodDictDAO.java create mode 100644 src/main/java/com/zhongzhi/dao/YearDictDAO.java create mode 100644 src/main/java/com/zhongzhi/dto/administer/AdministerPageDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/administer/LoginDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/college/AddProjectMemberDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/college/AwardedListDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/college/CollegesDOT.java create mode 100644 src/main/java/com/zhongzhi/dto/college/CollegesDictDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/college/CollegesPageDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/college/DownloadErrorDataDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/college/ExportCollegeDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/college/LoginDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/college/LoginStatusDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/college/RegisterMembersDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/college/UpdatePwdDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/course/ChangeOrdersDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/course/CoursesDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/course/VodsDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/judge/ProjectJudgePageDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/match/MatchDictDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/match/SelectListPageDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/member/CreateProjectMemberDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/member/MentorDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/member/TeamMemberDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/message/MessagePageDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/notice/SmsNoticeDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/notice/SmsNoticePageDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/period/ProjectReviewPeriodDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/project/ApproveDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/project/BatchRollbackDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/project/CollegeProjectDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/project/CreateMainTrackProjectDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/project/CreateSeedTrackProjectDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/project/CreateVocationalProjectDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/project/DataOverviewDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/project/EditStatusDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/project/ExportDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/project/ExportProjectDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/project/ImportVocationalProjectDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/project/PrintAttachmentDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/project/ProjectCollegeListDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/project/ProjectListPageDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/project/ReviewListDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/project/ReviewVocationalNumDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/project/SeedTrackProjectNumDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/project/StudentProjectDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/projectJudge/ImportJudge.java create mode 100644 src/main/java/com/zhongzhi/dto/review/CancelReviewDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/review/ProjectReviewDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/review/ProjectReviewPageDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/review/ProjectReviewScoreDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/review/ReviewScoreDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/review/SetReviewDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/review/SubmittedDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/scheduleRecord/ProjectScheduleRecordDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/student/LoginDTO.java create mode 100644 src/main/java/com/zhongzhi/dto/student/RegisterDTO.java create mode 100644 src/main/java/com/zhongzhi/model/AdministerDO.java create mode 100644 src/main/java/com/zhongzhi/model/AdministerPermissionDO.java create mode 100644 src/main/java/com/zhongzhi/model/CollegesDictDO.java create mode 100644 src/main/java/com/zhongzhi/model/CourseDictDO.java create mode 100644 src/main/java/com/zhongzhi/model/FinalMatchMemberDO.java create mode 100644 src/main/java/com/zhongzhi/model/FundDictDO.java create mode 100644 src/main/java/com/zhongzhi/model/ItemFieldDictDO.java create mode 100644 src/main/java/com/zhongzhi/model/MajorDictDO.java create mode 100644 src/main/java/com/zhongzhi/model/MatchCollegePdfDO.java create mode 100644 src/main/java/com/zhongzhi/model/MatchDictDO.java create mode 100644 src/main/java/com/zhongzhi/model/MatchScheduleDO.java create mode 100644 src/main/java/com/zhongzhi/model/MessageDO.java create mode 100644 src/main/java/com/zhongzhi/model/PermissionsDO.java create mode 100644 src/main/java/com/zhongzhi/model/ProjectAwardDO.java create mode 100644 src/main/java/com/zhongzhi/model/ProjectCopyrightDO.java create mode 100644 src/main/java/com/zhongzhi/model/ProjectDO.java create mode 100644 src/main/java/com/zhongzhi/model/ProjectJudgeDO.java create mode 100644 src/main/java/com/zhongzhi/model/ProjectMaterialsDO.java create mode 100644 src/main/java/com/zhongzhi/model/ProjectMemberDO.java create mode 100644 src/main/java/com/zhongzhi/model/ProjectOwnershipStructureDO.java create mode 100644 src/main/java/com/zhongzhi/model/ProjectPaperDO.java create mode 100644 src/main/java/com/zhongzhi/model/ProjectPatentDO.java create mode 100644 src/main/java/com/zhongzhi/model/ProjectReviewDO.java create mode 100644 src/main/java/com/zhongzhi/model/ProjectReviewPeriodDO.java create mode 100644 src/main/java/com/zhongzhi/model/ProjectScheduleRecordDO.java create mode 100644 src/main/java/com/zhongzhi/model/ProjectTrademarkDO.java create mode 100644 src/main/java/com/zhongzhi/model/ProjectWorksDO.java create mode 100644 src/main/java/com/zhongzhi/model/SmsCodeDO.java create mode 100644 src/main/java/com/zhongzhi/model/SmsNoticeDO.java create mode 100644 src/main/java/com/zhongzhi/model/StudentDO.java create mode 100644 src/main/java/com/zhongzhi/model/VodDictDO.java create mode 100644 src/main/java/com/zhongzhi/model/YearDictDO.java create mode 100644 src/main/java/com/zhongzhi/model/base/BaseModel.java create mode 100644 src/main/java/com/zhongzhi/service/.DS_Store create mode 100644 src/main/java/com/zhongzhi/service/AdministerPermissionService.java create mode 100644 src/main/java/com/zhongzhi/service/AdministerService.java create mode 100644 src/main/java/com/zhongzhi/service/CollegesDictService.java create mode 100644 src/main/java/com/zhongzhi/service/CourseDictService.java create mode 100644 src/main/java/com/zhongzhi/service/FinalMatchMemberService.java create mode 100644 src/main/java/com/zhongzhi/service/FundDictService.java create mode 100644 src/main/java/com/zhongzhi/service/ItemFieldDictService.java create mode 100644 src/main/java/com/zhongzhi/service/MajorDictService.java create mode 100644 src/main/java/com/zhongzhi/service/MatchCollegePdfService.java create mode 100644 src/main/java/com/zhongzhi/service/MatchDictService.java create mode 100644 src/main/java/com/zhongzhi/service/MatchScheduleService.java create mode 100644 src/main/java/com/zhongzhi/service/MessageService.java create mode 100644 src/main/java/com/zhongzhi/service/PermissionsService.java create mode 100644 src/main/java/com/zhongzhi/service/ProjectAwardService.java create mode 100644 src/main/java/com/zhongzhi/service/ProjectCopyrightService.java create mode 100644 src/main/java/com/zhongzhi/service/ProjectJudgeService.java create mode 100644 src/main/java/com/zhongzhi/service/ProjectMaterialsService.java create mode 100644 src/main/java/com/zhongzhi/service/ProjectMemberService.java create mode 100644 src/main/java/com/zhongzhi/service/ProjectOwnershipStructureService.java create mode 100644 src/main/java/com/zhongzhi/service/ProjectPaperService.java create mode 100644 src/main/java/com/zhongzhi/service/ProjectPatentService.java create mode 100644 src/main/java/com/zhongzhi/service/ProjectReviewPeriodService.java create mode 100644 src/main/java/com/zhongzhi/service/ProjectReviewService.java create mode 100644 src/main/java/com/zhongzhi/service/ProjectScheduleRecordService.java create mode 100644 src/main/java/com/zhongzhi/service/ProjectService.java create mode 100644 src/main/java/com/zhongzhi/service/ProjectTrademarkService.java create mode 100644 src/main/java/com/zhongzhi/service/ProjectWorksService.java create mode 100644 src/main/java/com/zhongzhi/service/SmsCodeService.java create mode 100644 src/main/java/com/zhongzhi/service/SmsNoticeService.java create mode 100644 src/main/java/com/zhongzhi/service/StudentService.java create mode 100644 src/main/java/com/zhongzhi/service/VodDictService.java create mode 100644 src/main/java/com/zhongzhi/service/YearDictService.java create mode 100644 src/main/java/com/zhongzhi/service/impl/AdministerPermissionServiceImpl.java create mode 100644 src/main/java/com/zhongzhi/service/impl/AdministerServiceImpl.java create mode 100644 src/main/java/com/zhongzhi/service/impl/CollegesDictServiceImpl.java create mode 100644 src/main/java/com/zhongzhi/service/impl/CourseDictServiceImpl.java create mode 100644 src/main/java/com/zhongzhi/service/impl/FinalMatchMemberServiceImpl.java create mode 100644 src/main/java/com/zhongzhi/service/impl/FundDictServiceImpl.java create mode 100644 src/main/java/com/zhongzhi/service/impl/ItemFieldDictServiceImpl.java create mode 100644 src/main/java/com/zhongzhi/service/impl/MajorDictServiceImpl.java create mode 100644 src/main/java/com/zhongzhi/service/impl/MatchCollegePdfServiceImpl.java create mode 100644 src/main/java/com/zhongzhi/service/impl/MatchDictServiceImpl.java create mode 100644 src/main/java/com/zhongzhi/service/impl/MatchScheduleServiceImpl.java create mode 100644 src/main/java/com/zhongzhi/service/impl/MessageServiceImpl.java create mode 100644 src/main/java/com/zhongzhi/service/impl/PermissionsServiceImpl.java create mode 100644 src/main/java/com/zhongzhi/service/impl/ProjectAwardServiceImpl.java create mode 100644 src/main/java/com/zhongzhi/service/impl/ProjectCopyrightServiceImpl.java create mode 100644 src/main/java/com/zhongzhi/service/impl/ProjectJudgeServiceImpl.java create mode 100644 src/main/java/com/zhongzhi/service/impl/ProjectMaterialsServiceImpl.java create mode 100644 src/main/java/com/zhongzhi/service/impl/ProjectMemberServiceImpl.java create mode 100644 src/main/java/com/zhongzhi/service/impl/ProjectOwnershipStructureServiceImpl.java create mode 100644 src/main/java/com/zhongzhi/service/impl/ProjectPaperServiceImpl.java create mode 100644 src/main/java/com/zhongzhi/service/impl/ProjectPatentServiceImpl.java create mode 100644 src/main/java/com/zhongzhi/service/impl/ProjectReviewPeriodServiceImpl.java create mode 100644 src/main/java/com/zhongzhi/service/impl/ProjectReviewServiceImpl.java create mode 100644 src/main/java/com/zhongzhi/service/impl/ProjectScheduleRecordServiceImpl.java create mode 100644 src/main/java/com/zhongzhi/service/impl/ProjectServiceImpl.java create mode 100644 src/main/java/com/zhongzhi/service/impl/ProjectTrademarkServiceImpl.java create mode 100644 src/main/java/com/zhongzhi/service/impl/ProjectWorksServiceImpl.java create mode 100644 src/main/java/com/zhongzhi/service/impl/SmsCodeServiceImpl.java create mode 100644 src/main/java/com/zhongzhi/service/impl/SmsNoticeServiceImpl.java create mode 100644 src/main/java/com/zhongzhi/service/impl/StudentServiceImpl.java create mode 100644 src/main/java/com/zhongzhi/service/impl/VodDictServiceImpl.java create mode 100644 src/main/java/com/zhongzhi/service/impl/YearDictServiceImpl.java create mode 100644 src/main/java/com/zhongzhi/vo/ExcelFieldVO.java create mode 100644 src/main/java/com/zhongzhi/vo/ResponseVO.java create mode 100644 src/main/java/com/zhongzhi/vo/administer/AdministerVO.java create mode 100644 src/main/java/com/zhongzhi/vo/college/AwardedListVO.java create mode 100644 src/main/java/com/zhongzhi/vo/college/CollegePageVO.java create mode 100644 src/main/java/com/zhongzhi/vo/college/CollegesVO.java create mode 100644 src/main/java/com/zhongzhi/vo/college/DetailVO.java create mode 100644 src/main/java/com/zhongzhi/vo/college/ExportListVO.java create mode 100644 src/main/java/com/zhongzhi/vo/college/RegisterMembersVO.java create mode 100644 src/main/java/com/zhongzhi/vo/college/SchoolsVO.java create mode 100644 src/main/java/com/zhongzhi/vo/course/CourseVodsVO.java create mode 100644 src/main/java/com/zhongzhi/vo/course/CoursesVO.java create mode 100644 src/main/java/com/zhongzhi/vo/course/SignatureVO.java create mode 100644 src/main/java/com/zhongzhi/vo/course/VodsVO.java create mode 100644 src/main/java/com/zhongzhi/vo/judge/JudgeInfoVO.java create mode 100644 src/main/java/com/zhongzhi/vo/judge/ProjectJudgePageVO.java create mode 100644 src/main/java/com/zhongzhi/vo/judge/ProjectReviewVO.java create mode 100644 src/main/java/com/zhongzhi/vo/match/MatchDictVO.java create mode 100644 src/main/java/com/zhongzhi/vo/member/ProjectMemberVO.java create mode 100644 src/main/java/com/zhongzhi/vo/message/MessageVO.java create mode 100644 src/main/java/com/zhongzhi/vo/notice/SmsNoticeVO.java create mode 100644 src/main/java/com/zhongzhi/vo/oss/GetSecretVO.java create mode 100644 src/main/java/com/zhongzhi/vo/oss/UploadFileVO.java create mode 100644 src/main/java/com/zhongzhi/vo/permission/PermissionVO.java create mode 100644 src/main/java/com/zhongzhi/vo/project/CollegeProjectVO.java create mode 100644 src/main/java/com/zhongzhi/vo/project/MainTrackProjectDetailVO.java create mode 100644 src/main/java/com/zhongzhi/vo/project/MainTrackProjectPageVO.java create mode 100644 src/main/java/com/zhongzhi/vo/project/ProjectAssignNumVO.java create mode 100644 src/main/java/com/zhongzhi/vo/project/ProjectDataOverview.java create mode 100644 src/main/java/com/zhongzhi/vo/project/ProjectInfoVO.java create mode 100644 src/main/java/com/zhongzhi/vo/project/ProjectJudgeVO.java create mode 100644 src/main/java/com/zhongzhi/vo/project/ProjectNumVO.java create mode 100644 src/main/java/com/zhongzhi/vo/project/ProjectPageVO.java create mode 100644 src/main/java/com/zhongzhi/vo/project/QueryPdfStatusVO.java create mode 100644 src/main/java/com/zhongzhi/vo/project/ReviewListVO.java create mode 100644 src/main/java/com/zhongzhi/vo/project/SeedTrackProjectDetailVO.java create mode 100644 src/main/java/com/zhongzhi/vo/project/SeedTrackProjectNumVO.java create mode 100644 src/main/java/com/zhongzhi/vo/project/SeedTrackProjectPageVO.java create mode 100644 src/main/java/com/zhongzhi/vo/project/SeedTrackProjectVO.java create mode 100644 src/main/java/com/zhongzhi/vo/project/VocationalNumVO.java create mode 100644 src/main/java/com/zhongzhi/vo/project/VocationalProjectInfoVO.java create mode 100644 src/main/java/com/zhongzhi/vo/project/VocationalProjectNum.java create mode 100644 src/main/java/com/zhongzhi/vo/project/VocationalProjectVO.java create mode 100644 src/main/java/com/zhongzhi/vo/project/VocationalReviewNumVO.java create mode 100644 src/main/java/com/zhongzhi/vo/projectReviewPeriod/ProjectReviewPeriodVO.java create mode 100644 src/main/java/com/zhongzhi/vo/review/FinalsReviewVO.java create mode 100644 src/main/java/com/zhongzhi/vo/review/ReMatchReviewVO.java create mode 100644 src/main/java/com/zhongzhi/vo/review/SchoolReviewVO.java create mode 100644 src/main/java/com/zhongzhi/vo/review/SendNoticeVO.java create mode 100644 src/main/java/com/zhongzhi/vo/scheduleRecord/ProjectScheduleRecordVO.java create mode 100644 src/main/java/com/zhongzhi/vo/student/StudentInfoVO.java create mode 100644 src/main/resources/application-dev.properties create mode 100644 src/main/resources/application-pre.properties create mode 100644 src/main/resources/application-prod.properties create mode 100644 src/main/resources/application.properties create mode 100644 src/main/resources/banner.txt create mode 100644 src/main/resources/code.properties create mode 100644 src/main/resources/logback-spring.xml create mode 100644 src/main/resources/mapper/AdministerDAO.xml create mode 100644 src/main/resources/mapper/AdministerPermissionDAO.xml create mode 100644 src/main/resources/mapper/CollegesDictDAO.xml create mode 100644 src/main/resources/mapper/CourseDictDAO.xml create mode 100644 src/main/resources/mapper/FinalMatchMemberMapper.xml create mode 100644 src/main/resources/mapper/FundDictDAO.xml create mode 100644 src/main/resources/mapper/ItemFieldDictDAO.xml create mode 100644 src/main/resources/mapper/MajorDictDAO.xml create mode 100644 src/main/resources/mapper/MatchCollegePdfMapper.xml create mode 100644 src/main/resources/mapper/MatchDictDAO.xml create mode 100644 src/main/resources/mapper/MatchScheduleDAO.xml create mode 100644 src/main/resources/mapper/MessageDAO.xml create mode 100644 src/main/resources/mapper/PermissionsDAO.xml create mode 100644 src/main/resources/mapper/ProjectAwardMapper.xml create mode 100644 src/main/resources/mapper/ProjectCopyrightMapper.xml create mode 100644 src/main/resources/mapper/ProjectDAO.xml create mode 100644 src/main/resources/mapper/ProjectJudgeDAO.xml create mode 100644 src/main/resources/mapper/ProjectMaterialsDAO.xml create mode 100644 src/main/resources/mapper/ProjectMemberDAO.xml create mode 100644 src/main/resources/mapper/ProjectOwnershipStructureDAO.xml create mode 100644 src/main/resources/mapper/ProjectPaperMapper.xml create mode 100644 src/main/resources/mapper/ProjectPatentMapper.xml create mode 100644 src/main/resources/mapper/ProjectReviewDAO.xml create mode 100644 src/main/resources/mapper/ProjectReviewPeriodMapper.xml create mode 100644 src/main/resources/mapper/ProjectScheduleRecordDAO.xml create mode 100644 src/main/resources/mapper/ProjectTrademarkMapper.xml create mode 100644 src/main/resources/mapper/ProjectWorksMapper.xml create mode 100644 src/main/resources/mapper/SmsCodeDAO.xml create mode 100644 src/main/resources/mapper/SmsNoticeMapper.xml create mode 100644 src/main/resources/mapper/StudentDAO.xml create mode 100644 src/main/resources/mapper/VodDictDAO.xml create mode 100644 src/main/resources/mapper/YearDictDAO.xml create mode 100644 src/main/resources/mybatis-generator.properties create mode 100644 src/main/resources/templates/controller.java.ftl create mode 100644 src/main/resources/templates/entity.java.ftl create mode 100644 src/main/resources/templates/mapper.java.ftl create mode 100644 src/main/resources/templates/mapper.xml.ftl create mode 100644 src/main/resources/templates/service.java.ftl create mode 100644 src/main/resources/templates/serviceImpl.java.ftl diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..f7f3849 Binary files /dev/null and b/.DS_Store differ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7763800 --- /dev/null +++ b/.gitignore @@ -0,0 +1,34 @@ +HELP.md +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/** +!**/src/test/** +**/target/ + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ + +### VS Code ### +.vscode/ +assets/ +logs/ \ No newline at end of file diff --git a/.mvn/wrapper/MavenWrapperDownloader.java b/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 0000000..a45eb6b --- /dev/null +++ b/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,118 @@ +/* + * Copyright 2007-present the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import java.net.*; +import java.io.*; +import java.nio.channels.*; +import java.util.Properties; + +public class MavenWrapperDownloader { + + private static final String WRAPPER_VERSION = "0.5.6"; + /** + * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. + */ + private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" + + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; + + /** + * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to + * use instead of the default one. + */ + private static final String MAVEN_WRAPPER_PROPERTIES_PATH = + ".mvn/wrapper/maven-wrapper.properties"; + + /** + * Path where the maven-wrapper.jar will be saved to. + */ + private static final String MAVEN_WRAPPER_JAR_PATH = + ".mvn/wrapper/maven-wrapper.jar"; + + /** + * Name of the property which should be used to override the default download url for the wrapper. + */ + private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; + + public static void main(String args[]) { + System.out.println("- Downloader started"); + File baseDirectory = new File(args[0]); + System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); + + // If the maven-wrapper.properties exists, read it and check if it contains a custom + // wrapperUrl parameter. + File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); + String url = DEFAULT_DOWNLOAD_URL; + if (mavenWrapperPropertyFile.exists()) { + FileInputStream mavenWrapperPropertyFileInputStream = null; + try { + mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); + Properties mavenWrapperProperties = new Properties(); + mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); + url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); + } catch (IOException e) { + System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); + } finally { + try { + if (mavenWrapperPropertyFileInputStream != null) { + mavenWrapperPropertyFileInputStream.close(); + } + } catch (IOException e) { + // Ignore ... + } + } + } + System.out.println("- Downloading from: " + url); + + File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); + if (!outputFile.getParentFile().exists()) { + if (!outputFile.getParentFile().mkdirs()) { + System.out.println( + "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'"); + } + } + System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); + try { + downloadFileFromURL(url, outputFile); + System.out.println("Done"); + System.exit(0); + } catch (Throwable e) { + System.out.println("- Error downloading"); + e.printStackTrace(); + System.exit(1); + } + } + + private static void downloadFileFromURL(String urlString, File destination) throws Exception { + if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { + String username = System.getenv("MVNW_USERNAME"); + char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); + Authenticator.setDefault(new Authenticator() { + @Override + protected PasswordAuthentication getPasswordAuthentication() { + return new PasswordAuthentication(username, password); + } + }); + } + URL website = new URL(urlString); + ReadableByteChannel rbc; + rbc = Channels.newChannel(website.openStream()); + FileOutputStream fos = new FileOutputStream(destination); + fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); + fos.close(); + rbc.close(); + } + +} diff --git a/.mvn/wrapper/maven-wrapper.jar b/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 0000000..2cc7d4a Binary files /dev/null and b/.mvn/wrapper/maven-wrapper.jar differ diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 0000000..642d572 --- /dev/null +++ b/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,2 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar diff --git a/mvnw b/mvnw new file mode 100644 index 0000000..a16b543 --- /dev/null +++ b/mvnw @@ -0,0 +1,310 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Maven Start Up Batch script +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir +# +# Optional ENV vars +# ----------------- +# M2_HOME - location of maven2's installed home dir +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# ---------------------------------------------------------------------------- + +if [ -z "$MAVEN_SKIP_RC" ] ; then + + if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +mingw=false +case "`uname`" in + CYGWIN*) cygwin=true ;; + MINGW*) mingw=true;; + Darwin*) darwin=true + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + export JAVA_HOME="`/usr/libexec/java_home`" + else + export JAVA_HOME="/Library/Java/Home" + fi + fi + ;; +esac + +if [ -z "$JAVA_HOME" ] ; then + if [ -r /etc/gentoo-release ] ; then + JAVA_HOME=`java-config --jre-home` + fi +fi + +if [ -z "$M2_HOME" ] ; then + ## resolve links - $0 may be a link to maven's home + PRG="$0" + + # need this for relative symlinks + while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="`dirname "$PRG"`/$link" + fi + done + + saveddir=`pwd` + + M2_HOME=`dirname "$PRG"`/.. + + # make it fully qualified + M2_HOME=`cd "$M2_HOME" && pwd` + + cd "$saveddir" + # echo Using m2 at $M2_HOME +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --unix "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +# For Mingw, ensure paths are in UNIX format before anything is touched +if $mingw ; then + [ -n "$M2_HOME" ] && + M2_HOME="`(cd "$M2_HOME"; pwd)`" + [ -n "$JAVA_HOME" ] && + JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="`which javac`" + if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=`which readlink` + if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then + if $darwin ; then + javaHome="`dirname \"$javaExecutable\"`" + javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" + else + javaExecutable="`readlink -f \"$javaExecutable\"`" + fi + javaHome="`dirname \"$javaExecutable\"`" + javaHome=`expr "$javaHome" : '\(.*\)/bin'` + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD="`which java`" + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 + exit 1 +fi + +if [ -z "$JAVA_HOME" ] ; then + echo "Warning: JAVA_HOME environment variable is not set." +fi + +CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher + +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + + if [ -z "$1" ] + then + echo "Path not specified to find_maven_basedir" + return 1 + fi + + basedir="$1" + wdir="$1" + while [ "$wdir" != '/' ] ; do + if [ -d "$wdir"/.mvn ] ; then + basedir=$wdir + break + fi + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=`cd "$wdir/.."; pwd` + fi + # end of workaround + done + echo "${basedir}" +} + +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + echo "$(tr -s '\n' ' ' < "$1")" + fi +} + +BASE_DIR=`find_maven_basedir "$(pwd)"` +if [ -z "$BASE_DIR" ]; then + exit 1; +fi + +########################################################################################## +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +# This allows using the maven wrapper in projects that prohibit checking in binary data. +########################################################################################## +if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found .mvn/wrapper/maven-wrapper.jar" + fi +else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." + fi + if [ -n "$MVNW_REPOURL" ]; then + jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" + else + jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" + fi + while IFS="=" read key value; do + case "$key" in (wrapperUrl) jarUrl="$value"; break ;; + esac + done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Downloading from: $jarUrl" + fi + wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" + if $cygwin; then + wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` + fi + + if command -v wget > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found wget ... using wget" + fi + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + wget "$jarUrl" -O "$wrapperJarPath" + else + wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" + fi + elif command -v curl > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found curl ... using curl" + fi + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + curl -o "$wrapperJarPath" "$jarUrl" -f + else + curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f + fi + + else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Falling back to using Java to download" + fi + javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" + # For Cygwin, switch paths to Windows format before running javac + if $cygwin; then + javaClass=`cygpath --path --windows "$javaClass"` + fi + if [ -e "$javaClass" ]; then + if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Compiling MavenWrapperDownloader.java ..." + fi + # Compiling the Java class + ("$JAVA_HOME/bin/javac" "$javaClass") + fi + if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + # Running the downloader + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Running MavenWrapperDownloader.java ..." + fi + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") + fi + fi + fi +fi +########################################################################################## +# End of extension +########################################################################################## + +export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} +if [ "$MVNW_VERBOSE" = true ]; then + echo $MAVEN_PROJECTBASEDIR +fi +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --path --windows "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + [ -n "$MAVEN_PROJECTBASEDIR" ] && + MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` +fi + +# Provide a "standardized" way to retrieve the CLI args that will +# work with both Windows and non-Windows executions. +MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" +export MAVEN_CMD_LINE_ARGS + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +exec "$JAVACMD" \ + $MAVEN_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/mvnw.cmd b/mvnw.cmd new file mode 100644 index 0000000..c8d4337 --- /dev/null +++ b/mvnw.cmd @@ -0,0 +1,182 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM https://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Maven Start Up Batch script +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM M2_HOME - location of maven2's installed home dir +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" +if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" + +FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( + IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + if "%MVNW_VERBOSE%" == "true" ( + echo Found %WRAPPER_JAR% + ) +) else ( + if not "%MVNW_REPOURL%" == "" ( + SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" + ) + if "%MVNW_VERBOSE%" == "true" ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %DOWNLOAD_URL% + ) + + powershell -Command "&{"^ + "$webclient = new-object System.Net.WebClient;"^ + "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ + "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ + "}"^ + "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ + "}" + if "%MVNW_VERBOSE%" == "true" ( + echo Finished downloading %WRAPPER_JAR% + ) +) +@REM End of extension + +@REM Provide a "standardized" way to retrieve the CLI args that will +@REM work with both Windows and non-Windows executions. +set MAVEN_CMD_LINE_ARGS=%* + +%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" +if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%" == "on" pause + +if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% + +exit /B %ERROR_CODE% diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..1b28369 --- /dev/null +++ b/pom.xml @@ -0,0 +1,210 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.3.7.RELEASE + + + + com.zhongzhi + zhongzhi + 1.0 + + + UTF-8 + UTF-8 + 1.8 + 3.3.0 + 3.3.2 + 2.9.2 + 1.2.58 + 2.0.0 + 3.13 + 1.1.0 + 4.0.1 + 3.9 + 1.1.22 + 5.2.0 + 5.4.1 + 3.10.3 + + + + + org.springframework.boot + spring-boot-starter + + + + org.freemarker + freemarker + + + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.boot + spring-boot-starter-aop + + + + org.springframework.boot + spring-boot-configuration-processor + true + + + + mysql + mysql-connector-java + runtime + + + + com.alibaba + druid-spring-boot-starter + ${druid.version} + + + + org.springframework.boot + spring-boot-starter-jdbc + + + + org.projectlombok + lombok + true + + + + com.baomidou + mybatis-plus-boot-starter + ${mybatis-plus.version} + + + + com.baomidou + mybatis-plus-generator + ${generator.version} + + + + com.alibaba + fastjson + ${fastjson.version} + + + + io.springfox + springfox-swagger2 + ${swagger2.version} + + + + io.springfox + springfox-swagger-ui + ${swagger2.version} + + + + com.amdelamar + jhash + ${jhash.version} + + + + org.apache.poi + poi-ooxml + ${poi-ooxml.version} + + + + com.aliyun + aliyun-java-sdk-dysmsapi + ${dysmsapi.version} + + + com.aliyun + aliyun-java-sdk-core + ${sdk-core.version} + + + org.apache.commons + commons-lang3 + ${lang3.version} + + + + com.itextpdf + itext-asian + ${itext-asian.version} + + + + com.itextpdf + itextpdf + ${itextpdf.version} + + + + com.auth0 + java-jwt + ${java-jwt.version} + + + + + com.aliyun.oss + aliyun-sdk-oss + 3.15.0 + + + + com.tencentcloudapi + tencentcloud-sdk-java + 3.1.64 + + + + commons-httpclient + commons-httpclient + 3.1 + + + + org.apache.httpcomponents + fluent-hc + 4.5.13 + + + + + + + central + aliyun maven + http://maven.aliyun.com/nexus/content/groups/public/ + default + + true + + + + + + zhongzhi + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/src/.DS_Store b/src/.DS_Store new file mode 100644 index 0000000..870a68b Binary files /dev/null and b/src/.DS_Store differ diff --git a/src/main/.DS_Store b/src/main/.DS_Store new file mode 100644 index 0000000..80786e7 Binary files /dev/null and b/src/main/.DS_Store differ diff --git a/src/main/java/.DS_Store b/src/main/java/.DS_Store new file mode 100644 index 0000000..ed09e3d Binary files /dev/null and b/src/main/java/.DS_Store differ diff --git a/src/main/java/com/.DS_Store b/src/main/java/com/.DS_Store new file mode 100644 index 0000000..6c815d8 Binary files /dev/null and b/src/main/java/com/.DS_Store differ diff --git a/src/main/java/com/zhongzhi/.DS_Store b/src/main/java/com/zhongzhi/.DS_Store new file mode 100644 index 0000000..3453da3 Binary files /dev/null and b/src/main/java/com/zhongzhi/.DS_Store differ diff --git a/src/main/java/com/zhongzhi/ZhongzhiApplication.java b/src/main/java/com/zhongzhi/ZhongzhiApplication.java new file mode 100644 index 0000000..b790a2a --- /dev/null +++ b/src/main/java/com/zhongzhi/ZhongzhiApplication.java @@ -0,0 +1,17 @@ +package com.zhongzhi; + +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@MapperScan(basePackages = {"com.zhongzhi.dao"}) +@SpringBootApplication +public class ZhongzhiApplication { + + public static void main(String[] args) { + SpringApplication.run(ZhongzhiApplication.class, args); + } + +} \ No newline at end of file diff --git a/src/main/java/com/zhongzhi/common/configure/AliyunSmsProperties.java b/src/main/java/com/zhongzhi/common/configure/AliyunSmsProperties.java new file mode 100644 index 0000000..8bf4bc1 --- /dev/null +++ b/src/main/java/com/zhongzhi/common/configure/AliyunSmsProperties.java @@ -0,0 +1,28 @@ +package com.zhongzhi.common.configure; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.stereotype.Component; + +@Data +@Component +@ConfigurationProperties(prefix = "sms") +public class AliyunSmsProperties { + + private String product; + + private String domain; + + private String accessKeyId; + + private String accessKeySecret; + + private String cpcode; + + private String excode; + + private String key; + + private String rcsapi; + +} diff --git a/src/main/java/com/zhongzhi/common/configure/MybatisPlusConfig.java b/src/main/java/com/zhongzhi/common/configure/MybatisPlusConfig.java new file mode 100644 index 0000000..4ca9b62 --- /dev/null +++ b/src/main/java/com/zhongzhi/common/configure/MybatisPlusConfig.java @@ -0,0 +1,36 @@ +package com.zhongzhi.common.configure; + +import com.baomidou.mybatisplus.annotation.DbType; +import com.baomidou.mybatisplus.core.config.GlobalConfig; +import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor; +import com.zhongzhi.common.handler.MetaHandler; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +@Configuration +public class MybatisPlusConfig { + + /** + * 分页 + * + * @return + */ + @Bean + public PaginationInterceptor paginationInterceptor() { + PaginationInterceptor page = new PaginationInterceptor(); + page.setDialectType(DbType.MYSQL.getDb()); + return page; + } + + /** + * 自动填充功能 + * + * @return + */ + @Bean + public GlobalConfig globalConfig() { + GlobalConfig globalConfig = new GlobalConfig(); + globalConfig.setMetaObjectHandler(new MetaHandler()); + return globalConfig; + } +} \ No newline at end of file diff --git a/src/main/java/com/zhongzhi/common/configure/RemoteProperties.java b/src/main/java/com/zhongzhi/common/configure/RemoteProperties.java new file mode 100644 index 0000000..46b5fa0 --- /dev/null +++ b/src/main/java/com/zhongzhi/common/configure/RemoteProperties.java @@ -0,0 +1,36 @@ +package com.zhongzhi.common.configure; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.PropertySource; +import org.springframework.stereotype.Component; + +import java.util.HashMap; +import java.util.Map; + +/** + *

+ * 读取状态码 + *

+ * + * @author DengMin + * @date Created in 2020/08/24 + */ +@Component +@ConfigurationProperties(prefix = "c") +@PropertySource(value = "classpath:code.properties", encoding = "UTF-8") +public class RemoteProperties { + + private static Map codeMessage = new HashMap<>(); + + public static String getMessage(Integer code) { + return codeMessage.get(code); + } + + public Map getCodeMessage() { + return codeMessage; + } + + public void setCodeMessage(Map codeMessage) { + RemoteProperties.codeMessage = codeMessage; + } +} \ No newline at end of file diff --git a/src/main/java/com/zhongzhi/common/configure/SwaggerConfig.java b/src/main/java/com/zhongzhi/common/configure/SwaggerConfig.java new file mode 100644 index 0000000..79547e7 --- /dev/null +++ b/src/main/java/com/zhongzhi/common/configure/SwaggerConfig.java @@ -0,0 +1,38 @@ +package com.zhongzhi.common.configure; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import springfox.documentation.builders.ApiInfoBuilder; +import springfox.documentation.builders.PathSelectors; +import springfox.documentation.builders.RequestHandlerSelectors; +import springfox.documentation.spi.DocumentationType; +import springfox.documentation.spring.web.plugins.Docket; +import springfox.documentation.swagger2.annotations.EnableSwagger2; + +/** + *

+ * swagger2 + *

+ * + * @author DengMin + * @since 2020/12/8 + */ +@Configuration +@EnableSwagger2 +public class SwaggerConfig { + + @Bean + public Docket createRestApi() { + return new Docket(DocumentationType.SWAGGER_2) + .pathMapping("/") + .select() + .apis(RequestHandlerSelectors.basePackage("com.zhongzhi.controller")) + .paths(PathSelectors.any()) + .build() + .apiInfo(new ApiInfoBuilder() + .title("中职双创系统") + .description("接口文档") + .version("1.0") + .build()); + } +} diff --git a/src/main/java/com/zhongzhi/common/configure/VODConfig.java b/src/main/java/com/zhongzhi/common/configure/VODConfig.java new file mode 100644 index 0000000..aec1353 --- /dev/null +++ b/src/main/java/com/zhongzhi/common/configure/VODConfig.java @@ -0,0 +1,27 @@ +package com.zhongzhi.common.configure; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.stereotype.Component; + +/** + * @author: tuyp + * @create: 2020-06-01 16:46 + */ +@Component +@Data +@ConfigurationProperties(prefix = "vod") +public class VODConfig { + + private String appId; + + private String secretId; + + private String secretKey; + + private String api; + + private String region; + + private Integer classId; +} diff --git a/src/main/java/com/zhongzhi/common/configure/WebConfig.java b/src/main/java/com/zhongzhi/common/configure/WebConfig.java new file mode 100644 index 0000000..3c656ea --- /dev/null +++ b/src/main/java/com/zhongzhi/common/configure/WebConfig.java @@ -0,0 +1,75 @@ +package com.zhongzhi.common.configure; + +import com.zhongzhi.common.interceptor.AuthenticationInterceptor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.cors.CorsConfiguration; +import org.springframework.web.cors.UrlBasedCorsConfigurationSource; +import org.springframework.web.filter.CorsFilter; +import org.springframework.web.servlet.config.annotation.*; + +/** + * @author DengMin + * @date 2020/07/06 + **/ +@Configuration +public class WebConfig extends WebMvcConfigurationSupport { + + @Autowired + private AuthenticationInterceptor authenticationInterceptor; + + /** + * 跨域支持 + * + * @param registry + */ + @Override + public void addCorsMappings(CorsRegistry registry) { + registry.addMapping("/**") + .allowCredentials(true) + .allowedOrigins("*") + .allowedMethods("GET", "HEAD", "POST", "PUT", "DELETE", "OPTIONS") + .maxAge(3600); + } + + @Bean + public CorsFilter corsFilter() { + CorsConfiguration config = new CorsConfiguration(); + config.setMaxAge(3600L); + config.addAllowedOrigin("*"); + config.addAllowedMethod("*"); + config.addAllowedHeader("*"); + UrlBasedCorsConfigurationSource configSource = new UrlBasedCorsConfigurationSource(); + configSource.registerCorsConfiguration("/**", config); + return new CorsFilter(configSource); + } + + /** + * Swagger + * + * @param registry + */ + @Override + public void addResourceHandlers(ResourceHandlerRegistry registry) { + registry.addResourceHandler("/**") + .addResourceLocations("classpath:/static/"); + registry.addResourceHandler("swagger-ui.html") + .addResourceLocations("classpath:/META-INF/resources/"); + registry.addResourceHandler("/webjars/**") + .addResourceLocations("classpath:/META-INF/resources/webjars/"); + super.addResourceHandlers(registry); + } + + /** + * 鉴权 + * + * @param registry + */ + @Override + public void addInterceptors(InterceptorRegistry registry) { + registry.addInterceptor(authenticationInterceptor) + .excludePathPatterns("/static/*") + .addPathPatterns("/**"); + } +} \ No newline at end of file diff --git a/src/main/java/com/zhongzhi/common/constant/Code.java b/src/main/java/com/zhongzhi/common/constant/Code.java new file mode 100644 index 0000000..69d55f2 --- /dev/null +++ b/src/main/java/com/zhongzhi/common/constant/Code.java @@ -0,0 +1,33 @@ +package com.zhongzhi.common.constant; + +import lombok.Getter; + +@Getter +public enum Code { + + USERNAMENOTFOUND(1001, "用户不存在"), + BADCREDENTIALS(1002, "账户或者密码错误"), + ACCOUNTEXPIRED(1003, "账户过期"), + LOCKEDEXCEPTION(1004, "账户已锁定"), + DISABLEDEXCEPTION(1005, "账户已禁用"), + ACCESSDENIED(1006, "无权限访问"), + AUTHENTICATION(1007, "身份验证异常"), + NOHANDLERFOUND(1008, "找不到相应的视图处理器"), + PARAM_INVALID(1009, "参数不合法"), + TOKEN_EXCEPTION(1010, "无效的令牌"), + TOKEN_EXPIRED(1011, "令牌已过期"), + TOKEN_VERIFICATION_FAILED(1012, "令牌验证失败"), + OSS_ERROR(1013, "OSS文件上传异常"), + Network_ERROR(9000, "网络请求失败"), + SERVER_INTERNAL_ERROR(99999, "服务器内部错误"), + ; + + private final Integer code; + + private final String message; + + Code(Integer code, String message) { + this.code = code; + this.message = message; + } +} diff --git a/src/main/java/com/zhongzhi/common/constant/MemberType.java b/src/main/java/com/zhongzhi/common/constant/MemberType.java new file mode 100644 index 0000000..62e4621 --- /dev/null +++ b/src/main/java/com/zhongzhi/common/constant/MemberType.java @@ -0,0 +1,21 @@ +package com.zhongzhi.common.constant; + +/** + *

+ * 团队成员类型 + *

+ * + * @author DengMin + * @since 2021/6/9 + */ +public class MemberType { + + /* + 团队负责人只能有一个且是项目申请人 + */ + public static final String PRINCIPAL = "团队负责人"; + + public static final String TEAM_MEMBER = "团队成员"; + + public static final String MENTOR = "指导教师"; +} diff --git a/src/main/java/com/zhongzhi/common/constant/PDFCheckBox.java b/src/main/java/com/zhongzhi/common/constant/PDFCheckBox.java new file mode 100644 index 0000000..d02ae14 --- /dev/null +++ b/src/main/java/com/zhongzhi/common/constant/PDFCheckBox.java @@ -0,0 +1,84 @@ +package com.zhongzhi.common.constant; + +import org.apache.commons.lang3.StringUtils; + +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; + +public class PDFCheckBox { + + public static String getType(String type, String projectGroup) { + if (StringUtils.isBlank(type) && + projectGroup.equals(ProjectType.TECHNOLOGY_INNOVATION_GROUP)) { + return "□方案设计类 □模型创意类 □虚拟演示类"; + } else if (StringUtils.isBlank(type) && + projectGroup.equals(ProjectType.CULTURAL_CREATIVE_GROUP)) { + return "□服装与服饰类设计 □视觉传达类 □产品设计类"; + } + + String[] typeT = {"方案设计类", "模型创意类", "虚拟演示类"}; + String typeValue = ""; + if (projectGroup.equals(ProjectType.TECHNOLOGY_INNOVATION_GROUP)) { + List typeList = Arrays.stream(typeT).collect(Collectors.toList()); + List str = Arrays.stream(type.split(",")).collect(Collectors.toList()); + for (String s : typeList) { + if (str.contains(s)) { + typeValue += "■" + s + " "; + } else { + typeValue += "□" + s + " "; + } + } + return typeValue; + } else if (projectGroup.equals(ProjectType.CULTURAL_CREATIVE_GROUP)) { + if (type.equals("服装与服饰类设计")) { + return "■服装与服饰类设计 □视觉传达类 □产品设计类"; + } else if (type.equals("视觉传达类")) { + return "□服装与服饰类设计 ■视觉传达类 □产品设计类"; + } else if (type.equals("产品设计类")) { + return "□服装与服饰类设计 □视觉传达类 ■产品设计类"; + } else { + return "□服装与服饰类设计 □视觉传达类 □产品设计类"; + } + } + return ""; + } + + public static String getRoadshow( String projectGroup) { + if (projectGroup.equals(ProjectType.TECHNOLOGY_INNOVATION_GROUP)) { + return "□模型展示 □数字化演示" + + " □PPT演示 □其他"; + } else if (projectGroup.equals(ProjectType.CULTURAL_CREATIVE_GROUP)) { + return "□物化产品展示 □作品模型展示" + + " □数字化演示 □PPT演示 □其他"; + } + + String[] roadshowT = {"模型展示", "数字化演示", "PPT演示", "其他"}; + String[] roadshowC = {"物化产品展示", "作品模型展示", "数字化演示", "PPT演示", "其他"}; + +// List str = Arrays.stream(roadshow.split(",")).collect(Collectors.toList()); + String roadshowValue = ""; + if (projectGroup.equals(ProjectType.TECHNOLOGY_INNOVATION_GROUP)) { + List roadshowTList = Arrays.stream(roadshowT).collect(Collectors.toList()); + for (String s : roadshowTList) { +// if (str.contains(s)) { +// roadshowValue += "■" + s + " "; +// } else { +// roadshowValue += "□" + s + " "; +// } + } + return roadshowValue; + } else if (projectGroup.equals(ProjectType.CULTURAL_CREATIVE_GROUP)) { + List roadshowCList = Arrays.stream(roadshowC).collect(Collectors.toList()); + for (String s : roadshowCList) { +// if (str.contains(s)) { +// roadshowValue += "■" + s + " "; +// } else { +// roadshowValue += "□" + s + " "; +// } + } + return roadshowValue; + } + return ""; + } +} diff --git a/src/main/java/com/zhongzhi/common/constant/Platform.java b/src/main/java/com/zhongzhi/common/constant/Platform.java new file mode 100644 index 0000000..00bcb93 --- /dev/null +++ b/src/main/java/com/zhongzhi/common/constant/Platform.java @@ -0,0 +1,32 @@ +package com.zhongzhi.common.constant; + +/** + *

+ * 平台标识 + *

+ * + * @author DengMin + * @since 2021/6/9 + */ +public class Platform { + + /* + 学生端 + */ + public static final String student = "student"; + + /* + 院校端 + */ + public static final String school = "school"; + + /* + 中心端 + */ + public static final String center = "center"; + + /* + 评审端 + */ + public static final String review = "review"; +} diff --git a/src/main/java/com/zhongzhi/common/constant/ProjectProgress.java b/src/main/java/com/zhongzhi/common/constant/ProjectProgress.java new file mode 100644 index 0000000..12910d7 --- /dev/null +++ b/src/main/java/com/zhongzhi/common/constant/ProjectProgress.java @@ -0,0 +1,9 @@ +package com.zhongzhi.common.constant; + +public class ProjectProgress { + + public static final String REGISTERED = "已注册公司"; + + public static final String UNREGISTERED = "创意设计阶段"; + +} diff --git a/src/main/java/com/zhongzhi/common/constant/ProjectReview.java b/src/main/java/com/zhongzhi/common/constant/ProjectReview.java new file mode 100644 index 0000000..b104abc --- /dev/null +++ b/src/main/java/com/zhongzhi/common/constant/ProjectReview.java @@ -0,0 +1,30 @@ +package com.zhongzhi.common.constant; + +/** + *

+ * 项目评审状态 + *

+ * + * @author DengMin + * @since 2021/6/9 + */ +public class ProjectReview { + + /** + * 评分状态(对于评分) + */ + public static final String SUBMITTED = "已评审"; + + public static final String TO_SCORE = "待评审"; + + /** + * 评审状态(对于项目) + */ + public static final String TO_REVIEWED = "待评审"; + + public static final String ASSIGNED = "已分配"; + + public static final String UNASSIGNED = "未分配"; + + public static final String REVIEW = "已评审"; +} diff --git a/src/main/java/com/zhongzhi/common/constant/ProjectSchedule.java b/src/main/java/com/zhongzhi/common/constant/ProjectSchedule.java new file mode 100644 index 0000000..7f82823 --- /dev/null +++ b/src/main/java/com/zhongzhi/common/constant/ProjectSchedule.java @@ -0,0 +1,24 @@ +package com.zhongzhi.common.constant; + +/** + *

+ * 项目进度 + *

+ * + * @author DengMin + * @since 2021/6/9 + */ +public class ProjectSchedule { + + //报名阶段 + public static final String REGISTER = "报名阶段"; + + // 校内赛 + public static final String SCHOOL_REVIEW = "校级申请项目"; + +// public static final String PRELIMINARY_REVIEW = "市级初赛项目"; + + public static final String SEMI_FINAL_REVIEW = "市级复赛项目"; + + public static final String FINAL_REVIEW = "市级决赛项目"; +} diff --git a/src/main/java/com/zhongzhi/common/constant/ProjectStatus.java b/src/main/java/com/zhongzhi/common/constant/ProjectStatus.java new file mode 100644 index 0000000..41dcb23 --- /dev/null +++ b/src/main/java/com/zhongzhi/common/constant/ProjectStatus.java @@ -0,0 +1,32 @@ +package com.zhongzhi.common.constant; + +/** + *

+ * 项目状态 + *

+ * + * @author DengMin + * @since 2021/6/9 + */ +public class ProjectStatus { + +// public static final String TO_REVIEW = ""; + + public static final String UN_SUBMITTED = "填写中"; + + public static final String WITHDRAWN = "已撤回"; + + public static final String SCHOOL_NOT_PASSED = "不予提交市级复赛"; + + public static final String REGISTER_NOT_PASSED = "报名不通过"; + + public static final String PRELIMINARY_NOT_PASSED = "不予提交市级初赛"; + + public static final String REMATCH_WINNING_AWARD = "市级优胜奖"; + + public static final String REMATCH_SILVER_AWARD = "市级银奖"; + + public static final String REMATCH_BRONZE_AWARD = "市级铜奖"; + + public static final String REMATCH_FINALS_GOLD_AWARD = "市级金奖"; +} diff --git a/src/main/java/com/zhongzhi/common/constant/ProjectType.java b/src/main/java/com/zhongzhi/common/constant/ProjectType.java new file mode 100644 index 0000000..f591652 --- /dev/null +++ b/src/main/java/com/zhongzhi/common/constant/ProjectType.java @@ -0,0 +1,32 @@ +package com.zhongzhi.common.constant; + +/** + *

+ * 项目组别 + *

+ * + * @author DengMin + * @since 2021/6/9 + */ +public class ProjectType { + + /** + * 赛道 + */ + public static final String MAIN_TRACK = "主赛道"; + + public static final String SEED_TRACK = "种子赛道"; + + public static final String VOCATIONAL = "职教赛道"; + + /** + * 组别 + */ + public static final String TECHNOLOGY_INNOVATION_GROUP = "科技创新"; + + public static final String CULTURAL_CREATIVE_GROUP = "文化创意"; + + public static final String VOCATIONAL_GROUP = "高职"; + + public static final String SECONDARY_GROUP = "中职"; +} diff --git a/src/main/java/com/zhongzhi/common/constant/SMSTemplate.java b/src/main/java/com/zhongzhi/common/constant/SMSTemplate.java new file mode 100644 index 0000000..bebf559 --- /dev/null +++ b/src/main/java/com/zhongzhi/common/constant/SMSTemplate.java @@ -0,0 +1,31 @@ +package com.zhongzhi.common.constant; + +public class SMSTemplate { + + /* + 项目进度通知 + */ + public static final String PROJECT_PROGRESS = "2760175"; + + /* + 项目提交通知 + */ + public static final String PROJECT_SUBMIT = "270159"; + + /* + 评审邀请通知 old + */ + public static final String REVIEW_INVITATION_OLD = "2765806"; + + /** + * + */ + public static final String REVIEW_INVITATION_NEW = "2939771"; + + /* + 撤销评审项目通知 + */ + public static final String CANCEL_REVIEW = "229303"; + + +} diff --git a/src/main/java/com/zhongzhi/common/constant/SmsCode.java b/src/main/java/com/zhongzhi/common/constant/SmsCode.java new file mode 100644 index 0000000..b49a411 --- /dev/null +++ b/src/main/java/com/zhongzhi/common/constant/SmsCode.java @@ -0,0 +1,30 @@ +package com.zhongzhi.common.constant; + +/** + *

+ * 短信标识 + *

+ * + * @author DengMin + * @since 2021/6/9 + */ +public class SmsCode { + + /** + * 平台:student(学生端)、school(院校端)、center(中心端)、review(评审端) + */ + public static final String student = "student"; + + public static final String school = "school"; + + public static final String center = "center"; + + public static final String review = "review"; + + /** + * 行为标识:register(注册标识)、login(登录标识) + */ + public static final String register = "register"; + + public static final String login = "login"; +} diff --git a/src/main/java/com/zhongzhi/common/exception/GlobalExceptionHandler.java b/src/main/java/com/zhongzhi/common/exception/GlobalExceptionHandler.java new file mode 100644 index 0000000..d24ae00 --- /dev/null +++ b/src/main/java/com/zhongzhi/common/exception/GlobalExceptionHandler.java @@ -0,0 +1,121 @@ +package com.zhongzhi.common.exception; + +import com.baomidou.mybatisplus.core.toolkit.StringUtils; +import com.zhongzhi.common.configure.RemoteProperties; +import com.zhongzhi.common.constant.Code; +import com.zhongzhi.common.utils.ResponseData; +import com.zhongzhi.vo.ResponseVO; +import lombok.extern.slf4j.Slf4j; +import org.apache.poi.ss.formula.functions.T; +import org.springframework.http.converter.HttpMessageNotReadableException; +import org.springframework.validation.BindException; +import org.springframework.web.HttpRequestMethodNotSupportedException; +import org.springframework.web.bind.MethodArgumentNotValidException; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.bind.annotation.RestControllerAdvice; +import org.springframework.web.servlet.NoHandlerFoundException; + +import javax.servlet.http.HttpServletRequest; +import java.util.ArrayList; +import java.util.List; + +@Slf4j +@RestControllerAdvice +public class GlobalExceptionHandler { + + /** + * 自定义异常 + * + * @param e + * @return + */ + @ExceptionHandler(value = HttpException.class) + public ResponseVO handlerException(HttpServletRequest request, HttpException e) { + String message = RemoteProperties.getMessage(e.getCode()); + if (StringUtils.isBlank(message)) { + message = e.getMessage(); + } + String url = request.getRequestURI(); + return ResponseData.generateCreatedResponse(e.getCode(), message, url); + } + + /** + * 404 + * + * @param request + * @return + */ + @ExceptionHandler(value = NoHandlerFoundException.class) + public ResponseVO NoHandlerFoundException(HttpServletRequest request) { + String url = request.getRequestURI(); + return ResponseData.generateCreatedResponse(Code.NOHANDLERFOUND.getCode(), Code.NOHANDLERFOUND.getMessage(), url); + } + + /** + * 请求方式错误 + * + * @param request + * @return + */ + @ExceptionHandler(value = HttpRequestMethodNotSupportedException.class) + public ResponseVO HttpRequestMethodNotSupportedException(HttpServletRequest request) { + String url = request.getRequestURI(); + return ResponseData.generateCreatedResponse(Code.NOHANDLERFOUND.getCode(), Code.NOHANDLERFOUND.getMessage(), url); + } + + /** + * 参数不合法 + * + * @param e + * @return + */ + @ExceptionHandler(MethodArgumentNotValidException.class) + public ResponseVO validateException(MethodArgumentNotValidException e) { + final List errList = new ArrayList<>(); + e.getBindingResult().getAllErrors().stream().forEach(x -> { + errList.add(x.getDefaultMessage()); + }); + return ResponseData.generateCreatedResponse(Code.PARAM_INVALID.getCode(), Code.PARAM_INVALID.getMessage(), errList.toString()); + } + + /** + * JSON 序列化异常 + * + * @param e + * @return + */ + @ExceptionHandler(HttpMessageNotReadableException.class) + public ResponseVO exceptionHandler(HttpMessageNotReadableException e) { + log.error(e.getMessage()); + return ResponseData.generateCreatedResponse(Code.PARAM_INVALID.getCode(), Code.PARAM_INVALID.getMessage() + ":{" + e.getMessage() + "}"); + } + + /** + * 校验异常 + * + * @param e + * @return + */ + @ExceptionHandler(BindException.class) + public ResponseVO BindException(BindException e) { + final List errList = new ArrayList<>(); + e.getBindingResult().getAllErrors().stream().forEach(x -> { + errList.add(x.getDefaultMessage()); + }); + return ResponseData.generateCreatedResponse(Code.PARAM_INVALID.getCode(), Code.PARAM_INVALID.getMessage(), errList.toString()); + } + + /** + * 服务器内部错误 + * + * @return + */ + @ExceptionHandler(value = Exception.class) + public ResponseVO serverInternalError(Exception e, HttpServletRequest request) { + String url = request.getRequestURI(); + log.error("path:" + url); + log.error("error:"+ e.getClass()); + log.error("error message:"+ e.getLocalizedMessage() + e.getStackTrace()[0] + System.getProperty("line.separator")); + return ResponseData.generateCreatedResponse(Code.SERVER_INTERNAL_ERROR.getCode(), Code.SERVER_INTERNAL_ERROR.getMessage(), url); + } +} \ No newline at end of file diff --git a/src/main/java/com/zhongzhi/common/exception/HttpException.java b/src/main/java/com/zhongzhi/common/exception/HttpException.java new file mode 100644 index 0000000..b14bcc0 --- /dev/null +++ b/src/main/java/com/zhongzhi/common/exception/HttpException.java @@ -0,0 +1,45 @@ +package com.zhongzhi.common.exception; + +import com.zhongzhi.common.configure.RemoteProperties; + +/** + * 异常处理 + * + * @author DengMin + * @date 2020/08/12 + **/ +public class HttpException extends RuntimeException { + + private Integer code; + + private String message; + + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + @Override + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public HttpException(Integer code) { + super(RemoteProperties.getMessage(code)); + String message = RemoteProperties.getMessage(code); + this.message = message; + this.code = code; + } + + public HttpException(Integer code, String message) { + this.message = message; + this.code = code; + } +} diff --git a/src/main/java/com/zhongzhi/common/generator/CodeGenerator.java b/src/main/java/com/zhongzhi/common/generator/CodeGenerator.java new file mode 100644 index 0000000..7f325fb --- /dev/null +++ b/src/main/java/com/zhongzhi/common/generator/CodeGenerator.java @@ -0,0 +1,126 @@ +package com.zhongzhi.common.generator; + +import com.baomidou.mybatisplus.annotation.DbType; +import com.baomidou.mybatisplus.core.exceptions.MybatisPlusException; +import com.baomidou.mybatisplus.core.toolkit.StringPool; +import com.baomidou.mybatisplus.core.toolkit.StringUtils; +import com.baomidou.mybatisplus.generator.AutoGenerator; +import com.baomidou.mybatisplus.generator.InjectionConfig; +import com.baomidou.mybatisplus.generator.config.*; +import com.baomidou.mybatisplus.generator.config.po.TableInfo; +import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy; +import com.baomidou.mybatisplus.generator.engine.FreemarkerTemplateEngine; +import com.zhongzhi.model.base.BaseModel; + +import java.util.ArrayList; +import java.util.List; +import java.util.ResourceBundle; +import java.util.Scanner; + +/** + *

+ * 项目生成器 + *

+ * + * @author DengMin + */ +public class CodeGenerator { + + public static String scanner(String tip) { + StringBuilder help = new StringBuilder(); + help.append("1.生成全部表 2.输入需要生成表名"); + System.out.println(help); + Scanner scanner = new Scanner(System.in); + Integer ipt = Integer.valueOf(scanner.next()); + if (ipt == 1) { + return ""; + } else if (ipt == 2) { + StringBuilder help1 = new StringBuilder(); + help1.append("请输入" + tip + ":"); + System.out.println(help1); + Scanner scanner1 = new Scanner(System.in); + if (scanner1.hasNext()) { + String name = scanner1.next(); + if (StringUtils.isNotEmpty(name)) { + return name; + } + } + throw new MybatisPlusException("请输入正确的" + tip + "!"); + } + return scanner(tip); + } + + public static void main(String[] args) { + final ResourceBundle rb = ResourceBundle.getBundle("mybatis-generator"); + // 代码生成器 + AutoGenerator mpg = new AutoGenerator(); + + // 全局配置 + GlobalConfig gc = new GlobalConfig(); + gc.setOutputDir(System.getProperty("user.dir") + rb.getString("outputDir")); + gc.setOpen(false); + gc.setBaseResultMap(true); + gc.setBaseColumnList(true); + gc.setAuthor(rb.getString("author")); + gc.setMapperName("%sMapper"); + gc.setEntityName("%sDO"); + gc.setServiceName("%sService"); + gc.setServiceImplName("%sServiceImpl"); + gc.setControllerName("%sController"); + mpg.setGlobalConfig(gc); + + // 数据源配置 + DataSourceConfig dsc = new DataSourceConfig(); + dsc.setDbType(DbType.MYSQL); + dsc.setUrl(rb.getString("url")); + dsc.setDriverName(rb.getString("driverName")); + dsc.setUsername(rb.getString("userName")); + dsc.setPassword(rb.getString("password")); + mpg.setDataSource(dsc); + + // 包配置 + PackageConfig pc = new PackageConfig(); + pc.setParent(rb.getString("setParent")); + pc.setController("controller"); + pc.setService("service"); + pc.setServiceImpl("service.impl"); + pc.setEntity("model"); + pc.setMapper("mapper"); + mpg.setPackageInfo(pc); + + // 自定义配置 + InjectionConfig cfg = new InjectionConfig() { + @Override + public void initMap() { + // to do nothing + } + }; + List focList = new ArrayList<>(); + focList.add(new FileOutConfig("/templates/mapper.xml.ftl") { + @Override + public String outputFile(TableInfo tableInfo) { + // 自定义输入文件名称 + return System.getProperty("user.dir") + rb.getString("mapperPath") + tableInfo.getMapperName() + StringPool.DOT_XML; + } + }); + cfg.setFileOutConfigList(focList); + mpg.setCfg(cfg); + mpg.setTemplate(new TemplateConfig().setXml(null)); + + // 策略配置 + StrategyConfig strategy = new StrategyConfig(); + strategy.setNaming(NamingStrategy.underline_to_camel); + strategy.setColumnNaming(NamingStrategy.underline_to_camel); + strategy.setSuperEntityClass(BaseModel.class); + strategy.setEntityLombokModel(true); + strategy.setRestControllerStyle(true); + String[] tables = scanner("表名,多个英文逗号分割").split(","); + if (StringUtils.isNotBlank(tables[0])) { + strategy.setInclude(tables); + } + strategy.setControllerMappingHyphenStyle(true); + mpg.setStrategy(strategy); + mpg.setTemplateEngine(new FreemarkerTemplateEngine()); + mpg.execute(); + } +} diff --git a/src/main/java/com/zhongzhi/common/handler/MetaHandler.java b/src/main/java/com/zhongzhi/common/handler/MetaHandler.java new file mode 100644 index 0000000..6dd207e --- /dev/null +++ b/src/main/java/com/zhongzhi/common/handler/MetaHandler.java @@ -0,0 +1,27 @@ +package com.zhongzhi.common.handler; + +import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler; +import org.apache.ibatis.reflection.MetaObject; +import org.springframework.stereotype.Component; + +import java.time.LocalDateTime; + +/** + * 填充配置 + * + * @author DengMin + * @date 2020/07/21 + **/ +@Component +public class MetaHandler implements MetaObjectHandler { + + @Override + public void insertFill(MetaObject metaObject) { + this.setFieldValByName("createTime", LocalDateTime.now(), metaObject); + } + + @Override + public void updateFill(MetaObject metaObject) { + this.setFieldValByName("updateTime", LocalDateTime.now(), metaObject); + } +} diff --git a/src/main/java/com/zhongzhi/common/interceptor/AuthenticationInterceptor.java b/src/main/java/com/zhongzhi/common/interceptor/AuthenticationInterceptor.java new file mode 100644 index 0000000..359f5e8 --- /dev/null +++ b/src/main/java/com/zhongzhi/common/interceptor/AuthenticationInterceptor.java @@ -0,0 +1,127 @@ +package com.zhongzhi.common.interceptor; + +import com.auth0.jwt.interfaces.Claim; +import com.zhongzhi.common.constant.Code; +import com.zhongzhi.common.constant.SmsCode; +import com.zhongzhi.common.exception.HttpException; +import com.zhongzhi.common.utils.JwtUtil; +import com.zhongzhi.common.utils.Localstorage; +import com.zhongzhi.common.utils.LoginRequired; +import com.zhongzhi.model.AdministerDO; +import com.zhongzhi.model.CollegesDictDO; +import com.zhongzhi.model.ProjectJudgeDO; +import com.zhongzhi.model.StudentDO; +import com.zhongzhi.service.AdministerService; +import com.zhongzhi.service.CollegesDictService; +import com.zhongzhi.service.ProjectJudgeService; +import com.zhongzhi.service.StudentService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.springframework.web.method.HandlerMethod; +import org.springframework.web.servlet.HandlerInterceptor; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.lang.reflect.Method; +import java.util.Arrays; +import java.util.Map; + +/** + *

+ * 鉴权拦截器 + *

+ * + * @author DengMin + * @since 2021/4/26 + */ +@Component +public class AuthenticationInterceptor implements HandlerInterceptor { + + @Autowired + private StudentService studentService; + + @Autowired + private AdministerService administerService; + + @Autowired + private CollegesDictService collegesDictService; + + @Autowired + private ProjectJudgeService projectJudgeService; + + @Override + public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) { + if (!(handler instanceof HandlerMethod)) { + return true; + } + + HandlerMethod handlerMethod = (HandlerMethod) handler; + Method method = handlerMethod.getMethod(); + LoginRequired methodAnnotation = method.getAnnotation(LoginRequired.class); + if (methodAnnotation != null) { + String authorization = request.getHeader("Authorization"); + if (StringUtils.isBlank(authorization)) { + throw new HttpException(Code.TOKEN_EXCEPTION.getCode(), Code.TOKEN_EXCEPTION.getMessage()); + } + + String token = authorization; + if (authorization.startsWith("Bearer")) { + token = authorization.replace("Bearer ", ""); + } + + if (token == null || JwtUtil.isExpired(token) || !JwtUtil.verifyToken(token)) { + throw new HttpException(Code.TOKEN_EXCEPTION.getCode(), Code.TOKEN_EXCEPTION.getMessage()); + } + + Map claimMap = JwtUtil.getClaims(token); + if (claimMap != null) { + String[] role = methodAnnotation.value(); + String type = claimMap.get("type").asString(); + if (role.length > 0) { + if (Arrays.asList(role).contains(type)) { + if (SmsCode.student.equals(type)) { + StudentDO studentDO = studentService.getById(claimMap.get("id").asLong()); + if (studentDO != null) { + Localstorage.setUser(studentDO, type); + return true; + } else { + Localstorage.remove(); + throw new HttpException(Code.USERNAMENOTFOUND.getCode(), Code.USERNAMENOTFOUND.getMessage()); + } + } else if (SmsCode.center.equals(type)) { + AdministerDO administerDO = administerService.getById(claimMap.get("id").asLong()); + if (administerDO != null) { + Localstorage.setUser(administerDO, type); + return true; + } else { + Localstorage.remove(); + throw new HttpException(Code.USERNAMENOTFOUND.getCode(), Code.USERNAMENOTFOUND.getMessage()); + } + } else if (SmsCode.school.equals(type)) { + CollegesDictDO collegesDictDO = collegesDictService.getById(claimMap.get("id").asLong()); + if (collegesDictDO != null) { + Localstorage.setUser(collegesDictDO, type); + return true; + } else { + Localstorage.remove(); + throw new HttpException(Code.USERNAMENOTFOUND.getCode(), Code.USERNAMENOTFOUND.getMessage()); + } + } else if (SmsCode.review.equals(type)) { + ProjectJudgeDO projectJudgeDO = projectJudgeService.getById(claimMap.get("id").asLong()); + if (projectJudgeDO != null) { + Localstorage.setUser(projectJudgeDO, type); + return true; + } else { + Localstorage.remove(); + throw new HttpException(Code.USERNAMENOTFOUND.getCode(), Code.USERNAMENOTFOUND.getMessage()); + } + } + } + throw new HttpException(Code.ACCESSDENIED.getCode(), Code.ACCESSDENIED.getMessage()); + } + } + } + return true; + } +} diff --git a/src/main/java/com/zhongzhi/common/utils/AliyunSmsUtil.java b/src/main/java/com/zhongzhi/common/utils/AliyunSmsUtil.java new file mode 100644 index 0000000..1d02343 --- /dev/null +++ b/src/main/java/com/zhongzhi/common/utils/AliyunSmsUtil.java @@ -0,0 +1,216 @@ +package com.zhongzhi.common.utils; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.aliyuncs.DefaultAcsClient; +import com.aliyuncs.IAcsClient; +import com.aliyuncs.dysmsapi.model.v20170525.SendSmsRequest; +import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse; +import com.zhongzhi.common.configure.AliyunSmsProperties; +import com.aliyuncs.profile.DefaultProfile; +import com.aliyuncs.profile.IClientProfile; +import com.zhongzhi.common.constant.SMSTemplate; +import com.zhongzhi.common.exception.HttpException; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpEntity; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Component; +import org.springframework.web.client.RestTemplate; + +import java.io.UnsupportedEncodingException; +import java.net.HttpURLConnection; +import java.nio.charset.StandardCharsets; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.util.HashMap; +import java.util.Map; + +/** + *

+ * 阿里云短信 + *

+ * + * @author DengMin + * @since 2021/1/27 + */ + +@Slf4j +@Component +public class AliyunSmsUtil { + + @Autowired + private AliyunSmsProperties aliyunSmsProperties; + + /** + * 阿里云短信 -- 验证码 + * @param phone + * @param code + * @return + */ + public SendSmsResponse send(String phone, int code) { + try { + System.setProperty("sun.net.client.defaultConnectTimeout", "10000"); + System.setProperty("sun.net.client.defaultReadTimeout", "10000"); + + //初始化acsClient,暂不支持region化 + IClientProfile profile = DefaultProfile.getProfile("cn-hangzhou", aliyunSmsProperties.getAccessKeyId(), aliyunSmsProperties.getAccessKeySecret()); + DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", aliyunSmsProperties.getProduct(), aliyunSmsProperties.getDomain()); + IAcsClient acsClient = new DefaultAcsClient(profile); + + //组装请求对象-具体描述见控制台-文档部分内容 + SendSmsRequest request = new SendSmsRequest(); + //必填:待发送手机号 + request.setPhoneNumbers(phone); + //必填:短信签名-可在短信控制台中找到 + request.setSignName("双创平台"); + //必填:短信模板-可在短信控制台中找到 + request.setTemplateCode("SMS_229640297"); + //可选:模板中的变量替换JSON串,如模板内容为"亲爱的${name},您的验证码为${code}"时,此处的值为 + request.setTemplateParam("{\"code\":\"" + code + "\"}"); + + //hint 此处可能会抛出异常,注意catch + SendSmsResponse sendSmsResponse = acsClient.getAcsResponse(request); + if (sendSmsResponse != null && sendSmsResponse.getCode().equals("OK")) { + return sendSmsResponse; + } + + throw new Exception(sendSmsResponse.getMessage()); + } catch (Exception e) { + log.error("---短信发送失败:" + e); + throw new HttpException(10011); + } + } + + public static void main(String[] args) { +// AliyunSmsUtil.sendNew("15201936167",000123); + } + + + /** + * 三网平台短信 + * @param msg + * @param phone + * @param templateId + */ + public void sendTemplateMsg(String msg, String phone, String templateId) { + Map map = new HashMap<>(); + try { + map.put("cpcode", aliyunSmsProperties.getCpcode()); + map.put("msg", msg); + map.put("mobiles", phone); + map.put("excode", aliyunSmsProperties.getExcode()); + map.put("templetid", templateId); + String md5source = aliyunSmsProperties.getCpcode() + msg + phone + aliyunSmsProperties.getExcode() + templateId + aliyunSmsProperties.getKey(); + map.put("sign", makeMD5(new String(md5source.getBytes(StandardCharsets.UTF_8), StandardCharsets.UTF_8)).toLowerCase()); + RestTemplate restTemplate = new RestTemplate(); + ResponseEntity responseEntity = restTemplate.postForEntity(aliyunSmsProperties.getRcsapi(), map, String.class); + String body = responseEntity.getBody(); + JSONObject object = JSON.parseObject(body); + if (Integer.valueOf(object.get("resultcode").toString()) != 0) { + log.error(object.get("resultmsg").toString()); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + +// /** +// * 三网平台短信 新版本 https://flaginfo-cloud.yuque.com/staff-rozzgq/ofcpak +// * @param msg +// * @param phone +// * @param templateId +// */ +// public static void sendTemplateMsgNew(String msg, String phone, String templateId) { +// String info = null; +// try{ +// HttpClient httpclient = new HttpClient(); +// PostMethod post = new PostMethod("https://opassapi.infocloud.cc/sms/Api/SendGBK.do");// +// post.getParams().setParameter(HttpMethodParams.HTTP_CONTENT_CHARSET,"gb2312"); +// post.addParameter("SpCode", templateId); +// post.addParameter("LoginName", "7db124d0baf189d1e485350xxx"); +// post.addParameter("Password", "3df50b24fb8288b9da99d16bf527e9dbf13659748534dca6e0820xxx"); +// post.addParameter("MessageContent", msg); +// post.addParameter("UserNumber", phone); +// post.addParameter("SerialNumber", ""); +// post.addParameter("f", "1"); +// httpclient.executeMethod(post); +// info = new String(post.getResponseBody(),"gbk"); +// System.out.println(info); +// }catch (Exception e) { +// e.printStackTrace(); +// } +// } + + + public void sendTemplateMsgP(String msg, String phone, String templateId) { + Map map = new HashMap<>(); + try { + map.put("cpcode", aliyunSmsProperties.getCpcode()); + map.put("msg", msg); + map.put("mobiles", phone); + map.put("excode", aliyunSmsProperties.getExcode()); + map.put("templetid", templateId); + String md5source = aliyunSmsProperties.getCpcode() + msg + phone + aliyunSmsProperties.getExcode() + templateId + aliyunSmsProperties.getKey(); + map.put("sign", makeMD5(new String(md5source.getBytes(StandardCharsets.UTF_8), StandardCharsets.UTF_8)).toLowerCase()); + RestTemplate restTemplate = new RestTemplate(); + ResponseEntity responseEntity = restTemplate.postForEntity(aliyunSmsProperties.getRcsapi(), map, String.class); + String body = responseEntity.getBody(); + JSONObject object = JSON.parseObject(body); + if (Integer.valueOf(object.get("resultcode").toString()) != 0) { + log.error(object.get("resultmsg").toString()); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + + public String makeMD5(String plainText) { + String re_md5 = ""; + try { + MessageDigest md = MessageDigest.getInstance("MD5"); + md.update(plainText.getBytes(StandardCharsets.UTF_8)); + byte[] b = md.digest(); + int i; + StringBuffer buf = new StringBuffer(); + for (int offset = 0; offset < b.length; offset++) { + i = b[offset]; + if (i < 0) { + i += 256; + } + + if (i < 16) { + buf.append("0"); + } + buf.append(Integer.toHexString(i)); + } + re_md5 = buf.toString().toLowerCase(); + } catch (Exception e) { + e.printStackTrace(); + } + return re_md5; + } + + +// public static String getByteString( byte[] buff_out ) +// { +// StringBuffer strBuf = new StringBuffer(buff_out.length * 3); +// strBuf.append("Length["); +// strBuf.append(buff_out.length); +// strBuf.append("];Content["); +// for ( int i = 0 ; i < buff_out.length ; ++i ) { +// int l = buff_out[i] & 0x0F; +// int h = (buff_out[i] & 0xF0) >> 4; +// +// char ll = (char) (l > 9 ? 'a' + l - 10 : '0' + l); +// char hh = (char) (h > 9 ? 'a' + h - 10 : '0' + h); +// +// strBuf.append(hh); +// strBuf.append(ll); +// strBuf.append(" "); +// } +// strBuf.append("]"); +// return strBuf.toString().toUpperCase(); +// } + +} \ No newline at end of file diff --git a/src/main/java/com/zhongzhi/common/utils/ApplicationContextUtil.java b/src/main/java/com/zhongzhi/common/utils/ApplicationContextUtil.java new file mode 100644 index 0000000..ec96cc1 --- /dev/null +++ b/src/main/java/com/zhongzhi/common/utils/ApplicationContextUtil.java @@ -0,0 +1,25 @@ +package com.zhongzhi.common.utils; + +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; +import org.springframework.stereotype.Component; + +@Component +public class ApplicationContextUtil implements ApplicationContextAware { + + private static ApplicationContext applicationContext; + + @Override + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + ApplicationContextUtil.applicationContext = applicationContext; + } + + public static T getBean(Class clazz) { + return applicationContext.getBean(clazz); + } + + public static T getBean(String name) { + return (T) applicationContext.getBean(name); + } +} diff --git a/src/main/java/com/zhongzhi/common/utils/DateFormatUtil.java b/src/main/java/com/zhongzhi/common/utils/DateFormatUtil.java new file mode 100644 index 0000000..7784fb0 --- /dev/null +++ b/src/main/java/com/zhongzhi/common/utils/DateFormatUtil.java @@ -0,0 +1,187 @@ +package com.zhongzhi.common.utils; + +import com.baomidou.mybatisplus.core.toolkit.StringUtils; + +import java.text.SimpleDateFormat; +import java.time.*; +import java.util.Date; + +/** + * Date格式工具 + * + * @author DengMin + * @date 2020/08/03 + **/ +public class DateFormatUtil { + + public final static String FMT_sdf14_L = "yyyy-MM-dd HH:mm:ss"; + public final static String FMT_sdf_yMd = "yyyy-MM-dd"; + public final static String FMT_sdf_Hm = "H:mm"; + public final static String cron = "s m H d M ? yyyy"; + + /** + * Date转String,自定义格式 + * + * @param date + * @param pattern + * @return + */ + public static String format(Date date, String pattern) { + try { + if (date == null) { + return null; + } + + SimpleDateFormat sdf = new SimpleDateFormat(pattern); + return sdf.format(date); + } catch (Exception e) { + e.printStackTrace(); + return null; + } + } + + /** + * String转Date,自定义格式 + * + * @param date + * @param pattern + * @return + */ + public static Date parse(String date, String pattern) { + try { + if (StringUtils.isBlank(date)) { + return null; + } + + SimpleDateFormat sdf = new SimpleDateFormat(pattern); + return sdf.parse(date); + } catch (Exception e) { + e.printStackTrace(); + return null; + } + } + + /** + * LocalDate转Date + * + * @param localDate + * @return + */ + public static Date localDateToDate(LocalDate localDate) { + if (localDate == null) { + return null; + } + + ZonedDateTime zonedDateTime = localDate.atStartOfDay(ZoneId.systemDefault()); + return Date.from(zonedDateTime.toInstant()); + } + + /** + * LocalDate转String + * + * @param localDate + * @return + */ + public static String localDateToString(LocalDate localDate) { + if (localDate == null) { + return null; + } + + ZonedDateTime zonedDateTime = localDate.atStartOfDay(ZoneId.systemDefault()); + return format(Date.from(zonedDateTime.toInstant()), FMT_sdf_yMd); + } + + public static Date localDateTimeToDate(LocalDateTime localDateTime) { + if (localDateTime == null) { + return null; + } + + return Date.from(localDateTime.atZone(ZoneId.systemDefault()).toInstant()); + } + + /** + * date转localDate + * + * @param date + * @return + */ + public static LocalDate dateTOLocalDate(Date date) { + if (date == null) { + return null; + } + return date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + } + + /** + * String转LocalDate + * + * @param date + * @return + */ + public static LocalDate localDateParse(String date) { + if (StringUtils.isBlank(date)) { + return null; + } + return LocalDate.parse(date); + } + + /** + * 时间戳转LocalDate + * + * @param timestamp + * @return + */ + public static LocalDate timestampTOLocalDate(Long timestamp) { + return Instant.ofEpochMilli(timestamp).atZone(ZoneOffset.ofHours(0)).toLocalDate(); + } + + /** + * 时间字符串转Cron + * + * @param date + * @return + */ + public static String getCron(String date) { + try { + Date d = parse(date, FMT_sdf14_L); + SimpleDateFormat sdf = new SimpleDateFormat(cron); + return sdf.format(d); + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + + /** + * 时间戳转日期字符串 + * + * @param timestamp 时间戳 + * @return 日期字符串 + * @author ALiang + */ + public static String timestampToDateString(Long timestamp) { + Date date = new Date(timestamp); + SimpleDateFormat simpleDateFormat = new SimpleDateFormat(FMT_sdf14_L); + return simpleDateFormat.format(date); + } + + /** + * Date转LocalTime + * + * @param date + * @return + */ + public static LocalTime dateToLocalTime(Date date) { + Instant instant = date.toInstant(); + ZoneId zoneId = ZoneId.systemDefault(); + LocalTime localTime = instant.atZone(zoneId).toLocalTime(); + return localTime; + } + + public static LocalDateTime dateToLocalDateTime(Date date) { + Instant instant = date.toInstant(); + ZoneId zoneId = ZoneId.systemDefault(); + LocalDateTime localDateTime = instant.atZone(zoneId).toLocalDateTime(); + return localDateTime; + } +} diff --git a/src/main/java/com/zhongzhi/common/utils/ExcelColumn.java b/src/main/java/com/zhongzhi/common/utils/ExcelColumn.java new file mode 100644 index 0000000..5c0a008 --- /dev/null +++ b/src/main/java/com/zhongzhi/common/utils/ExcelColumn.java @@ -0,0 +1,13 @@ +package com.zhongzhi.common.utils; + +import java.lang.annotation.*; + +@Target(ElementType.FIELD) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface ExcelColumn { + + String value() default ""; + + int col() default 1; +} diff --git a/src/main/java/com/zhongzhi/common/utils/ExcelUtil.java b/src/main/java/com/zhongzhi/common/utils/ExcelUtil.java new file mode 100644 index 0000000..c39092d --- /dev/null +++ b/src/main/java/com/zhongzhi/common/utils/ExcelUtil.java @@ -0,0 +1,336 @@ +package com.zhongzhi.common.utils; + +import com.zhongzhi.common.exception.HttpException; +import com.zhongzhi.vo.ExcelFieldVO; +import org.apache.commons.lang3.BooleanUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.poi.hssf.usermodel.HSSFCellStyle; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.poi.ss.formula.functions.T; +import org.apache.poi.ss.usermodel.*; +import org.apache.poi.ss.util.CellRangeAddress; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; +import org.springframework.http.MediaType; +import org.springframework.stereotype.Component; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.io.InputStream; +import java.lang.reflect.Constructor; +import java.lang.reflect.Field; +import java.math.BigDecimal; +import java.net.URLEncoder; +import java.time.LocalDateTime; +import java.time.LocalTime; +import java.util.*; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +@Component +public class ExcelUtil { + + private final static String EXCEL2003 = "xls"; + + private final static String EXCEL2007 = "xlsx"; + + public static List readExcel(Class cls, MultipartFile file) { + String fileName = file.getOriginalFilename(); + if (!fileName.matches("^.+\\.(?i)(xls)$") && !fileName.matches("^.+\\.(?i)(xlsx)$")) { + throw new HttpException(10800); + } + + Workbook workbook = null; + List list = new ArrayList<>(); + try { + InputStream stream = file.getInputStream(); + if (fileName.endsWith(EXCEL2003)) { + workbook = new HSSFWorkbook(stream); + } else if (fileName.endsWith(EXCEL2007)) { + workbook = new XSSFWorkbook(stream); + } + + if (workbook != null) { + Map> classMap = new HashMap<>(); + List fields = Stream.of(cls.getDeclaredFields()).collect(Collectors.toList()); + fields.forEach(field -> { + ExcelColumn annotation = field.getAnnotation(ExcelColumn.class); + if (annotation != null) { + String value = annotation.value(); + if (StringUtils.isBlank(value)) { + return; + } + + if (!classMap.containsKey(value)) { + classMap.put(value, new ArrayList<>()); + } + field.setAccessible(true); + classMap.get(value).add(field); + } + }); + + boolean title = true; + Map> reflectionMap = new HashMap<>(); + Sheet sheet = workbook.getSheetAt(0); + for (int i = 0; i <= sheet.getLastRowNum(); i++) { + Row row = sheet.getRow(i); + if (title) { + for (int j = 0; j <= row.getLastCellNum(); j++) { + Cell cell = row.getCell(j); + if (cell != null) { + String cellValue = cell.getStringCellValue(); + if (StringUtils.isNotBlank(cellValue)) { + if (classMap.containsKey(cellValue)) { + reflectionMap.put(j, classMap.get(cellValue)); + } else { + throw new HttpException(10802); + } + } + } + } + title = false; + } else { + if (row == null) { + continue; + } + + boolean isBlank = true; + T t = cls.newInstance(); + for (int j = 0; j <= row.getLastCellNum(); j++) { + if (reflectionMap.containsKey(j)) { + List fieldList = reflectionMap.get(j); + for (Field field : fieldList) { + Cell cell = row.getCell(j); + Class type = field.getType(); + Object cellValue = getCellValue(cell, type); + if (cellValue != null) { + isBlank = false; + } + handleField(t, cellValue, field); + } + } + } + if (!isBlank) { + list.add(t); + } + } + } + } + } catch (InstantiationException | IOException | IllegalAccessException e) { + e.printStackTrace(); + } + return list; + } + + public static void writeExcel(String title, List fields, List list) { + ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); + HttpServletResponse response = servletRequestAttributes.getResponse(); + + Workbook wb = new XSSFWorkbook(); + Sheet sheet = wb.createSheet(); + AtomicInteger ai = new AtomicInteger(); + { + sheet.addMergedRegion(new CellRangeAddress(0,0, 0, 6)); + Row t = sheet.createRow(ai.getAndIncrement()); + AtomicInteger tat = new AtomicInteger(); + Cell tcl = t.createCell(tat.getAndIncrement()); + CellStyle style = wb.createCellStyle(); + style.setFillForegroundColor(IndexedColors.PALE_BLUE.getIndex()); + style.setAlignment(HSSFCellStyle.ALIGN_CENTER); + style.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER); + Font f = wb.createFont(); + f.setFontHeightInPoints((short) 13); + f.setBoldweight(Font.BOLDWEIGHT_NORMAL); + style.setFont(f); + tcl.setCellStyle(style); + tcl.setCellValue(title); + + Row row = sheet.createRow(ai.getAndIncrement()); + AtomicInteger at = new AtomicInteger(); + fields.forEach(field -> { + Cell cell = row.createCell(at.getAndIncrement()); + CellStyle cellStyle = wb.createCellStyle(); + cellStyle.setFillForegroundColor(IndexedColors.PALE_BLUE.getIndex()); + Font font = wb.createFont(); + font.setBoldweight(Font.BOLDWEIGHT_NORMAL); + cellStyle.setFont(font); + cell.setCellStyle(cellStyle); + cell.setCellValue(field.getName()); + }); + + if (list != null) { + for (Map map : list) { + Row r = sheet.createRow(ai.getAndIncrement()); + AtomicInteger a = new AtomicInteger(); + fields.forEach(field -> { + Object value = map.get(field.getField()); + Cell cell = r.createCell(a.getAndIncrement()); + if (value != null) { + cell.setCellValue(value.toString()); + } + }); + } + } + sheet.autoSizeColumn(1); + String fileName = String.valueOf(new Date().getTime()); + buildExcelDocument(fileName + "." + EXCEL2007, wb, response); + } + } + + public static void writeExcel(List fields, List list) { + ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); + HttpServletResponse response = servletRequestAttributes.getResponse(); + + Workbook wb = new XSSFWorkbook(); + Sheet sheet = wb.createSheet(); + AtomicInteger ai = new AtomicInteger(); + { + Row row = sheet.createRow(ai.getAndIncrement()); + AtomicInteger at = new AtomicInteger(); + fields.forEach(field -> { + Cell cell = row.createCell(at.getAndIncrement()); + CellStyle cellStyle = wb.createCellStyle(); + cellStyle.setFillForegroundColor(IndexedColors.PALE_BLUE.getIndex()); + Font font = wb.createFont(); + font.setBoldweight(Font.BOLDWEIGHT_BOLD); + cellStyle.setFont(font); + cell.setCellStyle(cellStyle); + cell.setCellValue(field.getName()); + }); + + if (list != null) { + list.forEach(map -> { + Row r = sheet.createRow(ai.getAndIncrement()); + AtomicInteger a = new AtomicInteger(); + fields.forEach(field -> { + Object value = map.get(field.getField()); + Cell cell = r.createCell(a.getAndIncrement()); + if (value != null) { + cell.setCellValue(value.toString()); + } + }); + }); + for (int i = 0; i < list.size(); i++) { + sheet.autoSizeColumn(i); + } + } + String fileName = String.valueOf(new Date().getTime()); + buildExcelDocument(fileName + "." + EXCEL2007, wb, response); + } + } + + public static List getField(Class cls) { + List fields = Stream.of(cls.getDeclaredFields()).collect(Collectors.toList()); + List list = new ArrayList<>(); + fields.forEach(field -> { + ExcelFieldVO excelFieldVO = new ExcelFieldVO(); + ExcelColumn annotation = field.getAnnotation(ExcelColumn.class); + if (annotation != null) { + + String value = annotation.value(); + if (StringUtils.isBlank(value)) { + return; + } + + excelFieldVO.setField(field.getName()); + excelFieldVO.setName(value); + field.setAccessible(true); + list.add(excelFieldVO); + } + }); + return list; + } + + private static void buildExcelDocument(String fileName, Workbook wb, HttpServletResponse response) { + try { + response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "utf-8")); + response.flushBuffer(); + wb.write(response.getOutputStream()); + } catch (IOException e) { + e.printStackTrace(); + } + } + + private static Object getCellValue(Cell cell, Class type) { + if (cell == null) { + return null; + } + + if (cell.getCellType() == Cell.CELL_TYPE_NUMERIC) { + if (DateUtil.isCellDateFormatted(cell)) { + if ("h:mm".equals(cell.getCellStyle().getDataFormatString()) || "hh:mm".equals(cell.getCellStyle().getDataFormatString())) { + return DateFormatUtil.format(cell.getDateCellValue(), DateFormatUtil.FMT_sdf_Hm); + } + return cell.getDateCellValue(); + } else { + if (type != null) { + if (type == String.class) { + cell.setCellType(Cell.CELL_TYPE_STRING); + return cell.getStringCellValue(); + } else { + return cell.getNumericCellValue(); + } + } else { + cell.setCellType(Cell.CELL_TYPE_STRING); + return cell.getStringCellValue(); + } + + } + } else if (cell.getCellType() == Cell.CELL_TYPE_STRING) { + return cell.getStringCellValue(); + } else if (cell.getCellType() == Cell.CELL_TYPE_FORMULA) { + return cell.getCellFormula(); + } else if (cell.getCellType() == Cell.CELL_TYPE_BLANK) { + return ""; + } else if (cell.getCellType() == Cell.CELL_TYPE_BOOLEAN) { + return String.valueOf(cell.getBooleanCellValue()); + } else { + return cell; + } + } + + private static void handleField(T t, Object value, Field field) { + try { + Class type = field.getType(); + if (type == null || type == void.class || value == null) { + return; + } + + if (type == Object.class) { + field.set(t, value); + } else if (type.getSuperclass() == null || type.getSuperclass() == Number.class) { + if (type == BigDecimal.class) { + field.set(t, new BigDecimal(value.toString())); + } else { + field.set(t, value); + } + } else if (type == Boolean.class) { + field.set(t, BooleanUtils.toBoolean(value.toString())); + } else if (type == Date.class || type == LocalTime.class || type == LocalDateTime.class) { + if (type == Date.class) { + field.set(t, value); + } else if (type == LocalTime.class) { + if (value != null && value != "") { + field.set(t, DateFormatUtil.dateToLocalTime(DateFormatUtil.parse(value.toString(), DateFormatUtil.FMT_sdf_yMd))); + } + } else if (type == LocalDateTime.class) { + if (value != null && value != "") { + field.set(t, DateFormatUtil.dateToLocalDateTime(DateFormatUtil.parse(value.toString(), DateFormatUtil.FMT_sdf_yMd))); + } + } + } else if (type == String.class) { + field.set(t, value.toString()); + } else { + Constructor constructor = type.getConstructor(String.class); + field.set(t, constructor.newInstance(value)); + } + } catch (Exception e) { + e.printStackTrace(); + throw new HttpException(10801); + } + } +} diff --git a/src/main/java/com/zhongzhi/common/utils/IpAddressUtil.java b/src/main/java/com/zhongzhi/common/utils/IpAddressUtil.java new file mode 100644 index 0000000..82dfea0 --- /dev/null +++ b/src/main/java/com/zhongzhi/common/utils/IpAddressUtil.java @@ -0,0 +1,36 @@ +package com.zhongzhi.common.utils; + +import javax.servlet.http.HttpServletRequest; +import java.net.InetAddress; +import java.net.UnknownHostException; + +public class IpAddressUtil { + + public static String getIpAddress(HttpServletRequest request) { + String ipAddress = request.getHeader("x-forwarded-for"); + if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) { + ipAddress = request.getHeader("Proxy-Client-IP"); + } + if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) { + ipAddress = request.getHeader("WL-Proxy-Client-IP"); + } + if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) { + ipAddress = request.getRemoteAddr(); + if (ipAddress.equals("127.0.0.1") || ipAddress.equals("0:0:0:0:0:0:0:1")) { + InetAddress inet = null; + try { + inet = InetAddress.getLocalHost(); + } catch (UnknownHostException e) { + e.printStackTrace(); + } + ipAddress = inet.getHostAddress(); + } + } + if (ipAddress != null && ipAddress.length() > 15) { + if (ipAddress.indexOf(",") > 0) { + ipAddress = ipAddress.substring(0, ipAddress.indexOf(",")); + } + } + return ipAddress; + } +} diff --git a/src/main/java/com/zhongzhi/common/utils/JwtUtil.java b/src/main/java/com/zhongzhi/common/utils/JwtUtil.java new file mode 100644 index 0000000..ffe78e5 --- /dev/null +++ b/src/main/java/com/zhongzhi/common/utils/JwtUtil.java @@ -0,0 +1,101 @@ +package com.zhongzhi.common.utils; + +import com.auth0.jwt.JWT; +import com.auth0.jwt.JWTVerifier; +import com.auth0.jwt.algorithms.Algorithm; +import com.auth0.jwt.interfaces.Claim; + +import java.util.Date; +import java.util.Map; + +/** + *

+ * Token工具 + *

+ * + * @author DengMin + * @since 2021/4/14 + */ +public class JwtUtil { + + private static final Long EXPIRE_TIME = 24 * 60 * 60 * 1000L; + + private static final String SECRET = "PBKDF2SHA256:64000:18:24:N:GFHZ6Y0PTEUDYCJI3K6SOOXWYEKPOZED:WBWFJMX5DF252E0HR3BF3P/D"; + + /** + * 生成Token + * + * @param id + * @return + */ + public static String generateToken(Long id, String type) { + Date expireDate = new Date(System.currentTimeMillis() + EXPIRE_TIME); + return JWT.create() + .withClaim("id", id) + .withClaim("type", type) + .withAudience() + .withExpiresAt(expireDate) + .withIssuedAt(new Date()) + .sign(Algorithm.HMAC256(SECRET)); + } + + /** + * 检验token是否正确 + * + * @param token + * @return + */ + public static boolean verifyToken(String token) { + try { + Algorithm algorithm = Algorithm.HMAC256(SECRET); + JWTVerifier verifier = JWT.require(algorithm).build(); + verifier.verify(token); + return true; + } catch (Exception e) { + return false; + } + } + + /** + * 获取用户自定义Claim集合 + * + * @param token + * @return + */ + public static Map getClaims(String token) { + Algorithm algorithm = Algorithm.HMAC256(SECRET); + JWTVerifier verifier = JWT.require(algorithm).build(); + Map claims = verifier.verify(token).getClaims(); + return claims; + } + + /** + * 获取过期时间 + * + * @param token + * @return + */ + public static Date getExpiresAt(String token) { + Algorithm algorithm = Algorithm.HMAC256(SECRET); + return JWT + .require(algorithm) + .build() + .verify(token) + .getExpiresAt(); + } + + /** + * 验证token是否失效 + * + * @param token + * @return true: 过期, false: 没过期 + */ + public static boolean isExpired(String token) { + try { + final Date expiration = getExpiresAt(token); + return expiration.before(new Date()); + } catch (Exception e) { + return true; + } + } +} diff --git a/src/main/java/com/zhongzhi/common/utils/Localstorage.java b/src/main/java/com/zhongzhi/common/utils/Localstorage.java new file mode 100644 index 0000000..ac2ef06 --- /dev/null +++ b/src/main/java/com/zhongzhi/common/utils/Localstorage.java @@ -0,0 +1,33 @@ +package com.zhongzhi.common.utils; + +import org.springframework.web.bind.annotation.RestController; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +@RestController +public class Localstorage { + + private static final ThreadLocal local = ThreadLocal.withInitial(() -> null); + private static ConcurrentHashMap map = new ConcurrentHashMap<>(); + public static void setUser(Object obj, String type) { +// Map map = new HashMap<>(); + map.put("user", obj); + map.put("type", type); + Localstorage.local.set(map); + } + + public static Map getMap() { + return (Map) Localstorage.local.get(); + } + + public static Object getUser() { +// Map map = (Map) Localstorage.local.get(); + return map.get("user"); + } + + public static void remove() { + Localstorage.local.remove(); + } +} diff --git a/src/main/java/com/zhongzhi/common/utils/LoginRequired.java b/src/main/java/com/zhongzhi/common/utils/LoginRequired.java new file mode 100644 index 0000000..79c2ca0 --- /dev/null +++ b/src/main/java/com/zhongzhi/common/utils/LoginRequired.java @@ -0,0 +1,21 @@ +package com.zhongzhi.common.utils; + +import java.lang.annotation.*; + +/** + *

+ * 自定义验证登陆注解 + *

+ * + * @author DengMin + * @since 2020/12/18 + */ +@Target({ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +@Inherited +public @interface LoginRequired { + + String[] value(); + +} \ No newline at end of file diff --git a/src/main/java/com/zhongzhi/common/utils/PDFUtil.java b/src/main/java/com/zhongzhi/common/utils/PDFUtil.java new file mode 100644 index 0000000..82e5159 --- /dev/null +++ b/src/main/java/com/zhongzhi/common/utils/PDFUtil.java @@ -0,0 +1,1073 @@ +package com.zhongzhi.common.utils; + +import com.itextpdf.text.*; +import com.itextpdf.text.pdf.BaseFont; +import com.itextpdf.text.pdf.PdfPCell; +import com.itextpdf.text.pdf.PdfPTable; +import com.itextpdf.text.pdf.PdfWriter; +import com.zhongzhi.common.constant.PDFCheckBox; +import com.zhongzhi.common.constant.ProjectType; +import com.zhongzhi.common.exception.HttpException; +import com.zhongzhi.dto.member.MentorDTO; +import com.zhongzhi.dto.member.TeamMemberDTO; +import com.zhongzhi.model.MatchDictDO; +import com.zhongzhi.vo.project.SeedTrackProjectVO; +import com.zhongzhi.vo.project.VocationalProjectVO; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Component; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; + +import javax.servlet.http.HttpServletResponse; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; + +@Slf4j +@Component +public class PDFUtil { + + static BaseFont baseFont; + + { + try { + baseFont = BaseFont.createFont("https://zhongzhi-cms.oss-cn-shanghai.aliyuncs.com/STSONG.TTF", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED); + } catch (Exception e) { + e.printStackTrace(); + } + } + + public static void create(String projectMatch, MatchDictDO matchDictDO, String projectGroup, SeedTrackProjectVO seedTrackProjectVO) { + try { + ByteArrayOutputStream bao = new ByteArrayOutputStream(); + Document document = new Document(PageSize.A4, 20, 20, 20, 20); + PdfWriter.getInstance(document, bao); + document.open(); + + Paragraph t1 = new Paragraph(projectMatch + "年"+matchDictDO.getMatchName(), new Font(baseFont, 16, Font.BOLD)); + t1.setAlignment(Element.ALIGN_CENTER); + document.add(t1); + Paragraph t2 = new Paragraph("“" + projectGroup + "”组参赛作品申报表", new Font(baseFont, 16, Font.BOLD)); + t2.setAlignment(Element.ALIGN_CENTER); + document.add(t2); + document.add(new Paragraph(" ")); + + PdfPTable table = new PdfPTable(13); + PDFUtil.tableStyle(new PdfPTable(13), new int[13]); + PdfPCell cell; + + Paragraph name = new Paragraph("参赛作品名称", new Font(PDFUtil.baseFont, 10)); + name.setAlignment(Element.ALIGN_CENTER); + cell = new PdfPCell(name); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(2); + cell.setPaddingTop(8); + cell.setPaddingBottom(8); + table.addCell(cell); + + Paragraph nameValue = new Paragraph(seedTrackProjectVO.getProjectName() == null ? "" : seedTrackProjectVO.getProjectName(), new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(nameValue); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(11); + cell.setPadding(5); + table.addCell(cell); + + Paragraph type = new Paragraph("类别(请打√可多选)", new Font(PDFUtil.baseFont, 10)); + type.setAlignment(Element.ALIGN_CENTER); + cell = new PdfPCell(type); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(2); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph typeValue = new Paragraph(PDFCheckBox.getType(seedTrackProjectVO.getClassification(), projectGroup), new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(typeValue); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(11); + cell.setPadding(5); + table.addCell(cell); + + Paragraph leader = new Paragraph("团队负责人", new Font(PDFUtil.baseFont, 10)); + leader.setAlignment(Element.ALIGN_CENTER); + cell = new PdfPCell(leader); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(1); + cell.setRowspan(3); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph leaderName = new Paragraph("姓名", new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(leaderName); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(1); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph leaderNameValue = new Paragraph(seedTrackProjectVO.getName() == null ? "" : seedTrackProjectVO.getName(), new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(leaderNameValue); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(2); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph school = new Paragraph("就读学校", new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(school); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(2); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph schoolValue = new Paragraph(seedTrackProjectVO.getSchool() == null ? "" : seedTrackProjectVO.getSchool(), new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(schoolValue); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(7); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph grade = new Paragraph("年级", new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(grade); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(1); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph gradeValue = new Paragraph(seedTrackProjectVO.getGrade() == null ? "" : seedTrackProjectVO.getGrade(), new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(gradeValue); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(2); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph major = new Paragraph("就读专业", new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(major); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(2); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph majorValue = new Paragraph(seedTrackProjectVO.getMajor() == null ? "" : seedTrackProjectVO.getMajor(), new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(majorValue); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(7); + table.addCell(cell); + + Paragraph sex = new Paragraph("性别", new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(sex); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(1); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph sexValue = new Paragraph(seedTrackProjectVO.getSex() == null ? "" : seedTrackProjectVO.getSex(), new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(sexValue); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(2); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph studentNo = new Paragraph("学籍号", new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(studentNo); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(2); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph studentNoValue = new Paragraph(seedTrackProjectVO.getStudentNo() == null ? "" : seedTrackProjectVO.getStudentNo() + "", new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(studentNoValue); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(4); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph telephone = new Paragraph("手机", new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(telephone); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(1); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph telephoneValue = new Paragraph(seedTrackProjectVO.getTelephone() == null ? "" : seedTrackProjectVO.getTelephone(), new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(telephoneValue); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(2); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + for (int i = 0; i <= 3; i++) { + TeamMemberDTO teamMemberDTO = new TeamMemberDTO(); + if (seedTrackProjectVO.getTeamMember() != null && + i <= seedTrackProjectVO.getTeamMember().size() - 1) { + teamMemberDTO = seedTrackProjectVO.getTeamMember().get(i); + } + Paragraph partner = new Paragraph("合作者" + (i + 1), new Font(PDFUtil.baseFont, 10)); + partner.setAlignment(Element.ALIGN_CENTER); + cell = new PdfPCell(partner); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(1); + cell.setRowspan(3); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph partnerName = new Paragraph("姓名", new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(partnerName); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(1); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph partnerNameValue = new Paragraph(teamMemberDTO.getTeamName() == null ? "" : teamMemberDTO.getTeamName(), new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(partnerNameValue); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(2); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph partnerSchool = new Paragraph("就读学校", new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(partnerSchool); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(2); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph partnerSchoolValue = new Paragraph(teamMemberDTO.getSchool() == null ? "" : teamMemberDTO.getSchool(), new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(partnerSchoolValue); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(7); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph partnerGrade = new Paragraph("年级", new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(partnerGrade); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(1); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph partnerGradeValue = new Paragraph(teamMemberDTO.getGrade() == null ? "" : teamMemberDTO.getGrade(), new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(partnerGradeValue); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(2); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph partnerMajor = new Paragraph("就读专业", new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(partnerMajor); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(2); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph partnerMajorValue = new Paragraph(teamMemberDTO.getMajor() == null ? "" : teamMemberDTO.getMajor(), new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(partnerMajorValue); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(7); + table.addCell(cell); + + Paragraph partnerSex = new Paragraph("性别", new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(partnerSex); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(1); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph partnerSexValue = new Paragraph(teamMemberDTO.getSex() == null ? "" : teamMemberDTO.getSex(), new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(partnerSexValue); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(2); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph partnerStudentNo = new Paragraph("学籍号", new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(partnerStudentNo); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(2); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph partnerStudentNoValue = new Paragraph(teamMemberDTO.getStudentNo() == null ? "" : teamMemberDTO.getStudentNo() + "", new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(partnerStudentNoValue); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(4); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph partnerTelephone = new Paragraph("手机", new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(partnerTelephone); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(1); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph partnerTelephoneValue = new Paragraph(teamMemberDTO.getTeamTelephone() == null ? "" : teamMemberDTO.getTeamTelephone(), new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(partnerTelephoneValue); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(2); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + } + + for (int i = 0; i <= 1; i++) { + MentorDTO mentorDTO = new MentorDTO(); + if (seedTrackProjectVO.getMentor() != null && + i <= seedTrackProjectVO.getMentor().size() - 1) { + mentorDTO = seedTrackProjectVO.getMentor().get(i); + } + Paragraph partner = new Paragraph("指导老师", new Font(PDFUtil.baseFont, 10)); + partner.setAlignment(Element.ALIGN_CENTER); + cell = new PdfPCell(partner); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(1); + cell.setRowspan(2); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph partnerGrade = new Paragraph("姓名", new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(partnerGrade); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(1); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph partnerGradeValue = new Paragraph(mentorDTO.getTeacherName() == null ? "" : mentorDTO.getTeacherName(), new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(partnerGradeValue); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(2); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph partnerMajor = new Paragraph("工作单位", new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(partnerMajor); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(2); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph partnerMajorValue = new Paragraph(mentorDTO.getCompany() == null ? "" : mentorDTO.getCompany(), new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(partnerMajorValue); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(7); + table.addCell(cell); + + Paragraph partnerSex = new Paragraph("职称", new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(partnerSex); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(1); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph partnerSexValue = new Paragraph(mentorDTO.getPositionTitle() == null ? "" : mentorDTO.getPositionTitle(), new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(partnerSexValue); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(2); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph partnerStudentNo = new Paragraph("职务", new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(partnerStudentNo); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(2); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph partnerStudentNoValue = new Paragraph(mentorDTO.getPosition() == null ? "" : mentorDTO.getPosition(), new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(partnerStudentNoValue); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(4); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph partnerTelephone = new Paragraph("手机", new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(partnerTelephone); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(1); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph partnerTelephoneValue = new Paragraph(mentorDTO.getTelephone() == null ? "" : mentorDTO.getTelephone(), new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(partnerTelephoneValue); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(2); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + } + + if (projectGroup.equals(ProjectType.TECHNOLOGY_INNOVATION_GROUP)) { + Paragraph idea = new Paragraph("创意构思(约200字,阐述创意灵感,是如何想到这项创意设计的)", new Font(PDFUtil.baseFont, 10)); + idea.setAlignment(Element.ALIGN_LEFT); + cell = new PdfPCell(idea); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setVerticalAlignment(Element.ALIGN_TOP); + cell.setColspan(13); + cell.setBorderWidthBottom(0); + table.addCell(cell); + + Paragraph ideaValue = new Paragraph(seedTrackProjectVO.getProjectCreativity() == null ? "" : seedTrackProjectVO.getProjectCreativity(), new Font(PDFUtil.baseFont, 10)); + ideaValue.setAlignment(Element.ALIGN_LEFT); + cell = new PdfPCell(ideaValue); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setVerticalAlignment(Element.ALIGN_TOP); + cell.setColspan(13); + cell.setFixedHeight(100); + cell.setBorderWidthBottom(0); + cell.setBorderWidthTop(0); + table.addCell(cell); + + Paragraph design = new Paragraph("科学设计(约300字,阐述这项创意的科学原理、设计思路和实施途径,可通过哪些方式和步骤来实现它)", new Font(PDFUtil.baseFont, 10)); + design.setAlignment(Element.ALIGN_LEFT); + cell = new PdfPCell(design); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setVerticalAlignment(Element.ALIGN_TOP); + cell.setColspan(13); + cell.setBorderWidthBottom(0); + table.addCell(cell); + + Paragraph designValue = new Paragraph(seedTrackProjectVO.getScientificPrinciple() == null ? "" : seedTrackProjectVO.getScientificPrinciple(), new Font(PDFUtil.baseFont, 10)); + designValue.setAlignment(Element.ALIGN_LEFT); + cell = new PdfPCell(designValue); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setVerticalAlignment(Element.ALIGN_TOP); + cell.setColspan(13); + cell.setFixedHeight(100); + cell.setBorderWidthTop(0); + table.addCell(cell); + + Paragraph n = new Paragraph(); + cell = new PdfPCell(n); + cell.setColspan(13); + cell.setBorderWidthTop(0); + cell.setBorderWidthLeft(0); + cell.setBorderWidthRight(0); + cell.setBorderWidthBottom(0); + cell.setFixedHeight(50); + table.addCell(cell); + + Paragraph prospects = new Paragraph("应用前景(约200字,阐述如果这项创意设计得以实现,有哪些实用价值,它能为生活带来哪些便利)", new Font(PDFUtil.baseFont, 10)); + prospects.setAlignment(Element.ALIGN_LEFT); + cell = new PdfPCell(prospects); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setVerticalAlignment(Element.ALIGN_TOP); + cell.setColspan(13); + cell.setBorderWidthBottom(0); + table.addCell(cell); + + Paragraph prospectsValue = new Paragraph(seedTrackProjectVO.getApplicationProspect() == null ? "" : seedTrackProjectVO.getApplicationProspect(), new Font(PDFUtil.baseFont, 10)); + prospectsValue.setAlignment(Element.ALIGN_LEFT); + cell = new PdfPCell(prospectsValue); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setVerticalAlignment(Element.ALIGN_TOP); + cell.setColspan(13); + cell.setFixedHeight(100); + cell.setBorderWidthTop(0); + table.addCell(cell); + } else if (projectGroup.equals(ProjectType.CULTURAL_CREATIVE_GROUP)) { + Paragraph idea = new Paragraph("设计背景、思路(200字内)", new Font(PDFUtil.baseFont, 10)); + idea.setAlignment(Element.ALIGN_LEFT); + cell = new PdfPCell(idea); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setVerticalAlignment(Element.ALIGN_TOP); + cell.setColspan(13); + cell.setBorderWidthBottom(0); + table.addCell(cell); + + Paragraph ideaValue = new Paragraph(seedTrackProjectVO.getProjectCreativity() == null ? "" : seedTrackProjectVO.getProjectCreativity(), new Font(PDFUtil.baseFont, 10)); + ideaValue.setAlignment(Element.ALIGN_LEFT); + cell = new PdfPCell(ideaValue); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setVerticalAlignment(Element.ALIGN_TOP); + cell.setColspan(13); + cell.setFixedHeight(100); + cell.setBorderWidthBottom(0); + cell.setBorderWidthTop(0); + table.addCell(cell); + + Paragraph design = new Paragraph("介绍及创新点(约300字,阐述产品定位与功能、产品的材料与工艺、产品特色与应用、产品创新点)", new Font(PDFUtil.baseFont, 10)); + design.setAlignment(Element.ALIGN_LEFT); + cell = new PdfPCell(design); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setVerticalAlignment(Element.ALIGN_TOP); + cell.setColspan(13); + cell.setBorderWidthBottom(0); + table.addCell(cell); + + Paragraph designValue = new Paragraph(seedTrackProjectVO.getProjectIntro() == null ? "" : seedTrackProjectVO.getProjectIntro(), new Font(PDFUtil.baseFont, 10)); + designValue.setAlignment(Element.ALIGN_LEFT); + cell = new PdfPCell(designValue); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setVerticalAlignment(Element.ALIGN_TOP); + cell.setColspan(13); + cell.setFixedHeight(100); + cell.setBorderWidthTop(0); + table.addCell(cell); + + Paragraph n = new Paragraph(); + cell = new PdfPCell(n); + cell.setColspan(13); + cell.setBorderWidthTop(0); + cell.setBorderWidthLeft(0); + cell.setBorderWidthRight(0); + cell.setBorderWidthBottom(0); + cell.setFixedHeight(50); + table.addCell(cell); + } + +// Paragraph roadshow = new Paragraph("路演拟采用表现形式(请打√)", new Font(PDFUtil.baseFont, 10)); +// roadshow.setAlignment(Element.ALIGN_CENTER); +// cell = new PdfPCell(roadshow); +// cell.setHorizontalAlignment(Element.ALIGN_CENTER); +// cell.setVerticalAlignment(Element.ALIGN_MIDDLE); +// cell.setColspan(2); +// cell.setFixedHeight(100); +// table.addCell(cell); + +// Paragraph roadshowValue = new Paragraph(PDFCheckBox.getRoadshow(projectGroup), new Font(PDFUtil.baseFont, 10)); +// roadshowValue.setAlignment(Element.ALIGN_CENTER); +// cell = new PdfPCell(roadshowValue); +// cell.setHorizontalAlignment(Element.ALIGN_CENTER); +// cell.setVerticalAlignment(Element.ALIGN_MIDDLE); +// cell.setColspan(11); +// cell.setFixedHeight(100); +// table.addCell(cell); + + if (projectGroup.equals(ProjectType.TECHNOLOGY_INNOVATION_GROUP)) { + Paragraph restrict = new Paragraph("创意实施或试验所受条件的限制(请打√)", new Font(PDFUtil.baseFont, 10)); + restrict.setAlignment(Element.ALIGN_CENTER); + cell = new PdfPCell(restrict); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(2); + cell.setRowspan(4); + cell.setFixedHeight(100); + table.addCell(cell); + + String[] rc = {"有创意,但还没时间开展实验探究", "创意实施需要得到外界的设备或设施的支持", "创意实施在技术与设施上目前还有未能突破的难点"}; + List restriction = Arrays.stream(rc).collect(Collectors.toList()); + List restrictionValue = Arrays.stream(seedTrackProjectVO.getRestriction().split(",")).collect(Collectors.toList()); + int i = 0; + for (String s : restriction) { + i++; + if (restrictionValue.contains(s)) { + Paragraph roadshowValue1 = new Paragraph("■" + s, new Font(PDFUtil.baseFont, 10)); + roadshowValue1.setAlignment(Element.ALIGN_LEFT); + cell = new PdfPCell(roadshowValue1); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(11); + cell.setBorderWidthLeft(0); + cell.setBorderWidthTop(0); + cell.setBorderWidthBottom(0); + cell.setPaddingLeft(20); + if (i == 1) { + cell.setPaddingTop(20); + } + table.addCell(cell); + } else { + Paragraph roadshowValue1 = new Paragraph("□" + s, new Font(PDFUtil.baseFont, 10)); + roadshowValue1.setAlignment(Element.ALIGN_LEFT); + cell = new PdfPCell(roadshowValue1); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(11); + cell.setBorderWidthLeft(0); + cell.setBorderWidthTop(0); + cell.setBorderWidthBottom(0); + cell.setPaddingLeft(20); + if (i == 1) { + cell.setPaddingTop(20); + } + table.addCell(cell); + } + } + + Paragraph roadshowValue4 = new Paragraph("(请在创意设计中具体说明) ", new Font(PDFUtil.baseFont, 10)); + roadshowValue4.setAlignment(Element.ALIGN_LEFT); + cell = new PdfPCell(roadshowValue4); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setBorderWidthLeft(0); + cell.setBorderWidthTop(0); + cell.setPaddingLeft(20); + cell.setPaddingBottom(30); + cell.setColspan(11); + table.addCell(cell); + } + + Paragraph confirm = new Paragraph("团队负责人确认事宜", new Font(PDFUtil.baseFont, 10)); + confirm.setAlignment(Element.ALIGN_CENTER); + cell = new PdfPCell(confirm); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(2); + cell.setRowspan(4); + table.addCell(cell); + + Paragraph condition1 = new Paragraph("1.承诺参赛作品为原创作品。", new Font(PDFUtil.baseFont, 10)); + condition1.setAlignment(Element.ALIGN_LEFT); + cell = new PdfPCell(condition1); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setPaddingTop(20); + cell.setPaddingLeft(20); + cell.setColspan(11); + cell.setBorderWidthTop(0); + cell.setBorderWidthBottom(0); + cell.setBorderWidthLeft(0); + table.addCell(cell); + + Paragraph condition2 = new Paragraph("2.申报者有公开发表自己作品的权力,同时也同意无偿提供项目内容,由大赛组委会进行展示并收入汇编。", new Font(PDFUtil.baseFont, 10)); + condition2.setAlignment(Element.ALIGN_LEFT); + cell = new PdfPCell(condition2); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setPaddingLeft(20); + cell.setColspan(11); + cell.setBorderWidthTop(0); + cell.setBorderWidthBottom(0); + cell.setBorderWidthLeft(0); + table.addCell(cell); + + Paragraph signature = new Paragraph("团队负责人签名:", new Font(PDFUtil.baseFont, 10)); + signature.setAlignment(Element.ALIGN_LEFT); + cell = new PdfPCell(signature); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setPaddingTop(30); + cell.setPaddingBottom(10); + cell.setPaddingLeft(8); + cell.setColspan(11); + cell.setBorderWidthTop(0); + cell.setBorderWidthBottom(0); + cell.setBorderWidthLeft(0); + table.addCell(cell); + + Paragraph date = new Paragraph("年 月 日", new Font(PDFUtil.baseFont, 10)); + date.setAlignment(Element.ALIGN_RIGHT); + cell = new PdfPCell(date); + cell.setHorizontalAlignment(Element.ALIGN_RIGHT); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(11); + cell.setPaddingRight(30); + cell.setPaddingBottom(20); + cell.setBorderWidthTop(0); + cell.setBorderWidthBottom(0); + cell.setBorderWidthLeft(0); + table.addCell(cell); + + Paragraph opinion = new Paragraph("推荐学校意见", new Font(PDFUtil.baseFont, 10)); + opinion.setAlignment(Element.ALIGN_CENTER); + cell = new PdfPCell(opinion); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(2); + cell.setRowspan(3); + table.addCell(cell); + + Paragraph opinionValue = new Paragraph("", new Font(PDFUtil.baseFont, 10)); + opinionValue.setAlignment(Element.ALIGN_LEFT); + cell = new PdfPCell(opinionValue); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(11); + cell.setPadding(5); + cell.setBorderWidthLeft(0); + cell.setBorderWidthBottom(0); + cell.setFixedHeight(70); + table.addCell(cell); + + Paragraph stamp = new Paragraph("(盖章)", new Font(PDFUtil.baseFont, 10)); + stamp.setAlignment(Element.ALIGN_CENTER); + cell = new PdfPCell(stamp); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setBorderWidthTop(0); + cell.setBorderWidthLeft(0); + cell.setBorderWidthBottom(0); + cell.setColspan(11); + table.addCell(cell); + + Paragraph opinionDate = new Paragraph("年 月 日", new Font(PDFUtil.baseFont, 10)); + opinionDate.setAlignment(Element.ALIGN_RIGHT); + cell = new PdfPCell(opinionDate); + cell.setHorizontalAlignment(Element.ALIGN_RIGHT); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setPaddingRight(20); + cell.setBorderWidthTop(0); + cell.setBorderWidthLeft(0); + cell.setColspan(11); + table.addCell(cell); + + document.add(table); + document.close(); + bao.close(); + renderPdf(bao.toByteArray(), String.valueOf(System.currentTimeMillis()), "pdf"); + } catch (Exception e) { +// log.error("---PDF创建异常: " + e); + e.printStackTrace(); + throw new HttpException(10010); + } + } + + + public static void createProjectPDF(List result, String schoolName,String deadline,String matchName) { + try { + ByteArrayOutputStream bao = new ByteArrayOutputStream(); + Document document = new Document(PageSize.A4, 20, 20, 20, 20); + PdfWriter.getInstance(document, bao); + document.open(); + + Paragraph t1 = new Paragraph("附件2:", new Font(baseFont, 14, Font.BOLD)); + t1.setAlignment(Element.ALIGN_LEFT); + document.add(t1); + document.add(new Paragraph(" ")); + + Paragraph t3 = new Paragraph(matchName, new Font(baseFont, 14, Font.BOLD)); + t3.setAlignment(Element.ALIGN_CENTER); + document.add(t3); + + Paragraph teamName = new Paragraph("市级复赛项目申报汇总表" , new Font(baseFont, 14, Font.BOLD)); + teamName.setAlignment(Element.ALIGN_CENTER); + document.add(teamName); + document.add(new Paragraph(" ")); + + + Paragraph collegeName = new Paragraph("学校名称: "+ schoolName +" (盖学校公章)" , new Font(baseFont, 12, Font.BOLD)); + teamName.setAlignment(Element.ALIGN_LEFT); + document.add(collegeName); + document.add(new Paragraph(" ")); + + //开始画表 + PdfPTable table = new PdfPTable(26); + table.setTotalWidth(560); + table.setLockedWidth(true); +// PDFUtil.tableStyle(new PdfPTable(22), new int[22]); + PdfPCell cell; + + Paragraph teacherTitle = new Paragraph("序号", new Font(PDFUtil.baseFont, 10,Font.BOLD)); + cell = new PdfPCell(teacherTitle); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(2); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph name = new Paragraph("项目名称", new Font(PDFUtil.baseFont, 10,Font.BOLD)); + cell = new PdfPCell(name); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(4); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph projectType = new Paragraph("赛道组别", new Font(PDFUtil.baseFont, 10,Font.BOLD)); + cell = new PdfPCell(projectType); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(3); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph leader = new Paragraph("负责人姓名", new Font(PDFUtil.baseFont, 10,Font.BOLD)); + cell = new PdfPCell(leader); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(3); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph phone = new Paragraph("负责人手机", new Font(PDFUtil.baseFont, 10,Font.BOLD)); + cell = new PdfPCell(phone); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(3); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph leaderName = new Paragraph("成员姓名", new Font(PDFUtil.baseFont, 10,Font.BOLD)); + cell = new PdfPCell(leaderName); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(8); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + Paragraph teacher = new Paragraph("指导教师", new Font(PDFUtil.baseFont, 10,Font.BOLD)); + cell = new PdfPCell(teacher); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(3); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + + for (int i = 0; i < result.size(); i++) { + + //序号 + Paragraph partner = new Paragraph(""+ (i + 1), new Font(PDFUtil.baseFont, 10)); + partner.setAlignment(Element.ALIGN_CENTER); + cell = new PdfPCell(partner); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(2); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + //项目名称 + Paragraph userName = new Paragraph(result.get(i).getProjectName()== null ? "" : result.get(i).getProjectName(), new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(userName); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(4); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + //组别 + Paragraph memberInfo = new Paragraph(result.get(i).getProjectProgress() == null ? "" : result.get(i).getProjectProgress(), new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(memberInfo); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(3); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + //负责人姓名 + Paragraph leaderNameTmp = new Paragraph(result.get(i).getName() == null ? "" : result.get(i).getName(), new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(leaderNameTmp); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(3); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + //负责人手机 + Paragraph leaderPhoneTmp = new Paragraph(result.get(i).getTelephone() == null ? "" : result.get(i).getTelephone(), new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(leaderPhoneTmp); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(3); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + //member + Paragraph memberName = new Paragraph(result.get(i).getTeamMember() == null ? "" : result.get(i).getTeamMember(), new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(memberName); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(8); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + + //指导教师 + Paragraph zhidaojiaoshi = new Paragraph(result.get(i).getMentor() == null ? "" : result.get(i).getMentor(), new Font(PDFUtil.baseFont, 10)); + cell = new PdfPCell(zhidaojiaoshi); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); + cell.setColspan(3); + cell.setPaddingTop(5); + cell.setPaddingBottom(5); + table.addCell(cell); + } + + document.add(table); + + + Paragraph blank = new Paragraph("", new Font(baseFont, 32, Font.BOLD)); + blank.setAlignment(Element.ALIGN_LEFT); + document.add(blank); + document.add(new Paragraph(" ")); + + + + Paragraph thirdPart = new Paragraph("备注: 纸质盖章版请于"+deadline+"前快递到组委会办公室" + + "(冠生园路401号2号楼208室 周欢老师收,联系电话 021-64822115),逾期视为放弃比赛。", new Font(baseFont, 12, Font.NORMAL)); + document.add(thirdPart); + document.add(new Paragraph(" ")); + + document.close(); + bao.close(); + renderPdf(bao.toByteArray(), String.valueOf(System.currentTimeMillis()), "pdf"); + } catch (Exception e) { + log.error("---PDF创建异常: " + e); + e.printStackTrace(); + throw new HttpException(10010); + } + } + + public static void tableStyle(PdfPTable table, int[] cellsWidth) throws DocumentException { + table.setWidths(cellsWidth); + table.setWidthPercentage(100); + table.getDefaultCell().setHorizontalAlignment(Element.ALIGN_CENTER); + table.getDefaultCell().setVerticalAlignment(Element.ALIGN_MIDDLE); + table.getDefaultCell().setFixedHeight(30); + table.getDefaultCell().setBackgroundColor(BaseColor.BLUE); + table.getDefaultCell().setPadding(0); + table.getDefaultCell().setBorderWidth(0); + } + + /** + * 流化下载 + * + * @param bytes + * @param filename + */ + public static void renderPdf(final byte[] bytes, final String filename, String type) { + ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); + HttpServletResponse response = servletRequestAttributes.getResponse(); + initResponseHeader(response, "application/" + type); + setFileDownloadHeader(response, filename, "." + type); + if (null != bytes) { + try { + response.getOutputStream().write(bytes); + response.getOutputStream().flush(); + } catch (IOException e) { + throw new IllegalArgumentException(e); + } + } + } + + /** + * 分析并设置contentType与headers. + */ + private static HttpServletResponse initResponseHeader(HttpServletResponse response, final String contentType, final String... headers) { + // 分析headers参数 + String encoding = "utf-8"; + boolean noCache = true; + for (String header : headers) { + String headerName = StringUtils.substringBefore(header, ":"); + String headerValue = StringUtils.substringAfter(header, ":"); + if (StringUtils.equalsIgnoreCase(headerName, "utf-8")) { + encoding = headerValue; + } else if (StringUtils.equalsIgnoreCase(headerName, "no-cache")) { + noCache = Boolean.parseBoolean(headerValue); + } else { + throw new IllegalArgumentException(headerName + "不是一个合法的header类型"); + } + } + // 设置headers参数 + String fullContentType = contentType + ";charset=" + encoding; + response.setContentType(fullContentType); + if (noCache) { + // Http 1.0 header + response.setDateHeader("Expires", 0); + response.addHeader("Pragma", "no-cache"); + // Http 1.1 header + response.setHeader("Cache-Control", "no-cache"); + } + return response; + } + + /** + * 设置让浏览器弹出下载对话框的Header. + * + * @param + */ + public static void setFileDownloadHeader(HttpServletResponse response, String fileName, String fileType) { + try { + // 中文文件名支持 + String encodedfileName = new String(fileName.getBytes(StandardCharsets.UTF_8), "ISO8859-1"); + response.setHeader("Content-Disposition", "attachment; filename=\"" + encodedfileName + fileType + "\""); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/zhongzhi/common/utils/RandomUtil.java b/src/main/java/com/zhongzhi/common/utils/RandomUtil.java new file mode 100644 index 0000000..fed1563 --- /dev/null +++ b/src/main/java/com/zhongzhi/common/utils/RandomUtil.java @@ -0,0 +1,58 @@ +package com.zhongzhi.common.utils; + +import java.util.Date; +import java.util.Random; + +public class RandomUtil { + + public static int getCode() { + return (int) ((Math.random() * 9 + 1) * 100000); + } + + public static String randomPass(Integer count) { + StringBuffer stringBuffer = new StringBuffer(); + Random random = new Random(new Date().getTime()); + String flag = type[random.nextInt(type.length)]; + int length = count; + for (int i = 0; i < length; i++) { + switch (flag) { + case "word": + stringBuffer.append(word[random.nextInt(word.length)]); + break; + case "num": + stringBuffer.append(num[random.nextInt(num.length)]); + break; + case "symbol": + stringBuffer.append(symbol[random.nextInt(symbol.length)]); + break; + default: + break; + } + flag = type[random.nextInt(type.length)]; + } + return stringBuffer.toString(); + } + + public final static String[] type = { + "word", "num", "symbol" + }; + + public final static String[] word = { + "a", "b", "c", "d", "e", "f", "g", + "h", "j", "k", "m", "n", + "p", "q", "r", "s", "t", + "u", "v", "w", "x", "y", "z", + "A", "B", "C", "D", "E", "F", "G", + "H", "J", "K", "M", "N", + "P", "Q", "R", "S", "T", + "U", "V", "W", "X", "Y", "Z" + }; + + public final static String[] num = { + "1", "2", "3", "4", "5", "6", "7", "8", "9" + }; + + public final static String[] symbol = { + "!", "@", "#", "$", "%", "&" + }; +} diff --git a/src/main/java/com/zhongzhi/common/utils/ResponseData.java b/src/main/java/com/zhongzhi/common/utils/ResponseData.java new file mode 100644 index 0000000..2c8b207 --- /dev/null +++ b/src/main/java/com/zhongzhi/common/utils/ResponseData.java @@ -0,0 +1,55 @@ +package com.zhongzhi.common.utils; + +import com.zhongzhi.common.configure.RemoteProperties; +import com.zhongzhi.vo.ResponseVO; +import lombok.Data; +import org.springframework.boot.context.properties.EnableConfigurationProperties; + +/** + * 返回数据 + * + * @author DengMin + * @date 2019/08/27 13:57 + **/ +@Data +@EnableConfigurationProperties(RemoteProperties.class) +public class ResponseData { + + public static ResponseVO generateCreatedResponse(int code) { + return (ResponseVO) ResponseVO.builder() + .code(code) + .message(RemoteProperties.getMessage(code)) + .build(); + } + + public static ResponseVO generateCreatedResponse(int code, String message) { + return (ResponseVO) ResponseVO.builder() + .code(code) + .message(message) + .build(); + } + + public static ResponseVO generateCreatedResponse(int code, T data) { + return (ResponseVO) ResponseVO.builder() + .code(code) + .message(RemoteProperties.getMessage(code)) + .data(data) + .build(); + } + + public static ResponseVO generateCreatedResponse(int code, String message, T data) { + return (ResponseVO) ResponseVO.builder() + .code(code) + .message(message) + .data(data) + .build(); + } + + public static ResponseVO generateCreatedResponse(int code, String message, String path) { + return (ResponseVO) ResponseVO.builder() + .code(code) + .message(message) + .path(path) + .build(); + } +} \ No newline at end of file diff --git a/src/main/java/com/zhongzhi/common/utils/SMSSendUtils.java b/src/main/java/com/zhongzhi/common/utils/SMSSendUtils.java new file mode 100644 index 0000000..199b677 --- /dev/null +++ b/src/main/java/com/zhongzhi/common/utils/SMSSendUtils.java @@ -0,0 +1,208 @@ +package com.zhongzhi.common.utils; + +import com.alibaba.fastjson.JSON; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.codec.digest.HmacAlgorithms; +import org.apache.commons.codec.digest.HmacUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.http.HttpResponse; +import org.apache.http.HttpVersion; +import org.apache.http.client.fluent.Request; +import org.apache.http.entity.ContentType; +import springfox.documentation.service.ApiKey; + +import java.io.IOException; +import java.util.*; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.locks.ReentrantLock; +import java.util.stream.Collectors; + +/*** + * 短信发送工具类 + */ +@Slf4j +public class SMSSendUtils { + /** + * 短信平台接口配置中申请,替换为企业自己的API_KEY + */ + private static String API_KEY = "01b0312e7d016d2af41a47e5ba2c2748"; + /** + * 短信平台接口配置中申请,替换为企业自己的SECRET_KEY + */ + private static String SECRET_KEY = "bd985a3772ca3b362f8b049a3017b6edac604815e34be96631513e29afbcac47"; + + private static final String DOMAIN = "https://opassapi.infocloud.cc/"; + private static final String MESSAGE_SEND="message/send"; + private static final String MESSAGE_SEND_BATCH = "message/sendBatch"; + + public static String SMS_API_KEY = "sms.api.key"; + public static String SMS_SECRET_KEY = "sms.secret.key"; + public static final int CONNECT_TIMEOUT= 30_000; + public static final int SOCKET_TIMEOUT = 15_000; + + private static ReentrantLock lock = new ReentrantLock(true); + private static AtomicBoolean init = new AtomicBoolean(false); + + static void init(){ +// String apiKey = API_KEY; +// String secretKey = SECRET_KEY; +// System.setProperty(SMSSendUtils.SMS_API_KEY,API_KEY); +// System.setProperty(SMSSendUtils.SMS_SECRET_KEY,SECRET_KEY); +// if(StringUtils.isAnyEmpty(apiKey,secretKey)){ +// throw new NullPointerException("短信发送apiKey、secretKey不能为空。\n解决方式:\n1.代码设置。" + +// "System.setProperty(SMSSendUtils.SMS_API_KEY,\"从短信平台接口配置中获取\");" + +// "System.setProperty(SMSSendUtils.SMS_SECRET_KEY,\"从短信平台接口配置中获取\");\n" + +// "2.启动配置。java -Dsms.api.key=xx -Dsms.secret.key=xxx"); +// } +// API_KEY = apiKey; +// SECRET_KEY = secretKey; + } + + private SMSSendUtils(){} + /** + * 短信发送。无参短信模板内容发送,即所有手机号接收到的短信内容一样 + * @param templateCode + * @param phones 手机号。手机号最大个数限制1000 + * @return + */ + public static HttpResponse send(String templateCode, String ...phones) throws IOException { + + return send(templateCode,null,phones); + } + + /** + * 短信发送。不同手机号对应相同的短信模板变量值,即所有手机号接收到的短信内容一样 + * @param templateCode + * @param params 模板参数变量值 + * @param phones 手机号。手机号最大个数限制1000 + * @return + */ + public static HttpResponse send(String templateCode, LinkedList params, String ... phones) throws IOException { + //手机号先去重,然后再转换 + return sendBatch(templateCode,params!=null&&!params.isEmpty()?JSON.toJSONString(params):null,Arrays.stream(phones).collect(Collectors.toSet()).stream().collect(Collectors.joining(",")), false); + } + + + /** + * 短信发送 + * @param templateCode 模板ID + * @param paramsJson 模板参数 + * @param phonesJson 手机号 + * @param batch true:使用MESSAGE_SEND_BATCH接口发送;false:使用MESSAGE_SEND接口发送 + * @return HttpResponse + * @throws IOException + */ + private static HttpResponse sendBatch(String templateCode,String paramsJson,String phonesJson,boolean batch) throws IOException { + if(StringUtils.isAnyEmpty(templateCode)){ + throw new NullPointerException("模板id或手机号不能为空"); + } + + Map headers = getHeaders(); + Map bodyParams = new HashMap<>(4); + + if(batch){ + if(StringUtils.isAnyEmpty(paramsJson)){ + throw new NullPointerException("短信发送所有手机号接收到的短信内容不一样时,模板参数值不能为空"); + } + bodyParams.put("phonesJson", phonesJson); + //模板变量内容 + bodyParams.put("templateParamJson", paramsJson); + }else{ + bodyParams.put("phones", phonesJson); + //模板变量内容 + if(StringUtils.isNotEmpty(paramsJson)) { + bodyParams.put("templateParam", paramsJson); + } + } + bodyParams.put("templateCode", templateCode); + + //排序 +// bd985a3772ca3b362f8b049a3017b6edac604815e34be96631513e29afbcac47 + + SortedMap sortedMap = new TreeMap<>(bodyParams); + headers.forEach((k, v) -> sortedMap.put(k, v)); + //生成签名 + headers.put("x-sign", getSignature(SECRET_KEY, sortedMap, HmacAlgorithms.HMAC_SHA_224)); + + Request request = Request.Post(DOMAIN+(batch?MESSAGE_SEND_BATCH:MESSAGE_SEND)) + .version(HttpVersion.HTTP_1_1) + //设置连接超时 + .connectTimeout(CONNECT_TIMEOUT) + //设置文本读取超时 + .socketTimeout(SOCKET_TIMEOUT); + headers.forEach((k,v)->request.addHeader(k,String.valueOf(v))); + + + return request.bodyString(JSON.toJSONString(bodyParams), ContentType.APPLICATION_JSON) + .execute() + .returnResponse(); + } + + private static Map getHeaders(){ + if(init.get()==false){ + lock.lock(); + try { + if(init.get()==false) { + init.set(true); + init(); + } + }catch (Exception e){ + throw e; + }finally { + lock.unlock(); + } + } + + Map headers = new HashMap<>(); + headers.put("x-api-key", API_KEY); + headers.put("x-sign-method", HmacAlgorithms.HMAC_SHA_224.getName()); + headers.put("x-nonce", getRandomNickname(10)); + headers.put("x-timestamp", String.valueOf(System.currentTimeMillis())); + return headers; + } + + /** + * 签名生成 + * @param secret + * @param sortedMap + * @param hmacAlgorithms + * @return + */ + private static String getSignature(String secret, SortedMap sortedMap, HmacAlgorithms hmacAlgorithms) { + // 将参数拼接为字符串 + // e.g. "key1=value1&key2=value2" + StringBuffer plainText = new StringBuffer(); + for (Map.Entry entry : sortedMap.entrySet()) { + plainText.append(entry.getKey() + "=" + entry.getValue()); + plainText.append("&"); + } + if(StringUtils.isNotEmpty(plainText)) { + plainText.deleteCharAt(plainText.length() - 1); + } + log.info("\n加密方式:{} \n排序后的请求参数:{}",hmacAlgorithms.getName(),plainText); + return new HmacUtils(hmacAlgorithms, secret).hmacHex(plainText.toString()); + } + + /** + * 随机数生成 + * @param length + * @return + */ + private static String getRandomNickname(int length) { + String val = ""; + Random random = new Random(); + for (int i = 0; i < length; i++) { + // 输出字母还是数字 + String charOrNum = random.nextInt(2) % 2 == 0 ? "char" : "num"; + // 字符串 + if ("char".equalsIgnoreCase(charOrNum)) { + // 取得大写字母还是小写字母 + int choice = random.nextInt(2) % 2 == 0 ? 65 : 97; + val += (char) (choice + random.nextInt(26)); + } else if ("num".equalsIgnoreCase(charOrNum)) { // 数字 + val += String.valueOf(random.nextInt(10)); + } + } + return val; + } +} diff --git a/src/main/java/com/zhongzhi/common/utils/Signature.java b/src/main/java/com/zhongzhi/common/utils/Signature.java new file mode 100644 index 0000000..420d39b --- /dev/null +++ b/src/main/java/com/zhongzhi/common/utils/Signature.java @@ -0,0 +1,83 @@ +package com.zhongzhi.common.utils; + +import sun.misc.BASE64Encoder; + +import javax.crypto.Mac; +import javax.crypto.spec.SecretKeySpec; +import java.nio.charset.StandardCharsets; + +/** + * @author: tuyp + * @create: 2020-07-29 12:42 + */ +public class Signature { + private String secretId; + private String secretKey; + private long currentTime; + private int random; + private int signValidDuration; + private int classId; + + private static final String HMAC_ALGORITHM = "HmacSHA1"; + private static final String CONTENT_CHARSET = "UTF-8"; + + public static byte[] byteMerger(byte[] byte1, byte[] byte2) { + byte[] byte3 = new byte[byte1.length + byte2.length]; + System.arraycopy(byte1, 0, byte3, 0, byte1.length); + System.arraycopy(byte2, 0, byte3, byte1.length, byte2.length); + return byte3; + } + + public String getUploadSignature() throws Exception { + String strSign = ""; + String contextStr = ""; + + long endTime = (currentTime + signValidDuration); + contextStr += "secretId=" + java.net.URLEncoder.encode(secretId, "utf8"); + contextStr += "¤tTimeStamp=" + currentTime; + contextStr += "&expireTime=" + endTime; + contextStr += "&random=" + random; + contextStr += "&classId=" + classId; + + try { + Mac mac = Mac.getInstance(HMAC_ALGORITHM); + SecretKeySpec secretKey = new SecretKeySpec(this.secretKey.getBytes(CONTENT_CHARSET), mac.getAlgorithm()); + mac.init(secretKey); + + byte[] hash = mac.doFinal(contextStr.getBytes(CONTENT_CHARSET)); + byte[] sigBuf = byteMerger(hash, contextStr.getBytes(StandardCharsets.UTF_8)); + strSign = base64Encode(sigBuf); + strSign = strSign.replace(" ", "").replace("\n", "").replace("\r", ""); + } catch (Exception e) { + throw e; + } + return strSign; + } + + private String base64Encode(byte[] buffer) { + BASE64Encoder encoder = new BASE64Encoder(); + return encoder.encode(buffer); + } + + public void setSecretId(String secretId) { + this.secretId = secretId; + } + + public void setSecretKey(String secretKey) { + this.secretKey = secretKey; + } + + public void setCurrentTime(long currentTime) { + this.currentTime = currentTime; + } + + public void setRandom(int random) { + this.random = random; + } + + public void setSignValidDuration(int signValidDuration) { + this.signValidDuration = signValidDuration; + } + + public void setClassId(int classId){this.classId = classId;} +} diff --git a/src/main/java/com/zhongzhi/common/utils/SysLog.java b/src/main/java/com/zhongzhi/common/utils/SysLog.java new file mode 100644 index 0000000..b04fc15 --- /dev/null +++ b/src/main/java/com/zhongzhi/common/utils/SysLog.java @@ -0,0 +1,19 @@ +package com.zhongzhi.common.utils; + +import java.lang.annotation.*; + +/** + *

+ * 自定义日志注解 + *

+ * + * @author DengMin + * @since 2020/12/18 + */ +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface SysLog { + + String value() default ""; +} diff --git a/src/main/java/com/zhongzhi/common/utils/VodUtil.java b/src/main/java/com/zhongzhi/common/utils/VodUtil.java new file mode 100644 index 0000000..9c61ea2 --- /dev/null +++ b/src/main/java/com/zhongzhi/common/utils/VodUtil.java @@ -0,0 +1,116 @@ +package com.zhongzhi.common.utils; + +import com.tencentcloudapi.common.Credential; +import com.tencentcloudapi.common.exception.TencentCloudSDKException; +import com.tencentcloudapi.common.profile.ClientProfile; +import com.tencentcloudapi.common.profile.HttpProfile; +import com.tencentcloudapi.vod.v20180717.VodClient; +import com.tencentcloudapi.vod.v20180717.models.*; +import com.zhongzhi.common.configure.VODConfig; +import com.zhongzhi.common.exception.HttpException; +import org.springframework.stereotype.Component; + +/** + *

+ * 腾讯云 - 云点播API + *

+ * + * @author DengMin + * @since 2022/8/1 + */ +@Component +public class VodUtil { + + private static String endpoint = "vod.tencentcloudapi.com"; + + /** + * 根据视频模版进行转码 + * @param vodCode + * @return + */ + public static ProcessMediaResponse processMedia(VODConfig vodConfig, String vodCode) { + try { + //上传后直接转码 + Credential cred = new Credential(vodConfig.getSecretId(), vodConfig.getSecretKey()); + HttpProfile httpProfile = new HttpProfile(); + httpProfile.setEndpoint(endpoint); + + ClientProfile clientProfile = new ClientProfile(); + clientProfile.setHttpProfile(httpProfile); + + VodClient client = new VodClient(cred, "", clientProfile); + + ProcessMediaRequest processMediaRequest = new ProcessMediaRequest(); + MediaProcessTaskInput mediaProcessTaskInput1 = new MediaProcessTaskInput(); + TranscodeTaskInput[] transcodeTaskInputs1 = new TranscodeTaskInput[1]; + TranscodeTaskInput transcodeTaskInput1 = new TranscodeTaskInput(); + transcodeTaskInput1.setDefinition(100030L); + transcodeTaskInputs1[0] = transcodeTaskInput1; + mediaProcessTaskInput1.setTranscodeTaskSet(transcodeTaskInputs1); + processMediaRequest.setMediaProcessTask(mediaProcessTaskInput1); + processMediaRequest.setFileId(vodCode); + return client.ProcessMedia(processMediaRequest); + } catch (Exception ex) { + throw new HttpException(50001); + } + } + + /** + * 删除腾讯云上原视频 + * @param vodCode + */ + public static void deleteMedia(VODConfig vodConfig, String vodCode) { + try { + //删除原视频 + Credential cred = new Credential(vodConfig.getSecretId(), vodConfig.getSecretKey()); + HttpProfile httpProfile = new HttpProfile(); + httpProfile.setEndpoint(endpoint); + + ClientProfile clientProfile = new ClientProfile(); + clientProfile.setHttpProfile(httpProfile); + + VodClient client = new VodClient(cred, "", clientProfile); + // 实例化一个请求对象,每个接口都会对应一个request对象 + DeleteMediaRequest req = new DeleteMediaRequest(); + req.setFileId(vodCode); + // 返回的resp是一个DeleteMediaResponse的实例,与请求对象对应 + client.DeleteMedia(req); + } catch (TencentCloudSDKException e) { + throw new HttpException(99999, e.getMessage()); + } + } + + /** + * 云点播域名的CDN统计数据 + * @param vodConfig + * @param DataType + * @param startTime + * @param endTime + * @return + */ + public static StatDataItem[] DescribeCDNStatDetails(VODConfig vodConfig, String DataType, String startTime, String endTime) { + try { + Credential cred = new Credential(vodConfig.getSecretId(), vodConfig.getSecretKey()); + // 实例化一个http选项,可选的,没有特殊需求可以跳过 + HttpProfile httpProfile = new HttpProfile(); + httpProfile.setEndpoint(endpoint); + // 实例化一个client选项,可选的,没有特殊需求可以跳过 + ClientProfile clientProfile = new ClientProfile(); + clientProfile.setHttpProfile(httpProfile); + // 实例化要请求产品的client对象,clientProfile是可选的 + VodClient client = new VodClient(cred, "", clientProfile); + // 实例化一个请求对象,每个接口都会对应一个request对象 + DescribeCDNUsageDataRequest req = new DescribeCDNUsageDataRequest(); + req.setStartTime(startTime); + req.setEndTime(endTime); + req.setDataType(DataType); + // 返回的resp是一个DescribeCDNUsageDataResponse的实例,与请求对象对应 + DescribeCDNUsageDataResponse resp = client.DescribeCDNUsageData(req); + // 返回的resp是一个DescribeCDNStatDetailsResponse的实例,与请求对象对应 + return resp.getData(); + } catch (TencentCloudSDKException e) { + e.printStackTrace(); + throw new HttpException(99999, e.getMessage()); + } + } +} diff --git a/src/main/java/com/zhongzhi/controller/AdministerController.java b/src/main/java/com/zhongzhi/controller/AdministerController.java new file mode 100644 index 0000000..ca6a439 --- /dev/null +++ b/src/main/java/com/zhongzhi/controller/AdministerController.java @@ -0,0 +1,71 @@ +package com.zhongzhi.controller; + +import com.zhongzhi.common.constant.Platform; +import com.zhongzhi.common.utils.LoginRequired; +import com.zhongzhi.common.utils.ResponseData; +import com.zhongzhi.dto.administer.AdministerPageDTO; +import com.zhongzhi.dto.administer.LoginDTO; +import com.zhongzhi.model.AdministerDO; +import com.zhongzhi.service.AdministerService; +import com.zhongzhi.vo.ResponseVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + *

+ * 中心管理账户表 前端控制器 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +@RestController +@Api(tags = "中心管理账户") +@RequestMapping("/administer") +public class AdministerController { + + @Autowired + private AdministerService administerService; + + @PostMapping(value = "/login") + @ApiOperation("中心端 --- 登录:手机号/telephone, code/验证码") + public ResponseVO login(@RequestBody LoginDTO loginDTO) { + return ResponseData.generateCreatedResponse(0, administerService.login(loginDTO)); + } + + @PostMapping(value = "/getAdministerPage") + @LoginRequired({Platform.center}) + @ApiOperation("中心端 --- 成员管理分页查询:listItem/角色、 username/搜索名称、pageNo/当前页数、pageSize/每页显示条数") + public ResponseVO getAdministerPage(@RequestBody AdministerPageDTO administerPageDTO) { + return ResponseData.generateCreatedResponse(0, administerService.getAdministerPage(administerPageDTO)); + } + + @PostMapping(value = "/createAdminister") + @LoginRequired({Platform.center}) + @ApiOperation("中心端 --- 新增成员:username/名称、telephone/手机号、avatar/头像、role/角色") + public ResponseVO createAdminister(@RequestBody AdministerDO administerDO) { + administerService.save(administerDO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/updateAdminister") + @LoginRequired({Platform.center}) + @ApiOperation("中心端 --- 编辑成员:id/成员ID、username/名称、telephone/手机号、avatar/头像、role/角色") + public ResponseVO updateAdminister(@RequestBody AdministerDO administerDO) { + administerService.updateById(administerDO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/deleteById") + @LoginRequired({Platform.center}) + @ApiOperation("中心端 --- 删除成员:id/成员ID") + public ResponseVO delete(@RequestBody AdministerDO administerDO) { + administerService.removeById(administerDO.getId()); + return ResponseData.generateCreatedResponse(0); + } +} diff --git a/src/main/java/com/zhongzhi/controller/AdministerPermissionController.java b/src/main/java/com/zhongzhi/controller/AdministerPermissionController.java new file mode 100644 index 0000000..36ce519 --- /dev/null +++ b/src/main/java/com/zhongzhi/controller/AdministerPermissionController.java @@ -0,0 +1,20 @@ +package com.zhongzhi.controller; + +import io.swagger.annotations.Api; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + *

+ * 系统用户权限表 前端控制器 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +@RestController +@Api(tags = "用户权限") +@RequestMapping("/administerPermission") +public class AdministerPermissionController { + +} diff --git a/src/main/java/com/zhongzhi/controller/CollegesDictController.java b/src/main/java/com/zhongzhi/controller/CollegesDictController.java new file mode 100644 index 0000000..2ca0168 --- /dev/null +++ b/src/main/java/com/zhongzhi/controller/CollegesDictController.java @@ -0,0 +1,278 @@ +package com.zhongzhi.controller; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.zhongzhi.common.constant.Platform; +import com.zhongzhi.common.utils.LoginRequired; +import com.zhongzhi.common.utils.ResponseData; +import com.zhongzhi.dto.college.*; +import com.zhongzhi.dto.project.EditStatusDTO; +import com.zhongzhi.model.*; +import com.zhongzhi.service.CollegesDictService; +import com.zhongzhi.vo.ResponseVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import java.net.ResponseCache; + +/** + *

+ * 院校字典表 前端控制器 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +@RestController +@Api(tags = "就读院校") +@RequestMapping("/collegesDict") +public class CollegesDictController { + + @Autowired + public CollegesDictService collegesDictService; + + @PostMapping(value = "/getCollegesList") + @ApiOperation("查询所有就读院校: name/院校名称, education/学历") + public ResponseVO getCollegesList(@RequestBody CollegesDictDTO collegesDictDTO) { + QueryWrapper queryWrapper = new QueryWrapper(); + if (StringUtils.isNotBlank(collegesDictDTO.getEducation())) { + if ("中职".equals(collegesDictDTO.getEducation())){ + queryWrapper.lambda().eq(CollegesDictDO::getEducation, collegesDictDTO.getEducation()); + }else { + queryWrapper.lambda().like(CollegesDictDO::getEducation, collegesDictDTO.getEducation()); + } + } + + if (StringUtils.isNotBlank(collegesDictDTO.getName())) { + queryWrapper.lambda().like(CollegesDictDO::getName, collegesDictDTO.getName()); + } + queryWrapper.lambda().eq(CollegesDictDO::getLoginStatus,1); + return ResponseData.generateCreatedResponse(0, collegesDictService.list(queryWrapper)); + } + + @PostMapping(value = "/login") + @ApiOperation("院校端 --- 登录: account/账户, password/密码") + public ResponseVO login(@RequestBody LoginDTO loginDTO) { + return ResponseData.generateCreatedResponse(0, collegesDictService.login(loginDTO)); + } + + @PostMapping(value = "updateCollegeById") + @LoginRequired({Platform.center}) + @ApiOperation("院校端 --- 更新院校信息: id/ID, account/账户,code/代码, name/名称, password/密码") + public ResponseVO updateCollegeById(@RequestBody CollegesDictDO collegesDictDO) { + collegesDictService.updateById(collegesDictDO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "addContact") + @LoginRequired({Platform.school}) + @ApiOperation("院校端 --- 新增联系人:leaderName/领导姓名、leaderPost/领导职务、leaderPhone/领导手机号、contactName/联系人姓名、contactPost/联系人职务、contactPhone/联系人手机号") + public ResponseVO addContact(@RequestBody CollegesDictDO collegesDictDO) { + collegesDictService.addContact(collegesDictDO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/updatePwd") + @LoginRequired(Platform.school) + @ApiOperation("院校端 --- 修改密码: password/密码") + public ResponseVO updatePwd(@RequestBody UpdatePwdDTO updatePwdDTO) { + collegesDictService.updatePwd(updatePwdDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/projects") + @LoginRequired(Platform.school) + @ApiOperation("##院校端 --- 查看某个院校进决赛的项目(除去已经登记过的) matchId ") + public ResponseVO projects(@RequestBody ProjectDO projectDO) { + return ResponseData.generateCreatedResponse(0,collegesDictService.projects(projectDO)); + } + + @PostMapping("projectLeader") + @LoginRequired(Platform.school) + @ApiOperation("##院校端---自动带出负责人 projectId ") + public ResponseVO projectLeader(@RequestBody ProjectMemberDO projectMemberDO){ + return ResponseData.generateCreatedResponse(0,collegesDictService.projectLeader(projectMemberDO)); + } + + @PostMapping("projectMembers") + @LoginRequired(Platform.school) + @ApiOperation("##院校端---进决赛的项目下的成员 projectId ") + public ResponseVO projectMembers(@RequestBody ProjectMemberDO projectMemberDO){ + return ResponseData.generateCreatedResponse(0,collegesDictService.projectMembers(projectMemberDO)); + } + + @PostMapping("addProjectMember") + @LoginRequired({Platform.school}) + @ApiOperation("##院校端---添加参赛人员 matchId studentIds[] 人员id projectId matchId") + public ResponseVO addProjectMember(@RequestBody AddProjectMemberDTO addProjectMemberDTO)throws Exception{ + collegesDictService.addProjectMember(addProjectMemberDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping("removeProject") + @LoginRequired({Platform.school,Platform.center}) + @ApiOperation("##院校端---移除参赛人员 projectId matchId") + public ResponseVO removeProject(@RequestBody AddProjectMemberDTO addProjectMemberDTO)throws Exception{ + collegesDictService.removeProject(addProjectMemberDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping("addObservations") + @LoginRequired(Platform.school) + @ApiOperation("##院校端---添加观摩人员/学校领队 matchId memberType 观摩人员/学校领队/车 userName 人名/车牌号 telephone idCardType idCard") + public ResponseVO addObservations(@RequestBody FinalMatchMemberDO finalMatchMemberDO)throws Exception { + collegesDictService.addObservations(finalMatchMemberDO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping("updateObservations") + @LoginRequired({Platform.school,Platform.center}) + @ApiOperation("##院校端---修改观摩人员 matchId id userName telephone idCardType idCard") + public ResponseVO updateObservations(@RequestBody FinalMatchMemberDO finalMatchMemberDO)throws Exception{ + collegesDictService.updateObservations(finalMatchMemberDO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping("deleteObservations") + @LoginRequired({Platform.school,Platform.center}) + @ApiOperation("##院校端---删除观摩人员 id matchId ") + public ResponseVO deleteObservations(@RequestBody FinalMatchMemberDO finalMatchMemberDO)throws Exception{ + collegesDictService.deleteObservations(finalMatchMemberDO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping("registerMembers") + @LoginRequired({Platform.school,Platform.center}) + @ApiOperation("##查看已登记的参赛人员 collegeId matchId ") + public ResponseVO registerMembers(@RequestBody RegisterMembersDTO registerMembersDTO){ + return ResponseData.generateCreatedResponse(0,collegesDictService.registerMembers(registerMembersDTO)); + } + + @PostMapping("otherMembers") + @LoginRequired({Platform.school,Platform.center}) + @ApiOperation("##查看已登记的其他人员 collegeId matchId") + public ResponseVO otherMembers(@RequestBody RegisterMembersDTO registerMembersDTO){ + return ResponseData.generateCreatedResponse(0,collegesDictService.otherMembers(registerMembersDTO)); + } + + @PostMapping("cars") + @LoginRequired({Platform.school,Platform.center}) + @ApiOperation("##查看已登记的车辆 collegeId matchId") + public ResponseVO cars(@RequestBody RegisterMembersDTO registerMembersDTO){ + return ResponseData.generateCreatedResponse(0,collegesDictService.cars(registerMembersDTO)); + } + + @PostMapping("details") + @LoginRequired({Platform.school,Platform.center}) + @ApiOperation("##截至时间+最近一次更新时间 id matchId ") + public ResponseVO details(@RequestBody RegisterMembersDTO registerMembersDTO){ + return ResponseData.generateCreatedResponse(0,collegesDictService.detail(registerMembersDTO)); + } + + @PostMapping("schools") + @LoginRequired(Platform.center) + @ApiOperation("##这届登记的院校+人员数 matchId name") + public ResponseVO schools(@RequestBody RegisterMembersDTO registerMembersDTO){ + return ResponseData.generateCreatedResponse(0,collegesDictService.schools(registerMembersDTO)); + } + + @PostMapping("exportList") + @LoginRequired(Platform.center) + @ApiOperation("##导出总名单 id 届数id collegeId") + public ResponseVO exportList(@RequestBody FinalMatchMemberDO finalMatchMemberDO){ + collegesDictService.exportList(finalMatchMemberDO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/getCollegesPage") + @LoginRequired(Platform.center) + @ApiOperation("中心端 --- 院校名录分页查询: name/搜索名称, pageNo/当前页数, pageSize/每页显示条数") + public ResponseVO getCollegesPage(@RequestBody CollegesPageDTO collegesPageDTO) { + return ResponseData.generateCreatedResponse(0, collegesDictService.getCollegesPage(collegesPageDTO)); + } + + @PostMapping(value = "/createColleges") + @LoginRequired(Platform.center) + @ApiOperation("中心端 --- 新建院校: name/搜索名称, code/院校代码、 phone/手机号") + public ResponseVO createColleges(@RequestBody CollegesDictDO collegesDictDO) { + collegesDictService.createColleges(collegesDictDO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/delete") + @LoginRequired(Platform.center) + @ApiOperation("中心端 --- 删除院校: id/院校ID") + public ResponseVO delete(@RequestBody CollegesDictDO collegesDictDO) { + collegesDictService.removeById(collegesDictDO.getId()); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/importColleges") + @LoginRequired(Platform.center) + @ApiOperation("中心端 --- 导入院校:file/文件(数据格式:Form-Data)") + public ResponseVO importColleges(MultipartFile file) { + return ResponseData.generateCreatedResponse(0, collegesDictService.importColleges(file)); + } + + @PostMapping(value = "/downloadErrorData") + @LoginRequired(Platform.center) + @ApiOperation("中心端 --- 下载导入失败院校数据:errorData/失败数据") + public ResponseVO downloadErrorData(@RequestBody DownloadErrorDataDTO downloadErrorDataDTO) { + collegesDictService.downloadErrorData(downloadErrorDataDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/getAwardedListPage") + @LoginRequired(Platform.center) + @ApiOperation("中心端 --- 查询获奖情况:matchId/赛事年份ID、projectGroup/项目组别(科技创新、红色文创、高职、中职)、name/搜索名称、pageNo/当前页数、pageSize/每页显示条数") + public ResponseVO getAwardedList(@RequestBody AwardedListDTO awardedListDTO) { + return ResponseData.generateCreatedResponse(0, collegesDictService.getAwardedList(awardedListDTO)); + } + + @PostMapping(value = "/exportAwardedList") + @LoginRequired(Platform.center) + @ApiOperation("中心端 --- 导出获奖情况:matchId/赛事年份ID") + public void exportAwardedList(@RequestBody AwardedListDTO awardedListDTO) { + collegesDictService.exportAwardedList(awardedListDTO); + } + + @PostMapping(value = "/exportCollege") + @LoginRequired(Platform.center) + @ApiOperation("导出院校名录") + public ResponseVO exportCollege() { + collegesDictService.exportCollege(); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "updateAllLoginStatus") + @LoginRequired(Platform.center) + @ApiOperation("中心端 --- 更新所有登录状态:loginStatus/状态(0:关闭,1:开启)") + public ResponseVO updateAllLoginStatus(@RequestBody LoginStatusDTO loginStatusDTO) { + collegesDictService.updateAllLoginStatus(loginStatusDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "batchUpdateLoginStatus") + @LoginRequired(Platform.center) + @ApiOperation("中心端 --- 批量更新登录状态:ids/院校ID(数组)、loginStatus/状态(0:关闭,1:开启)") + public ResponseVO batchUpdateLoginStatus(@RequestBody LoginStatusDTO loginStatusDTO) { + collegesDictService.batchUpdateLoginStatus(loginStatusDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "updateLoginStatus") + @LoginRequired(Platform.center) + @ApiOperation("中心端 --- 更新登录状态:id/院校ID、loginStatus/状态(0:关闭,1:开启)") + public ResponseVO updateLoginStatus(@RequestBody LoginStatusDTO loginStatusDTO) { + collegesDictService.updateLoginStatus(loginStatusDTO); + return ResponseData.generateCreatedResponse(0); + } +} diff --git a/src/main/java/com/zhongzhi/controller/CourseDictController.java b/src/main/java/com/zhongzhi/controller/CourseDictController.java new file mode 100644 index 0000000..5b63682 --- /dev/null +++ b/src/main/java/com/zhongzhi/controller/CourseDictController.java @@ -0,0 +1,69 @@ +package com.zhongzhi.controller; + + +import com.zhongzhi.common.utils.ResponseData; +import com.zhongzhi.dto.course.CoursesDTO; +import com.zhongzhi.model.CourseDictDO; +import com.zhongzhi.service.CourseDictService; +import com.zhongzhi.vo.ResponseVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; + +/** + *

+ * 前端控制器 + *

+ * + * @author DengMin + * @since 2022-11-14 + */ +@RestController +@RequestMapping("/courseDict") +@Api(tags = "课程字典表") +public class CourseDictController { + + + @Autowired + private CourseDictService courseDictService; + + @PostMapping("addCourse") + @ApiOperation("添加课程 courseName") + public ResponseVO addCourse(@RequestBody CourseDictDO courseDictDO) { + courseDictService.addCourse(courseDictDO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping("updateCourse") + @ApiOperation("编辑课程 id courseName") + public ResponseVO updateCourse(@RequestBody CourseDictDO courseDictDO){ + courseDictService.updateCourse(courseDictDO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping("courses") + @ApiOperation("查询所有课程(+视频数量) pageSize pageNo courseName") + public ResponseVO courses(@RequestBody CoursesDTO coursesDTO){ + return ResponseData.generateCreatedResponse(0,courseDictService.courses(coursesDTO)); + } + + @PostMapping("deleteCourse") + @ApiOperation("删除某个课程 id 课程id") + public ResponseVO deleteCourse(@RequestBody CourseDictDO courseDictDO){ + courseDictService.deleteCourse(courseDictDO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping("courseVods") + @ApiOperation("课程+视频") + public ResponseVO courseVods(@RequestBody CourseDictDO courseDictDO){ + return ResponseData.generateCreatedResponse(0,courseDictService.courseVods(courseDictDO)); + } + + +} diff --git a/src/main/java/com/zhongzhi/controller/FinalMatchMemberController.java b/src/main/java/com/zhongzhi/controller/FinalMatchMemberController.java new file mode 100644 index 0000000..17aba84 --- /dev/null +++ b/src/main/java/com/zhongzhi/controller/FinalMatchMemberController.java @@ -0,0 +1,20 @@ +package com.zhongzhi.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; + +/** + *

+ * 前端控制器 + *

+ * + * @author DengMin + * @since 2024-07-12 + */ +@RestController +@RequestMapping("/final-match-member-do") +public class FinalMatchMemberController { + +} diff --git a/src/main/java/com/zhongzhi/controller/FundDictController.java b/src/main/java/com/zhongzhi/controller/FundDictController.java new file mode 100644 index 0000000..60a3955 --- /dev/null +++ b/src/main/java/com/zhongzhi/controller/FundDictController.java @@ -0,0 +1,22 @@ +package com.zhongzhi.controller; + + +import io.swagger.annotations.Api; +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; + +/** + *

+ * 届数表 前端控制器 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +@RestController +@Api(tags = "赛事届数") +@RequestMapping("/fundDict") +public class FundDictController { + +} diff --git a/src/main/java/com/zhongzhi/controller/ItemFieldDictController.java b/src/main/java/com/zhongzhi/controller/ItemFieldDictController.java new file mode 100644 index 0000000..d8e41d5 --- /dev/null +++ b/src/main/java/com/zhongzhi/controller/ItemFieldDictController.java @@ -0,0 +1,27 @@ +package com.zhongzhi.controller; + +import com.zhongzhi.service.ItemFieldDictService; +import com.zhongzhi.vo.ResponseVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + *

+ * 行业领域字典表 前端控制器 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +@RestController +@Api(tags = "行业领域") +@RequestMapping("/itemFieldDict") +public class ItemFieldDictController { + + @Autowired + public ItemFieldDictService itemFieldDictService; +} diff --git a/src/main/java/com/zhongzhi/controller/MajorDictController.java b/src/main/java/com/zhongzhi/controller/MajorDictController.java new file mode 100644 index 0000000..90b340b --- /dev/null +++ b/src/main/java/com/zhongzhi/controller/MajorDictController.java @@ -0,0 +1,45 @@ +package com.zhongzhi.controller; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.zhongzhi.common.utils.ResponseData; +import com.zhongzhi.model.MajorDictDO; +import com.zhongzhi.service.MajorDictService; +import com.zhongzhi.vo.ResponseVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + *

+ * 专业字典表 前端控制器 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +@RestController +@Api(tags = "就读专业") +@RequestMapping("/majorDict") +public class MajorDictController { + + @Autowired + private MajorDictService majorDictService; + + @PostMapping(value = "/getMajorList") + @ApiOperation("查询全部就读专业: major/专业名称、education/学历、code/院校代码") + public ResponseVO getMajorList(@RequestBody MajorDictDO majorDictDO) { + return ResponseData.generateCreatedResponse(0, majorDictService.list(new QueryWrapper() + .lambda() + .eq(StringUtils.isNotBlank(majorDictDO.getEducation()), MajorDictDO::getEducation, majorDictDO.getEducation()) + .eq(StringUtils.isNotBlank(majorDictDO.getCode()), MajorDictDO::getCode, majorDictDO.getCode()) + .like(StringUtils.isNotBlank(majorDictDO.getMajor()), MajorDictDO::getMajor, majorDictDO.getMajor()))); + } + +} diff --git a/src/main/java/com/zhongzhi/controller/MatchCollegePdfController.java b/src/main/java/com/zhongzhi/controller/MatchCollegePdfController.java new file mode 100644 index 0000000..bf951f7 --- /dev/null +++ b/src/main/java/com/zhongzhi/controller/MatchCollegePdfController.java @@ -0,0 +1,62 @@ +package com.zhongzhi.controller; + + +import com.zhongzhi.common.constant.Platform; +import com.zhongzhi.common.utils.LoginRequired; +import com.zhongzhi.common.utils.ResponseData; +import com.zhongzhi.dto.project.ProjectListPageDTO; +import com.zhongzhi.model.MatchCollegePdfDO; +import com.zhongzhi.service.MatchCollegePdfService; +import com.zhongzhi.vo.ResponseVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; + +/** + *

+ * 前端控制器 + *

+ * + * @author DengMin + * @since 2024-06-25 + */ +@RestController +@RequestMapping("/matchCollegePdf") +@Api(tags = "pdf") +public class MatchCollegePdfController { + + @Autowired + private MatchCollegePdfService matchCollegePdfService; + + @PostMapping("uploadPdf") + @ApiOperation("上传盖章pdf attachment matchId fileName") + @LoginRequired(Platform.school) + public ResponseVO uploadPdf(@RequestBody MatchCollegePdfDO matchCollegePdfDO) { + matchCollegePdfService.uploadPdf(matchCollegePdfDO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping("dropPdf") + @ApiOperation("删除盖章pdf matchId") + @LoginRequired(Platform.school) + public ResponseVO dropPdf(@RequestBody MatchCollegePdfDO matchCollegePdfDO) { + matchCollegePdfService.dropPdf (matchCollegePdfDO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping("queryPdfStatus") + @ApiOperation("查看pdf matchId") + @LoginRequired(Platform.school) + public ResponseVO queryPdfStatus(@RequestBody MatchCollegePdfDO matchCollegePdfDO) { + return ResponseData.generateCreatedResponse(0, matchCollegePdfService.queryPdfStatus (matchCollegePdfDO)); + } + + + + +} diff --git a/src/main/java/com/zhongzhi/controller/MatchDictController.java b/src/main/java/com/zhongzhi/controller/MatchDictController.java new file mode 100644 index 0000000..f66c1bb --- /dev/null +++ b/src/main/java/com/zhongzhi/controller/MatchDictController.java @@ -0,0 +1,178 @@ +package com.zhongzhi.controller; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.zhongzhi.common.constant.Platform; +import com.zhongzhi.common.constant.ProjectType; +import com.zhongzhi.common.utils.LoginRequired; +import com.zhongzhi.common.utils.ResponseData; +import com.zhongzhi.dto.match.MatchDictDTO; +import com.zhongzhi.dto.match.SelectListPageDTO; +import com.zhongzhi.model.MatchDictDO; +import com.zhongzhi.service.MatchDictService; +import com.zhongzhi.vo.ResponseVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + *

+ * 赛事年份管理 前端控制器 + *

+ * + * @author DengMin + * @since 2021-05-17 + */ +@RestController +@Api(tags = "赛事年份管理") +@RequestMapping("/match") +public class MatchDictController { + + @Autowired + private MatchDictService matchDictService; + + @PostMapping(value = "/getMainTrackMatch") + @LoginRequired({Platform.school, Platform.center, Platform.student}) + @ApiOperation("查询主赛道启用赛事年份") + public ResponseVO getMainTrackMatch() { + return ResponseData.generateCreatedResponse(0, matchDictService.getMainTrackMatch()); + } + + @PostMapping(value = "/getSeedTrackMatch") + @LoginRequired({Platform.school, Platform.center, Platform.student}) + @ApiOperation("查询种子赛道启用赛事年份") + public ResponseVO getSeedTrackMatch() { + return ResponseData.generateCreatedResponse(0, matchDictService.getSeedTrackMatch()); + } + + @PostMapping(value = "/getMatch") + @ApiOperation("查询启用种子赛事年份") + public ResponseVO getMatch() { + return ResponseData.generateCreatedResponse(0, matchDictService.getMatch()); + } + + @PostMapping(value = "/getVocationalMatch") + @ApiOperation("查询启用职教赛事年份") + public ResponseVO getVocationalMatch() { + return ResponseData.generateCreatedResponse(0, matchDictService.getVocationalMatch()); + } + + @PostMapping("updateMatchDate") + @ApiOperation("修改届数 id registrationStart registrationDeadline") + public ResponseVO updateMatch(@RequestBody MatchDictDO matchDictDO){ + matchDictService.updateMatchDate(matchDictDO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping("getMatchInfo") + @ApiOperation("查看某届数详情 id") + public ResponseVO getMatch(@RequestBody MatchDictDO matchDictDO){ + return ResponseData.generateCreatedResponse(0,matchDictService.getMatch(matchDictDO)); + } + + + @PostMapping(value = "/getMainTrackMatchPage") + @LoginRequired({Platform.center, Platform.school}) + @ApiOperation("中心端/院校端 ---分页查询主赛道赛事年份:pageNo、pageSize") + public ResponseVO getMainTrackMatchPage(@RequestBody SelectListPageDTO selectListPageDTO) { + Page page = new Page(selectListPageDTO.getPageNo(), selectListPageDTO.getPageSize()); + return ResponseData.generateCreatedResponse(0, matchDictService.page(page, new QueryWrapper() + .lambda() + .eq(MatchDictDO::getMatchType, ProjectType.MAIN_TRACK))); + } + + @PostMapping(value = "/getSeedTrackMatchPage") + @LoginRequired({Platform.center, Platform.school, Platform.review}) + @ApiOperation("中心端/院校端 ---分页查询种子赛道赛事年份:pageNo、pageSize") + public ResponseVO getSeedTrackMatchPage(@RequestBody SelectListPageDTO selectListPageDTO) { + return ResponseData.generateCreatedResponse(0, matchDictService.getSeedTrackMatchPage(selectListPageDTO)); + } + + @PostMapping(value = "/createMainTrackMatch") + @LoginRequired({Platform.center}) + @ApiOperation("中心端 ---创建主赛道赛事年份:matchName/名称、matchDate/年份、startTime/报名起始时间、endTime/报名结束时间、" + + "schedule:[{ scheduleTime/时间安排、explain/说明 }]") + public ResponseVO createMainTrackMatch(@RequestBody MatchDictDTO matchDictDTO) { + matchDictDTO.setMatchType(ProjectType.MAIN_TRACK); + matchDictService.createMatch(matchDictDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/createSeedTrackMatch") + @LoginRequired({Platform.center}) + @ApiOperation("中心端 ---创建种子赛道赛事年份:matchName/名称、matchDate/年份、startTime/报名起始时间、endTime/报名结束时间、" + + "schedule:[{ scheduleTime/时间安排、explains/说明 }]") + public ResponseVO createSeedTrackMatch(@RequestBody MatchDictDTO matchDictDTO) { + matchDictDTO.setMatchType(ProjectType.SEED_TRACK); + matchDictService.createMatch(matchDictDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/createVocationalMatch") + @LoginRequired({Platform.center}) + @ApiOperation("中心端 ---创建职教赛道赛事年份:matchName/名称、matchDate/年份、startTime/报名起始时间、endTime/报名结束时间、" + + "schedule:[{ scheduleTime/时间安排、explains/说明 }]") + public ResponseVO createVocationalMatch(@RequestBody MatchDictDTO matchDictDTO) { + matchDictDTO.setMatchType(ProjectType.VOCATIONAL); + matchDictService.createMatch(matchDictDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/updateMatch") + @LoginRequired({Platform.center}) + @ApiOperation("中心端 ---编辑赛事年份:id/ID、matchName/名称、matchDate/年份、startTime/报名起始时间、endTime/报名结束时间、status/状态(1:启动,0:暂停)" + + "schedule:[{ id/时间安排ID、scheduleTime/时间安排、explains/说明 }]") + public ResponseVO updateMatch(@RequestBody MatchDictDTO matchDictDTO) { + matchDictService.updateMatch(matchDictDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/delete") + @LoginRequired({Platform.center}) + @ApiOperation("中心端 ---删除赛事年份:id/ID") + public ResponseVO delete(@RequestBody MatchDictDO matchDictDO) { + matchDictService.removeById(matchDictDO.getId()); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/getMainTrackMatchAll") + @LoginRequired({Platform.center, Platform.school, Platform.student, Platform.review}) + @ApiOperation("中心端/学生端/院校端/审批端 ---查询全部主赛道赛事年份") + public ResponseVO getMainTrackMatchAll() { + return ResponseData.generateCreatedResponse(0, matchDictService.list(new QueryWrapper() + .lambda() + .eq(MatchDictDO::getMatchType, ProjectType.MAIN_TRACK))); + } + + @PostMapping(value = "/getSeedTrackMatchAll") + @LoginRequired({Platform.center, Platform.school, Platform.student, Platform.review}) + @ApiOperation("中心端/学生端/院校端/审批端 ---查询全部种子赛道赛事年份") + public ResponseVO getSeedTrackMatchAll() { + return ResponseData.generateCreatedResponse(0, matchDictService.list(new QueryWrapper() + .lambda() + .eq(MatchDictDO::getMatchType, ProjectType.SEED_TRACK))); + } + + @PostMapping(value = "/getVocationalMatchAll") + @LoginRequired({Platform.center, Platform.school, Platform.student, Platform.review}) + @ApiOperation("中心端/学生端/院校端/审批端 ---查询全部职教赛道赛事年份") + public ResponseVO getVocationalMatchAll() { + return ResponseData.generateCreatedResponse(0, matchDictService.list(new QueryWrapper() + .lambda() + .eq(MatchDictDO::getMatchType, ProjectType.VOCATIONAL))); + } + + /* 职教管理端 */ + @PostMapping(value = "/getVocationalPage") + @LoginRequired({Platform.center, Platform.school, Platform.review}) + @ApiOperation("中心端/院校端 ---分页查询职教赛道赛事年份:pageNo、pageSize") + public ResponseVO getVocationalPage(@RequestBody SelectListPageDTO selectListPageDTO) { + return ResponseData.generateCreatedResponse(0, matchDictService.getVocationalPage(selectListPageDTO)); + } + + +} \ No newline at end of file diff --git a/src/main/java/com/zhongzhi/controller/MatchScheduleController.java b/src/main/java/com/zhongzhi/controller/MatchScheduleController.java new file mode 100644 index 0000000..5f69c45 --- /dev/null +++ b/src/main/java/com/zhongzhi/controller/MatchScheduleController.java @@ -0,0 +1,79 @@ +package com.zhongzhi.controller; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.zhongzhi.common.constant.Platform; +import com.zhongzhi.common.constant.ProjectType; +import com.zhongzhi.common.utils.LoginRequired; +import com.zhongzhi.common.utils.ResponseData; +import com.zhongzhi.model.MatchDictDO; +import com.zhongzhi.model.MatchScheduleDO; +import com.zhongzhi.service.MatchDictService; +import com.zhongzhi.service.MatchScheduleService; +import com.zhongzhi.vo.ResponseVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; + +import java.util.ArrayList; +import java.util.List; + +/** + *

+ * 时间安排 前端控制器 + *

+ * + * @author DengMin + * @since 2021-05-27 + */ +@RestController +@RequestMapping("/matchSchedule") +@Api(tags = "时间安排") +public class MatchScheduleController { + + @Autowired + private MatchScheduleService matchScheduleService; + + @Autowired + private MatchDictService matchDictService; + + @PostMapping(value = "/getMatchSchedule") + @LoginRequired({Platform.student}) + @ApiOperation("学生端 ---种子赛道查看时间安排:matchId/赛事年份ID") + public ResponseVO getMatchSchedule(@RequestBody MatchScheduleDO matchScheduleDO) { + MatchDictDO matchDictDO = matchDictService.getOne(new QueryWrapper() + .lambda() + .eq(MatchDictDO::getId, matchScheduleDO.getMatchId()) + .eq(MatchDictDO::getMatchType, ProjectType.SEED_TRACK) + .eq(MatchDictDO::getStatus, 1)); + List list = new ArrayList<>(); + if (matchDictDO != null) { + list = matchScheduleService.list(new QueryWrapper() + .lambda() + .eq(MatchScheduleDO::getMatchId, matchDictDO.getId())); + } + return ResponseData.generateCreatedResponse(0, list); + } + + @PostMapping(value = "getVocationalMatchSchedule") + @LoginRequired({Platform.student}) + @ApiOperation("学生端 ---职教赛道查看时间安排:matchId/赛事年份ID") + public ResponseVO getVocationalMatchSchedule(@RequestBody MatchScheduleDO matchScheduleDO) { + MatchDictDO matchDictDO = matchDictService.getOne(new QueryWrapper() + .lambda() + .eq(MatchDictDO::getId, matchScheduleDO.getMatchId()) + .eq(MatchDictDO::getMatchType, ProjectType.VOCATIONAL) + .eq(MatchDictDO::getStatus, 1)); + List list = new ArrayList<>(); + if (matchDictDO != null) { + list = matchScheduleService.list(new QueryWrapper() + .lambda() + .eq(MatchScheduleDO::getMatchId, matchDictDO.getId())); + } + return ResponseData.generateCreatedResponse(0, list); + } +} diff --git a/src/main/java/com/zhongzhi/controller/MessageController.java b/src/main/java/com/zhongzhi/controller/MessageController.java new file mode 100644 index 0000000..f21b21d --- /dev/null +++ b/src/main/java/com/zhongzhi/controller/MessageController.java @@ -0,0 +1,99 @@ +package com.zhongzhi.controller; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.zhongzhi.common.constant.Platform; +import com.zhongzhi.common.utils.DateFormatUtil; +import com.zhongzhi.common.utils.Localstorage; +import com.zhongzhi.common.utils.LoginRequired; +import com.zhongzhi.common.utils.ResponseData; +import com.zhongzhi.dto.message.MessagePageDTO; +import com.zhongzhi.model.AdministerDO; +import com.zhongzhi.model.MessageDO; +import com.zhongzhi.service.MessageService; +import com.zhongzhi.vo.ResponseVO; +import com.zhongzhi.vo.message.MessageVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + *

+ * 通知消息表 前端控制器 + *

+ * + * @author DengMin + * @since 2021-05-17 + */ +@RestController +@Api(tags = "通知消息") +@RequestMapping("/message") +public class MessageController { + + @Autowired + private MessageService messageService; + + @PostMapping(value = "/getMessage") + @ApiOperation("查询通知") + public ResponseVO getMessage() { + List messages = new ArrayList(); + + List list = messageService.list(new QueryWrapper() + .lambda() + .orderByDesc(MessageDO::getCreateTime)); + for (MessageDO messageDO : list) { + MessageVO messageVO = new MessageVO(); + BeanUtils.copyProperties(messageDO, messageVO); + messageVO.setReleaseTime(DateFormatUtil.format(messageDO.getReleaseTime(), DateFormatUtil.FMT_sdf_yMd)); + messages.add(messageVO); + } + return ResponseData.generateCreatedResponse(0, messages); + } + + @PostMapping(value = "/getMessageById") + @LoginRequired({Platform.center}) + @ApiOperation("中心端 --- 根据ID查询详情:id/ID") + public ResponseVO getMessageById(@RequestBody MessageDO messageDO) { + return ResponseData.generateCreatedResponse(0, messageService.getById(messageDO.getId())); + } + + @PostMapping(value = "/getMessagePage") + @LoginRequired({Platform.center}) + @ApiOperation("中心端 ---分页查询通知: pageNo/当前页数, pageSize/每页显示条数") + public ResponseVO getMessagePage(@RequestBody MessagePageDTO messagePageDTO) { + return ResponseData.generateCreatedResponse(0, messageService.getMessagePage(messagePageDTO)); + } + + @PostMapping(value = "/createMessage") + @LoginRequired({Platform.center}) + @ApiOperation("中心端 ---创建通知: title/标题, content/内容, attachmentUrl/附件地址, releaseTime/发布时间, attachmentName/附件名称, attachmentType/附件类型") + public ResponseVO createMessage(@RequestBody MessageDO messageDO) { + messageService.createMessage(messageDO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/updateMessage") + @LoginRequired({Platform.center}) + @ApiOperation("中心端 ---编辑通知: id/ID, title/标题, content/内容, attachmentUrl/附件地址, attachmentName/附件名称, attachmentType/附件类型") + public ResponseVO updateMessage(@RequestBody MessageDO messageDO) { + messageService.updateById(messageDO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/delete") + @LoginRequired({Platform.center}) + @ApiOperation("中心端 ---删除通知: id/ID, ") + public ResponseVO delete(@RequestBody MessageDO messageDO) { + messageService.removeById(messageDO.getId()); + return ResponseData.generateCreatedResponse(0); + } +} diff --git a/src/main/java/com/zhongzhi/controller/OssController.java b/src/main/java/com/zhongzhi/controller/OssController.java new file mode 100644 index 0000000..bae1213 --- /dev/null +++ b/src/main/java/com/zhongzhi/controller/OssController.java @@ -0,0 +1,211 @@ +package com.zhongzhi.controller; + + +import com.aliyun.oss.ClientException; +import com.aliyun.oss.OSS; +import com.aliyun.oss.OSSClientBuilder; +import com.aliyun.oss.OSSException; +import com.aliyun.oss.model.*; +import com.zhongzhi.common.utils.ResponseData; +import com.zhongzhi.vo.ResponseVO; +import com.zhongzhi.vo.oss.GetSecretVO; +import com.zhongzhi.vo.oss.UploadFileVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.List; + +@Api(tags = "oss") +@RestController +@RequestMapping("/oss") +public class OssController { + + public static final String keyId = "LTAI5tPAH7P7WQVeowo517BE"; + + + public static final String secret = "0ueqhIfdAZyw5lWlBVSLpAxTtx37RY"; + + +// @Value("${spring.profiles.active}") +// private String env; + + @PostMapping("getSecret") + @ApiOperation("oss秘钥") + public ResponseVO getSecret() { + GetSecretVO getSecretVO = new GetSecretVO(); + getSecretVO.setKey(keyId); + getSecretVO.setSecret(secret); + return ResponseData.generateCreatedResponse(0, getSecretVO); + } + +// @PostMapping("uploadFile") +// @ApiOperation("上传文件 file") +// public ResponseVO uploadFile(@RequestParam("file") MultipartFile file) { +// // 创建OSSClient实例。 +// OSS ossClient = new OSSClientBuilder().build("http://oss-cn-shanghai.aliyuncs.com", keyId, secret); +// UploadFileVO uploadFileVO = new UploadFileVO(); +// try { +//// +//// if (env.equals("test")) { +//// env = "ykhl-bigger-test"; +//// } +//// if (env.equals("prod")) { +//// env = "ykhl-bigger"; +//// } +// +// +// // 创建PutObjectRequest对象。 +// PutObjectRequest putObjectRequest = new PutObjectRequest("zhongzhi-cms", System.currentTimeMillis() + "_" + file.getOriginalFilename(), file.getInputStream()); +// // 设置该属性可以返回response。如果不设置,则返回的response为空。 +// putObjectRequest.setProcess("true"); +// // 创建PutObject请求。 +// PutObjectResult result = ossClient.putObject(putObjectRequest); +// // 如果上传成功,则返回200。 +//// System.out.println(result.getResponse().getUri()); +// uploadFileVO.setUrl(result.getResponse().getUri()); +// } catch (Exception oe) { +// oe.printStackTrace(); +// } finally { +// if (ossClient != null) { +// ossClient.shutdown(); +// } +// } +// return ResponseData.generateCreatedResponse(0, uploadFileVO); +// } + + @PostMapping("uploadFile") + @ApiOperation("分片上传") + public ResponseVO fenpian(@RequestParam("file") MultipartFile file) { + + UploadFileVO uploadFileVO = new UploadFileVO(); + + // Endpoint以华东1(杭州)为例,其它Region请按实际情况填写。 + String endpoint = "http://oss-cn-beijing.aliyuncs.com"; + // 阿里云账号AccessKey拥有所有API的访问权限,风险很高。强烈建议您创建并使用RAM用户进行API访问或日常运维,请登录RAM控制台创建RAM用户。 + String accessKeyId = keyId; + String accessKeySecret = secret; + // 填写Bucket名称,例如examplebucket。 + String bucketName = "mass-entrepreneurship"; + // 填写Object完整路径,例如exampledir/exampleobject.txt。Object完整路径中不能包含Bucket名称。 + String objectName = System.currentTimeMillis() + "_" + file.getOriginalFilename(); + + // 创建OSSClient实例。 + OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret); + try { + // 创建InitiateMultipartUploadRequest对象。 + InitiateMultipartUploadRequest request = new InitiateMultipartUploadRequest(bucketName, objectName); + + // 如果需要在初始化分片时设置请求头,请参考以下示例代码。 + ObjectMetadata metadata = new ObjectMetadata(); +// + metadata.setContentType(file.getContentType()); + if ("pdf".equals(file.getContentType())){ + metadata.setContentType("application/x-pcx"); + } + + metadata.setContentDisposition("inline"); +// metadata.setHeader("x-oss-force-download", false); + request.setObjectMetadata(metadata); + // 返回uploadId,它是分片上传事件的唯一标识。您可以根据该uploadId发起相关的操作,例如取消分片上传、查询分片上传等。 + // 初始化分片。 + InitiateMultipartUploadResult upresult = ossClient.initiateMultipartUpload(request); + String uploadId = upresult.getUploadId(); + + // partETags是PartETag的集合。PartETag由分片的ETag和分片号组成。 + List partETags = new ArrayList(); + // 每个分片的大小,用于计算文件有多少个分片。单位为字节。 + final long partSize = 1 * 1024 * 1024L; //1 MB。 + + // 根据上传的数据大小计算分片数。以本地文件为例,说明如何通过File.length()获取上传数据的大小。 +// final File sampleFile = new File("D:\\localpath\\examplefile.txt"); +// long fileLength = sampleFile.length(); +// int partCount = (int) (fileLength / partSize); +// if (fileLength % partSize != 0) { +// partCount++; +// } + + long fileLength = file.getSize(); + int partCount = (int) (fileLength / partSize); + if (fileLength % partSize != 0) { + partCount++; + } + + // 遍历分片上传。 + for (int i = 0; i < partCount; i++) { + long startPos = i * partSize; + long curPartSize = (i + 1 == partCount) ? (fileLength - startPos) : partSize; + UploadPartRequest uploadPartRequest = new UploadPartRequest(); + uploadPartRequest.setBucketName(bucketName); + uploadPartRequest.setKey(objectName); + uploadPartRequest.setUploadId(uploadId); + // 设置上传的分片流。 + // 以本地文件为例说明如何创建FIleInputstream,并通过InputStream.skip()方法跳过指定数据。 + InputStream instream = file.getInputStream(); + instream.skip(startPos); + uploadPartRequest.setInputStream(instream); + // 设置分片大小。除了最后一个分片没有大小限制,其他的分片最小为100 KB。 + uploadPartRequest.setPartSize(curPartSize); + // 设置分片号。每一个上传的分片都有一个分片号,取值范围是1~10000,如果超出此范围,OSS将返回InvalidArgument错误码。 + uploadPartRequest.setPartNumber(i + 1); + // 每个分片不需要按顺序上传,甚至可以在不同客户端上传,OSS会按照分片号排序组成完整的文件。 + UploadPartResult uploadPartResult = ossClient.uploadPart(uploadPartRequest); + // 每次上传分片之后,OSS的返回结果包含PartETag。PartETag将被保存在partETags中。 + partETags.add(uploadPartResult.getPartETag()); + } + + + // 创建CompleteMultipartUploadRequest对象。 + // 在执行完成分片上传操作时,需要提供所有有效的partETags。OSS收到提交的partETags后,会逐一验证每个分片的有效性。当所有的数据分片验证通过后,OSS将把这些分片组合成一个完整的文件。 + CompleteMultipartUploadRequest completeMultipartUploadRequest = + new CompleteMultipartUploadRequest(bucketName, objectName, uploadId, partETags); + + // 如果需要在完成分片上传的同时设置文件访问权限,请参考以下示例代码。 + // completeMultipartUploadRequest.setObjectACL(CannedAccessControlList.Private); + // 指定是否列举当前UploadId已上传的所有Part。仅在Java SDK为3.14.0及以上版本时,支持通过服务端List分片数据来合并完整文件时,将CompleteMultipartUploadRequest中的partETags设置为null。 + // Map headers = new HashMap(); + // 如果指定了x-oss-complete-all:yes,则OSS会列举当前UploadId已上传的所有Part,然后按照PartNumber的序号排序并执行CompleteMultipartUpload操作。 + // 如果指定了x-oss-complete-all:yes,则不允许继续指定body,否则报错。 + // headers.put("x-oss-complete-all","yes"); + // completeMultipartUploadRequest.setHeaders(headers); + + // 完成分片上传。 + CompleteMultipartUploadResult completeMultipartUploadResult = ossClient.completeMultipartUpload(completeMultipartUploadRequest); + uploadFileVO.setUrl(completeMultipartUploadResult.getLocation().replace("http","https")); + System.out.println(completeMultipartUploadResult.getLocation()); + } catch (OSSException oe) { + System.out.println("Caught an OSSException, which means your request made it to OSS, " + + "but was rejected with an error response for some reason."); + System.out.println("Error Message:" + oe.getErrorMessage()); + System.out.println("Error Code:" + oe.getErrorCode()); + System.out.println("Request ID:" + oe.getRequestId()); + System.out.println("Host ID:" + oe.getHostId()); + } catch (ClientException ce) { + System.out.println("Caught an ClientException, which means the client encountered " + + "a serious internal problem while trying to communicate with OSS, " + + "such as not being able to access the network."); + System.out.println("Error Message:" + ce.getMessage()); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } finally { + if (ossClient != null) { + ossClient.shutdown(); + } + } + + return ResponseData.generateCreatedResponse(0, uploadFileVO); + } + + +} diff --git a/src/main/java/com/zhongzhi/controller/PermissionsController.java b/src/main/java/com/zhongzhi/controller/PermissionsController.java new file mode 100644 index 0000000..59b2ec4 --- /dev/null +++ b/src/main/java/com/zhongzhi/controller/PermissionsController.java @@ -0,0 +1,20 @@ +package com.zhongzhi.controller; + +import io.swagger.annotations.Api; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + *

+ * 权限表 前端控制器 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +@RestController +@Api(tags = "权限") +@RequestMapping("/permissions") +public class PermissionsController { + +} diff --git a/src/main/java/com/zhongzhi/controller/ProjectAwardController.java b/src/main/java/com/zhongzhi/controller/ProjectAwardController.java new file mode 100644 index 0000000..8cab4a1 --- /dev/null +++ b/src/main/java/com/zhongzhi/controller/ProjectAwardController.java @@ -0,0 +1,20 @@ +package com.zhongzhi.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; + +/** + *

+ * 项目奖项 前端控制器 + *

+ * + * @author DengMin + * @since 2022-04-25 + */ +@RestController +@RequestMapping("/project-award-do") +public class ProjectAwardController { + +} diff --git a/src/main/java/com/zhongzhi/controller/ProjectController.java b/src/main/java/com/zhongzhi/controller/ProjectController.java new file mode 100644 index 0000000..0010f37 --- /dev/null +++ b/src/main/java/com/zhongzhi/controller/ProjectController.java @@ -0,0 +1,665 @@ +package com.zhongzhi.controller; + +import com.zhongzhi.common.constant.Platform; +import com.zhongzhi.common.constant.ProjectType; +import com.zhongzhi.common.utils.LoginRequired; +import com.zhongzhi.common.utils.ResponseData; +import com.zhongzhi.dto.member.CreateProjectMemberDTO; +import com.zhongzhi.dto.project.*; +import com.zhongzhi.dto.review.ProjectReviewPageDTO; +import com.zhongzhi.dto.review.ProjectReviewScoreDTO; +import com.zhongzhi.model.ProjectDO; +import com.zhongzhi.service.ProjectService; +import com.zhongzhi.vo.ResponseVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + *

+ * 项目表 前端控制器 + *

+ * + * @author DengMin + * @since 2021-05-11 + */ +@RestController +@Api(tags = "项目") +@RequestMapping("/project") +public class ProjectController { + + @Autowired + private ProjectService projectService; + + @PostMapping(value = "/getProjectDetail") + @LoginRequired({Platform.student}) + @ApiOperation("学生端(高职赛道、种子赛道通用) ---项目详情: id/项目ID") + public ResponseVO getProjectDetail(@RequestBody ProjectDO projectDO) { + return ResponseData.generateCreatedResponse(0, projectService.getProjectById(projectDO.getId())); + } + + @PostMapping(value = "/getMainTrackProject") + @LoginRequired(Platform.student) + @ApiOperation("学生端 ---主赛道项目分页查询: matchId/赛事年份ID, pageNo/当前页数, pageSize/每页显示条数") + public ResponseVO getMainTrackProject(@RequestBody ProjectListPageDTO projectListPageDTO) { + return ResponseData.generateCreatedResponse(0, projectService.getMainTrackProject(projectListPageDTO)); + } + + @PostMapping(value = "/getMainTrackProjectById") + @LoginRequired(Platform.student) + @ApiOperation("学生端---根据ID查询主赛道项目信息") + public ResponseVO getMainTrackProjectById() { + return ResponseData.generateCreatedResponse(0, projectService.getMainTrackProjectById()); + } + + @PostMapping(value = "/createMainTrackProject") + @LoginRequired(Platform.student) + @ApiOperation("学生端 ---保存主赛道项目信息: 项目logo/logoUri、项目名称/projectName、所在地/address、itemField/所属领域、项目概述/projectIntro、projectTransform/国家级重大、重点科研项目的科研成果转化项目" + + "学校科技成果转化/resultTransfer、参赛申报人为科技成果的完成人或所有人/competitionOwner、参赛申报人为科技成果的第一完成人或所有人/competitionFirst" + + "师生共创/bothInvention、项目进展/projectProgress(创意设计阶段,已注册公司)、公司名称/companyName、法人身份/legalPersonStatus、法人姓名/legalPersonName、职务/position、注册资金/registerFund" + + "注册时间/registerDate、注册省份/registerProvince、注册地址/registerAddress、统一社会信用代码/unifyCode" + + "股权结构/pos:[{ shareholderStatus/股东身份、shareholderName/股东名称、shareholdingRatio/持股比例 }]" + + "隐私设置/privacySetting(保密,公开)、materialsType/项目计划书类型、materialsSize/项目计划书大小、materialsName/项目计划书名称、materialsUrl/项目计划书地址" + + "vodUrl 视频地址") + public ResponseVO createMainTrackProject(@RequestBody CreateMainTrackProjectDTO createMainTrackProjectDTO) { + projectService.createMainTrackProject(createMainTrackProjectDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/getProjectMemberById") + @LoginRequired(Platform.student) + @ApiOperation("学生端 ---根据项目ID查询主赛道团队成员") + public ResponseVO getProjectMemberById() { + return ResponseData.generateCreatedResponse(0, projectService.getProjectMemberById()); + } + + @PostMapping(value = "/createProjectMember") + @LoginRequired(Platform.student) + @ApiOperation("学生端 ---保存主赛道团队信息:name/姓名、school/就读学校、grade/年级、major/就读专业、sex/性别、studentNo/学籍号" + + "teamMember/团队成员:[{ teamName/姓名、school/就读学校、grade/年级、major/就读专业、sex/性别、studentNo/学籍号 }]" + + "mentor/指导老师:[{ teacherName/姓名、 company/工作单位、positionTitle/职称、position/职务、telephone/手机号}]") + public ResponseVO createProjectMember(@RequestBody CreateProjectMemberDTO createProjectMemberDTO) { + createProjectMemberDTO.setProjectGroup(ProjectType.MAIN_TRACK); + createProjectMemberDTO.setProjectType(ProjectType.MAIN_TRACK); + projectService.createProjectMember(createProjectMemberDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/withdrawn") + @LoginRequired(Platform.student) + @ApiOperation("学生端 ---撤回申请:id/项目ID") + public ResponseVO withdrawn(@RequestBody ProjectDO projectDO) { + projectService.withdrawn(projectDO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/rollback") +// @LoginRequired(Platform.school) + @ApiOperation("院校端 ---上报撤回:id/项目ID") + public ResponseVO rollback(@RequestBody ProjectDO projectDO) { + projectService.rollback(projectDO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/getSeedTrackProject") + @LoginRequired(Platform.student) + @ApiOperation("学生端 ---种子赛道项目分页查询: matchId/年份ID, pageNo/当前页数, pageSize/每页显示条数") + public ResponseVO getSeedTrackProject(@RequestBody ProjectListPageDTO projectListPageDTO) { + return ResponseData.generateCreatedResponse(0, projectService.getSeedTrackProject(projectListPageDTO)); + } + + @PostMapping(value = "/createSeedTrackProject") + @LoginRequired(Platform.student) + @ApiOperation("学生端 ---保存种子赛道项目信息: projectProgress:红色文创/科技创新 projectName/项目名称、projectGroup/组别、projectIntro/介绍及创新点、projectCreativity/设计背景、" + + "scientificPrinciple/科学设计、applicationProspect/应用前景、roadShowForm/路演形式、restriction/创意实施或实验所受条件的限制" + + "、materials/项目材料:[{ materialsType/项目计划书类型、materialsSize/项目计划书大小、materialsName/项目计划书名称、materialsUrl/项目计划书地址 }]") + public ResponseVO createSeedTrackProject(@RequestBody CreateSeedTrackProjectDTO createSeedTrackProjectDTO) { + projectService.createSeedTrackProject(createSeedTrackProjectDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/getTechnologyProjectById") + @LoginRequired(Platform.student) + @ApiOperation("学生端 ---根据ID查询科技创新项目") + public ResponseVO getTechnologyProjectById() { + return ResponseData.generateCreatedResponse(0, projectService.getSeedTrackProjectById()); + } + + @PostMapping(value = "/getCulturalProjectById") + @LoginRequired(Platform.student) + @ApiOperation("学生端 ---根据ID查询红色文创项目") + public ResponseVO getCulturalProjectById() { + return ResponseData.generateCreatedResponse(0, projectService.getCulturalProjectById()); + } + + @PostMapping(value = "/uploadTechnologyProjectAttachment") + @LoginRequired(Platform.student) + @ApiOperation("学生端 --- 上传科技创新项目加盖公章的附件: printAttachment/附件地址, printAttachmentType/附件类型, printAttachmentName/附件名称") + public ResponseVO uploadTechnologyProjectAttachment(@RequestBody PrintAttachmentDTO printAttachmentDTO) { + printAttachmentDTO.setProjectGroup(ProjectType.TECHNOLOGY_INNOVATION_GROUP); + projectService.uploadPrintAttachment(printAttachmentDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/createTechnologyProjectMember") + @LoginRequired(Platform.student) + @ApiOperation("学生端 ---保存科技创新项目团队信息:name/姓名、school/就读学校、grade/年级、major/就读专业、sex/性别、idCard身份证 studentNo/学籍号 fiveYears" + + "teamMember/团队成员:[{ teamName/姓名、school/就读学校、grade/年级、major/就读专业、sex/性别、studentNo/学籍号 }]" + + "mentor/指导老师:[{ teacherName/姓名、 company/工作单位、positionTitle/职称、position/职务、telephone/手机号}]") + public ResponseVO createTechnologyProjectMember(@RequestBody CreateProjectMemberDTO createProjectMemberDTO) { + createProjectMemberDTO.setProjectGroup(ProjectType.TECHNOLOGY_INNOVATION_GROUP); + createProjectMemberDTO.setProjectType(ProjectType.SEED_TRACK); + projectService.createProjectMember(createProjectMemberDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/getTechnologyProjectMember") + @LoginRequired(Platform.student) + @ApiOperation("学生端 ---查询科技创新项目团队信息") + public ResponseVO getTechnologyProjectMember() { + return ResponseData.generateCreatedResponse(0, projectService.getProjectMember(ProjectType.TECHNOLOGY_INNOVATION_GROUP)); + } + + @PostMapping(value = "/uploadCulturalProjectAttachment") + @LoginRequired(Platform.student) + @ApiOperation("学生端 --- 上传红色文创项目加盖公章的附件: printAttachment/附件地址, printAttachmentType/附件类型, printAttachmentName/附件名称") + public ResponseVO uploadCulturalProjectAttachment(@RequestBody PrintAttachmentDTO printAttachmentDTO) { + printAttachmentDTO.setProjectGroup(ProjectType.CULTURAL_CREATIVE_GROUP); + projectService.uploadPrintAttachment(printAttachmentDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/createCulturalProjectMember") + @LoginRequired(Platform.student) + @ApiOperation("学生端 ---保存红色文创项目团队信息:name/姓名、school/就读学校、grade/年级、major/就读专业、sex/性别、idCard 身份证 studentNo/学籍号 fiveYears" + + "teamMember/团队成员:[{ teamName/姓名、school/就读学校、grade/年级、major/就读专业、sex/性别、studentNo/学籍号 }]" + + "mentor/指导老师:[{ teacherName/姓名、 company/工作单位、positionTitle/职称、position/职务、telephone/手机号}]") + public ResponseVO createCulturalProjectMember(@RequestBody CreateProjectMemberDTO createProjectMemberDTO) { + createProjectMemberDTO.setProjectGroup(ProjectType.CULTURAL_CREATIVE_GROUP); + createProjectMemberDTO.setProjectType(ProjectType.SEED_TRACK); + projectService.createProjectMember(createProjectMemberDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/getCulturalProjectMember") + @LoginRequired(Platform.student) + @ApiOperation("学生端 ---查询红色文创项目团队信息") + public ResponseVO getCulturalProjectMember() { + return ResponseData.generateCreatedResponse(0, projectService.getProjectMember(ProjectType.CULTURAL_CREATIVE_GROUP)); + } + + @PostMapping(value = "/getMainTrackProjectPage") + @LoginRequired(Platform.school) + @ApiOperation("院校端 --- 分页查询主赛道全部项目:matchId/赛事ID, projectSchedule/项目进度(全部项目传空字符串、校内赛、复赛、决赛), " + + "projectStatus/项目状态, itemField/领域, name/搜名称, pageNo/当前页数 、pageSize/每页显示条数") + public ResponseVO getMainTrackProjectPage(@RequestBody ProjectListPageDTO projectListPageDTO) { + return ResponseData.generateCreatedResponse(0, projectService.getMainTrackProjectPage(projectListPageDTO)); + } + + @PostMapping(value = "/getMainTrackProjectDetail") + @LoginRequired({Platform.center, Platform.school, Platform.review}) + @ApiOperation("学生端/中心端 ---查询主赛道项目详情:id/项目ID") + public ResponseVO getMainTrackProjectDetail(@RequestBody ProjectDO projectDO) { + return ResponseData.generateCreatedResponse(0, projectService.getMainTrackProjectDetail(projectDO.getId())); + } + + @PostMapping(value = "/delete") + @LoginRequired({Platform.center, Platform.school}) + @ApiOperation("中心端/院校端 --- 删除项目:id/项目ID") + public ResponseVO delete(@RequestBody ProjectDO projectDO) { + projectService.removeById(projectDO.getId()); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/getSeedTrackProjectList") + @LoginRequired(Platform.school) + @ApiOperation("院校端 --- 分页查询种子赛道全部项目:matchId/赛事ID,projectGroup/项目组别(科技创新、红色文创)、projectSchedule/项目进度(全部项目传空字符串、校内赛、复赛、决赛), " + + "projectStatus/项目状态, itemField/领域, name/搜名称, pageNo/当前页数 、pageSize/每页显示条数") + public ResponseVO getSeedTrackProjectList(@RequestBody ProjectListPageDTO projectListPageDTO) { + return ResponseData.generateCreatedResponse(0, projectService.getSeedTrackProjectList(projectListPageDTO)); + } + + @PostMapping(value = "/getSeedTrackProjectPage") + @LoginRequired(Platform.center) + @ApiOperation("中心端 --- 分页查询种子赛道全部项目:matchId/赛事ID,projectGroup/项目组别(科技创新、红色文创)、projectSchedule/项目进度(全部项目传空字符串、校内赛、复赛、决赛), " + + "projectStatus/项目状态, itemField/领域, name/搜名称, pageNo/当前页数 、pageSize/每页显示条数 projectProgress") + public ResponseVO getSeedTrackProjectPage(@RequestBody ProjectListPageDTO projectListPageDTO) { + return ResponseData.generateCreatedResponse(0, projectService.getSeedTrackProjectPage(projectListPageDTO)); + } + + @PostMapping(value = "/downloadTechnologyPDF") + @LoginRequired({Platform.student}) + @ApiOperation("学生端 --- 种子赛道科技创新申请表下载") + public void downloadTechnologyPDF() { + projectService.downloadPDF(ProjectType.TECHNOLOGY_INNOVATION_GROUP); + } + + @PostMapping(value = "/downloadCulturalPDF") + @LoginRequired({Platform.student}) + @ApiOperation("学生端 --- 种子赛道红色文创申请表下载") + public void downloadCulturalPDF() { + projectService.downloadPDF(ProjectType.CULTURAL_CREATIVE_GROUP); + } + + @PostMapping(value = "/getSeedTrackProjectDetail") + @LoginRequired({Platform.center, Platform.school, Platform.review}) + @ApiOperation("中心端/院校端 --- 种子赛道项目详情:id/项目ID") + public ResponseVO getSeedTrackProjectDetail(@RequestBody ProjectDO projectDO) { + return ResponseData.generateCreatedResponse(0, projectService.getSeedTrackProjectDetail(projectDO.getId())); + } + + @PostMapping(value = "/weedOut") + @LoginRequired({Platform.center, Platform.school}) + @ApiOperation("院校端 --- 不予提交:id/项目ID") + public ResponseVO weedOut(@RequestBody ApproveDTO approveDTO) { + projectService.weedOut(approveDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/batchWeedOut") + @LoginRequired({Platform.center, Platform.school}) + @ApiOperation("院校端 --- 批量不予提交:ids/项目ID") + public ResponseVO batchWeedOut(@RequestBody ApproveDTO approveDTO) { + projectService.batchWeedOut(approveDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/pass") + @LoginRequired({Platform.center, Platform.school}) + @ApiOperation("中心端/院校端 --- (校内赛/初赛/复赛/决赛)通过:id/项目ID、" + + "projectStatus/1:市级复赛通过, 2:市级优胜奖,3/6:市级银奖,4:市级铜奖,5:市级金奖") + public ResponseVO pass(@RequestBody ApproveDTO approveDTO) { + projectService.pass(approveDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/batchPass") + @LoginRequired({Platform.center, Platform.school}) + @ApiOperation("中心端/院校端 --- 批量(校内赛/初赛/复赛/决赛)通过:ids/项目ID、" + + "projectStatus/1:市级复赛通过, 2:市级优胜奖,3/6:市级银奖,4:市级铜奖,5:市级金奖") + public ResponseVO batchPass(@RequestBody ApproveDTO approveDTO) { + projectService.batchPass(approveDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/getReviewList") + @LoginRequired({Platform.center}) + @ApiOperation("中心端 --- 评审列表:projectGroup/组别(科技创新、红色文创、主赛道)、projectName/搜索项目或院校、 projectStatus/项目状态(市级复赛、市级决赛)、projectReview/评审分配状态(已分配/未分配)、" + + "pageNo/当前页数、pageSize/每页显示条数") + public ResponseVO getReviewList(@RequestBody ReviewListDTO reviewListDTO) { + return ResponseData.generateCreatedResponse(0, projectService.getReviewList(reviewListDTO)); + } + + @PostMapping(value = "/getProjectReviewNum") + @LoginRequired({Platform.center}) + @ApiOperation("中心端 --- 评审列表项目数量统计:matchId/赛事年份ID、projectProgress/组别(科技创新、文化创意), projectStatus/项目进度(市级复赛、市级决赛)") + public ResponseVO getProjectReviewNum(@RequestBody ReviewListDTO reviewListDTO) { + return ResponseData.generateCreatedResponse(0, projectService.getProjectReviewNum(reviewListDTO)); + } + + @PostMapping(value = "/getProjectReviewAssignNum") + @LoginRequired({Platform.center}) + @ApiOperation("中心端 --- 评审分配项目数量统计:matchId/赛事年份ID、projectGroup/组别(科技创新、红色文创), projectStatus/项目进度(市级复赛、市级决赛)") + public ResponseVO getProjectReviewAssignNum(@RequestBody ReviewListDTO reviewListDTO) { + return ResponseData.generateCreatedResponse(0, projectService.getProjectReviewAssignNum(reviewListDTO)); + } + + @PostMapping(value = "/getReviewProjectNum") + @LoginRequired({Platform.review}) + @ApiOperation("评审端 --- 评审项目数量统计:matchId/赛事年份ID、projectGroup/组别(科技创新、红色文创), projectStatus/项目状态(市级复赛、市级决赛)") + public ResponseVO getReviewProjectNum(@RequestBody ReviewListDTO reviewListDTO) { + return ResponseData.generateCreatedResponse(0, projectService.getReviewProjectNum(reviewListDTO)); + } + + @PostMapping(value = "/getExportProjectListField") + @LoginRequired({Platform.center, Platform.school}) + @ApiOperation("中心端 --- 种子赛道项目字段") + public ResponseVO getExportProjectListField() { + return ResponseData.generateCreatedResponse(0, projectService.getExportProjectField()); + } + + @PostMapping(value = "/exportProjectCollegeList") + @LoginRequired({Platform.school}) + @ApiOperation("院校端 --- 批量导出院校项目:matchId/赛事ID") + public void exportProjectCollegeList(@RequestBody ProjectCollegeListDTO projectCollegeListDTO) { + projectService.exportProjectCollegeList(projectCollegeListDTO); + } + + @PostMapping(value = "/exportProjectList") + @LoginRequired({Platform.center}) + @ApiOperation("中心端 --- 批量导出种子赛道项目:matchId/赛事ID") + public void exportProjectList(@RequestBody ProjectCollegeListDTO projectCollegeListDTO) { + projectService.exportProjectList(projectCollegeListDTO); + } + + @PostMapping(value = "/exportProjectAll") + @LoginRequired({Platform.center}) + @ApiOperation("中心端 --- 导出全部种子赛道项目:matchId/赛事ID, projectSchedule/项目进度,projectGroup/项目组别") + public void exportProjectAll(@RequestBody ProjectCollegeListDTO projectCollegeListDTO) { + projectService.exportProjectAll(projectCollegeListDTO); + } + + @PostMapping(value = "/exportProjectAllProgress") +// @LoginRequired({Platform.center}) + @ApiOperation("中心端 --- 导出全部种子赛道项目:matchId/赛事ID, projectSchedule/项目进度,projectGroup/项目组别 projectProgress 组别") + public void exportProjectAllProgress(@RequestBody ProjectCollegeListDTO projectCollegeListDTO) { + projectService.exportProjectAllProgress(projectCollegeListDTO); + } + + + @PostMapping(value = "/getExportProjectField") + @LoginRequired({Platform.center}) + @ApiOperation("中心端 --- 评审项目字段") + public ResponseVO getExportProjectField() { + return ResponseData.generateCreatedResponse(0, projectService.getExportProjectReviewField()); + } + + @PostMapping(value = "/exportProject") +// @LoginRequired({Platform.center}) + @ApiOperation("中心端 --- 评审项目导出:matchId/赛事ID") + public ResponseVO exportProject(@RequestBody ReviewListDTO reviewListDTO) { + projectService.exportProjectReview(reviewListDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/exportProjectNew") + @LoginRequired({Platform.center}) + @ApiOperation("中心端 --- 评审项目导出:matchId/赛事ID") + public ResponseVO exportProjectNew(@RequestBody ReviewListDTO reviewListDTO) { + projectService.exportProjectNew(reviewListDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/exportProjectById") + @LoginRequired({Platform.center}) + @ApiOperation("中心端 --- 评审项目根据ID导出:id/ID") + public ResponseVO exportProjectById(@RequestBody ReviewListDTO reviewListDTO) { + projectService.exportProjectById(reviewListDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/getProjectReviewPage") + @LoginRequired({Platform.review}) + @ApiOperation("评审端 ---评审项目分页查询:matchId/赛事年份ID、projectSchedule/项目进度(复赛、决赛)、status/状态(待评审, 已评审)、projectGroup/项目组别、projectName/搜索名称、pageNo/当前页数、pageSize/每页显示条数") + public ResponseVO getProjectReviewPage(@RequestBody ProjectReviewPageDTO projectReviewPageDTO) { + return ResponseData.generateCreatedResponse(0, projectService.getProjectReviewPage(projectReviewPageDTO)); + } + + @PostMapping(value = "/setScore") + @LoginRequired({Platform.review}) + @ApiOperation("评审端 ---批量预评分:reviewScore[{ id/项目ID、score/分数 }] +" + + " --- 单个预评分:id/项目ID、score/分数") + public ResponseVO setScore(@RequestBody ProjectReviewScoreDTO projectReviewScoreDTO) { + projectService.setScore(projectReviewScoreDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/submitted") + @LoginRequired({Platform.review}) + @ApiOperation("评审端 ---批量提交:ids:[项目ID]" + + " --- 提交评分:id/项目ID ") + public ResponseVO submitted(@RequestBody ProjectReviewScoreDTO projectReviewScoreDTO) { + projectService.submitted(projectReviewScoreDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "getCollegeDataOverview") + @LoginRequired({Platform.school}) + @ApiOperation("院校端 --- 种子赛道数据概览") + public ResponseVO getCollegeDataOverview(@RequestBody DataOverviewDTO dataOverviewDTO) { + return ResponseData.generateCreatedResponse(0, projectService.getCollegeDataOverview(dataOverviewDTO)); + } + +// @PostMapping(value = "getCollegeVocationalDataOverview") +// @LoginRequired({Platform.school}) +// @ApiOperation("院校端 --- 职教赛道数据概览") +// public ResponseVO getCollegeVocationalDataOverview() { +// return ResponseData.generateCreatedResponse(0, projectService.getCollegeVocationalDataOverview()); +// } + + @PostMapping(value = "getDataOverview") + @LoginRequired({Platform.center}) + @ApiOperation("中心端 --- 数据概览") + public ResponseVO getDataOverview(@RequestBody DataOverviewDTO dataOverviewDTO) { + return ResponseData.generateCreatedResponse(0, projectService.getVocationalDataOverview(dataOverviewDTO)); + } + +// @PostMapping(value = "getSeedTrackDataOverview") +// @LoginRequired({Platform.center}) +// @ApiOperation("中心端 --- 种子赛道数据概览") +// public ResponseVO getSeedTrackDataOverview() { +// return ResponseData.generateCreatedResponse(0, projectService.getSeedTrackDataOverview()); +// } +// +// @PostMapping(value = "getMainTrackDataOverview") +// @LoginRequired({Platform.center}) +// @ApiOperation("中心端 --- 主赛道数据概览") +// public ResponseVO getMainTrackDataOverview() { +// return ResponseData.generateCreatedResponse(0, projectService.getMainTrackDataOverview()); +// } + + @PostMapping(value = "exportCollegeProject") + @LoginRequired({Platform.school}) + @ApiOperation("院校端 --- 批量导出项目") + public ResponseVO exportCollegeProject(@RequestBody CollegeProjectDTO collegeProjectDTO) { + projectService.exportCollegeProject(collegeProjectDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "getProjectByStudentId") + @LoginRequired({Platform.student}) + @ApiOperation("学生端 --- 项目查重:matchId/赛事ID, projectGroup/组别") + public ResponseVO getProjectByStudentId(@RequestBody StudentProjectDTO studentProjectDTO) { + projectService.getProjectByStudentId(studentProjectDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "getSeedTrackProjectNum") + @LoginRequired({Platform.center, Platform.school}) + @ApiOperation("中心端/院校端 --- 项目数量: matchId/赛事ID、projectGroup/项目组别") + public ResponseVO getSeedTrackProjectNum(@RequestBody SeedTrackProjectNumDTO seedTrackProjectNumDTO) { + return ResponseData.generateCreatedResponse(0, projectService.getSeedTrackProjectNum(seedTrackProjectNumDTO)); + } + + /* -- 职教接口(学生端) -- */ + @PostMapping(value = "createVocationalProject") + @LoginRequired({ Platform.student }) + @ApiOperation("学生端(职教)--创建职教项目:项目logo/logoUri、项目名称/projectName、所属领域/itemField、项目概述/projectIntro、国家级重大、重点科研项目的科研成果转化项目/projectTransform、" + + "学校科技成果转化/resultTransfer、参赛申报人为科技成果的完成人或所有人/competitionOwner、参赛申报人为科技成果的第一完成人或所有人/competitionFirst、师生共创/bothInvention、组别/projectProgress、项目进展/projectStage" + + "公司名称/companyName、法人姓名/legalPersonName、法人职务/position、注册资金/registerFund、注册时间/registerDate、注册省份/registerProvince、注册地址/registerAddress、统一社会信用代码/unifyCode、财务报表地址/financialStatement、是否获得投资/investment、" + + "ownership(股权结构): [{ shareholderStatus/股东身份、shareholderName/股东名称、shareholdingRatio/持股比例 }]" + + "隐私设置/privacySetting(保密,公开)、materialsType/项目计划书类型、materialsSize/项目计划书大小、materialsName/项目计划书名称、materialsUrl/项目计划书地址、项目PPT地址/projectPptUrl、项目TTP类型/projectPptType、项目PPT名称/projectPptName" + + "patent(获得专利): [{专利国别/country、公开号/publicationNumber、专利标题/patentTitle、专利类型/patentType、专利号/patentNumber、专利申请人/patentApplicants、获得时间/issuedTime、到期时间/expirationTime、发明人/inventor、其他发明人/otherInventors}]"+ + "paper(论文发表): [{论文名称/paperTitle、发表期刊/publishedJournals、DOI号/doi、是否有共同/common、第一作者/firstAuthor、其他作者/otherAuthor}]"+ + "award(奖项): [{奖项名称/awardTitle、获奖项目名称/awardProjectTitle、level/级别、获奖人/prizewinner、获奖时间/winningTime}]"+ + "copyright(软件著作): [{软件名称/dynacomm、著作权人/copyrightOwner、权利获取方式/rightAcquisitionMethod、开发完成日期/developmentDate、开发发表日期/publishedDate、权利范围/interestField、登记号/registerNumber}]"+ + "works(作品著作): [{作品名称/worksName、作者/author、创作完成日期/completionDate、首次发表日期/firstPublicationDate、作品类别/worksType、登记号/registerNumber}]" + + "trademark(商标): [{国际分类号/classificationNumber、商标名称/tradeName、注册人/registeredPerson、注册时间/registeredDate、有效日期/effectiveDate、商标编号/trademarkNumber}]" + + "vodUrl") + public ResponseVO createVocationalProject(@RequestBody CreateVocationalProjectDTO createVocationalProjectDTO) { + projectService.createVocationalProject(createVocationalProjectDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "updateVocationalProject") + @LoginRequired({ Platform.student }) + @ApiOperation("学生端(职教)--修改职教项目:id/项目ID、项目logo/logoUri、所属领域/itemField、项目概述/projectIntro、国家级重大、重点科研项目的科研成果转化项目/projectTransform、" + + "学校科技成果转化/resultTransfer、参赛申报人为科技成果的完成人或所有人/competitionOwner、参赛申报人为科技成果的第一完成人或所有人/competitionFirst、师生共创/bothInvention、组别/projectProgress、项目进展/projectStage" + + "公司名称/companyName、法人姓名/legalPersonName、法人职务/position、注册资金/registerFund、注册时间/registerDate、注册省份/registerProvince、注册地址/registerAddress、统一社会信用代码/unifyCode、财务报表地址/financialStatement、是否获得投资/investment、" + + "ownership(股权结构): [{ shareholderStatus/股东身份、shareholderName/股东名称、shareholdingRatio/持股比例 }]" + + "隐私设置/privacySetting(保密,公开)、materialsType/项目计划书类型、materialsSize/项目计划书大小、materialsName/项目计划书名称、materialsUrl/项目计划书地址、项目PPT地址/projectPptUrl、项目TTP类型/projectPptType、项目PPT名称/projectPptName" + + "patent(获得专利): [{专利国别/country、公开号/publicationNumber、专利标题/patentTitle、专利类型/patentType、专利号/patentNumber、专利申请人/patentApplicants、获得时间/issuedTime、到期时间/expirationTime、发明人/inventor、其他发明人/otherInventors}]"+ + "paper(论文发表): [{论文名称/paperTitle、发表期刊/publishedJournals、DOI号/doi、是否有共同/common、第一作者/firstAuthor、其他作者/otherAuthor}]"+ + "award(奖项): [{奖项名称/awardTitle、获奖项目名称/awardProjectTitle、level/级别、获奖人/prizewinner、获奖时间/winningTime}]"+ + "copyright(软件著作): [{软件名称/dynacomm、著作权人/copyrightOwner、权利获取方式/rightAcquisitionMethod、开发完成日期/developmentDate、开发发表日期/publishedDate、权利范围/interestField、登记号/registerNumber}]"+ + "works(作品著作): [{作品名称/worksName、作者/author、创作完成日期/completionDate、首次发表日期/firstPublicationDate、作品类别/worksType、登记号/registerNumber}]" + + "trademark(商标): [{国际分类号/classificationNumber、商标名称/tradeName、注册人/registeredPerson、注册时间/registeredDate、有效日期/effectiveDate、商标编号/trademarkNumber}]") + public ResponseVO updateVocationalProject(@RequestBody CreateVocationalProjectDTO createVocationalProjectDTO) { + projectService.updateVocationalProject(createVocationalProjectDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "getVocationalProject") + @LoginRequired(Platform.student) + @ApiOperation("学生端 ---职教赛道项目分页查询: matchId/赛事届数ID ,pageNo/当前页数, pageSize/每页显示条数") + public ResponseVO getVocationalProject(@RequestBody ProjectListPageDTO projectListPageDTO) { + return ResponseData.generateCreatedResponse(0, projectService.getVocationalProject(projectListPageDTO)); + } + + @PostMapping(value = "getVocationalProjectById") + @LoginRequired(Platform.student) + @ApiOperation("学生端(职教)--根据ID查询高职赛道项目信息") + public ResponseVO getVocationalProjectById() { + return ResponseData.generateCreatedResponse(0, projectService.getVocationalProjectById()); + } + + @PostMapping(value = "createVocationalMember") + @LoginRequired(Platform.student) + @ApiOperation("学生端(职教) ---保存职教赛道团队信息:name/姓名、school/就读学校、grade/年级、major/就读专业、sex/性别、studentNo/学籍号、email/邮箱 fiveYears" + + "teamMember/团队成员:[{ teamName/姓名、school/就读学校、grade/年级、major/就读专业、sex/性别、studentNo/学籍号 teamTelephone 手机号 }]" + + "mentor/指导老师:[{ teacherName/姓名、 company/工作单位、positionTitle/职称、position/职务、telephone/手机号 idCard}]") + public ResponseVO createVocationalMember(@RequestBody CreateProjectMemberDTO createProjectMemberDTO) { + projectService.createVocationalMember(createProjectMemberDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "updateVocationalMember") + @LoginRequired(Platform.student) + @ApiOperation("学生端(职教) ---保存职教赛道团队信息:id/项目ID、name/姓名、school/就读学校、grade/年级、major/就读专业、sex/性别、studentNo/学籍号、email/邮箱" + + "teamMember/团队成员:[{ teamName/姓名、school/就读学校、grade/年级、major/就读专业、sex/性别、studentNo/学籍号 }]" + + "mentor/指导老师:[{ teacherName/姓名、 company/工作单位、positionTitle/职称、position/职务、telephone/手机号}]") + public ResponseVO updateVocationalMember(@RequestBody CreateProjectMemberDTO createProjectMemberDTO) { + projectService.updateVocationalMember(createProjectMemberDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "getVocationalProjectMember") + @LoginRequired(Platform.student) + @ApiOperation("学生端(职教) ---查询职教项目团队信息") + public ResponseVO getVocationalProjectMember() { + return ResponseData.generateCreatedResponse(0, projectService.getProjectMember(ProjectType.VOCATIONAL)); + } + + /* -- 管理端 -- */ + @PostMapping(value = "/getVocationalProjectPage") + @LoginRequired(Platform.center) + @ApiOperation("中心端 --- 分页查询职教赛道项目管理:matchId/赛事ID,projectGroup/项目组别(高职、中职)、projectSchedule/项目进度(全部项目传空字符串、校内赛、市级初赛、市级复赛、市级决赛), " + + "projectStatus/项目状态, itemField/领域, name/搜名称, pageNo/当前页数 、pageSize/每页显示条数") + public ResponseVO getVocationalProjectPage(@RequestBody ProjectListPageDTO projectListPageDTO) { + return ResponseData.generateCreatedResponse(0, projectService.getVocationalProjectPage(projectListPageDTO)); + } + + @PostMapping(value = "updateAllEditStatus") + @LoginRequired(Platform.center) + @ApiOperation("中心端 --- 更新所有编辑状态:matchId/赛事ID、projectGroup/项目组别、projectSchedule/项目进度、editStatus/状态(0:关闭,1:开启)") + public ResponseVO updateAllEditStatus(@RequestBody EditStatusDTO editStatusDTO) { + projectService.updateAllEditStatus(editStatusDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "batchUpdateEditStatus") + @LoginRequired(Platform.center) + @ApiOperation("中心端 --- 批量更新编辑状态:ids/项目ID(数组)、editStatus/状态(0:关闭,1:开启)") + public ResponseVO batchUpdateEditStatus(@RequestBody EditStatusDTO editStatusDTO) { + projectService.batchUpdateEditStatus(editStatusDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "updateEditStatus") + @LoginRequired(Platform.center) + @ApiOperation("中心端 --- 更新编辑状态:id/项目ID、editStatus/状态(0:关闭,1:开启)") + public ResponseVO updateEditStatus(@RequestBody EditStatusDTO editStatusDTO) { + projectService.updateEditStatus(editStatusDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/getVocationalReviewList") + @LoginRequired({Platform.center}) + @ApiOperation("中心端 --- 职教评审列表:projectGroup/组别、projectName/搜索项目或院校、 projectStatus/项目状态(市级初赛、市级复赛、市级决赛)、projectReview/评审分配状态(已分配/未分配)、" + + "pageNo/当前页数、pageSize/每页显示条数") + public ResponseVO getVocationalReviewList(@RequestBody ReviewListDTO reviewListDTO) { + return ResponseData.generateCreatedResponse(0, projectService.getVocationalReviewList(reviewListDTO)); + } + + @PostMapping(value = "/getVocationalProjectDetail") + @LoginRequired({Platform.center, Platform.school, Platform.review}) + @ApiOperation("中心端/院校端 --- 职教赛道项目详情:id/项目ID") + public ResponseVO getVocationalProjectDetail(@RequestBody ProjectDO projectDO) { + return ResponseData.generateCreatedResponse(0, projectService.getVocationalProjectDetail(projectDO.getId())); + } + + /* -- 院校端 -- */ + @PostMapping(value = "/getVocationalProjectList") + @LoginRequired(Platform.school) + @ApiOperation("院校端 --- 分页查询职教赛道项目:matchId/赛事ID,projectGroup/项目组别、projectSchedule/项目进度(全部项目传空字符串、校内赛、初赛、复赛、决赛), " + + "projectStatus/项目状态, itemField/领域, name/搜名称, pageNo/当前页数 、pageSize/每页显示条数") + public ResponseVO getVocationalProjectList(@RequestBody ProjectListPageDTO projectListPageDTO) { + return ResponseData.generateCreatedResponse(0, projectService.getVocationalProjectList(projectListPageDTO)); + } + + @PostMapping(value = "getReviewVocationalNum") + @LoginRequired(Platform.review) + @ApiOperation("评审端 --- (职教)项目数量: matchId/赛事ID、projectGroup/项目组别、 projectSchedule/赛事状态 projectJudgeId") + public ResponseVO getReviewVocationalNum(@RequestBody ReviewVocationalNumDTO reviewVocationalNumDTO) { + return ResponseData.generateCreatedResponse(0, projectService.getReviewVocationalNum(reviewVocationalNumDTO)); + } + + /* -- 评审端 -- */ + @PostMapping(value = "/getVocationalProjectReviewPage") + @LoginRequired({Platform.review}) + @ApiOperation("评审端 ---职教评审项目分页查询:matchId/赛事年份ID、projectSchedule/项目进度(初赛、复赛、决赛)、status/状态(待评审, 已评审)、projectGroup/项目组别、projectName/搜索名称、pageNo/当前页数、pageSize/每页显示条数") + public ResponseVO getVocationalProjectReviewPage(@RequestBody ProjectReviewPageDTO projectReviewPageDTO) { + return ResponseData.generateCreatedResponse(0, projectService.getVocationalProjectReviewPage(projectReviewPageDTO)); + } + + @PostMapping(value = "getVocationalProjectNum") + @LoginRequired({Platform.center, Platform.school, Platform.review}) + @ApiOperation("中心端/院校端 --- (职教)项目管理数量: matchId/赛事ID、projectGroup/项目组别") + public ResponseVO getVocationalProjectNum(@RequestBody SeedTrackProjectNumDTO seedTrackProjectNumDTO) { + return ResponseData.generateCreatedResponse(0, projectService.getVocationalProjectNum(seedTrackProjectNumDTO)); + } + + @PostMapping(value = "/getVocationalReviewNum") + @LoginRequired({Platform.center}) + @ApiOperation("中心端 --- 职教评审列表(已评审 + 待评审)项目数量统计:matchId/赛事年份ID、projectGroup/组别(高职、中职), projectStatus/项目进度(校级申请项目、市级初赛项目、市级复赛项目、市级 决赛项目)") + public ResponseVO getVocationalReviewNum(@RequestBody ReviewListDTO reviewListDTO) { + return ResponseData.generateCreatedResponse(0, projectService.getVocationalReviewNum(reviewListDTO)); + } + + @PostMapping(value = "/getVocationalAssignNum") + @LoginRequired({Platform.center}) + @ApiOperation("中心端 --- 职教评审分配(已分配 + 未分配)项目数量统计:matchId/赛事年份ID、projectGroup/组别(高职、中职), projectStatus/项目进度(校级申请项目、市级初赛项目、市级复赛项目、市级 决赛项目)") + public ResponseVO getVocationalAssignNum(@RequestBody ReviewListDTO reviewListDTO) { + return ResponseData.generateCreatedResponse(0, projectService.getVocationalAssignNum(reviewListDTO)); + } + + @PostMapping(value = "importVocationalProject") + @ApiOperation("中心端/院校端 --- 导出高职项目赛事: projectGroup/项目组别") + @LoginRequired({ Platform.center, Platform.school }) + public void importVocationalProject(@RequestBody ImportVocationalProjectDTO importVocationalProjectDTO) { + projectService.importVocationalProject(importVocationalProjectDTO); + } + + @PostMapping(value = "importProjectByGroup") + @ApiOperation("中心端/院校端 ---excel 数据预览导出市级初赛/市级复赛项目: projectGroup/项目组别") + @LoginRequired({ Platform.center, Platform.school }) + public void importProjectByGroup(@RequestBody ImportVocationalProjectDTO importVocationalProjectDTO) { + projectService.importProjectByGroup(importVocationalProjectDTO); + } + + @PostMapping("exportProjectByGroup") + @ApiOperation("中心端/院校端 ---pdf 数据预览导出市级初赛/市级复赛项目: projectGroup/项目组别 matchId") +// @LoginRequired({ Platform.center, Platform.school }) + public void exportProjectByGroup(@RequestBody ImportVocationalProjectDTO importVocationalProjectDTO) { + projectService.exportProjectByGroup(importVocationalProjectDTO); + } + + + + + +} \ No newline at end of file diff --git a/src/main/java/com/zhongzhi/controller/ProjectCopyrightController.java b/src/main/java/com/zhongzhi/controller/ProjectCopyrightController.java new file mode 100644 index 0000000..62c2696 --- /dev/null +++ b/src/main/java/com/zhongzhi/controller/ProjectCopyrightController.java @@ -0,0 +1,20 @@ +package com.zhongzhi.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; + +/** + *

+ * 项目软件著作权 前端控制器 + *

+ * + * @author DengMin + * @since 2022-04-25 + */ +@RestController +@RequestMapping("/project-copyright-do") +public class ProjectCopyrightController { + +} diff --git a/src/main/java/com/zhongzhi/controller/ProjectJudgeController.java b/src/main/java/com/zhongzhi/controller/ProjectJudgeController.java new file mode 100644 index 0000000..5d825cc --- /dev/null +++ b/src/main/java/com/zhongzhi/controller/ProjectJudgeController.java @@ -0,0 +1,103 @@ +package com.zhongzhi.controller; + +import com.zhongzhi.common.constant.Platform; +import com.zhongzhi.common.utils.LoginRequired; +import com.zhongzhi.common.utils.ResponseData; +import com.zhongzhi.dto.administer.LoginDTO; +import com.zhongzhi.dto.judge.ProjectJudgePageDTO; +import com.zhongzhi.model.ProjectJudgeDO; +import com.zhongzhi.service.ProjectJudgeService; +import com.zhongzhi.vo.ResponseVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +/** + *

+ * 项目评审员 前端控制器 + *

+ * + * @author DengMin + * @since 2021-05-28 + */ +@RestController +@Api(tags = "评委") +@RequestMapping("/projectJudge") +public class ProjectJudgeController { + + @Autowired + private ProjectJudgeService projectJudgeService; + + @PostMapping(value = "/login") + @ApiOperation("评审端 --- 登录:telephone/手机号、code/验证码") + public ResponseVO login(@RequestBody LoginDTO loginDTO) { + return ResponseData.generateCreatedResponse(0, projectJudgeService.login(loginDTO)); + } + + @PostMapping(value = "/getProjectJudgePage") + @LoginRequired({Platform.center}) + @ApiOperation("中心端 ---评委列表:username/姓名、status/状态、pageNo/当前页数、 pageSize/每页显示条数") + public ResponseVO getProjectJudgePage(@RequestBody ProjectJudgePageDTO projectJudgePageDTO) { + return ResponseData.generateCreatedResponse(0, projectJudgeService.getProjectJudgePage(projectJudgePageDTO)); + } + + @PostMapping(value = "/createProjectJudge") + @LoginRequired({Platform.center}) + @ApiOperation("中心端 ---添加评委:username/姓名、telephone/手机号、 position/职位、unit/单位") + public ResponseVO createProjectJudge(@RequestBody ProjectJudgeDO projectJudgeDO) { + projectJudgeService.createProjectJudge(projectJudgeDO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/updateProjectJudge") + @LoginRequired({Platform.center}) + @ApiOperation("中心端 ---编辑评委:id/ID、username/姓名、telephone/手机号、 position/职位、unit/单位, status/状态(1:启用,0:禁用)") + public ResponseVO updateProjectJudge(@RequestBody ProjectJudgeDO projectJudgeDO) { + projectJudgeService.updateProjectJudge(projectJudgeDO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/delete") + @LoginRequired({Platform.center}) + @ApiOperation("中心端 ---删除评委:id/ID") + public ResponseVO delete(@RequestBody ProjectJudgeDO projectJudgeDO) { + projectJudgeService.removeById(projectJudgeDO.getId()); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/projectJudgesAssigned") + @LoginRequired({Platform.center}) + @ApiOperation("中心端 ---已分配项目评委列表: matchId/赛事ID、projectGroup/组别、projectSchedule/进度") + public ResponseVO projectJudgesAssigned(@RequestBody ProjectJudgePageDTO projectJudgePageDTO) { + return ResponseData.generateCreatedResponse(0, projectJudgeService.projectJudgesAssigned(projectJudgePageDTO)); + } + + @PostMapping(value = "/downloadJudgeTemplate") + @LoginRequired({Platform.center}) + @ApiOperation("中心端 ---下载导入评委模板") + public ResponseVO downloadJudgeTemplate() { + projectJudgeService.downloadTemplate(); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/importJudge") + @LoginRequired({Platform.center}) + @ApiOperation("中心端 ---导入评委:file/文件(数据格式:Form-Data)") + public ResponseVO importJudge(MultipartFile file) { + projectJudgeService.importJudge(file); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/exportProjectJudge") + @LoginRequired({Platform.center}) + @ApiOperation("中心端 ---导出评委") + public void exportProjectJudge() { + projectJudgeService.exportProjectJudge(); + } + +} diff --git a/src/main/java/com/zhongzhi/controller/ProjectMaterialsController.java b/src/main/java/com/zhongzhi/controller/ProjectMaterialsController.java new file mode 100644 index 0000000..b59c15e --- /dev/null +++ b/src/main/java/com/zhongzhi/controller/ProjectMaterialsController.java @@ -0,0 +1,20 @@ +package com.zhongzhi.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; + +/** + *

+ * 项目材料 前端控制器 + *

+ * + * @author DengMin + * @since 2021-05-11 + */ +@RestController +@RequestMapping("/projectMaterials") +public class ProjectMaterialsController { + +} diff --git a/src/main/java/com/zhongzhi/controller/ProjectMemberController.java b/src/main/java/com/zhongzhi/controller/ProjectMemberController.java new file mode 100644 index 0000000..6b7a2dc --- /dev/null +++ b/src/main/java/com/zhongzhi/controller/ProjectMemberController.java @@ -0,0 +1,20 @@ +package com.zhongzhi.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; + +/** + *

+ * 项目团队信息表 前端控制器 + *

+ * + * @author DengMin + * @since 2021-05-11 + */ +@RestController +@RequestMapping("/projectMember") +public class ProjectMemberController { + +} diff --git a/src/main/java/com/zhongzhi/controller/ProjectOwnershipStructureController.java b/src/main/java/com/zhongzhi/controller/ProjectOwnershipStructureController.java new file mode 100644 index 0000000..f3f2a29 --- /dev/null +++ b/src/main/java/com/zhongzhi/controller/ProjectOwnershipStructureController.java @@ -0,0 +1,20 @@ +package com.zhongzhi.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; + +/** + *

+ * 股权结构表 前端控制器 + *

+ * + * @author DengMin + * @since 2021-05-11 + */ +@RestController +@RequestMapping("/projectOwnershipStructure") +public class ProjectOwnershipStructureController { + +} diff --git a/src/main/java/com/zhongzhi/controller/ProjectPaperController.java b/src/main/java/com/zhongzhi/controller/ProjectPaperController.java new file mode 100644 index 0000000..9aea4fe --- /dev/null +++ b/src/main/java/com/zhongzhi/controller/ProjectPaperController.java @@ -0,0 +1,20 @@ +package com.zhongzhi.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; + +/** + *

+ * 项目论文 前端控制器 + *

+ * + * @author DengMin + * @since 2022-04-25 + */ +@RestController +@RequestMapping("/project-paper-do") +public class ProjectPaperController { + +} diff --git a/src/main/java/com/zhongzhi/controller/ProjectPatentController.java b/src/main/java/com/zhongzhi/controller/ProjectPatentController.java new file mode 100644 index 0000000..62251fd --- /dev/null +++ b/src/main/java/com/zhongzhi/controller/ProjectPatentController.java @@ -0,0 +1,20 @@ +package com.zhongzhi.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; + +/** + *

+ * 项目专利 前端控制器 + *

+ * + * @author DengMin + * @since 2022-04-25 + */ +@RestController +@RequestMapping("/project-patent-do") +public class ProjectPatentController { + +} diff --git a/src/main/java/com/zhongzhi/controller/ProjectReviewController.java b/src/main/java/com/zhongzhi/controller/ProjectReviewController.java new file mode 100644 index 0000000..8bbaafd --- /dev/null +++ b/src/main/java/com/zhongzhi/controller/ProjectReviewController.java @@ -0,0 +1,68 @@ +package com.zhongzhi.controller; + +import com.zhongzhi.common.constant.Platform; +import com.zhongzhi.common.utils.LoginRequired; +import com.zhongzhi.common.utils.ResponseData; +import com.zhongzhi.dto.review.CancelReviewDTO; +import com.zhongzhi.dto.review.ProjectReviewDTO; +import com.zhongzhi.dto.review.SetReviewDTO; +import com.zhongzhi.service.ProjectReviewService; +import com.zhongzhi.vo.ResponseVO; +import com.zhongzhi.vo.review.SendNoticeVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; + +/** + *

+ * 项目评审 前端控制器 + *

+ * + * @author DengMin + * @since 2021-05-18 + */ +@RestController +@Api(tags = "项目评审") +@RequestMapping("/projectReview") +public class ProjectReviewController { + + @Autowired + private ProjectReviewService projectReviewService; + + @PostMapping(value = "/setReview") + @LoginRequired({Platform.center}) + @ApiOperation("中心端 ---分配评审:[{projectId}]/项目ID、[{judgeId}]/评委ID、smsMessage/是否发送短信通知(0:不发送,1:发送)") + public ResponseVO setReview(@RequestBody SetReviewDTO setReviewDTO) { + projectReviewService.setReview(setReviewDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/sendNotice") + @LoginRequired({Platform.center}) + @ApiOperation("中心端 --- 发送通知评审:id/评委ID, matchId/赛事ID") + public ResponseVO sendNotice(@RequestBody SendNoticeVO sendNoticeVO) { + projectReviewService.sendNotice(sendNoticeVO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/cancelReview") + @LoginRequired({Platform.center}) + @ApiOperation("中心端 --- 撤销分配:projectId/项目ID、[{judgeId}]/评委ID、smsMessage/是否发送短信通知(0:不发送,1:发送)") + public ResponseVO cancelReview(@RequestBody CancelReviewDTO cancelReviewVO) { + projectReviewService.cancelReview(cancelReviewVO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/getProjectReview") + @LoginRequired({Platform.center}) + @ApiOperation("中心端 --- 已分配项目评审员:projectId/项目ID") + public ResponseVO getProjectReview(@RequestBody ProjectReviewDTO projectReviewDTO) { + return ResponseData.generateCreatedResponse(0, projectReviewService.getProjectReview(projectReviewDTO)); + } + +} diff --git a/src/main/java/com/zhongzhi/controller/ProjectReviewPeriodController.java b/src/main/java/com/zhongzhi/controller/ProjectReviewPeriodController.java new file mode 100644 index 0000000..b647614 --- /dev/null +++ b/src/main/java/com/zhongzhi/controller/ProjectReviewPeriodController.java @@ -0,0 +1,49 @@ +package com.zhongzhi.controller; + +import com.zhongzhi.common.constant.Platform; +import com.zhongzhi.common.utils.LoginRequired; +import com.zhongzhi.common.utils.ResponseData; +import com.zhongzhi.dto.period.ProjectReviewPeriodDTO; +import com.zhongzhi.model.ProjectReviewPeriodDO; +import com.zhongzhi.service.ProjectReviewPeriodService; +import com.zhongzhi.vo.ResponseVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + *

+ * 评审时段 前端控制器 + *

+ * + * @author DengMin + * @since 2021-06-10 + */ +@RestController +@Api(tags = "评审时段") +@RequestMapping("/projectReviewPeriod") +public class ProjectReviewPeriodController { + + @Autowired + private ProjectReviewPeriodService projectReviewPeriodService; + + @PostMapping(value = "/getProjectReviewPeriod") + @LoginRequired({Platform.center, Platform.school, Platform.review}) + @ApiOperation("中心端(种子赛道、职教赛道) --- 查询评审时间:matchId/赛事年份ID、projectGroup/项目组别(科技创新组、红色文创组、高职、中职)、projectSchedule/项目进度(市级初赛、市级复赛、市级决赛)") + public ResponseVO getProjectReviewPeriod(@RequestBody ProjectReviewPeriodDTO projectReviewPeriodDTO) { + return ResponseData.generateCreatedResponse(0, projectReviewPeriodService.getProjectReviewPeriod(projectReviewPeriodDTO)); + } + + @PostMapping(value = "/updateProjectReviewPeriod") + @LoginRequired(Platform.center) + @ApiOperation("中心端 --- 修改评审时间:id/ID、matchId/赛事ID、projectGroup/项目组别、projectSchedule/项目进度、startTime/开始时间、endTime/结束时间") + public ResponseVO updateProjectReviewPeriod(@RequestBody ProjectReviewPeriodDO projectReviewPeriodDO) { + projectReviewPeriodService.updateProjectReviewPeriod(projectReviewPeriodDO); + return ResponseData.generateCreatedResponse(0); + } + +} diff --git a/src/main/java/com/zhongzhi/controller/ProjectScheduleRecordController.java b/src/main/java/com/zhongzhi/controller/ProjectScheduleRecordController.java new file mode 100644 index 0000000..30df3b4 --- /dev/null +++ b/src/main/java/com/zhongzhi/controller/ProjectScheduleRecordController.java @@ -0,0 +1,41 @@ +package com.zhongzhi.controller; + +import com.zhongzhi.common.constant.Platform; +import com.zhongzhi.common.utils.LoginRequired; +import com.zhongzhi.common.utils.ResponseData; +import com.zhongzhi.dto.scheduleRecord.ProjectScheduleRecordDTO; +import com.zhongzhi.service.ProjectScheduleRecordService; +import com.zhongzhi.vo.ResponseVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; + +/** + *

+ * 项目进度记录 前端控制器 + *

+ * + * @author DengMin + * @since 2021-06-02 + */ +@RestController +@Api(tags = "项目进度记录") +@RequestMapping("/projectScheduleRecord") +public class ProjectScheduleRecordController { + + @Autowired + private ProjectScheduleRecordService projectScheduleRecordService; + + @PostMapping(value = "/getProjectScheduleRecord") + @ApiOperation("中心端 ---获奖情况") + @LoginRequired({Platform.center}) + public ResponseVO getProjectScheduleRecord(@RequestBody ProjectScheduleRecordDTO projectScheduleRecordDTO) { + return ResponseData.generateCreatedResponse(0, projectScheduleRecordService.getProjectScheduleRecord(projectScheduleRecordDTO)); + } + +} diff --git a/src/main/java/com/zhongzhi/controller/ProjectTrademarkController.java b/src/main/java/com/zhongzhi/controller/ProjectTrademarkController.java new file mode 100644 index 0000000..727eeff --- /dev/null +++ b/src/main/java/com/zhongzhi/controller/ProjectTrademarkController.java @@ -0,0 +1,20 @@ +package com.zhongzhi.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; + +/** + *

+ * 项目作品 前端控制器 + *

+ * + * @author DengMin + * @since 2022-04-25 + */ +@RestController +@RequestMapping("/project-trademark-do") +public class ProjectTrademarkController { + +} diff --git a/src/main/java/com/zhongzhi/controller/ProjectWorksController.java b/src/main/java/com/zhongzhi/controller/ProjectWorksController.java new file mode 100644 index 0000000..29141dc --- /dev/null +++ b/src/main/java/com/zhongzhi/controller/ProjectWorksController.java @@ -0,0 +1,20 @@ +package com.zhongzhi.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; + +/** + *

+ * 项目作品 前端控制器 + *

+ * + * @author DengMin + * @since 2022-04-25 + */ +@RestController +@RequestMapping("/project-works-do") +public class ProjectWorksController { + +} diff --git a/src/main/java/com/zhongzhi/controller/SmsCodeController.java b/src/main/java/com/zhongzhi/controller/SmsCodeController.java new file mode 100644 index 0000000..8a375c3 --- /dev/null +++ b/src/main/java/com/zhongzhi/controller/SmsCodeController.java @@ -0,0 +1,62 @@ +package com.zhongzhi.controller; + +import com.zhongzhi.common.constant.Platform; +import com.zhongzhi.common.utils.LoginRequired; +import com.zhongzhi.common.utils.ResponseData; +import com.zhongzhi.model.AdministerDO; +import com.zhongzhi.model.SmsCodeDO; +import com.zhongzhi.service.SmsCodeService; +import com.zhongzhi.vo.ResponseVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + *

+ * 短信验证码 前端控制器 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +@RestController +@Api(tags = "短信验证码") +@RequestMapping("/smsCode") +public class SmsCodeController { + + @Autowired + private SmsCodeService smsCodeService; + + @PostMapping(value = "/sendRegisterCode") + @ApiOperation("学生端 ---注册验证码:telephone/手机号") + public ResponseVO sendRegisterCode(@RequestBody SmsCodeDO smsCodeDO) { + smsCodeService.sendRegisterCode(smsCodeDO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/sendStudentLoginCode") + @ApiOperation("学生端 ---登陆验证码:telephone/手机号") + public ResponseVO sendStudentLoginCode(@RequestBody SmsCodeDO smsCodeDO) { + smsCodeService.sendStudentLoginCode(smsCodeDO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/sendAdministerLoginCode") + @ApiOperation("中心端 --- 中心端登陆验证码:telephone/手机号") + public ResponseVO sendAdministerLoginCode(@RequestBody AdministerDO administerDO) { + smsCodeService.sendAdministerLoginCode(administerDO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "/sendJudgeLoginCode") + @ApiOperation("评审端 ---登陆验证码:telephone/手机号") + public ResponseVO sendJudgeLoginCode(@RequestBody SmsCodeDO smsCodeDO) { + smsCodeService.sendJudgeLoginCode(smsCodeDO); + return ResponseData.generateCreatedResponse(0); + } + +} diff --git a/src/main/java/com/zhongzhi/controller/SmsNoticeController.java b/src/main/java/com/zhongzhi/controller/SmsNoticeController.java new file mode 100644 index 0000000..f143fda --- /dev/null +++ b/src/main/java/com/zhongzhi/controller/SmsNoticeController.java @@ -0,0 +1,59 @@ +package com.zhongzhi.controller; + + +import com.zhongzhi.common.constant.Platform; +import com.zhongzhi.common.utils.LoginRequired; +import com.zhongzhi.common.utils.ResponseData; +import com.zhongzhi.dto.notice.SmsNoticeDTO; +import com.zhongzhi.dto.notice.SmsNoticePageDTO; +import com.zhongzhi.service.SmsNoticeService; +import com.zhongzhi.vo.ResponseVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; + +/** + *

+ * 短信通知记录 前端控制器 + *

+ * + * @author DengMin + * @since 2022-04-15 + */ +@RestController +@Api(tags = "短信通知") +@RequestMapping("/smsNotice") +public class SmsNoticeController { + + @Autowired + private SmsNoticeService smsNoticeService; + + @PostMapping(value = "batchSend") + @LoginRequired({Platform.center}) + @ApiOperation("管理端 -- 批量发送短信:matchId/赛事年份ID、projectGroup/组别、projectSchedule/阶段、projectStatus/状态、name/搜索名称") + public ResponseVO batchSend(@RequestBody SmsNoticeDTO smsNoticeDTO) { + smsNoticeService.batchSend(smsNoticeDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "send") + @LoginRequired({Platform.center}) + @ApiOperation("管理端 -- 发送短信:ids/项目ID(数组)") + public ResponseVO send(@RequestBody SmsNoticeDTO smsNoticeDTO) { + smsNoticeService.send(smsNoticeDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "getListByPage") + @LoginRequired({Platform.center}) + @ApiOperation("管理端 -- 发送短信记录:date/日期、name/搜索名称、pageNo、pageSize") + public ResponseVO getListByPage(@RequestBody SmsNoticePageDTO smsNoticePageDTO) { + return ResponseData.generateCreatedResponse(0, smsNoticeService.getListByPage(smsNoticePageDTO)); + } + +} \ No newline at end of file diff --git a/src/main/java/com/zhongzhi/controller/StudentController.java b/src/main/java/com/zhongzhi/controller/StudentController.java new file mode 100644 index 0000000..d309c1b --- /dev/null +++ b/src/main/java/com/zhongzhi/controller/StudentController.java @@ -0,0 +1,55 @@ +package com.zhongzhi.controller; + +import com.zhongzhi.common.constant.Platform; +import com.zhongzhi.common.utils.LoginRequired; +import com.zhongzhi.common.utils.ResponseData; +import com.zhongzhi.dto.student.LoginDTO; +import com.zhongzhi.dto.student.RegisterDTO; +import com.zhongzhi.model.StudentDO; +import com.zhongzhi.service.StudentService; +import com.zhongzhi.vo.ResponseVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + *

+ * 前端控制器 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +@RestController +@Api(tags = "学生") +@RequestMapping("/student") +public class StudentController { + + @Autowired + private StudentService studentService; + + @PostMapping(value = "/register") + @ApiOperation("注册:name/真实姓名, idCard/身份证, telephone/手机号, code/验证码, " + + "education/学历层次, school/就读院校, major/就读专业, enrollmentDate/入学年份, graduateDate/毕业年份") + public ResponseVO register(@RequestBody RegisterDTO registerDTO) { + return ResponseData.generateCreatedResponse(0, studentService.register(registerDTO)); + } + + @PostMapping(value = "/login") + @ApiOperation("登陆:telephone/手机号, code/验证码") + public ResponseVO login(@RequestBody LoginDTO loginDTO) { + return ResponseData.generateCreatedResponse(0, studentService.login(loginDTO)); + } + + @PostMapping(value = "updateStudentInfo") + @LoginRequired({ Platform.student }) + @ApiOperation("登陆:id/ID, education/学历, college/就读院校, major/专业, enrollmentDate/入学年份, graduateDate/毕业年份") + public ResponseVO updateStudentInfo(@RequestBody StudentDO studentDO) { + studentService.updateStudentInfo(studentDO); + return ResponseData.generateCreatedResponse(0); + } +} diff --git a/src/main/java/com/zhongzhi/controller/VodDictController.java b/src/main/java/com/zhongzhi/controller/VodDictController.java new file mode 100644 index 0000000..ba1d62b --- /dev/null +++ b/src/main/java/com/zhongzhi/controller/VodDictController.java @@ -0,0 +1,84 @@ +package com.zhongzhi.controller; + + +import com.zhongzhi.common.utils.ResponseData; +import com.zhongzhi.dto.course.ChangeOrdersDTO; +import com.zhongzhi.dto.course.VodsDTO; +import com.zhongzhi.model.CourseDictDO; +import com.zhongzhi.model.VodDictDO; +import com.zhongzhi.service.VodDictService; +import com.zhongzhi.vo.ResponseVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; + +/** + *

+ * 前端控制器 + *

+ * + * @author DengMin + * @since 2022-11-14 + */ +@RestController +@RequestMapping("/vodDict") +@Api(tags = "视频字典表") +public class VodDictController { + + @Autowired + private VodDictService vodDictService; + + @PostMapping("/signature") + @ApiOperation("获取签名") + public ResponseVO signature()throws Exception{ + return ResponseData.generateCreatedResponse(0,vodDictService.signature()); + } + + + @PostMapping("deleteVod") + @ApiOperation("删除视频 id") + public ResponseVO deleteVod(@RequestBody VodDictDO vodDictDO){ + vodDictService.deleteVod(vodDictDO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping("addVod") + @ApiOperation("新增视频 courseId vodName vodUrl vodCode vodLength vodSize vodFormat coverPage") + public ResponseVO orderNo(@RequestBody VodDictDO vodDictDO){ + vodDictService.addVod(vodDictDO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping("updateVod") + @ApiOperation("修改视频 id vodName vodName vodUrl vodCode vodLength vodSize vodFormat coverPage ") + public ResponseVO updateVod(@RequestBody VodDictDO vodDictDO){ + vodDictService.updateVod(vodDictDO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping("changeOrders") + @ApiOperation("排序 ids[]") + public ResponseVO changeOrders(@RequestBody ChangeOrdersDTO changeOrdersDTO){ + vodDictService.changeOrders(changeOrdersDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping("vods") + @ApiOperation("查询课程下的视频 courseId vodName") + public ResponseVO vods(@RequestBody VodsDTO vodsDTO){ + return ResponseData.generateCreatedResponse(0, vodDictService.vods(vodsDTO)); + } + + @PostMapping("fourVods") + @ApiOperation("首页只查询4个视频 yearId ") + public ResponseVO fourVods(@RequestBody CourseDictDO courseDictDO){ + return ResponseData.generateCreatedResponse(0,vodDictService.fourVods(courseDictDO)); + } + + +} diff --git a/src/main/java/com/zhongzhi/controller/YearDictController.java b/src/main/java/com/zhongzhi/controller/YearDictController.java new file mode 100644 index 0000000..ac1c090 --- /dev/null +++ b/src/main/java/com/zhongzhi/controller/YearDictController.java @@ -0,0 +1,53 @@ +package com.zhongzhi.controller; + + +import com.zhongzhi.common.utils.ResponseData; +import com.zhongzhi.model.YearDictDO; +import com.zhongzhi.service.YearDictService; +import com.zhongzhi.vo.ResponseVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; + +/** + *

+ * 年份字典表 前端控制器 + *

+ * + * @author DengMin + * @since 2023-04-11 + */ +@RestController +@RequestMapping("/yearDict") +@Api(tags = "年份管理") +public class YearDictController { + + @Autowired + private YearDictService yearDictService; + + @PostMapping("queryYears") + @ApiOperation("查询年份") + public ResponseVO queryYears(){ + return ResponseData.generateCreatedResponse(0,yearDictService.queryYears()); + } + + @PostMapping("updateYear") + @ApiOperation("编辑年份 id year status") + public ResponseVO updateYear(@RequestBody YearDictDO yearDictDO){ + yearDictService.updateYear(yearDictDO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping("addYear") + @ApiOperation("添加年份 year status ") + public ResponseVO addYear(@RequestBody YearDictDO yearDictDO){ + yearDictService.addYear(yearDictDO); + return ResponseData.generateCreatedResponse(0); + } + +} diff --git a/src/main/java/com/zhongzhi/dao/AdministerDAO.java b/src/main/java/com/zhongzhi/dao/AdministerDAO.java new file mode 100644 index 0000000..0d51a5f --- /dev/null +++ b/src/main/java/com/zhongzhi/dao/AdministerDAO.java @@ -0,0 +1,18 @@ +package com.zhongzhi.dao; + +import com.zhongzhi.model.AdministerDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.springframework.stereotype.Repository; + +/** + *

+ * 中心管理账户表 Mapper 接口 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +@Repository +public interface AdministerDAO extends BaseMapper { + +} diff --git a/src/main/java/com/zhongzhi/dao/AdministerPermissionDAO.java b/src/main/java/com/zhongzhi/dao/AdministerPermissionDAO.java new file mode 100644 index 0000000..feb2306 --- /dev/null +++ b/src/main/java/com/zhongzhi/dao/AdministerPermissionDAO.java @@ -0,0 +1,18 @@ +package com.zhongzhi.dao; + +import com.zhongzhi.model.AdministerPermissionDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.springframework.stereotype.Repository; + +/** + *

+ * 系统用户权限表 Mapper 接口 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +@Repository +public interface AdministerPermissionDAO extends BaseMapper { + +} diff --git a/src/main/java/com/zhongzhi/dao/CollegesDictDAO.java b/src/main/java/com/zhongzhi/dao/CollegesDictDAO.java new file mode 100644 index 0000000..50ca542 --- /dev/null +++ b/src/main/java/com/zhongzhi/dao/CollegesDictDAO.java @@ -0,0 +1,30 @@ +package com.zhongzhi.dao; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.zhongzhi.dto.college.ExportCollegeDTO; +import com.zhongzhi.model.CollegesDictDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.zhongzhi.vo.college.AwardedListVO; +import com.zhongzhi.vo.college.CollegePageVO; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + *

+ * 院校字典表 Mapper 接口 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +@Repository +public interface CollegesDictDAO extends BaseMapper { + + IPage listPage(Page page, String name); + + IPage getAwardedList(Page page, String name); + + List getAwardedListAll(); +} diff --git a/src/main/java/com/zhongzhi/dao/CourseDictDAO.java b/src/main/java/com/zhongzhi/dao/CourseDictDAO.java new file mode 100644 index 0000000..e441c9a --- /dev/null +++ b/src/main/java/com/zhongzhi/dao/CourseDictDAO.java @@ -0,0 +1,22 @@ +package com.zhongzhi.dao; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.zhongzhi.model.CourseDictDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.zhongzhi.vo.course.CoursesVO; +import org.springframework.stereotype.Repository; + +/** + *

+ * Mapper 接口 + *

+ * + * @author DengMin + * @since 2022-11-14 + */ +@Repository +public interface CourseDictDAO extends BaseMapper { + + IPage courses(IPage page, String courseName,Long yearId); + +} diff --git a/src/main/java/com/zhongzhi/dao/FinalMatchMemberDAO.java b/src/main/java/com/zhongzhi/dao/FinalMatchMemberDAO.java new file mode 100644 index 0000000..af5ca99 --- /dev/null +++ b/src/main/java/com/zhongzhi/dao/FinalMatchMemberDAO.java @@ -0,0 +1,38 @@ +package com.zhongzhi.dao; + +import com.zhongzhi.model.FinalMatchMemberDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.zhongzhi.vo.college.ExportListVO; +import com.zhongzhi.vo.college.RegisterMembersVO; +import com.zhongzhi.vo.college.SchoolsVO; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + *

+ * Mapper 接口 + *

+ * + * @author DengMin + * @since 2024-07-12 + */ +@Repository +public interface FinalMatchMemberDAO extends BaseMapper { + + List registerMembers(Long collegeId,Long matchId); + + List otherMembers(Long collegeId,Long matchId); + + List cars(Long collegeId,Long matchId); + + String latestUpdateTime(Long collegeId); + + List schools(Long matchId,String name); + + /** + * 导出名单 + */ + List exportList(Long matchId,Long collegeId); + +} diff --git a/src/main/java/com/zhongzhi/dao/FundDictDAO.java b/src/main/java/com/zhongzhi/dao/FundDictDAO.java new file mode 100644 index 0000000..5446e6c --- /dev/null +++ b/src/main/java/com/zhongzhi/dao/FundDictDAO.java @@ -0,0 +1,18 @@ +package com.zhongzhi.dao; + +import com.zhongzhi.model.FundDictDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.springframework.stereotype.Repository; + +/** + *

+ * 届数表 Mapper 接口 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +@Repository +public interface FundDictDAO extends BaseMapper { + +} diff --git a/src/main/java/com/zhongzhi/dao/ItemFieldDictDAO.java b/src/main/java/com/zhongzhi/dao/ItemFieldDictDAO.java new file mode 100644 index 0000000..086537b --- /dev/null +++ b/src/main/java/com/zhongzhi/dao/ItemFieldDictDAO.java @@ -0,0 +1,18 @@ +package com.zhongzhi.dao; + +import com.zhongzhi.model.ItemFieldDictDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.springframework.stereotype.Repository; + +/** + *

+ * 行业领域字典表 Mapper 接口 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +@Repository +public interface ItemFieldDictDAO extends BaseMapper { + +} diff --git a/src/main/java/com/zhongzhi/dao/MajorDictDAO.java b/src/main/java/com/zhongzhi/dao/MajorDictDAO.java new file mode 100644 index 0000000..6f43c8d --- /dev/null +++ b/src/main/java/com/zhongzhi/dao/MajorDictDAO.java @@ -0,0 +1,18 @@ +package com.zhongzhi.dao; + +import com.zhongzhi.model.MajorDictDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.springframework.stereotype.Repository; + +/** + *

+ * 专业字典表 Mapper 接口 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +@Repository +public interface MajorDictDAO extends BaseMapper { + +} diff --git a/src/main/java/com/zhongzhi/dao/MatchCollegePdfMapper.java b/src/main/java/com/zhongzhi/dao/MatchCollegePdfMapper.java new file mode 100644 index 0000000..52d23b7 --- /dev/null +++ b/src/main/java/com/zhongzhi/dao/MatchCollegePdfMapper.java @@ -0,0 +1,9 @@ +package com.zhongzhi.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.zhongzhi.model.MatchCollegePdfDO; +import org.springframework.stereotype.Repository; + +@Repository +public interface MatchCollegePdfMapper extends BaseMapper { +} diff --git a/src/main/java/com/zhongzhi/dao/MatchDictDAO.java b/src/main/java/com/zhongzhi/dao/MatchDictDAO.java new file mode 100644 index 0000000..1dc7bdf --- /dev/null +++ b/src/main/java/com/zhongzhi/dao/MatchDictDAO.java @@ -0,0 +1,27 @@ +package com.zhongzhi.dao; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.zhongzhi.model.MatchDictDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.zhongzhi.vo.match.MatchDictVO; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + *

+ * 赛事年份管理 Mapper 接口 + *

+ * + * @author DengMin + * @since 2021-05-17 + */ +@Repository +public interface MatchDictDAO extends BaseMapper { + + IPage getSeedTrackMatchPage(Page page, String matchType); + + List getList(@Param("projectType") String projectType, @Param("projectGroup") String projectGroup); +} diff --git a/src/main/java/com/zhongzhi/dao/MatchScheduleDAO.java b/src/main/java/com/zhongzhi/dao/MatchScheduleDAO.java new file mode 100644 index 0000000..514bd19 --- /dev/null +++ b/src/main/java/com/zhongzhi/dao/MatchScheduleDAO.java @@ -0,0 +1,18 @@ +package com.zhongzhi.dao; + +import com.zhongzhi.model.MatchScheduleDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.springframework.stereotype.Repository; + +/** + *

+ * 时间安排 Mapper 接口 + *

+ * + * @author DengMin + * @since 2021-05-27 + */ +@Repository +public interface MatchScheduleDAO extends BaseMapper { + +} diff --git a/src/main/java/com/zhongzhi/dao/MessageDAO.java b/src/main/java/com/zhongzhi/dao/MessageDAO.java new file mode 100644 index 0000000..cdf7134 --- /dev/null +++ b/src/main/java/com/zhongzhi/dao/MessageDAO.java @@ -0,0 +1,18 @@ +package com.zhongzhi.dao; + +import com.zhongzhi.model.MessageDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.springframework.stereotype.Repository; + +/** + *

+ * 通知消息表 Mapper 接口 + *

+ * + * @author DengMin + * @since 2021-05-17 + */ +@Repository +public interface MessageDAO extends BaseMapper { + +} diff --git a/src/main/java/com/zhongzhi/dao/PermissionsDAO.java b/src/main/java/com/zhongzhi/dao/PermissionsDAO.java new file mode 100644 index 0000000..b9b2e3f --- /dev/null +++ b/src/main/java/com/zhongzhi/dao/PermissionsDAO.java @@ -0,0 +1,22 @@ +package com.zhongzhi.dao; + +import com.zhongzhi.model.PermissionsDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.zhongzhi.vo.permission.PermissionVO; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + *

+ * 权限表 Mapper 接口 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +@Repository +public interface PermissionsDAO extends BaseMapper { + + List getPermissionById(Long id); +} diff --git a/src/main/java/com/zhongzhi/dao/ProjectAwardMapper.java b/src/main/java/com/zhongzhi/dao/ProjectAwardMapper.java new file mode 100644 index 0000000..92a0d33 --- /dev/null +++ b/src/main/java/com/zhongzhi/dao/ProjectAwardMapper.java @@ -0,0 +1,18 @@ +package com.zhongzhi.dao; + +import com.zhongzhi.model.ProjectAwardDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.springframework.stereotype.Repository; + +/** + *

+ * 项目奖项 Mapper 接口 + *

+ * + * @author DengMin + * @since 2022-04-25 + */ +@Repository +public interface ProjectAwardMapper extends BaseMapper { + +} diff --git a/src/main/java/com/zhongzhi/dao/ProjectCopyrightMapper.java b/src/main/java/com/zhongzhi/dao/ProjectCopyrightMapper.java new file mode 100644 index 0000000..117fbec --- /dev/null +++ b/src/main/java/com/zhongzhi/dao/ProjectCopyrightMapper.java @@ -0,0 +1,18 @@ +package com.zhongzhi.dao; + +import com.zhongzhi.model.ProjectCopyrightDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.springframework.stereotype.Repository; + +/** + *

+ * 项目软件著作权 Mapper 接口 + *

+ * + * @author DengMin + * @since 2022-04-25 + */ +@Repository +public interface ProjectCopyrightMapper extends BaseMapper { + +} diff --git a/src/main/java/com/zhongzhi/dao/ProjectDAO.java b/src/main/java/com/zhongzhi/dao/ProjectDAO.java new file mode 100644 index 0000000..55d0ab7 --- /dev/null +++ b/src/main/java/com/zhongzhi/dao/ProjectDAO.java @@ -0,0 +1,55 @@ +package com.zhongzhi.dao; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.zhongzhi.model.ProjectDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.zhongzhi.vo.project.*; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + *

+ * 项目表 Mapper 接口 + *

+ * + * @author DengMin + * @since 2021-05-11 + */ +@Repository +public interface ProjectDAO extends BaseMapper { + + IPage getListPage(Page page, Long matchId, Long proposerId, String projectType); + + IPage getMainTrackProjectPage(Page page, Long matchId, String projectGroup, @Param("type") String type, @Param("projectType") String projectType, + String projectSchedule, + String projectStatus, String itemField, @Param("name") String name); + + IPage getSeedTrackProjectPage(Page page, Long matchId, String projectGroup, @Param("type") String type, @Param("projectType") String projectType, + @Param("school") String school, String projectSchedule, + String projectStatus, String itemField, @Param("name") String name,@Param("projectProgress") String projectProgress); + + IPage getReviewList(Page page, String projectName, String projectGroup, String projectReview, Long matchId, String projectStatus, String projectAssigned,String projectProgress); + + IPage getProjectReviewPage(Page page, Long judgeId, Long matchId, String projectName, String projectSchedule, String projectReview, String projectGroup,String projectProgress); + + List getProjectReviewList(Long id, Long matchId,String projectProgress); + + List getProjectByCollege(Long matchId, @Param("name") String name, String projectProgress); + + List getSeedTrackProjectList(Long matchId, String projectGroup, @Param("name") String name,@Param("projectProgress")String projectProgress); + + List selectListByCollege(String projectType, String projectGroup, @Param("name") String name); + + List getList(Long matchId, @Param("name") String name, String projectGroup); + + List getProjectList(Long matchId, String projectGroup, String projectSchedule, String projectStatus, @Param("name") String name); + + List getListByJudgeId(Long matchId, String projectGroup, @Param("judgeId") Long judgeId); + + List getProjectById(@Param("ids") Long[] ids); + + List projects(Long matchId,Long collegeId,String college); +} diff --git a/src/main/java/com/zhongzhi/dao/ProjectJudgeDAO.java b/src/main/java/com/zhongzhi/dao/ProjectJudgeDAO.java new file mode 100644 index 0000000..79dd8b7 --- /dev/null +++ b/src/main/java/com/zhongzhi/dao/ProjectJudgeDAO.java @@ -0,0 +1,25 @@ +package com.zhongzhi.dao; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.zhongzhi.model.ProjectJudgeDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.zhongzhi.vo.judge.ProjectJudgePageVO; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +/** + *

+ * 项目评审员 Mapper 接口 + *

+ * + * @author DengMin + * @since 2021-05-28 + */ +@Repository +public interface ProjectJudgeDAO extends BaseMapper { + + IPage getProjectJudgePage(Page page, String username, Integer status); + + IPage projectJudgesAssigned(Page page, @Param("matchId") Long matchId, @Param("projectGroup") String projectGroup, @Param("projectSchedule") String projectSchedule); +} diff --git a/src/main/java/com/zhongzhi/dao/ProjectMaterialsDAO.java b/src/main/java/com/zhongzhi/dao/ProjectMaterialsDAO.java new file mode 100644 index 0000000..073ab4a --- /dev/null +++ b/src/main/java/com/zhongzhi/dao/ProjectMaterialsDAO.java @@ -0,0 +1,18 @@ +package com.zhongzhi.dao; + +import com.zhongzhi.model.ProjectMaterialsDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.springframework.stereotype.Repository; + +/** + *

+ * 项目材料 Mapper 接口 + *

+ * + * @author DengMin + * @since 2021-05-11 + */ +@Repository +public interface ProjectMaterialsDAO extends BaseMapper { + +} diff --git a/src/main/java/com/zhongzhi/dao/ProjectMemberDAO.java b/src/main/java/com/zhongzhi/dao/ProjectMemberDAO.java new file mode 100644 index 0000000..62a204f --- /dev/null +++ b/src/main/java/com/zhongzhi/dao/ProjectMemberDAO.java @@ -0,0 +1,25 @@ +package com.zhongzhi.dao; + +import com.zhongzhi.model.ProjectMemberDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + *

+ * 项目团队信息表 Mapper 接口 + *

+ * + * @author DengMin + * @since 2021-05-11 + */ +@Repository +public interface ProjectMemberDAO extends BaseMapper { + + /** + * 团队成员 + */ + List projectMembers(Long projectId); + +} diff --git a/src/main/java/com/zhongzhi/dao/ProjectOwnershipStructureDAO.java b/src/main/java/com/zhongzhi/dao/ProjectOwnershipStructureDAO.java new file mode 100644 index 0000000..f033c5f --- /dev/null +++ b/src/main/java/com/zhongzhi/dao/ProjectOwnershipStructureDAO.java @@ -0,0 +1,18 @@ +package com.zhongzhi.dao; + +import com.zhongzhi.model.ProjectOwnershipStructureDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.springframework.stereotype.Repository; + +/** + *

+ * 股权结构表 Mapper 接口 + *

+ * + * @author DengMin + * @since 2021-05-11 + */ +@Repository +public interface ProjectOwnershipStructureDAO extends BaseMapper { + +} diff --git a/src/main/java/com/zhongzhi/dao/ProjectPaperMapper.java b/src/main/java/com/zhongzhi/dao/ProjectPaperMapper.java new file mode 100644 index 0000000..7d75482 --- /dev/null +++ b/src/main/java/com/zhongzhi/dao/ProjectPaperMapper.java @@ -0,0 +1,18 @@ +package com.zhongzhi.dao; + +import com.zhongzhi.model.ProjectPaperDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.springframework.stereotype.Repository; + +/** + *

+ * 项目论文 Mapper 接口 + *

+ * + * @author DengMin + * @since 2022-04-25 + */ +@Repository +public interface ProjectPaperMapper extends BaseMapper { + +} diff --git a/src/main/java/com/zhongzhi/dao/ProjectPatentMapper.java b/src/main/java/com/zhongzhi/dao/ProjectPatentMapper.java new file mode 100644 index 0000000..9598bf3 --- /dev/null +++ b/src/main/java/com/zhongzhi/dao/ProjectPatentMapper.java @@ -0,0 +1,18 @@ +package com.zhongzhi.dao; + +import com.zhongzhi.model.ProjectPatentDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.springframework.stereotype.Repository; + +/** + *

+ * 项目专利 Mapper 接口 + *

+ * + * @author DengMin + * @since 2022-04-25 + */ +@Repository +public interface ProjectPatentMapper extends BaseMapper { + +} diff --git a/src/main/java/com/zhongzhi/dao/ProjectReviewDAO.java b/src/main/java/com/zhongzhi/dao/ProjectReviewDAO.java new file mode 100644 index 0000000..f6ad28a --- /dev/null +++ b/src/main/java/com/zhongzhi/dao/ProjectReviewDAO.java @@ -0,0 +1,26 @@ +package com.zhongzhi.dao; + +import com.zhongzhi.model.ProjectReviewDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.zhongzhi.vo.judge.ProjectReviewVO; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + *

+ * 项目评审 Mapper 接口 + *

+ * + * @author DengMin + * @since 2021-05-18 + */ +@Repository +public interface ProjectReviewDAO extends BaseMapper { + + List getList(String projectSchedule, Long projectId); + + Integer selectCountByMatchId(Long judgeId, Long matchId); + + Integer selectNotReviewCount(Long judgeId, Long matchId); +} diff --git a/src/main/java/com/zhongzhi/dao/ProjectReviewPeriodMapper.java b/src/main/java/com/zhongzhi/dao/ProjectReviewPeriodMapper.java new file mode 100644 index 0000000..3d28726 --- /dev/null +++ b/src/main/java/com/zhongzhi/dao/ProjectReviewPeriodMapper.java @@ -0,0 +1,18 @@ +package com.zhongzhi.dao; + +import com.zhongzhi.model.ProjectReviewPeriodDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.springframework.stereotype.Repository; + +/** + *

+ * 评审时段 Mapper 接口 + *

+ * + * @author DengMin + * @since 2021-06-10 + */ +@Repository +public interface ProjectReviewPeriodMapper extends BaseMapper { + +} diff --git a/src/main/java/com/zhongzhi/dao/ProjectScheduleRecordDAO.java b/src/main/java/com/zhongzhi/dao/ProjectScheduleRecordDAO.java new file mode 100644 index 0000000..c9a9ec2 --- /dev/null +++ b/src/main/java/com/zhongzhi/dao/ProjectScheduleRecordDAO.java @@ -0,0 +1,27 @@ +package com.zhongzhi.dao; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.zhongzhi.model.ProjectScheduleRecordDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.zhongzhi.vo.scheduleRecord.ProjectScheduleRecordVO; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + *

+ * 项目进度记录 Mapper 接口 + *

+ * + * @author DengMin + * @since 2021-06-02 + */ +@Repository +public interface ProjectScheduleRecordDAO extends BaseMapper { + + IPage getProjectScheduleRecord(Page page, Long matchId, @Param("name") String name); + + List getList(Long matchId, String college, @Param("projectGroup") String projectGroup); +} diff --git a/src/main/java/com/zhongzhi/dao/ProjectTrademarkMapper.java b/src/main/java/com/zhongzhi/dao/ProjectTrademarkMapper.java new file mode 100644 index 0000000..6a7973f --- /dev/null +++ b/src/main/java/com/zhongzhi/dao/ProjectTrademarkMapper.java @@ -0,0 +1,18 @@ +package com.zhongzhi.dao; + +import com.zhongzhi.model.ProjectTrademarkDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.springframework.stereotype.Repository; + +/** + *

+ * 项目作品 Mapper 接口 + *

+ * + * @author DengMin + * @since 2022-04-25 + */ +@Repository +public interface ProjectTrademarkMapper extends BaseMapper { + +} diff --git a/src/main/java/com/zhongzhi/dao/ProjectWorksMapper.java b/src/main/java/com/zhongzhi/dao/ProjectWorksMapper.java new file mode 100644 index 0000000..18d8e9b --- /dev/null +++ b/src/main/java/com/zhongzhi/dao/ProjectWorksMapper.java @@ -0,0 +1,18 @@ +package com.zhongzhi.dao; + +import com.zhongzhi.model.ProjectWorksDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.springframework.stereotype.Repository; + +/** + *

+ * 项目作品 Mapper 接口 + *

+ * + * @author DengMin + * @since 2022-04-25 + */ +@Repository +public interface ProjectWorksMapper extends BaseMapper { + +} diff --git a/src/main/java/com/zhongzhi/dao/SmsCodeDAO.java b/src/main/java/com/zhongzhi/dao/SmsCodeDAO.java new file mode 100644 index 0000000..7a14284 --- /dev/null +++ b/src/main/java/com/zhongzhi/dao/SmsCodeDAO.java @@ -0,0 +1,19 @@ +package com.zhongzhi.dao; + +import com.zhongzhi.model.SmsCodeDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.springframework.stereotype.Repository; + +/** + *

+ * 短信验证码 Mapper 接口 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +@Repository +public interface SmsCodeDAO extends BaseMapper { + + SmsCodeDO getOneByTelePhone(String telephone, String type, String platform); +} diff --git a/src/main/java/com/zhongzhi/dao/SmsNoticeMapper.java b/src/main/java/com/zhongzhi/dao/SmsNoticeMapper.java new file mode 100644 index 0000000..d52c2b7 --- /dev/null +++ b/src/main/java/com/zhongzhi/dao/SmsNoticeMapper.java @@ -0,0 +1,23 @@ +package com.zhongzhi.dao; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.zhongzhi.model.SmsNoticeDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.zhongzhi.vo.notice.SmsNoticeVO; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +/** +*

+ * 短信通知记录 Mapper 接口 + *

+* +* @author DengMin +* @since 2022-04-15 +*/ +@Repository +public interface SmsNoticeMapper extends BaseMapper { + + IPage getListByPage(Page page, @Param("date") String date, String name); +} diff --git a/src/main/java/com/zhongzhi/dao/StudentDAO.java b/src/main/java/com/zhongzhi/dao/StudentDAO.java new file mode 100644 index 0000000..163c648 --- /dev/null +++ b/src/main/java/com/zhongzhi/dao/StudentDAO.java @@ -0,0 +1,18 @@ +package com.zhongzhi.dao; + +import com.zhongzhi.model.StudentDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.springframework.stereotype.Repository; + +/** + *

+ * Mapper 接口 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +@Repository +public interface StudentDAO extends BaseMapper { + +} diff --git a/src/main/java/com/zhongzhi/dao/VodDictDAO.java b/src/main/java/com/zhongzhi/dao/VodDictDAO.java new file mode 100644 index 0000000..3e014a6 --- /dev/null +++ b/src/main/java/com/zhongzhi/dao/VodDictDAO.java @@ -0,0 +1,27 @@ +package com.zhongzhi.dao; + +import com.zhongzhi.model.CourseDictDO; +import com.zhongzhi.model.VodDictDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.zhongzhi.vo.course.VodsVO; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + *

+ * Mapper 接口 + *

+ * + * @author DengMin + * @since 2022-11-14 + */ +@Repository +public interface VodDictDAO extends BaseMapper { + + List vods(Long courseId,String vodName,Long yearId); + + List fourVods(CourseDictDO courseDictDO); + + +} diff --git a/src/main/java/com/zhongzhi/dao/YearDictDAO.java b/src/main/java/com/zhongzhi/dao/YearDictDAO.java new file mode 100644 index 0000000..7c1124f --- /dev/null +++ b/src/main/java/com/zhongzhi/dao/YearDictDAO.java @@ -0,0 +1,18 @@ +package com.zhongzhi.dao; + +import com.zhongzhi.model.YearDictDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.springframework.stereotype.Repository; + +/** + *

+ * 年份字典表 Mapper 接口 + *

+ * + * @author DengMin + * @since 2023-04-11 + */ +@Repository +public interface YearDictDAO extends BaseMapper { + +} diff --git a/src/main/java/com/zhongzhi/dto/administer/AdministerPageDTO.java b/src/main/java/com/zhongzhi/dto/administer/AdministerPageDTO.java new file mode 100644 index 0000000..8a3f71b --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/administer/AdministerPageDTO.java @@ -0,0 +1,15 @@ +package com.zhongzhi.dto.administer; + +import lombok.Data; + +@Data +public class AdministerPageDTO { + + private String listItem; + + private String username; + + private Integer pageNo; + + private Integer pageSize; +} diff --git a/src/main/java/com/zhongzhi/dto/administer/LoginDTO.java b/src/main/java/com/zhongzhi/dto/administer/LoginDTO.java new file mode 100644 index 0000000..042a0cf --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/administer/LoginDTO.java @@ -0,0 +1,11 @@ +package com.zhongzhi.dto.administer; + +import lombok.Data; + +@Data +public class LoginDTO { + + private String telephone; + + private String code; +} diff --git a/src/main/java/com/zhongzhi/dto/college/AddProjectMemberDTO.java b/src/main/java/com/zhongzhi/dto/college/AddProjectMemberDTO.java new file mode 100644 index 0000000..8802fd0 --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/college/AddProjectMemberDTO.java @@ -0,0 +1,17 @@ +package com.zhongzhi.dto.college; + +import lombok.Data; + +import java.util.List; + +@Data +public class AddProjectMemberDTO { + + private List studentIds; + + private Long projectId; + + private Long matchId; + +} + diff --git a/src/main/java/com/zhongzhi/dto/college/AwardedListDTO.java b/src/main/java/com/zhongzhi/dto/college/AwardedListDTO.java new file mode 100644 index 0000000..5bd1959 --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/college/AwardedListDTO.java @@ -0,0 +1,17 @@ +package com.zhongzhi.dto.college; + +import lombok.Data; + +@Data +public class AwardedListDTO { + + private Long matchId; + + private String name; + + private String projectGroup; + + private Integer pageNo; + + private Integer pageSize; +} diff --git a/src/main/java/com/zhongzhi/dto/college/CollegesDOT.java b/src/main/java/com/zhongzhi/dto/college/CollegesDOT.java new file mode 100644 index 0000000..a32cf3b --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/college/CollegesDOT.java @@ -0,0 +1,20 @@ +package com.zhongzhi.dto.college; + +import com.zhongzhi.common.utils.ExcelColumn; +import lombok.Data; + +@Data +public class CollegesDOT { + + @ExcelColumn(col = 1, value = "学校代码") + private String code; + + @ExcelColumn(col = 2, value = "院校名称") + private String name; + + @ExcelColumn(col = 3, value = "联系方式") + private String phone; + + @ExcelColumn(col = 4, value = "导入失败原因") + private String failReason; +} diff --git a/src/main/java/com/zhongzhi/dto/college/CollegesDictDTO.java b/src/main/java/com/zhongzhi/dto/college/CollegesDictDTO.java new file mode 100644 index 0000000..8a3a628 --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/college/CollegesDictDTO.java @@ -0,0 +1,11 @@ +package com.zhongzhi.dto.college; + +import lombok.Data; + +@Data +public class CollegesDictDTO { + + private String name; + + private String education; +} diff --git a/src/main/java/com/zhongzhi/dto/college/CollegesPageDTO.java b/src/main/java/com/zhongzhi/dto/college/CollegesPageDTO.java new file mode 100644 index 0000000..f49c7ef --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/college/CollegesPageDTO.java @@ -0,0 +1,13 @@ +package com.zhongzhi.dto.college; + +import lombok.Data; + +@Data +public class CollegesPageDTO { + + private String name; + + private Integer pageNo; + + private Integer pageSize; +} diff --git a/src/main/java/com/zhongzhi/dto/college/DownloadErrorDataDTO.java b/src/main/java/com/zhongzhi/dto/college/DownloadErrorDataDTO.java new file mode 100644 index 0000000..24f8a7f --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/college/DownloadErrorDataDTO.java @@ -0,0 +1,11 @@ +package com.zhongzhi.dto.college; + +import lombok.Data; + +import java.util.List; + +@Data +public class DownloadErrorDataDTO { + + private List errorData; +} diff --git a/src/main/java/com/zhongzhi/dto/college/ExportCollegeDTO.java b/src/main/java/com/zhongzhi/dto/college/ExportCollegeDTO.java new file mode 100644 index 0000000..ccfafb6 --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/college/ExportCollegeDTO.java @@ -0,0 +1,41 @@ +package com.zhongzhi.dto.college; + +import com.zhongzhi.common.utils.ExcelColumn; +import lombok.Data; + +@Data +public class ExportCollegeDTO { + + @ExcelColumn(col = 1, value = "学校代码") + private String code; + + @ExcelColumn(col = 2, value = "学校名称") + private String name; + + @ExcelColumn(col = 3 , value = "分管领导") + private String leaderName; + + @ExcelColumn(col = 4 , value = "职务") + private String leaderPost; + + @ExcelColumn(col = 5 , value = "手机号") + private String leaderPhone; + + @ExcelColumn(col = 6 , value = "联系人姓名") + private String contactName; + + @ExcelColumn(col = 7 , value = "职务") + private String contactPost; + + @ExcelColumn(col = 8 , value = "手机号") + private String contactPhone; + + @ExcelColumn(col = 9, value = "账户") + private String account; + + @ExcelColumn(col = 10, value = "密码") + private String password; + + @ExcelColumn(col = 11, value = "联系地址") + private String address; +} diff --git a/src/main/java/com/zhongzhi/dto/college/LoginDTO.java b/src/main/java/com/zhongzhi/dto/college/LoginDTO.java new file mode 100644 index 0000000..ee7e704 --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/college/LoginDTO.java @@ -0,0 +1,11 @@ +package com.zhongzhi.dto.college; + +import lombok.Data; + +@Data +public class LoginDTO { + + private String account; + + private String password; +} diff --git a/src/main/java/com/zhongzhi/dto/college/LoginStatusDTO.java b/src/main/java/com/zhongzhi/dto/college/LoginStatusDTO.java new file mode 100644 index 0000000..600c691 --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/college/LoginStatusDTO.java @@ -0,0 +1,13 @@ +package com.zhongzhi.dto.college; + +import lombok.Data; + +@Data +public class LoginStatusDTO { + + private Long[] ids; + + private Long id; + + private Integer loginStatus; +} diff --git a/src/main/java/com/zhongzhi/dto/college/RegisterMembersDTO.java b/src/main/java/com/zhongzhi/dto/college/RegisterMembersDTO.java new file mode 100644 index 0000000..e4b9a11 --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/college/RegisterMembersDTO.java @@ -0,0 +1,16 @@ +package com.zhongzhi.dto.college; + +import lombok.Data; + +@Data +public class RegisterMembersDTO { + + private Long id; + + private Long matchId; + + private Long collegeId; + + private String name; + +} diff --git a/src/main/java/com/zhongzhi/dto/college/UpdatePwdDTO.java b/src/main/java/com/zhongzhi/dto/college/UpdatePwdDTO.java new file mode 100644 index 0000000..90143b7 --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/college/UpdatePwdDTO.java @@ -0,0 +1,9 @@ +package com.zhongzhi.dto.college; + +import lombok.Data; + +@Data +public class UpdatePwdDTO { + + private String password; +} diff --git a/src/main/java/com/zhongzhi/dto/course/ChangeOrdersDTO.java b/src/main/java/com/zhongzhi/dto/course/ChangeOrdersDTO.java new file mode 100644 index 0000000..5ab9323 --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/course/ChangeOrdersDTO.java @@ -0,0 +1,12 @@ +package com.zhongzhi.dto.course; + +import lombok.Data; + +import java.util.List; + +@Data +public class ChangeOrdersDTO { + + private List ids; + +} diff --git a/src/main/java/com/zhongzhi/dto/course/CoursesDTO.java b/src/main/java/com/zhongzhi/dto/course/CoursesDTO.java new file mode 100644 index 0000000..48a0ba3 --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/course/CoursesDTO.java @@ -0,0 +1,15 @@ +package com.zhongzhi.dto.course; + +import lombok.Data; + +@Data +public class CoursesDTO { + + private Integer pageSize; + + private Integer pageNo; + + private String courseName; + + private Long yearId; +} diff --git a/src/main/java/com/zhongzhi/dto/course/VodsDTO.java b/src/main/java/com/zhongzhi/dto/course/VodsDTO.java new file mode 100644 index 0000000..f41b75f --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/course/VodsDTO.java @@ -0,0 +1,13 @@ +package com.zhongzhi.dto.course; + +import lombok.Data; + +@Data +public class VodsDTO { + + private Long yearId; + + private Long courseId; + + private String vodName; +} diff --git a/src/main/java/com/zhongzhi/dto/judge/ProjectJudgePageDTO.java b/src/main/java/com/zhongzhi/dto/judge/ProjectJudgePageDTO.java new file mode 100644 index 0000000..b2927fc --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/judge/ProjectJudgePageDTO.java @@ -0,0 +1,21 @@ +package com.zhongzhi.dto.judge; + +import lombok.Data; + +@Data +public class ProjectJudgePageDTO { + + private Long matchId; + + private String projectGroup; + + private String projectSchedule; + + private String username; + + private Integer status; + + private Integer pageNo; + + private Integer pageSize; +} diff --git a/src/main/java/com/zhongzhi/dto/match/MatchDictDTO.java b/src/main/java/com/zhongzhi/dto/match/MatchDictDTO.java new file mode 100644 index 0000000..a271842 --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/match/MatchDictDTO.java @@ -0,0 +1,45 @@ +package com.zhongzhi.dto.match; + +import com.zhongzhi.model.MatchScheduleDO; +import lombok.Data; + +import java.util.Date; +import java.util.List; + +@Data +public class MatchDictDTO { + + private Long id; + + /** + * 赛事名称 + */ + private String matchName; + + /** + * 赛事年份 + */ + private String matchDate; + + /** + * 报名开始时间 + */ + private Date startTime; + + /** + * 报名结束时间 + */ + private Date endTime; + + /** + * 类型 + */ + private String matchType; + + private Integer status; + + /** + * 时间安排 + */ + private List schedule; +} diff --git a/src/main/java/com/zhongzhi/dto/match/SelectListPageDTO.java b/src/main/java/com/zhongzhi/dto/match/SelectListPageDTO.java new file mode 100644 index 0000000..fec1548 --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/match/SelectListPageDTO.java @@ -0,0 +1,11 @@ +package com.zhongzhi.dto.match; + +import lombok.Data; + +@Data +public class SelectListPageDTO { + + private Integer pageNo; + + private Integer pageSize; +} diff --git a/src/main/java/com/zhongzhi/dto/member/CreateProjectMemberDTO.java b/src/main/java/com/zhongzhi/dto/member/CreateProjectMemberDTO.java new file mode 100644 index 0000000..e8a911e --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/member/CreateProjectMemberDTO.java @@ -0,0 +1,80 @@ +package com.zhongzhi.dto.member; + +import lombok.Data; + +import java.util.List; + +@Data +public class CreateProjectMemberDTO { + + private Long id; + + /** + * 姓名 + */ + private String name; + + /** + * 就读学校 + */ + private String school; + + /** + * 年级 + */ + private String grade; + + /** + * 身份证 + */ + private String idCard; + + + /** + * 就读专业 + */ + private String major; + + /** + * 性别 + */ + private String sex; + + /** + * 学籍号 + */ + private String studentNo; + + /** + * 手机号 + */ + private String telephone; + + /** + * 邮箱 + */ + private String email; + + /** + * 团队成员 + */ + private List teamMember; + + /** + * 指导老师 + */ + private List mentor; + + /** + * 项目组别 + */ + private String projectGroup; + + /** + * 项目类型 + */ + private String projectType; + + private String fiveYears; + +} diff --git a/src/main/java/com/zhongzhi/dto/member/MentorDTO.java b/src/main/java/com/zhongzhi/dto/member/MentorDTO.java new file mode 100644 index 0000000..6457eff --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/member/MentorDTO.java @@ -0,0 +1,39 @@ +package com.zhongzhi.dto.member; + +import lombok.Data; + +@Data +public class MentorDTO { + + private Long id; + + /** + * 姓名 + */ + private String teacherName; + + /** + * 工作单位 + */ + private String company; + + /** + * 职称 + */ + private String positionTitle; + + /** + * 职务 + */ + private String position; + + /** + * 手机号 + */ + private String telephone; + + /** + * 身份证号 + */ + private String idCard; +} diff --git a/src/main/java/com/zhongzhi/dto/member/TeamMemberDTO.java b/src/main/java/com/zhongzhi/dto/member/TeamMemberDTO.java new file mode 100644 index 0000000..85a1b21 --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/member/TeamMemberDTO.java @@ -0,0 +1,49 @@ +package com.zhongzhi.dto.member; + +import lombok.Data; + +@Data +public class TeamMemberDTO { + + private Long id; + + /** + * 姓名 + */ + private String teamName; + + /** + * 就读学校 + */ + private String school; + + /** + * 年级 + */ + private String grade; + + /** + * 就读专业 + */ + private String major; + + /** + * 性别 + */ + private String sex; + + /** + * 身份证号 + */ + private String idCard; + + /** + * 学籍号 + */ + private String studentNo; + + /** + * 手机号 + */ + private String teamTelephone; +} diff --git a/src/main/java/com/zhongzhi/dto/message/MessagePageDTO.java b/src/main/java/com/zhongzhi/dto/message/MessagePageDTO.java new file mode 100644 index 0000000..87a28f7 --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/message/MessagePageDTO.java @@ -0,0 +1,11 @@ +package com.zhongzhi.dto.message; + +import lombok.Data; + +@Data +public class MessagePageDTO { + + private Integer pageNo; + + private Integer pageSize; +} diff --git a/src/main/java/com/zhongzhi/dto/notice/SmsNoticeDTO.java b/src/main/java/com/zhongzhi/dto/notice/SmsNoticeDTO.java new file mode 100644 index 0000000..b6026da --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/notice/SmsNoticeDTO.java @@ -0,0 +1,20 @@ +package com.zhongzhi.dto.notice; + +import lombok.Data; +import java.util.List; + +@Data +public class SmsNoticeDTO { + + private List ids; + + private Long matchId; + + private String projectGroup; + + private String projectSchedule; + + private String projectStatus; + + private String name; +} diff --git a/src/main/java/com/zhongzhi/dto/notice/SmsNoticePageDTO.java b/src/main/java/com/zhongzhi/dto/notice/SmsNoticePageDTO.java new file mode 100644 index 0000000..48750c6 --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/notice/SmsNoticePageDTO.java @@ -0,0 +1,15 @@ +package com.zhongzhi.dto.notice; + +import lombok.Data; + +@Data +public class SmsNoticePageDTO { + + private String date; + + private String name; + + private Integer pageNo; + + private Integer pageSize; +} diff --git a/src/main/java/com/zhongzhi/dto/period/ProjectReviewPeriodDTO.java b/src/main/java/com/zhongzhi/dto/period/ProjectReviewPeriodDTO.java new file mode 100644 index 0000000..f7220d8 --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/period/ProjectReviewPeriodDTO.java @@ -0,0 +1,15 @@ +package com.zhongzhi.dto.period; + +import lombok.Data; + +@Data +public class ProjectReviewPeriodDTO { + + private Long matchId; + + private String projectGroup; + + private String projectSchedule; + + private String projectProgress; +} diff --git a/src/main/java/com/zhongzhi/dto/project/ApproveDTO.java b/src/main/java/com/zhongzhi/dto/project/ApproveDTO.java new file mode 100644 index 0000000..3eb52ce --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/project/ApproveDTO.java @@ -0,0 +1,15 @@ +package com.zhongzhi.dto.project; + +import lombok.Data; + +import java.util.List; + +@Data +public class ApproveDTO { + + private List ids; + + private Long id; + + private Integer projectStatus; +} diff --git a/src/main/java/com/zhongzhi/dto/project/BatchRollbackDTO.java b/src/main/java/com/zhongzhi/dto/project/BatchRollbackDTO.java new file mode 100644 index 0000000..75466de --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/project/BatchRollbackDTO.java @@ -0,0 +1,9 @@ +package com.zhongzhi.dto.project; + +import lombok.Data; + +@Data +public class BatchRollbackDTO { + + private Long[] ids; +} diff --git a/src/main/java/com/zhongzhi/dto/project/CollegeProjectDTO.java b/src/main/java/com/zhongzhi/dto/project/CollegeProjectDTO.java new file mode 100644 index 0000000..b0dd6fe --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/project/CollegeProjectDTO.java @@ -0,0 +1,11 @@ +package com.zhongzhi.dto.project; + +import lombok.Data; + +import java.util.List; + +@Data +public class CollegeProjectDTO { + + private List id; +} diff --git a/src/main/java/com/zhongzhi/dto/project/CreateMainTrackProjectDTO.java b/src/main/java/com/zhongzhi/dto/project/CreateMainTrackProjectDTO.java new file mode 100644 index 0000000..2a593e6 --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/project/CreateMainTrackProjectDTO.java @@ -0,0 +1,140 @@ +package com.zhongzhi.dto.project; + +import com.zhongzhi.model.ProjectOwnershipStructureDO; +import lombok.Data; + +import java.util.List; + +@Data +public class CreateMainTrackProjectDTO { + + /** + * 所属领域 + */ + private String itemField; + + /** + * 项目LOGO + */ + private String logoUri; + + /** + * 项目名称 + */ + private String projectName; + + /** + * 所在地址 + */ + private String address; + + /** + * 项目概述 + */ + private String projectIntro; + + /** + * 国家级重大、重点科研项目的科研成果转化项目 + */ + private String projectTransform; + + /** + * 学校科技成果转化 + */ + private String resultTransfer; + + /** + * 参赛申报人为科技成果的完成人或所有人 + */ + private String competitionOwner; + + /** + * 参赛申报人为科技成果的第一完成人或所有人 + */ + private String competitionFirst; + + /** + * 师生共创 + */ + private String bothInvention; + + /** + * 项目进展 + */ + private String projectProgress; + + /** + * 公司名称 + */ + private String companyName; + + /** + * 法人身份 + */ + private String legalPersonStatus; + + /** + * 法人姓名 + */ + private String legalPersonName; + + /** + * 职务 + */ + private String position; + + /** + * 注册资金 + */ + private String registerFund; + + /** + * 注册时间 + */ + private String registerDate; + + /** + * 注册省份 + */ + private String registerProvince; + + /** + * 注册地址 + */ + private String registerAddress; + + /** + * 统一社会信用代码 + */ + private String unifyCode; + + /** + * 股权结构 + */ + private List po; + + /** + * 隐私设置 + */ + private String privacySetting; + + /** + * 类型 + */ + private String materialsType; + + /** + * 大小 + */ + private String materialsSize; + + /** + * 名称 + */ + private String materialsName; + + /** + * 地址 + */ + private String materialsUrl; +} diff --git a/src/main/java/com/zhongzhi/dto/project/CreateSeedTrackProjectDTO.java b/src/main/java/com/zhongzhi/dto/project/CreateSeedTrackProjectDTO.java new file mode 100644 index 0000000..00dd254 --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/project/CreateSeedTrackProjectDTO.java @@ -0,0 +1,67 @@ +package com.zhongzhi.dto.project; + +import com.zhongzhi.model.ProjectMaterialsDO; +import lombok.Data; + +import java.util.List; + +@Data +public class CreateSeedTrackProjectDTO { + + private String projectName; + + /** + * 组别 + */ + private String projectGroup; + + /** + * 红色文创组类别 + */ + private String culClassification; + + /** + * 科技组类别 + */ + private List classification; + + /** + * 介绍及创新点 + */ + private String projectIntro; + + /** + * 设计背景 + */ + private String projectCreativity; + + /** + * 科学设计 + */ + private String scientificPrinciple; + + /** + * 应用前景 + */ + private String applicationProspect; + + /** + * 路演形式 + */ + private List roadShowForm; + + /** + * 创意实施或实验所受条件的限制 + */ + private List restriction; + + /** + * 项目材料 + */ + private List materials; + + /** + * 红色文创/科技创新 + */ + private String projectProgress; +} diff --git a/src/main/java/com/zhongzhi/dto/project/CreateVocationalProjectDTO.java b/src/main/java/com/zhongzhi/dto/project/CreateVocationalProjectDTO.java new file mode 100644 index 0000000..3e77b50 --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/project/CreateVocationalProjectDTO.java @@ -0,0 +1,198 @@ +package com.zhongzhi.dto.project; + +import com.zhongzhi.model.ProjectAwardDO; +import com.zhongzhi.model.ProjectCopyrightDO; +import com.zhongzhi.model.ProjectOwnershipStructureDO; +import com.zhongzhi.model.ProjectPaperDO; +import com.zhongzhi.model.ProjectPatentDO; +import com.zhongzhi.model.ProjectTrademarkDO; +import com.zhongzhi.model.ProjectWorksDO; +import lombok.Data; + +import java.util.List; + +@Data +public class CreateVocationalProjectDTO { + + private Long id; + + /** + * 所属领域 + */ + private String itemField; + + /** + * 项目LOGO + */ + private String logoUri; + + /** + * 项目名称 + */ + private String projectName; + + /** + * 项目概述 + */ + private String projectIntro; + + /** + * 国家级重大、重点科研项目的科研成果转化项目 + */ + private String projectTransform; + + /** + * 学校科技成果转化 + */ + private String resultTransfer; + + /** + * 参赛申报人为科技成果的完成人或所有人 + */ + private String competitionOwner; + + /** + * 参赛申报人为科技成果的第一完成人或所有人 + */ + private String competitionFirst; + + /** + * 师生共创 + */ + private String bothInvention; + + /** + * 项目进展 + */ + private String projectProgress; + + /** + * 隐私设置 + */ + private String privacySetting; + + /** + * 类型 + */ + private String materialsType; + + /** + * 大小 + */ + private String materialsSize; + + /** + * 名称 + */ + private String materialsName; + + /** + * 地址 + */ + private String materialsUrl; + + /** + * 项目PPT地址 + */ + private String projectPptUrl; + + /** + * 项目PPT类型 + */ + private String projectPptType; + + /** + * 项目PPT名称 + */ + private String projectPptName; + + private String projectStage; + + // 公司信息 + /** + * 公司名称 + */ + private String companyName; + + /** + * 法人姓名 + */ + private String legalPersonName; + + /** + * 职务 + */ + private String position; + + /** + * 注册资金 + */ + private String registerFund; + + /** + * 注册时间 + */ + private String registerDate; + + /** + * 注册省份 + */ + private String registerProvince; + + /** + * 注册地址 + */ + private String registerAddress; + + /** + * 统一社会信用代码 + */ + private String unifyCode; + + /** + * 财务报表 + */ + private String financialStatement; + + /** + * 项目是否获得投资 + */ + private String investment; + + private String vodUrl; + + /** + * 股权结构 + */ + private List ownership; + + /** + * 专利 + */ + private List patent; + + /** + * 论文 + */ + private List paper; + + /** + * 奖项 + */ + private List award; + + /** + * 软件著作权 + */ + private List copyright; + + /** + * 作品著作 + */ + private List works; + + /** + * 商标 + */ + private List trademark; +} diff --git a/src/main/java/com/zhongzhi/dto/project/DataOverviewDTO.java b/src/main/java/com/zhongzhi/dto/project/DataOverviewDTO.java new file mode 100644 index 0000000..f372fdd --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/project/DataOverviewDTO.java @@ -0,0 +1,11 @@ +package com.zhongzhi.dto.project; + +import lombok.Data; + +@Data +public class DataOverviewDTO { + + private String projectGroup; + + private String projectType; +} diff --git a/src/main/java/com/zhongzhi/dto/project/EditStatusDTO.java b/src/main/java/com/zhongzhi/dto/project/EditStatusDTO.java new file mode 100644 index 0000000..7c95448 --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/project/EditStatusDTO.java @@ -0,0 +1,19 @@ +package com.zhongzhi.dto.project; + +import lombok.Data; + +@Data +public class EditStatusDTO { + + private Long id; + + private Long[] ids; + + private Integer editStatus; + + private Long matchId; + + private String projectGroup; + + private String projectSchedule; +} diff --git a/src/main/java/com/zhongzhi/dto/project/ExportDTO.java b/src/main/java/com/zhongzhi/dto/project/ExportDTO.java new file mode 100644 index 0000000..58a3f71 --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/project/ExportDTO.java @@ -0,0 +1,14 @@ +package com.zhongzhi.dto.project; + +import com.zhongzhi.vo.ExcelFieldVO; +import lombok.Data; + +import java.util.List; + +@Data +public class ExportDTO { + + private Long matchId; + + private List fields; +} diff --git a/src/main/java/com/zhongzhi/dto/project/ExportProjectDTO.java b/src/main/java/com/zhongzhi/dto/project/ExportProjectDTO.java new file mode 100644 index 0000000..d157aa6 --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/project/ExportProjectDTO.java @@ -0,0 +1,44 @@ +package com.zhongzhi.dto.project; + +import com.zhongzhi.common.utils.ExcelColumn; +import lombok.Data; + +@Data +public class ExportProjectDTO { + + @ExcelColumn(col = 1, value = "届数") + private String matchName; + + @ExcelColumn(col = 2, value = "项目名称") + private String projectName; + + @ExcelColumn(col = 3, value = "组别") + private String projectProgress; + + @ExcelColumn(col = 4, value = "负责人") + private String name; + + @ExcelColumn(col = 5, value = "院校") + private String college; + + @ExcelColumn(col = 6, value = "学籍号") + private String studentNo; + + @ExcelColumn(col = 7, value = "专业") + private String major; + + @ExcelColumn(col = 8, value = "手机号") + private String telephone; + + @ExcelColumn(col = 9, value = "团队成员") + private String teamMembers; + + @ExcelColumn(col = 10, value = "指导老师") + private String teachers; + + @ExcelColumn(col = 11, value = "项目阶段") + private String projectSchedule; + + @ExcelColumn(col = 12, value = "项目状态") + private String projectStatus; +} diff --git a/src/main/java/com/zhongzhi/dto/project/ImportVocationalProjectDTO.java b/src/main/java/com/zhongzhi/dto/project/ImportVocationalProjectDTO.java new file mode 100644 index 0000000..832992a --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/project/ImportVocationalProjectDTO.java @@ -0,0 +1,15 @@ +package com.zhongzhi.dto.project; + +import lombok.Data; + +@Data +public class ImportVocationalProjectDTO { + + private String projectGroup; + + private String college; + + private String projectType; + + private Long matchId; +} diff --git a/src/main/java/com/zhongzhi/dto/project/PrintAttachmentDTO.java b/src/main/java/com/zhongzhi/dto/project/PrintAttachmentDTO.java new file mode 100644 index 0000000..ece80bd --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/project/PrintAttachmentDTO.java @@ -0,0 +1,15 @@ +package com.zhongzhi.dto.project; + +import lombok.Data; + +@Data +public class PrintAttachmentDTO { + + private String printAttachment; + + private String printAttachmentType; + + private String printAttachmentName; + + private String projectGroup; +} diff --git a/src/main/java/com/zhongzhi/dto/project/ProjectCollegeListDTO.java b/src/main/java/com/zhongzhi/dto/project/ProjectCollegeListDTO.java new file mode 100644 index 0000000..1e757d8 --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/project/ProjectCollegeListDTO.java @@ -0,0 +1,19 @@ +package com.zhongzhi.dto.project; + +import lombok.Data; + +import java.util.List; + +@Data +public class ProjectCollegeListDTO { + + private List ids; + + private String projectSchedule; + + private String projectGroup; + + private Long matchId; + + private String projectProgress; +} diff --git a/src/main/java/com/zhongzhi/dto/project/ProjectListPageDTO.java b/src/main/java/com/zhongzhi/dto/project/ProjectListPageDTO.java new file mode 100644 index 0000000..d8b00ad --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/project/ProjectListPageDTO.java @@ -0,0 +1,25 @@ +package com.zhongzhi.dto.project; + +import lombok.Data; + +@Data +public class ProjectListPageDTO { + + private String projectSchedule; + + private String projectStatus; + + private String projectGroup; + + private String itemField; + + private String name; + + private Long matchId; + + private String projectProgress; + + private Integer pageNo; + + private Integer pageSize; +} diff --git a/src/main/java/com/zhongzhi/dto/project/ReviewListDTO.java b/src/main/java/com/zhongzhi/dto/project/ReviewListDTO.java new file mode 100644 index 0000000..ef350a8 --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/project/ReviewListDTO.java @@ -0,0 +1,36 @@ +package com.zhongzhi.dto.project; + +import com.zhongzhi.vo.ExcelFieldVO; +import lombok.Data; + +import java.util.List; + +@Data +public class ReviewListDTO { + + private List id; + + private List fields; + + private Long matchId; + + private String projectGroup; + + private String projectName; + + private String projectReview; + + private String projectStatus; + + private Integer pageNo; + + private Integer pageSize; + + private Integer type; + + private String projectAssigned; + + private String projectSchedule; + + private String projectProgress; +} diff --git a/src/main/java/com/zhongzhi/dto/project/ReviewVocationalNumDTO.java b/src/main/java/com/zhongzhi/dto/project/ReviewVocationalNumDTO.java new file mode 100644 index 0000000..9f8714c --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/project/ReviewVocationalNumDTO.java @@ -0,0 +1,15 @@ +package com.zhongzhi.dto.project; + +import lombok.Data; + +@Data +public class ReviewVocationalNumDTO { + + private Long matchId; + + private String projectGroup; + + private String projectStatus; + + private Long projectJudgeId; +} diff --git a/src/main/java/com/zhongzhi/dto/project/SeedTrackProjectNumDTO.java b/src/main/java/com/zhongzhi/dto/project/SeedTrackProjectNumDTO.java new file mode 100644 index 0000000..088eb0c --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/project/SeedTrackProjectNumDTO.java @@ -0,0 +1,13 @@ +package com.zhongzhi.dto.project; + +import lombok.Data; + +@Data +public class SeedTrackProjectNumDTO { + + private Long matchId; + + private String projectGroup; + + private String projectProgress; +} diff --git a/src/main/java/com/zhongzhi/dto/project/StudentProjectDTO.java b/src/main/java/com/zhongzhi/dto/project/StudentProjectDTO.java new file mode 100644 index 0000000..10231a0 --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/project/StudentProjectDTO.java @@ -0,0 +1,11 @@ +package com.zhongzhi.dto.project; + +import lombok.Data; + +@Data +public class StudentProjectDTO { + + private Long matchId; + + private String projectGroup; +} diff --git a/src/main/java/com/zhongzhi/dto/projectJudge/ImportJudge.java b/src/main/java/com/zhongzhi/dto/projectJudge/ImportJudge.java new file mode 100644 index 0000000..cccc7dd --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/projectJudge/ImportJudge.java @@ -0,0 +1,29 @@ +package com.zhongzhi.dto.projectJudge; + +import com.zhongzhi.common.utils.ExcelColumn; +import lombok.Data; + +@Data +public class ImportJudge { + + @ExcelColumn(col = 1, value = "专家姓名") + private String username; + + @ExcelColumn(col = 2, value = "单位") + private String unit; + + @ExcelColumn(col = 3, value = "职位/职称") + private String position; + + @ExcelColumn(col = 4, value = "手机号") + private String telephone; + + @ExcelColumn(col = 5, value = "身份证号") + private String idCard; + + @ExcelColumn(col = 6, value = "开户银行名称") + private String bankName; + + @ExcelColumn(col = 7, value = "银行卡号") + private String bankCard; +} diff --git a/src/main/java/com/zhongzhi/dto/review/CancelReviewDTO.java b/src/main/java/com/zhongzhi/dto/review/CancelReviewDTO.java new file mode 100644 index 0000000..65ef4a2 --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/review/CancelReviewDTO.java @@ -0,0 +1,15 @@ +package com.zhongzhi.dto.review; + +import lombok.Data; + +import java.util.List; + +@Data +public class CancelReviewDTO { + + private Long projectId; + + private List judgeId; + + private Integer smsMessage; +} diff --git a/src/main/java/com/zhongzhi/dto/review/ProjectReviewDTO.java b/src/main/java/com/zhongzhi/dto/review/ProjectReviewDTO.java new file mode 100644 index 0000000..9e95d5c --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/review/ProjectReviewDTO.java @@ -0,0 +1,9 @@ +package com.zhongzhi.dto.review; + +import lombok.Data; + +@Data +public class ProjectReviewDTO { + + private Long projectId; +} diff --git a/src/main/java/com/zhongzhi/dto/review/ProjectReviewPageDTO.java b/src/main/java/com/zhongzhi/dto/review/ProjectReviewPageDTO.java new file mode 100644 index 0000000..5e304e4 --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/review/ProjectReviewPageDTO.java @@ -0,0 +1,25 @@ +package com.zhongzhi.dto.review; + +import lombok.Data; + +@Data +public class ProjectReviewPageDTO { + + private Long matchId; + + private String projectName; + + private String projectGroup; + + private String projectStatus; + + private String projectSchedule; + + private String projectProgress; + + private String status; + + private Integer pageNo; + + private Integer pageSize; +} diff --git a/src/main/java/com/zhongzhi/dto/review/ProjectReviewScoreDTO.java b/src/main/java/com/zhongzhi/dto/review/ProjectReviewScoreDTO.java new file mode 100644 index 0000000..89305ef --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/review/ProjectReviewScoreDTO.java @@ -0,0 +1,21 @@ +package com.zhongzhi.dto.review; + +import lombok.Data; + +import java.util.List; + +@Data +public class ProjectReviewScoreDTO { + + private List ids; + + private List reviewScore; + + private Long id; + + private Double score; + + private String reviewOpinion; + + +} diff --git a/src/main/java/com/zhongzhi/dto/review/ReviewScoreDTO.java b/src/main/java/com/zhongzhi/dto/review/ReviewScoreDTO.java new file mode 100644 index 0000000..04bd454 --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/review/ReviewScoreDTO.java @@ -0,0 +1,13 @@ +package com.zhongzhi.dto.review; + +import lombok.Data; + +@Data +public class ReviewScoreDTO { + + private Long id; + + private Double score; + + private String reviewOpinion; +} diff --git a/src/main/java/com/zhongzhi/dto/review/SetReviewDTO.java b/src/main/java/com/zhongzhi/dto/review/SetReviewDTO.java new file mode 100644 index 0000000..69aa851 --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/review/SetReviewDTO.java @@ -0,0 +1,17 @@ +package com.zhongzhi.dto.review; + +import lombok.Data; + +import java.util.List; + +@Data +public class SetReviewDTO { + + private List projectId; + + private List judgeId; + + private Integer smsMessage; + + private Long matchId; +} diff --git a/src/main/java/com/zhongzhi/dto/review/SubmittedDTO.java b/src/main/java/com/zhongzhi/dto/review/SubmittedDTO.java new file mode 100644 index 0000000..99bd43c --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/review/SubmittedDTO.java @@ -0,0 +1,11 @@ +package com.zhongzhi.dto.review; + +import lombok.Data; + +import java.util.List; + +@Data +public class SubmittedDTO { + + private List id; +} diff --git a/src/main/java/com/zhongzhi/dto/scheduleRecord/ProjectScheduleRecordDTO.java b/src/main/java/com/zhongzhi/dto/scheduleRecord/ProjectScheduleRecordDTO.java new file mode 100644 index 0000000..fc05999 --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/scheduleRecord/ProjectScheduleRecordDTO.java @@ -0,0 +1,13 @@ +package com.zhongzhi.dto.scheduleRecord; + +import lombok.Data; + +@Data +public class ProjectScheduleRecordDTO { + + private String name; + + private Integer pageNo; + + private Integer pageSize; +} diff --git a/src/main/java/com/zhongzhi/dto/student/LoginDTO.java b/src/main/java/com/zhongzhi/dto/student/LoginDTO.java new file mode 100644 index 0000000..fbc71c6 --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/student/LoginDTO.java @@ -0,0 +1,11 @@ +package com.zhongzhi.dto.student; + +import lombok.Data; + +@Data +public class LoginDTO { + + private String telephone; + + private String code; +} diff --git a/src/main/java/com/zhongzhi/dto/student/RegisterDTO.java b/src/main/java/com/zhongzhi/dto/student/RegisterDTO.java new file mode 100644 index 0000000..bbf4b6d --- /dev/null +++ b/src/main/java/com/zhongzhi/dto/student/RegisterDTO.java @@ -0,0 +1,25 @@ +package com.zhongzhi.dto.student; + +import lombok.Data; + +@Data +public class RegisterDTO { + + private String name; + + private String idCard; + + private String telephone; + + private String education; + + private String school; + + private String major; + + private String enrollmentDate; + + private String graduateDate; + + private String code; +} diff --git a/src/main/java/com/zhongzhi/model/AdministerDO.java b/src/main/java/com/zhongzhi/model/AdministerDO.java new file mode 100644 index 0000000..b36b0e4 --- /dev/null +++ b/src/main/java/com/zhongzhi/model/AdministerDO.java @@ -0,0 +1,53 @@ +package com.zhongzhi.model; + +import com.zhongzhi.model.base.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; + +import java.time.LocalDateTime; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * 中心管理账户表 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("administer") +public class AdministerDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 手机号 + */ + private String telephone; + + /** + * 成员名称 + */ + private String username; + + /** + * 头像 + */ + private String avatar; + + /** + * 角色 + */ + private String role; +} diff --git a/src/main/java/com/zhongzhi/model/AdministerPermissionDO.java b/src/main/java/com/zhongzhi/model/AdministerPermissionDO.java new file mode 100644 index 0000000..b5993cc --- /dev/null +++ b/src/main/java/com/zhongzhi/model/AdministerPermissionDO.java @@ -0,0 +1,41 @@ +package com.zhongzhi.model; + +import com.zhongzhi.model.base.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; + +import java.time.LocalDateTime; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * 系统用户权限表 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("administer_permission") +public class AdministerPermissionDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 用户账户ID + */ + private Long administerId; + + /** + * 角色ID + */ + private Long permissionId; + +} diff --git a/src/main/java/com/zhongzhi/model/CollegesDictDO.java b/src/main/java/com/zhongzhi/model/CollegesDictDO.java new file mode 100644 index 0000000..b38f229 --- /dev/null +++ b/src/main/java/com/zhongzhi/model/CollegesDictDO.java @@ -0,0 +1,83 @@ +package com.zhongzhi.model; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.zhongzhi.model.base.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; + +import java.time.LocalDateTime; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * 院校字典表 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("colleges_dict") +public class CollegesDictDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 学校代码 + */ + private String code; + + /** + * 学历 + */ + private String education; + + /** + * 院校名称 + */ + private String name; + + /** + * 账户 + */ + private String account; + + /** + * 密码 + */ + private String password; + + /** + * 联系方式 + */ + private String address; + + /** + * 登陆时间 + */ + private LocalDateTime loginTime; + + private String leaderName; + + private String leaderPost; + + private String leaderPhone; + + private String contactName; + + private String contactPost; + + private String contactPhone; + + private Integer loginStatus; +} diff --git a/src/main/java/com/zhongzhi/model/CourseDictDO.java b/src/main/java/com/zhongzhi/model/CourseDictDO.java new file mode 100644 index 0000000..efcec2a --- /dev/null +++ b/src/main/java/com/zhongzhi/model/CourseDictDO.java @@ -0,0 +1,32 @@ +package com.zhongzhi.model; + +import com.zhongzhi.model.base.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * + *

+ * + * @author DengMin + * @since 2022-11-14 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("course_dict") +public class CourseDictDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + private Long yearId; + + private String courseName; + +} diff --git a/src/main/java/com/zhongzhi/model/FinalMatchMemberDO.java b/src/main/java/com/zhongzhi/model/FinalMatchMemberDO.java new file mode 100644 index 0000000..a131725 --- /dev/null +++ b/src/main/java/com/zhongzhi/model/FinalMatchMemberDO.java @@ -0,0 +1,60 @@ +package com.zhongzhi.model; + +import com.zhongzhi.model.base.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * + *

+ * + * @author DengMin + * @since 2024-07-12 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("final_match_member") +public class FinalMatchMemberDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + private Long matchId; + + /** + * 院校id + */ + private Long collegeId; + + /** + * 项目id + */ + private Long projectId; + + /** + * 人员id + */ + private Long memberId; + + /** + * 人员类型 + */ + private String memberType; + + private Integer orderNo; + + private String userName; + + private String idCard; + + private String idCardType; + + private String telephone; + +} diff --git a/src/main/java/com/zhongzhi/model/FundDictDO.java b/src/main/java/com/zhongzhi/model/FundDictDO.java new file mode 100644 index 0000000..41ebf95 --- /dev/null +++ b/src/main/java/com/zhongzhi/model/FundDictDO.java @@ -0,0 +1,49 @@ +package com.zhongzhi.model; + +import com.zhongzhi.model.base.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; + +import java.time.LocalDateTime; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * 届数表 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("fund_dict") +public class FundDictDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 基金名称 + */ + private String fundName; + + /** + * 年份 + */ + private String year; + + /** + * 0:禁用 1:启用 + */ + private Integer status; + +} diff --git a/src/main/java/com/zhongzhi/model/ItemFieldDictDO.java b/src/main/java/com/zhongzhi/model/ItemFieldDictDO.java new file mode 100644 index 0000000..fb9c232 --- /dev/null +++ b/src/main/java/com/zhongzhi/model/ItemFieldDictDO.java @@ -0,0 +1,35 @@ +package com.zhongzhi.model; + +import com.zhongzhi.model.base.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; + +import java.time.LocalDateTime; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * 行业领域字典表 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("item_field_dict") +public class ItemFieldDictDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 领域 + */ + private String field; +} diff --git a/src/main/java/com/zhongzhi/model/MajorDictDO.java b/src/main/java/com/zhongzhi/model/MajorDictDO.java new file mode 100644 index 0000000..406273a --- /dev/null +++ b/src/main/java/com/zhongzhi/model/MajorDictDO.java @@ -0,0 +1,48 @@ +package com.zhongzhi.model; + +import com.zhongzhi.model.base.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; + +import java.time.LocalDateTime; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * 专业字典表 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("major_dict") +public class MajorDictDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 专业代码 + */ + private String code; + + /** + * 专业名称 + */ + private String major; + + /** + * 学历 1.大专 2.本科 3.硕士 4.博士 + */ + private String education; +} diff --git a/src/main/java/com/zhongzhi/model/MatchCollegePdfDO.java b/src/main/java/com/zhongzhi/model/MatchCollegePdfDO.java new file mode 100644 index 0000000..ddf0b0e --- /dev/null +++ b/src/main/java/com/zhongzhi/model/MatchCollegePdfDO.java @@ -0,0 +1,36 @@ +package com.zhongzhi.model; + +import com.zhongzhi.model.base.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * + *

+ * + * @author DengMin + * @since 2024-06-25 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("match_college_pdf") +public class MatchCollegePdfDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + private Long collegeId; + + private Long matchId; + + private String attachment; + + private String fileName; + +} diff --git a/src/main/java/com/zhongzhi/model/MatchDictDO.java b/src/main/java/com/zhongzhi/model/MatchDictDO.java new file mode 100644 index 0000000..fd31bd5 --- /dev/null +++ b/src/main/java/com/zhongzhi/model/MatchDictDO.java @@ -0,0 +1,70 @@ +package com.zhongzhi.model; + +import com.zhongzhi.model.base.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.time.LocalDateTime; +import java.util.Date; + +/** + *

+ * 赛事年份管理 + *

+ * + * @author DengMin + * @since 2021-05-17 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("match_dict") +public class MatchDictDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 赛事名称 + */ + private String matchName; + + /** + * 赛事年份 + */ + private String matchDate; + + /** + * 报名开始时间 + */ + private Date startTime; + + /** + * 报名结束时间 + */ + private Date endTime; + + /** + * 状态(1:启动,0:暂停) + */ + private Integer status; + + /** + * 赛事类型 + */ + private String matchType; + + /*** + * 截止时间 + */ + private String deadline; + + private String registrationStart; + + private String registrationDeadline; + +} diff --git a/src/main/java/com/zhongzhi/model/MatchScheduleDO.java b/src/main/java/com/zhongzhi/model/MatchScheduleDO.java new file mode 100644 index 0000000..ed57f51 --- /dev/null +++ b/src/main/java/com/zhongzhi/model/MatchScheduleDO.java @@ -0,0 +1,47 @@ +package com.zhongzhi.model; + +import com.zhongzhi.model.base.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; + +import java.util.Date; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * 时间安排 + *

+ * + * @author DengMin + * @since 2021-05-27 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("match_schedule") +public class MatchScheduleDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 赛事年份ID + */ + private Long matchId; + + /** + * 时间安排 + */ + private Date scheduleTime; + + /** + * 说明 + */ + private String explains; + + +} diff --git a/src/main/java/com/zhongzhi/model/MessageDO.java b/src/main/java/com/zhongzhi/model/MessageDO.java new file mode 100644 index 0000000..8fb73d0 --- /dev/null +++ b/src/main/java/com/zhongzhi/model/MessageDO.java @@ -0,0 +1,76 @@ +package com.zhongzhi.model; + +import com.zhongzhi.model.base.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + *

+ * 通知消息表 + *

+ * + * @author DengMin + * @since 2021-05-17 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("message") +public class MessageDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 发布人 + */ + private String username; + + /** + * 标题 + */ + private String title; + + /** + * 内容 + */ + private String content; + + /** + * 置顶 + */ + private Integer top; + + /** + * 发布时间 + */ + private Date releaseTime; + + /** + * 附件地址 + */ + private String attachmentUrl; + + /** + * 附件名称 + */ + private String attachmentName; + + /** + * 附件类型 + */ + private String attachmentType; + + /** + * 状态(0:停用,1:启用) + */ + private Integer status; + + +} diff --git a/src/main/java/com/zhongzhi/model/PermissionsDO.java b/src/main/java/com/zhongzhi/model/PermissionsDO.java new file mode 100644 index 0000000..6ddfbaf --- /dev/null +++ b/src/main/java/com/zhongzhi/model/PermissionsDO.java @@ -0,0 +1,41 @@ +package com.zhongzhi.model; + +import com.zhongzhi.model.base.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; + +import java.time.LocalDateTime; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * 权限表 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("permissions") +public class PermissionsDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 父级ID + */ + private Long parentId; + + /** + * 名称 + */ + private String name; + +} diff --git a/src/main/java/com/zhongzhi/model/ProjectAwardDO.java b/src/main/java/com/zhongzhi/model/ProjectAwardDO.java new file mode 100644 index 0000000..34bb77d --- /dev/null +++ b/src/main/java/com/zhongzhi/model/ProjectAwardDO.java @@ -0,0 +1,59 @@ +package com.zhongzhi.model; + +import com.zhongzhi.model.base.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * 项目奖项 + *

+ * + * @author DengMin + * @since 2022-04-25 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("project_award") +public class ProjectAwardDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 项目ID + */ + private Long projectId; + + /** + * 奖项名称 + */ + private String awardTitle; + + /** + * 获奖项目名称 + */ + private String awardProjectTitle; + + /** + * 级别 + */ + private String level; + + /** + * 获奖人 + */ + private String prizewinner; + + /** + * 获奖时间 + */ + private String winningTime; + + +} diff --git a/src/main/java/com/zhongzhi/model/ProjectCopyrightDO.java b/src/main/java/com/zhongzhi/model/ProjectCopyrightDO.java new file mode 100644 index 0000000..255330e --- /dev/null +++ b/src/main/java/com/zhongzhi/model/ProjectCopyrightDO.java @@ -0,0 +1,69 @@ +package com.zhongzhi.model; + +import com.zhongzhi.model.base.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * 项目软件著作权 + *

+ * + * @author DengMin + * @since 2022-04-25 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("project_copyright") +public class ProjectCopyrightDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 项目ID + */ + private Long projectId; + + /** + * 软件名称 + */ + private String dynacomm; + + /** + * 著作权人 + */ + private String copyrightOwner; + + /** + * 权利获取方式 + */ + private String rightAcquisitionMethod; + + /** + * 开发完成时间 + */ + private String developmentDate; + + /** + * 开发发表日期 + */ + private String publishedDate; + + /** + * 权利范围 + */ + private String interestField; + + /** + * 登记号 + */ + private String registerNumber; + + +} diff --git a/src/main/java/com/zhongzhi/model/ProjectDO.java b/src/main/java/com/zhongzhi/model/ProjectDO.java new file mode 100644 index 0000000..fbf24e9 --- /dev/null +++ b/src/main/java/com/zhongzhi/model/ProjectDO.java @@ -0,0 +1,262 @@ +package com.zhongzhi.model; + +import com.zhongzhi.model.base.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; + +import java.time.LocalDateTime; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * 项目表 + *

+ * + * @author DengMin + * @since 2021-05-11 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("project") +public class ProjectDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 申请人ID + */ + private Long proposerId; + + /** + * 所属领域 + */ + private String itemField; + + /** + * 项目LOGO + */ + private String logoUri; + + /** + * 项目名称 + */ + private String projectName; + + /** + * 组别 + */ + private String projectGroup; + + /** + * 赛事年份 + */ + private Long matchId; + + /** + * 申报项目时所在院校 + */ + private String college; + + /** + * 类别 + */ + private String classification; + + /** + * 所在地址 + */ + private String address; + + /** + * 项目概述 + */ + private String projectIntro; + + /** + * 设计背景 + */ + private String projectCreativity; + + /** + * 科学设计 + */ + private String scientificPrinciple; + + /** + * 应用前景 + */ + private String applicationProspect; + + /** + * 路演形式 + */ + private String roadShowForm; + + /** + * 创意实施或实验所受条件的限制 + */ + private String restriction; + + /** + * 国家级重大、重点科研项目的科研成果转化项目 + */ + private String projectTransform; + + /** + * 学校科技成果转化 + */ + private String resultTransfer; + + /** + * 参赛申报人为科技成果的完成人或所有人 + */ + private String competitionOwner; + + /** + * 参赛申报人为科技成果的第一完成人或所有人 + */ + private String competitionFirst; + + /** + * 师生共创 + */ + private String bothInvention; + + /** + * 项目进展 + */ + private String projectProgress; + + /** + * 项目阶段 + */ + private String projectStage; + + /** + * 公司名称 + */ + private String companyName; + + /** + * 法人身份 + */ + private String legalPersonStatus; + + /** + * 法人姓名 + */ + private String legalPersonName; + + /** + * 职务 + */ + private String position; + + /** + * 注册资金 + */ + private String registerFund; + + /** + * 注册时间 + */ + private String registerDate; + + /** + * 注册省份 + */ + private String registerProvince; + + /** + * 注册地址 + */ + private String registerAddress; + + /** + * 统一社会信用代码 + */ + private String unifyCode; + + /** + * 财务报表 + */ + private String financialStatement; + + /** + * 隐私设置 + */ + private String privacySetting; + + /** + * 项目状态 + */ + private String projectStatus; + + /** + * 项目进度 + */ + private String projectSchedule; + + /** + * 项目类型 + */ + private String projectType; + + /** + * 上传加盖公章的附件 + */ + private String printAttachment; + + /** + * 上传加盖公章的附件类型 + */ + private String printAttachmentType; + + /** + * 上传加盖公章的附件名称 + */ + private String printAttachmentName; + + /** + * 项目是否获得投资 + */ + private String investment; + + /** + * 项目PPT + */ + private String projectPptUrl; + + /** + * 项目PPT类型 + */ + private String projectPptType; + + /** + * 项目PPT名称 + */ + private String projectPptName; + + /** + * 评审状态 + */ + private String projectReview; + + /** + * 分配状态 + */ + private String projectAssigned; + + private Integer editStatus; + + private String vodUrl; + + private Integer orderNo; + +} diff --git a/src/main/java/com/zhongzhi/model/ProjectJudgeDO.java b/src/main/java/com/zhongzhi/model/ProjectJudgeDO.java new file mode 100644 index 0000000..0444693 --- /dev/null +++ b/src/main/java/com/zhongzhi/model/ProjectJudgeDO.java @@ -0,0 +1,73 @@ +package com.zhongzhi.model; + +import com.zhongzhi.model.base.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; + +import java.time.LocalDateTime; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * 项目评审员 + *

+ * + * @author DengMin + * @since 2021-05-28 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("project_judge") +public class ProjectJudgeDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 姓名 + */ + private String username; + + /** + * 手机号 + */ + private String telephone; + + /** + * 职务 + */ + private String position; + + /** + * 单位 + */ + private String unit; + + /** + * 身份证号 + */ + private String idCard; + + /** + * 开户行 + */ + private String bankName; + + /** + * 银行卡号 + */ + private String bankCard; + + /** + * 状态 + */ + private Integer status; + + private Integer passwordFree; + +} diff --git a/src/main/java/com/zhongzhi/model/ProjectMaterialsDO.java b/src/main/java/com/zhongzhi/model/ProjectMaterialsDO.java new file mode 100644 index 0000000..a874be0 --- /dev/null +++ b/src/main/java/com/zhongzhi/model/ProjectMaterialsDO.java @@ -0,0 +1,54 @@ +package com.zhongzhi.model; + +import com.zhongzhi.model.base.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * 项目材料 + *

+ * + * @author DengMin + * @since 2021-05-11 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("project_materials") +public class ProjectMaterialsDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 项目ID + */ + private Long projectId; + + /** + * 类型 + */ + private String materialsType; + + /** + * 大小 + */ + private String materialsSize; + + /** + * 名称 + */ + private String materialsName; + + /** + * 地址 + */ + private String materialsUrl; + + +} diff --git a/src/main/java/com/zhongzhi/model/ProjectMemberDO.java b/src/main/java/com/zhongzhi/model/ProjectMemberDO.java new file mode 100644 index 0000000..b66ddea --- /dev/null +++ b/src/main/java/com/zhongzhi/model/ProjectMemberDO.java @@ -0,0 +1,102 @@ +package com.zhongzhi.model; + +import com.zhongzhi.model.base.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * 项目团队信息表 + *

+ * + * @author DengMin + * @since 2021-05-11 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("project_member") +public class ProjectMemberDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 项目ID + */ + private Long projectId; + + /** + * 姓名 + */ + private String name; + + /** + * 就读学校 + */ + private String school; + + /** + * 年级 + */ + private String grade; + + /** + * 身份证 + */ + private String idCard; + + + /** + * 就读专业 + */ + private String major; + + /** + * 性别 + */ + private String sex; + + /** + * 学籍号 + */ + private String studentNo; + + /** + * 工作单位 + */ + private String company; + + /** + * 职称 + */ + private String positionTitle; + + /** + * 职务 + */ + private String position; + + /** + * 手机号 + */ + private String telephone; + + /** + * 邮箱 + */ + private String email; + + /** + * 类型(1:团队负责人,2:团队成员,3:指导老师) + */ + private String type; + + private String fiveYears; + + +} diff --git a/src/main/java/com/zhongzhi/model/ProjectOwnershipStructureDO.java b/src/main/java/com/zhongzhi/model/ProjectOwnershipStructureDO.java new file mode 100644 index 0000000..869b223 --- /dev/null +++ b/src/main/java/com/zhongzhi/model/ProjectOwnershipStructureDO.java @@ -0,0 +1,49 @@ +package com.zhongzhi.model; + +import com.zhongzhi.model.base.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * 股权结构表 + *

+ * + * @author DengMin + * @since 2021-05-11 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("project_ownership_structure") +public class ProjectOwnershipStructureDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 项目ID + */ + private Long projectId; + + /** + * 股东身份 + */ + private String shareholderStatus; + + /** + * 股东名称 + */ + private String shareholderName; + + /** + * 持股比例 + */ + private Double shareholdingRatio; + + +} diff --git a/src/main/java/com/zhongzhi/model/ProjectPaperDO.java b/src/main/java/com/zhongzhi/model/ProjectPaperDO.java new file mode 100644 index 0000000..43a0eb7 --- /dev/null +++ b/src/main/java/com/zhongzhi/model/ProjectPaperDO.java @@ -0,0 +1,64 @@ +package com.zhongzhi.model; + +import com.zhongzhi.model.base.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * 项目论文 + *

+ * + * @author DengMin + * @since 2022-04-25 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("project_paper") +public class ProjectPaperDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 项目ID + */ + private Long projectId; + + /** + * 论文名称 + */ + private String paperTitle; + + /** + * 发表期刊 + */ + private String publishedJournals; + + /** + * DOI号 + */ + private String doi; + + /** + * 是否有共同 + */ + private String common; + + /** + * 第一作者 + */ + private String firstAuthor; + + /** + * 其他作者 + */ + private String otherAuthor; + + +} diff --git a/src/main/java/com/zhongzhi/model/ProjectPatentDO.java b/src/main/java/com/zhongzhi/model/ProjectPatentDO.java new file mode 100644 index 0000000..98d4a97 --- /dev/null +++ b/src/main/java/com/zhongzhi/model/ProjectPatentDO.java @@ -0,0 +1,86 @@ +package com.zhongzhi.model; + +import com.zhongzhi.model.base.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableField; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * 项目专利 + *

+ * + * @author DengMin + * @since 2022-04-25 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("project_patent") +public class ProjectPatentDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 项目ID + */ + private Long projectId; + + /** + * 国别 + */ + private String country; + + /** + * 公开号 + */ + private String publicationNumber; + + /** + * 专利标题 + */ + private String patentTitle; + + /** + * 专利类型 + */ + private String patentType; + + /** + * 专利号 + */ + private String patentNumber; + + /** + * 专利申请人 + */ + private String patentApplicants; + + /** + * 颁发时间(获得) + */ + @TableField("Issued_time") + private String issuedTime; + + /** + * 预估到期时间 + */ + private String expirationTime; + + /** + * 发明人 + */ + private String inventor; + + /** + * 其他发明人 + */ + private String otherInventors; + + +} diff --git a/src/main/java/com/zhongzhi/model/ProjectReviewDO.java b/src/main/java/com/zhongzhi/model/ProjectReviewDO.java new file mode 100644 index 0000000..bd11559 --- /dev/null +++ b/src/main/java/com/zhongzhi/model/ProjectReviewDO.java @@ -0,0 +1,72 @@ +package com.zhongzhi.model; + +import com.zhongzhi.model.base.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; + +import java.time.LocalDateTime; +import java.util.Date; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * 项目评审 + *

+ * + * @author DengMin + * @since 2021-05-18 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("project_review") +public class ProjectReviewDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 项目ID + */ + private Long projectId; + + /** + * 评委ID + */ + private Long judgeId; + + /** + * 评审分数 + */ + private Double reviewScore; + + /** + * 评分 + */ + private Double score; + + /** + * 评审意见 + */ + private String reviewOpinion; + + /** + * 进度 + */ + private String projectSchedule; + + /** + * 评审时间 + */ + private Date reviewTime; + + /** + * 评审状态 + */ + private String reviewStatus; + +} diff --git a/src/main/java/com/zhongzhi/model/ProjectReviewPeriodDO.java b/src/main/java/com/zhongzhi/model/ProjectReviewPeriodDO.java new file mode 100644 index 0000000..063f3f3 --- /dev/null +++ b/src/main/java/com/zhongzhi/model/ProjectReviewPeriodDO.java @@ -0,0 +1,57 @@ +package com.zhongzhi.model; + +import com.zhongzhi.model.base.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; + +import java.util.Date; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * 评审时段 + *

+ * + * @author DengMin + * @since 2021-06-10 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("project_review_period") +public class ProjectReviewPeriodDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 赛事年份ID + */ + private Long matchId; + + /** + * 项目组别 + */ + private String projectGroup; + + /** + * 项目进度 + */ + private String projectSchedule; + + /** + * 开始时间 + */ + private Date startTime; + + /** + * 结束时间 + */ + private Date endTime; + + +} diff --git a/src/main/java/com/zhongzhi/model/ProjectScheduleRecordDO.java b/src/main/java/com/zhongzhi/model/ProjectScheduleRecordDO.java new file mode 100644 index 0000000..5304cee --- /dev/null +++ b/src/main/java/com/zhongzhi/model/ProjectScheduleRecordDO.java @@ -0,0 +1,42 @@ +package com.zhongzhi.model; + +import com.zhongzhi.model.base.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * 项目进度记录 + *

+ * + * @author DengMin + * @since 2021-06-02 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("project_schedule_record") +public class ProjectScheduleRecordDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + private Long proposerId; + + private Long projectId; + + private Long matchId; + + private String college; + + private String projectType; + + private String projectSchedule; + + private String projectStatus; + +} diff --git a/src/main/java/com/zhongzhi/model/ProjectTrademarkDO.java b/src/main/java/com/zhongzhi/model/ProjectTrademarkDO.java new file mode 100644 index 0000000..840c141 --- /dev/null +++ b/src/main/java/com/zhongzhi/model/ProjectTrademarkDO.java @@ -0,0 +1,63 @@ +package com.zhongzhi.model; + +import com.zhongzhi.model.base.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * 项目作品 + *

+ * + * @author DengMin + * @since 2022-04-25 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("project_trademark") +public class ProjectTrademarkDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 项目ID + */ + private Long projectId; + + /** + * 国际分类号 + */ + private String classificationNumber; + + /** + * 商标名称 + */ + private String tradeName; + + /** + * 注册人 + */ + private String registeredPerson; + + /** + * 注册日期 + */ + private String registeredDate; + + /** + * 有效日期 + */ + private String effectiveDate; + + /** + * 商标编号 + */ + private String trademarkNumber; + +} diff --git a/src/main/java/com/zhongzhi/model/ProjectWorksDO.java b/src/main/java/com/zhongzhi/model/ProjectWorksDO.java new file mode 100644 index 0000000..26f9650 --- /dev/null +++ b/src/main/java/com/zhongzhi/model/ProjectWorksDO.java @@ -0,0 +1,64 @@ +package com.zhongzhi.model; + +import com.zhongzhi.model.base.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * 项目作品 + *

+ * + * @author DengMin + * @since 2022-04-25 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("project_works") +public class ProjectWorksDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 项目ID + */ + private Long projectId; + + /** + * 作品名称 + */ + private String worksName; + + /** + * 作者 + */ + private String author; + + /** + * 创作完成日期 + */ + private String completionDate; + + /** + * 首次发表日期 + */ + private String firstPublicationDate; + + /** + * 作品类别 + */ + private String worksType; + + /** + * 登记号 + */ + private String registerNumber; + + +} diff --git a/src/main/java/com/zhongzhi/model/SmsCodeDO.java b/src/main/java/com/zhongzhi/model/SmsCodeDO.java new file mode 100644 index 0000000..939d0b6 --- /dev/null +++ b/src/main/java/com/zhongzhi/model/SmsCodeDO.java @@ -0,0 +1,51 @@ +package com.zhongzhi.model; + +import com.zhongzhi.model.base.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; + +import java.time.LocalDateTime; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * 短信验证码 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("sms_code") +public class SmsCodeDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 手机号 + */ + private String telephone; + + /** + * 验证码 + */ + private String code; + + /** + * 类型 + */ + private String type; + + /** + * 平台 + */ + private String platform; + +} diff --git a/src/main/java/com/zhongzhi/model/SmsNoticeDO.java b/src/main/java/com/zhongzhi/model/SmsNoticeDO.java new file mode 100644 index 0000000..78edc66 --- /dev/null +++ b/src/main/java/com/zhongzhi/model/SmsNoticeDO.java @@ -0,0 +1,46 @@ +package com.zhongzhi.model; + +import com.zhongzhi.model.base.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * 短信通知记录 + *

+ * + * @author DengMin + * @since 2022-04-15 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("sms_notice") +public class SmsNoticeDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + private Long id; + + /** + * 项目ID + */ + private Long projectId; + + /** + * 姓名 + */ + private String name; + + /** + * 手机号 + */ + private String telephone; + + /** + * 发送内容 + */ + private String content; + + +} diff --git a/src/main/java/com/zhongzhi/model/StudentDO.java b/src/main/java/com/zhongzhi/model/StudentDO.java new file mode 100644 index 0000000..2224cf2 --- /dev/null +++ b/src/main/java/com/zhongzhi/model/StudentDO.java @@ -0,0 +1,76 @@ +package com.zhongzhi.model; + +import com.zhongzhi.model.base.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; + +import java.time.LocalDateTime; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("student") +public class StudentDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 姓名 + */ + private String name; + + /** + * 头像 + */ + private String avatar; + + /** + * 身份证号 + */ + private String idCard; + + /** + * 手机号 + */ + private String telephone; + + /** + * 学历 + */ + private String education; + + /** + * 就读院校 + */ + private String college; + + /** + * 就读专业 + */ + private String major; + + /** + * 入学年份 + */ + private String enrollmentDate; + + /** + * 毕业年份 + */ + private String graduateDate; + +} diff --git a/src/main/java/com/zhongzhi/model/VodDictDO.java b/src/main/java/com/zhongzhi/model/VodDictDO.java new file mode 100644 index 0000000..7e64126 --- /dev/null +++ b/src/main/java/com/zhongzhi/model/VodDictDO.java @@ -0,0 +1,79 @@ +package com.zhongzhi.model; + +import com.zhongzhi.model.base.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * + *

+ * + * @author DengMin + * @since 2022-11-14 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("vod_dict") +public class VodDictDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 课程id + */ + private Long courseId; + + /** + * 视频名称 + */ + private String vodName; + + /** + * 视频地址 + */ + private String vodUrl; + + /** + * 视频编号 + */ + private String vodCode; + + /** + * 视频时长 + */ + private String vodLength; + + /** + * 视频大小 + */ + private String vodSize; + + /** + * 视频格式 + */ + private String vodFormat; + + /** + * 序号 + */ + private Integer orderNo; + + /** + * 封面 + */ + private String coverPage; + + /** + * 播放量 + */ + private String playCount; + + +} diff --git a/src/main/java/com/zhongzhi/model/YearDictDO.java b/src/main/java/com/zhongzhi/model/YearDictDO.java new file mode 100644 index 0000000..163bd73 --- /dev/null +++ b/src/main/java/com/zhongzhi/model/YearDictDO.java @@ -0,0 +1,43 @@ +package com.zhongzhi.model; + +import com.zhongzhi.model.base.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; + +import java.time.LocalDateTime; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * 年份字典表 + *

+ * + * @author DengMin + * @since 2023-04-11 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("year_dict") +public class YearDictDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 年份 + */ + private String year; + + /** + * 状态 + */ + private String status; + + + +} diff --git a/src/main/java/com/zhongzhi/model/base/BaseModel.java b/src/main/java/com/zhongzhi/model/base/BaseModel.java new file mode 100644 index 0000000..31ae7fa --- /dev/null +++ b/src/main/java/com/zhongzhi/model/base/BaseModel.java @@ -0,0 +1,35 @@ +package com.zhongzhi.model.base; + +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.FieldStrategy; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.time.LocalDateTime; + +@Data +public class BaseModel { + + /** + * 创建时间 + */ + @JsonIgnore + @TableField(insertStrategy = FieldStrategy.NEVER, updateStrategy = FieldStrategy.NEVER, value = "create_time", fill = FieldFill.INSERT) + private LocalDateTime createTime; + + /** + * 更新时间 + */ + @JsonIgnore + @TableField(insertStrategy = FieldStrategy.NEVER, updateStrategy = FieldStrategy.NEVER, value = "update_time", fill = FieldFill.UPDATE) + private LocalDateTime updateTime; + + /** + * 删除时间 + */ + @JsonIgnore + @TableLogic + private LocalDateTime deleteTime; +} diff --git a/src/main/java/com/zhongzhi/service/.DS_Store b/src/main/java/com/zhongzhi/service/.DS_Store new file mode 100644 index 0000000..495af99 Binary files /dev/null and b/src/main/java/com/zhongzhi/service/.DS_Store differ diff --git a/src/main/java/com/zhongzhi/service/AdministerPermissionService.java b/src/main/java/com/zhongzhi/service/AdministerPermissionService.java new file mode 100644 index 0000000..f4ae7c2 --- /dev/null +++ b/src/main/java/com/zhongzhi/service/AdministerPermissionService.java @@ -0,0 +1,16 @@ +package com.zhongzhi.service; + +import com.zhongzhi.model.AdministerPermissionDO; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 系统用户权限表 服务类 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +public interface AdministerPermissionService extends IService { + +} diff --git a/src/main/java/com/zhongzhi/service/AdministerService.java b/src/main/java/com/zhongzhi/service/AdministerService.java new file mode 100644 index 0000000..f1b6d04 --- /dev/null +++ b/src/main/java/com/zhongzhi/service/AdministerService.java @@ -0,0 +1,23 @@ +package com.zhongzhi.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.zhongzhi.dto.administer.AdministerPageDTO; +import com.zhongzhi.dto.administer.LoginDTO; +import com.zhongzhi.model.AdministerDO; +import com.baomidou.mybatisplus.extension.service.IService; +import com.zhongzhi.vo.administer.AdministerVO; + +/** + *

+ * 中心管理账户表 服务类 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +public interface AdministerService extends IService { + + AdministerVO login(LoginDTO loginDTO); + + IPage getAdministerPage(AdministerPageDTO administerPageDTO); +} diff --git a/src/main/java/com/zhongzhi/service/CollegesDictService.java b/src/main/java/com/zhongzhi/service/CollegesDictService.java new file mode 100644 index 0000000..36232ff --- /dev/null +++ b/src/main/java/com/zhongzhi/service/CollegesDictService.java @@ -0,0 +1,79 @@ +package com.zhongzhi.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.zhongzhi.dto.college.*; +import com.zhongzhi.model.*; +import com.baomidou.mybatisplus.extension.service.IService; +import com.zhongzhi.vo.college.CollegesVO; +import com.zhongzhi.vo.college.DetailVO; +import com.zhongzhi.vo.college.RegisterMembersVO; +import com.zhongzhi.vo.college.SchoolsVO; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; +import java.util.Map; + +/** + *

+ * 院校字典表 服务类 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +public interface CollegesDictService extends IService { + + CollegesVO login(LoginDTO loginDTO); + + IPage getCollegesPage(CollegesPageDTO collegesPageDTO); + + void createColleges(CollegesDictDO collegesDictDO); + + Map importColleges(MultipartFile file); + + void downloadErrorData(DownloadErrorDataDTO downloadErrorDataDTO); + + IPage getAwardedList(AwardedListDTO awardedListDTO); + + void exportAwardedList(AwardedListDTO awardedListDTO); + + void exportCollege(); + + void updatePwd(UpdatePwdDTO updatePwdDTO); + + List projects(ProjectDO projectDO); + + ProjectMemberDO projectLeader(ProjectMemberDO projectMemberDO); + + List projectMembers(ProjectMemberDO projectMemberDO); + + void addProjectMember(AddProjectMemberDTO addProjectMemberDTO)throws Exception; + + void removeProject(AddProjectMemberDTO addProjectMemberDTO)throws Exception; + + void addObservations(FinalMatchMemberDO finalMatchMemberDO)throws Exception; + + void updateObservations(FinalMatchMemberDO finalMatchMemberDO)throws Exception; + + void deleteObservations(FinalMatchMemberDO finalMatchMemberDOO)throws Exception; + + List registerMembers(RegisterMembersDTO registerMembersDTO); + + List otherMembers(RegisterMembersDTO registerMembersDTO); + + List cars(RegisterMembersDTO registerMembersDTO); + + DetailVO detail(RegisterMembersDTO registerMembersDTO); + + List schools(RegisterMembersDTO registerMembersDTO); + + void exportList(FinalMatchMemberDO finalMatchMemberDO); + + void addContact(CollegesDictDO collegesDictDO); + + void updateAllLoginStatus(LoginStatusDTO loginStatusDTO); + + void batchUpdateLoginStatus(LoginStatusDTO loginStatusDTO); + + void updateLoginStatus(LoginStatusDTO loginStatusDTO); +} diff --git a/src/main/java/com/zhongzhi/service/CourseDictService.java b/src/main/java/com/zhongzhi/service/CourseDictService.java new file mode 100644 index 0000000..ffc8c08 --- /dev/null +++ b/src/main/java/com/zhongzhi/service/CourseDictService.java @@ -0,0 +1,31 @@ +package com.zhongzhi.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.zhongzhi.dto.course.CoursesDTO; +import com.zhongzhi.model.CourseDictDO; +import com.baomidou.mybatisplus.extension.service.IService; +import com.zhongzhi.vo.course.CourseVodsVO; +import com.zhongzhi.vo.course.CoursesVO; + +import java.util.List; + +/** + *

+ * 服务类 + *

+ * + * @author DengMin + * @since 2022-11-14 + */ +public interface CourseDictService extends IService { + + void addCourse(CourseDictDO courseDictDO); + + void updateCourse(CourseDictDO courseDictDO); + + IPage courses(CoursesDTO coursesDTO); + + void deleteCourse(CourseDictDO courseDictDO); + + List courseVods(CourseDictDO courseDictDO); +} diff --git a/src/main/java/com/zhongzhi/service/FinalMatchMemberService.java b/src/main/java/com/zhongzhi/service/FinalMatchMemberService.java new file mode 100644 index 0000000..bbf1d6e --- /dev/null +++ b/src/main/java/com/zhongzhi/service/FinalMatchMemberService.java @@ -0,0 +1,16 @@ +package com.zhongzhi.service; + +import com.zhongzhi.model.FinalMatchMemberDO; +import com.baomidou.mybatisplus.extension.service.IService; + +/** +*

+ * 服务类 + *

+* +* @author DengMin +* @since 2024-07-12 +*/ + public interface FinalMatchMemberService extends IService { + + } diff --git a/src/main/java/com/zhongzhi/service/FundDictService.java b/src/main/java/com/zhongzhi/service/FundDictService.java new file mode 100644 index 0000000..b2e62f8 --- /dev/null +++ b/src/main/java/com/zhongzhi/service/FundDictService.java @@ -0,0 +1,16 @@ +package com.zhongzhi.service; + +import com.zhongzhi.model.FundDictDO; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 届数表 服务类 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +public interface FundDictService extends IService { + +} diff --git a/src/main/java/com/zhongzhi/service/ItemFieldDictService.java b/src/main/java/com/zhongzhi/service/ItemFieldDictService.java new file mode 100644 index 0000000..f313f6e --- /dev/null +++ b/src/main/java/com/zhongzhi/service/ItemFieldDictService.java @@ -0,0 +1,16 @@ +package com.zhongzhi.service; + +import com.zhongzhi.model.ItemFieldDictDO; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 行业领域字典表 服务类 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +public interface ItemFieldDictService extends IService { + +} diff --git a/src/main/java/com/zhongzhi/service/MajorDictService.java b/src/main/java/com/zhongzhi/service/MajorDictService.java new file mode 100644 index 0000000..eefe9e6 --- /dev/null +++ b/src/main/java/com/zhongzhi/service/MajorDictService.java @@ -0,0 +1,16 @@ +package com.zhongzhi.service; + +import com.zhongzhi.model.MajorDictDO; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 专业字典表 服务类 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +public interface MajorDictService extends IService { + +} diff --git a/src/main/java/com/zhongzhi/service/MatchCollegePdfService.java b/src/main/java/com/zhongzhi/service/MatchCollegePdfService.java new file mode 100644 index 0000000..433a553 --- /dev/null +++ b/src/main/java/com/zhongzhi/service/MatchCollegePdfService.java @@ -0,0 +1,22 @@ +package com.zhongzhi.service; + +import com.zhongzhi.model.MatchCollegePdfDO; +import com.baomidou.mybatisplus.extension.service.IService; +import com.zhongzhi.vo.project.QueryPdfStatusVO; + +/** + *

+ * 服务类 + *

+ * + * @author DengMin + * @since 2024-06-25 + */ +public interface MatchCollegePdfService extends IService { + + void uploadPdf(MatchCollegePdfDO matchCollegePdfDO); + + void dropPdf(MatchCollegePdfDO matchCollegePdfDO); + + MatchCollegePdfDO queryPdfStatus(MatchCollegePdfDO matchCollegePdfDO); +} diff --git a/src/main/java/com/zhongzhi/service/MatchDictService.java b/src/main/java/com/zhongzhi/service/MatchDictService.java new file mode 100644 index 0000000..c24b22a --- /dev/null +++ b/src/main/java/com/zhongzhi/service/MatchDictService.java @@ -0,0 +1,42 @@ +package com.zhongzhi.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.zhongzhi.dto.match.MatchDictDTO; +import com.zhongzhi.dto.match.SelectListPageDTO; +import com.zhongzhi.model.MatchDictDO; +import com.baomidou.mybatisplus.extension.service.IService; + +import java.util.List; + +/** + *

+ * 赛事年份管理 服务类 + *

+ * + * @author DengMin + * @since 2021-05-17 + */ +public interface MatchDictService extends IService { + + MatchDictDO getMainTrackMatch(); + + MatchDictDO getSeedTrackMatch(); + + void updateMatch(MatchDictDTO matchDictDTO); + + IPage getSeedTrackMatchPage(SelectListPageDTO selectListPageDTO); + + void createMatch(MatchDictDTO matchDictDTO); + + List getMatch(); + + List getList(String projectType, String projectGroup); + + IPage getVocationalPage(SelectListPageDTO selectListPageDTO); + + MatchDictDO getVocationalMatch(); + + void updateMatchDate(MatchDictDO matchDictDO); + + MatchDictDO getMatch(MatchDictDO matchDictDO); +} diff --git a/src/main/java/com/zhongzhi/service/MatchScheduleService.java b/src/main/java/com/zhongzhi/service/MatchScheduleService.java new file mode 100644 index 0000000..79bc00c --- /dev/null +++ b/src/main/java/com/zhongzhi/service/MatchScheduleService.java @@ -0,0 +1,16 @@ +package com.zhongzhi.service; + +import com.zhongzhi.model.MatchScheduleDO; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 时间安排 服务类 + *

+ * + * @author DengMin + * @since 2021-05-27 + */ +public interface MatchScheduleService extends IService { + +} diff --git a/src/main/java/com/zhongzhi/service/MessageService.java b/src/main/java/com/zhongzhi/service/MessageService.java new file mode 100644 index 0000000..efb1c48 --- /dev/null +++ b/src/main/java/com/zhongzhi/service/MessageService.java @@ -0,0 +1,21 @@ +package com.zhongzhi.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.zhongzhi.dto.message.MessagePageDTO; +import com.zhongzhi.model.MessageDO; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 通知消息表 服务类 + *

+ * + * @author DengMin + * @since 2021-05-17 + */ +public interface MessageService extends IService { + + void createMessage(MessageDO messageDO); + + IPage getMessagePage(MessagePageDTO messagePageDTO); +} diff --git a/src/main/java/com/zhongzhi/service/PermissionsService.java b/src/main/java/com/zhongzhi/service/PermissionsService.java new file mode 100644 index 0000000..0dc40af --- /dev/null +++ b/src/main/java/com/zhongzhi/service/PermissionsService.java @@ -0,0 +1,20 @@ +package com.zhongzhi.service; + +import com.zhongzhi.model.PermissionsDO; +import com.baomidou.mybatisplus.extension.service.IService; +import com.zhongzhi.vo.permission.PermissionVO; + +import java.util.List; + +/** + *

+ * 权限表 服务类 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +public interface PermissionsService extends IService { + + List getPermissionById(Long id); +} diff --git a/src/main/java/com/zhongzhi/service/ProjectAwardService.java b/src/main/java/com/zhongzhi/service/ProjectAwardService.java new file mode 100644 index 0000000..8f4a202 --- /dev/null +++ b/src/main/java/com/zhongzhi/service/ProjectAwardService.java @@ -0,0 +1,16 @@ +package com.zhongzhi.service; + +import com.zhongzhi.model.ProjectAwardDO; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 项目奖项 服务类 + *

+ * + * @author DengMin + * @since 2022-04-25 + */ +public interface ProjectAwardService extends IService { + +} diff --git a/src/main/java/com/zhongzhi/service/ProjectCopyrightService.java b/src/main/java/com/zhongzhi/service/ProjectCopyrightService.java new file mode 100644 index 0000000..3bd4dc7 --- /dev/null +++ b/src/main/java/com/zhongzhi/service/ProjectCopyrightService.java @@ -0,0 +1,16 @@ +package com.zhongzhi.service; + +import com.zhongzhi.model.ProjectCopyrightDO; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 项目软件著作权 服务类 + *

+ * + * @author DengMin + * @since 2022-04-25 + */ +public interface ProjectCopyrightService extends IService { + +} diff --git a/src/main/java/com/zhongzhi/service/ProjectJudgeService.java b/src/main/java/com/zhongzhi/service/ProjectJudgeService.java new file mode 100644 index 0000000..a089f13 --- /dev/null +++ b/src/main/java/com/zhongzhi/service/ProjectJudgeService.java @@ -0,0 +1,37 @@ +package com.zhongzhi.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.zhongzhi.dto.administer.LoginDTO; +import com.zhongzhi.dto.judge.ProjectJudgePageDTO; +import com.zhongzhi.model.ProjectJudgeDO; +import com.baomidou.mybatisplus.extension.service.IService; +import com.zhongzhi.vo.judge.JudgeInfoVO; +import com.zhongzhi.vo.judge.ProjectJudgePageVO; +import org.springframework.web.multipart.MultipartFile; + +/** + *

+ * 项目评审员 服务类 + *

+ * + * @author DengMin + * @since 2021-05-28 + */ +public interface ProjectJudgeService extends IService { + + IPage getProjectJudgePage(ProjectJudgePageDTO projectJudgePageDTO); + + void createProjectJudge(ProjectJudgeDO projectJudgeDO); + + void updateProjectJudge(ProjectJudgeDO projectJudgeDO); + + JudgeInfoVO login(LoginDTO loginDTO); + + IPage projectJudgesAssigned(ProjectJudgePageDTO projectJudgePageDTO); + + void importJudge(MultipartFile file); + + void downloadTemplate(); + + void exportProjectJudge(); +} diff --git a/src/main/java/com/zhongzhi/service/ProjectMaterialsService.java b/src/main/java/com/zhongzhi/service/ProjectMaterialsService.java new file mode 100644 index 0000000..399ddab --- /dev/null +++ b/src/main/java/com/zhongzhi/service/ProjectMaterialsService.java @@ -0,0 +1,16 @@ +package com.zhongzhi.service; + +import com.zhongzhi.model.ProjectMaterialsDO; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 项目材料 服务类 + *

+ * + * @author DengMin + * @since 2021-05-11 + */ +public interface ProjectMaterialsService extends IService { + +} diff --git a/src/main/java/com/zhongzhi/service/ProjectMemberService.java b/src/main/java/com/zhongzhi/service/ProjectMemberService.java new file mode 100644 index 0000000..3ce1c56 --- /dev/null +++ b/src/main/java/com/zhongzhi/service/ProjectMemberService.java @@ -0,0 +1,16 @@ +package com.zhongzhi.service; + +import com.zhongzhi.model.ProjectMemberDO; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 项目团队信息表 服务类 + *

+ * + * @author DengMin + * @since 2021-05-11 + */ +public interface ProjectMemberService extends IService { + +} diff --git a/src/main/java/com/zhongzhi/service/ProjectOwnershipStructureService.java b/src/main/java/com/zhongzhi/service/ProjectOwnershipStructureService.java new file mode 100644 index 0000000..4c72d47 --- /dev/null +++ b/src/main/java/com/zhongzhi/service/ProjectOwnershipStructureService.java @@ -0,0 +1,16 @@ +package com.zhongzhi.service; + +import com.zhongzhi.model.ProjectOwnershipStructureDO; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 股权结构表 服务类 + *

+ * + * @author DengMin + * @since 2021-05-11 + */ +public interface ProjectOwnershipStructureService extends IService { + +} diff --git a/src/main/java/com/zhongzhi/service/ProjectPaperService.java b/src/main/java/com/zhongzhi/service/ProjectPaperService.java new file mode 100644 index 0000000..1b1feb5 --- /dev/null +++ b/src/main/java/com/zhongzhi/service/ProjectPaperService.java @@ -0,0 +1,16 @@ +package com.zhongzhi.service; + +import com.zhongzhi.model.ProjectPaperDO; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 项目论文 服务类 + *

+ * + * @author DengMin + * @since 2022-04-25 + */ +public interface ProjectPaperService extends IService { + +} diff --git a/src/main/java/com/zhongzhi/service/ProjectPatentService.java b/src/main/java/com/zhongzhi/service/ProjectPatentService.java new file mode 100644 index 0000000..c6117bc --- /dev/null +++ b/src/main/java/com/zhongzhi/service/ProjectPatentService.java @@ -0,0 +1,16 @@ +package com.zhongzhi.service; + +import com.zhongzhi.model.ProjectPatentDO; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 项目专利 服务类 + *

+ * + * @author DengMin + * @since 2022-04-25 + */ +public interface ProjectPatentService extends IService { + +} diff --git a/src/main/java/com/zhongzhi/service/ProjectReviewPeriodService.java b/src/main/java/com/zhongzhi/service/ProjectReviewPeriodService.java new file mode 100644 index 0000000..a32bc96 --- /dev/null +++ b/src/main/java/com/zhongzhi/service/ProjectReviewPeriodService.java @@ -0,0 +1,21 @@ +package com.zhongzhi.service; + +import com.zhongzhi.dto.period.ProjectReviewPeriodDTO; +import com.zhongzhi.model.ProjectReviewPeriodDO; +import com.baomidou.mybatisplus.extension.service.IService; +import com.zhongzhi.vo.projectReviewPeriod.ProjectReviewPeriodVO; + +/** + *

+ * 评审时段 服务类 + *

+ * + * @author DengMin + * @since 2021-06-10 + */ +public interface ProjectReviewPeriodService extends IService { + + ProjectReviewPeriodVO getProjectReviewPeriod(ProjectReviewPeriodDTO projectReviewPeriodDTO); + + void updateProjectReviewPeriod(ProjectReviewPeriodDO projectReviewPeriodDO); +} diff --git a/src/main/java/com/zhongzhi/service/ProjectReviewService.java b/src/main/java/com/zhongzhi/service/ProjectReviewService.java new file mode 100644 index 0000000..33c3efa --- /dev/null +++ b/src/main/java/com/zhongzhi/service/ProjectReviewService.java @@ -0,0 +1,37 @@ +package com.zhongzhi.service; + +import com.zhongzhi.dto.review.CancelReviewDTO; +import com.zhongzhi.dto.review.ProjectReviewDTO; +import com.zhongzhi.dto.review.SetReviewDTO; +import com.zhongzhi.model.ProjectJudgeDO; +import com.zhongzhi.model.ProjectReviewDO; +import com.baomidou.mybatisplus.extension.service.IService; +import com.zhongzhi.vo.judge.ProjectReviewVO; +import com.zhongzhi.vo.review.SendNoticeVO; + +import java.util.List; + +/** + *

+ * 项目评审 服务类 + *

+ * + * @author DengMin + * @since 2021-05-18 + */ +public interface ProjectReviewService extends IService { + + void setReview(SetReviewDTO setReviewDTO); + + List getList(String projectSchedule, Long projectId); + + void cancelReview(CancelReviewDTO cancelReviewVO); + + List getProjectReview(ProjectReviewDTO projectReviewDTO); + + void sendNotice(SendNoticeVO sendNoticeVO); + + Integer selectCount(Long judgeId, Long matchId); + + Integer selectNotReviewCount(Long judgeId, Long matchId); +} diff --git a/src/main/java/com/zhongzhi/service/ProjectScheduleRecordService.java b/src/main/java/com/zhongzhi/service/ProjectScheduleRecordService.java new file mode 100644 index 0000000..4ea2b7f --- /dev/null +++ b/src/main/java/com/zhongzhi/service/ProjectScheduleRecordService.java @@ -0,0 +1,24 @@ +package com.zhongzhi.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.zhongzhi.dto.scheduleRecord.ProjectScheduleRecordDTO; +import com.zhongzhi.model.ProjectScheduleRecordDO; +import com.baomidou.mybatisplus.extension.service.IService; +import com.zhongzhi.vo.scheduleRecord.ProjectScheduleRecordVO; + +import java.util.List; + +/** + *

+ * 项目进度记录 服务类 + *

+ * + * @author DengMin + * @since 2021-06-02 + */ +public interface ProjectScheduleRecordService extends IService { + + IPage getProjectScheduleRecord(ProjectScheduleRecordDTO projectScheduleRecordDTO); + + List getList(Long matchId, String name, String projectGroup); +} diff --git a/src/main/java/com/zhongzhi/service/ProjectService.java b/src/main/java/com/zhongzhi/service/ProjectService.java new file mode 100644 index 0000000..be5b737 --- /dev/null +++ b/src/main/java/com/zhongzhi/service/ProjectService.java @@ -0,0 +1,167 @@ +package com.zhongzhi.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.zhongzhi.common.utils.ResponseData; +import com.zhongzhi.dto.member.CreateProjectMemberDTO; +import com.zhongzhi.dto.project.*; +import com.zhongzhi.dto.review.ProjectReviewPageDTO; +import com.zhongzhi.dto.review.ProjectReviewScoreDTO; +import com.zhongzhi.dto.review.SubmittedDTO; +import com.zhongzhi.model.ProjectDO; +import com.baomidou.mybatisplus.extension.service.IService; +import com.zhongzhi.vo.ExcelFieldVO; +import com.zhongzhi.vo.member.ProjectMemberVO; +import com.zhongzhi.vo.project.*; + +import java.util.List; + +/** + *

+ * 项目表 服务类 + *

+ * + * @author DengMin + * @since 2021-05-11 + */ +public interface ProjectService extends IService { + + IPage getMainTrackProject(ProjectListPageDTO projectListPageDTO); + + void createMainTrackProject(CreateMainTrackProjectDTO createMainTrackProjectDTO); + + void createProjectMember(CreateProjectMemberDTO createProjectMemberDTO); + + void withdrawn(ProjectDO projectDO); + + IPage getSeedTrackProject(ProjectListPageDTO projectListPageDTO); + + void createSeedTrackProject(CreateSeedTrackProjectDTO createSeedTrackProjectDTO); + + ProjectInfoVO getMainTrackProjectById(); + + ProjectMemberVO getProjectMemberById(); + + ProjectInfoVO getSeedTrackProjectById(); + + ProjectInfoVO getCulturalProjectById(); + + IPage getMainTrackProjectPage(ProjectListPageDTO projectListPageDTO); + + MainTrackProjectDetailVO getMainTrackProjectDetail(Long id); + + IPage getSeedTrackProjectPage(ProjectListPageDTO projectListPageDTO); + + IPage getSeedTrackProjectList(ProjectListPageDTO projectListPageDTO); + + void downloadPDF(String projectGroup); + + SeedTrackProjectDetailVO getSeedTrackProjectDetail(Long id); + + void pass(ApproveDTO approveDTO); + + void batchPass(ApproveDTO approveDTO); + + void weedOut(ApproveDTO approveDTO); + + void batchWeedOut(ApproveDTO approveDTO); + + void exportProjectList(ProjectCollegeListDTO projectCollegeListDTO); + + void uploadPrintAttachment(PrintAttachmentDTO printAttachmentDTO); + + IPage getReviewList(ReviewListDTO reviewListDTO); + + ProjectNumVO getProjectReviewNum(ReviewListDTO reviewListDTO); + + ProjectNumVO getProjectReviewAssignNum(ReviewListDTO reviewListDTO); + + List getExportProjectField(); + + List getExportProjectReviewField(); + + IPage getProjectReviewPage(ProjectReviewPageDTO projectReviewPageDTO); + + void setScore(ProjectReviewScoreDTO projectReviewScoreDTO); + + void submitted(ProjectReviewScoreDTO projectReviewScoreDTO); + + ProjectMemberVO getProjectMember(String projectGroup); + + ProjectDataOverview getCollegeDataOverview(DataOverviewDTO dataOverviewDTO); + + // ProjectDataOverview getSeedTrackDataOverview(); + + // ProjectDataOverview getMainTrackDataOverview(); + + void exportProjectReview(ReviewListDTO reviewListDTO); + + void exportProjectNew(ReviewListDTO reviewListDTO); + + ProjectNumVO getReviewProjectNum(ReviewListDTO reviewListDTO); + + void exportCollegeProject(CollegeProjectDTO collegeProjectDTO); + + void getProjectByStudentId(StudentProjectDTO studentProjectDTO); + + void rollback(ProjectDO projectDO); + + SeedTrackProjectNumVO getSeedTrackProjectNum(SeedTrackProjectNumDTO seedTrackProjectNumDTO); + + void exportProjectCollegeList(ProjectCollegeListDTO projectCollegeListDTO); + + List getList(Long matchId, String name, String projectGroup); + + SeedTrackProjectDetailVO getProjectById(Long id); + + void exportProjectAll(ProjectCollegeListDTO projectCollegeListDTO); + + void exportProjectAllProgress(ProjectCollegeListDTO projectCollegeListDTO); + + void createVocationalProject(CreateVocationalProjectDTO createVocationalProjectDTO); + + void updateVocationalProject(CreateVocationalProjectDTO createVocationalProjectDTO); + + VocationalProjectInfoVO getVocationalProjectById(); + + void createVocationalMember(CreateProjectMemberDTO createProjectMemberDTO); + + void updateVocationalMember(CreateProjectMemberDTO createProjectMemberDTO); + + ProjectDataOverview getVocationalDataOverview(DataOverviewDTO dataOverviewDTO); + + IPage getVocationalProject(ProjectListPageDTO projectListPageDTO); + + IPage getVocationalReviewList(ReviewListDTO reviewListDTO); + + SeedTrackProjectDetailVO getVocationalProjectDetail(Long id); + + IPage getVocationalProjectPage(ProjectListPageDTO projectListPageDTO); + + IPage getVocationalProjectList(ProjectListPageDTO projectListPageDTO); + + IPage getVocationalProjectReviewPage(ProjectReviewPageDTO projectReviewPageDTO); + + void importVocationalProject(ImportVocationalProjectDTO importVocationalProjectDTO); + + VocationalNumVO getVocationalProjectNum(SeedTrackProjectNumDTO seedTrackProjectNumDTO); + + VocationalReviewNumVO getVocationalReviewNum(ReviewListDTO reviewListDTO); + + void exportProjectById(ReviewListDTO reviewListDTO); + + VocationalProjectNum getReviewVocationalNum(ReviewVocationalNumDTO reviewVocationalNumDTO); + + void batchUpdateEditStatus(EditStatusDTO editStatusDTO); + + void updateEditStatus(EditStatusDTO editStatusDTO); + + void updateAllEditStatus(EditStatusDTO editStatusDTO); + + ProjectAssignNumVO getVocationalAssignNum(ReviewListDTO reviewListDTO); + + void importProjectByGroup(ImportVocationalProjectDTO importVocationalProjectDTO); + + void exportProjectByGroup(ImportVocationalProjectDTO importVocationalProjectDTO); + + // ProjectDataOverview getCollegeVocationalDataOverview(); +} diff --git a/src/main/java/com/zhongzhi/service/ProjectTrademarkService.java b/src/main/java/com/zhongzhi/service/ProjectTrademarkService.java new file mode 100644 index 0000000..e706985 --- /dev/null +++ b/src/main/java/com/zhongzhi/service/ProjectTrademarkService.java @@ -0,0 +1,16 @@ +package com.zhongzhi.service; + +import com.zhongzhi.model.ProjectTrademarkDO; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 项目作品 服务类 + *

+ * + * @author DengMin + * @since 2022-04-25 + */ +public interface ProjectTrademarkService extends IService { + +} diff --git a/src/main/java/com/zhongzhi/service/ProjectWorksService.java b/src/main/java/com/zhongzhi/service/ProjectWorksService.java new file mode 100644 index 0000000..be3d38c --- /dev/null +++ b/src/main/java/com/zhongzhi/service/ProjectWorksService.java @@ -0,0 +1,16 @@ +package com.zhongzhi.service; + +import com.zhongzhi.model.ProjectWorksDO; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 项目作品 服务类 + *

+ * + * @author DengMin + * @since 2022-04-25 + */ +public interface ProjectWorksService extends IService { + +} diff --git a/src/main/java/com/zhongzhi/service/SmsCodeService.java b/src/main/java/com/zhongzhi/service/SmsCodeService.java new file mode 100644 index 0000000..694b358 --- /dev/null +++ b/src/main/java/com/zhongzhi/service/SmsCodeService.java @@ -0,0 +1,26 @@ +package com.zhongzhi.service; + +import com.zhongzhi.model.AdministerDO; +import com.zhongzhi.model.SmsCodeDO; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 短信验证码 服务类 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +public interface SmsCodeService extends IService { + + void sendRegisterCode(SmsCodeDO smsCodeDO); + + void sendStudentLoginCode(SmsCodeDO smsCodeDO); + + SmsCodeDO getOneByTelePhone(String telephone, String type, String platform); + + void sendAdministerLoginCode(AdministerDO administerDO); + + void sendJudgeLoginCode(SmsCodeDO smsCodeDO); +} diff --git a/src/main/java/com/zhongzhi/service/SmsNoticeService.java b/src/main/java/com/zhongzhi/service/SmsNoticeService.java new file mode 100644 index 0000000..34066f6 --- /dev/null +++ b/src/main/java/com/zhongzhi/service/SmsNoticeService.java @@ -0,0 +1,24 @@ +package com.zhongzhi.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.zhongzhi.dto.notice.SmsNoticeDTO; +import com.zhongzhi.dto.notice.SmsNoticePageDTO; +import com.zhongzhi.model.SmsNoticeDO; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 短信通知记录 服务类 + *

+ * + * @author DengMin + * @since 2022-04-15 + */ +public interface SmsNoticeService extends IService { + + void batchSend(SmsNoticeDTO smsNoticeDTO); + + void send(SmsNoticeDTO smsNoticeDTO); + + IPage getListByPage(SmsNoticePageDTO smsNoticePageDTO); +} diff --git a/src/main/java/com/zhongzhi/service/StudentService.java b/src/main/java/com/zhongzhi/service/StudentService.java new file mode 100644 index 0000000..f30b71d --- /dev/null +++ b/src/main/java/com/zhongzhi/service/StudentService.java @@ -0,0 +1,24 @@ +package com.zhongzhi.service; + +import com.zhongzhi.dto.student.LoginDTO; +import com.zhongzhi.dto.student.RegisterDTO; +import com.zhongzhi.model.StudentDO; +import com.baomidou.mybatisplus.extension.service.IService; +import com.zhongzhi.vo.student.StudentInfoVO; + +/** + *

+ * 服务类 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +public interface StudentService extends IService { + + StudentInfoVO register(RegisterDTO registerDTO); + + StudentInfoVO login(LoginDTO loginDTO); + + void updateStudentInfo(StudentDO studentDO); +} diff --git a/src/main/java/com/zhongzhi/service/VodDictService.java b/src/main/java/com/zhongzhi/service/VodDictService.java new file mode 100644 index 0000000..32a2ecb --- /dev/null +++ b/src/main/java/com/zhongzhi/service/VodDictService.java @@ -0,0 +1,36 @@ +package com.zhongzhi.service; + +import com.zhongzhi.dto.course.ChangeOrdersDTO; +import com.zhongzhi.dto.course.VodsDTO; +import com.zhongzhi.model.CourseDictDO; +import com.zhongzhi.model.VodDictDO; +import com.baomidou.mybatisplus.extension.service.IService; +import com.zhongzhi.vo.course.SignatureVO; +import com.zhongzhi.vo.course.VodsVO; + +import java.util.List; + +/** + *

+ * 服务类 + *

+ * + * @author DengMin + * @since 2022-11-14 + */ +public interface VodDictService extends IService { + + SignatureVO signature()throws Exception; + + void deleteVod(VodDictDO vodDictDO); + + void addVod(VodDictDO vodDictDO); + + void updateVod(VodDictDO vodDictDO); + + void changeOrders(ChangeOrdersDTO changeOrdersDTO); + + List vods(VodsDTO vodsDTO); + + List fourVods(CourseDictDO courseDictDO); +} diff --git a/src/main/java/com/zhongzhi/service/YearDictService.java b/src/main/java/com/zhongzhi/service/YearDictService.java new file mode 100644 index 0000000..7b8f17f --- /dev/null +++ b/src/main/java/com/zhongzhi/service/YearDictService.java @@ -0,0 +1,23 @@ +package com.zhongzhi.service; + +import com.zhongzhi.model.YearDictDO; +import com.baomidou.mybatisplus.extension.service.IService; + +import java.util.List; + +/** + *

+ * 年份字典表 服务类 + *

+ * + * @author DengMin + * @since 2023-04-11 + */ +public interface YearDictService extends IService { + + List queryYears(); + + void updateYear(YearDictDO yearDictDO); + + void addYear(YearDictDO yearDictDO); +} diff --git a/src/main/java/com/zhongzhi/service/impl/AdministerPermissionServiceImpl.java b/src/main/java/com/zhongzhi/service/impl/AdministerPermissionServiceImpl.java new file mode 100644 index 0000000..9d70daf --- /dev/null +++ b/src/main/java/com/zhongzhi/service/impl/AdministerPermissionServiceImpl.java @@ -0,0 +1,20 @@ +package com.zhongzhi.service.impl; + +import com.zhongzhi.model.AdministerPermissionDO; +import com.zhongzhi.dao.AdministerPermissionDAO; +import com.zhongzhi.service.AdministerPermissionService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + *

+ * 系统用户权限表 服务实现类 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +@Service +public class AdministerPermissionServiceImpl extends ServiceImpl implements AdministerPermissionService { + +} diff --git a/src/main/java/com/zhongzhi/service/impl/AdministerServiceImpl.java b/src/main/java/com/zhongzhi/service/impl/AdministerServiceImpl.java new file mode 100644 index 0000000..a72b7ce --- /dev/null +++ b/src/main/java/com/zhongzhi/service/impl/AdministerServiceImpl.java @@ -0,0 +1,100 @@ +package com.zhongzhi.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.zhongzhi.common.constant.Platform; +import com.zhongzhi.common.constant.SmsCode; +import com.zhongzhi.common.exception.HttpException; +import com.zhongzhi.common.utils.JwtUtil; +import com.zhongzhi.dto.administer.AdministerPageDTO; +import com.zhongzhi.dto.administer.LoginDTO; +import com.zhongzhi.model.AdministerDO; +import com.zhongzhi.dao.AdministerDAO; +import com.zhongzhi.model.SmsCodeDO; +import com.zhongzhi.service.AdministerService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.zhongzhi.service.PermissionsService; +import com.zhongzhi.service.SmsCodeService; +import com.zhongzhi.vo.administer.AdministerVO; +import com.zhongzhi.vo.permission.PermissionVO; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; + +/** + *

+ * 中心管理账户表 服务实现类 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +@Service +public class AdministerServiceImpl extends ServiceImpl implements AdministerService { + + @Autowired + private SmsCodeService smsCodeService; + + @Autowired + private PermissionsService permissionsService; + + @Override + public AdministerVO login(LoginDTO loginDTO) { + AdministerVO administerVO = new AdministerVO(); + SmsCodeDO smsCodeDO = smsCodeService.getOneByTelePhone(loginDTO.getTelephone(), SmsCode.login, SmsCode.center); + if (smsCodeDO == null) { + throw new HttpException(10025); + } + + if (!smsCodeDO.getCode().equals(loginDTO.getCode())) { + throw new HttpException(10021); + } + + smsCodeService.removeById(smsCodeDO.getId()); + + AdministerDO administerDO = this.baseMapper.selectOne(new QueryWrapper() + .lambda() + .eq(AdministerDO::getTelephone, loginDTO.getTelephone())); + if (administerDO == null) { + throw new HttpException(10060); + } + + BeanUtils.copyProperties(administerDO, administerVO); + String token = JwtUtil.generateToken(administerDO.getId(), Platform.center); + administerVO.setToken(token); + + List list = permissionsService.getPermissionById(administerDO.getId()); + List treeList = new ArrayList(); + list.forEach(permissions -> { + if (permissions.getParentId() == null) { + treeList.add(permissions); + } + + list.forEach(p -> { + if (p.getParentId() != null) { + if (p.getParentId().equals(permissions.getId())) { + if (permissions.getChildNodeList() == null) { + permissions.setChildNodeList(new ArrayList<>()); + } + permissions.getChildNodeList().add(p); + } + } + }); + }); + administerVO.setPermission(treeList); + return administerVO; + } + + @Override + public IPage getAdministerPage(AdministerPageDTO administerPageDTO) { + Page page = new Page(administerPageDTO.getPageNo(), administerPageDTO.getPageSize()); + return this.baseMapper.selectPage(page, new QueryWrapper() + .lambda() + .eq(AdministerDO::getRole, administerPageDTO.getListItem()) + .like(AdministerDO::getUsername, administerPageDTO.getUsername())); + } +} diff --git a/src/main/java/com/zhongzhi/service/impl/CollegesDictServiceImpl.java b/src/main/java/com/zhongzhi/service/impl/CollegesDictServiceImpl.java new file mode 100644 index 0000000..b2d6b1f --- /dev/null +++ b/src/main/java/com/zhongzhi/service/impl/CollegesDictServiceImpl.java @@ -0,0 +1,601 @@ +package com.zhongzhi.service.impl; + +import com.alibaba.fastjson.JSON; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.zhongzhi.common.constant.Platform; +import com.zhongzhi.common.constant.ProjectSchedule; +import com.zhongzhi.common.constant.ProjectStatus; +import com.zhongzhi.common.exception.HttpException; +import com.zhongzhi.common.utils.*; +import com.zhongzhi.dao.*; +import com.zhongzhi.dto.college.*; +import com.zhongzhi.dto.projectJudge.ImportJudge; +import com.zhongzhi.model.*; +import com.zhongzhi.service.CollegesDictService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.zhongzhi.service.ProjectScheduleRecordService; +import com.zhongzhi.service.ProjectService; +import com.zhongzhi.vo.ExcelFieldVO; +import com.zhongzhi.vo.college.*; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.multipart.MultipartFile; + +import java.text.SimpleDateFormat; +import java.time.LocalDateTime; +import java.util.*; + +/** + *

+ * 院校字典表 服务实现类 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +@Service +public class CollegesDictServiceImpl extends ServiceImpl implements CollegesDictService { + + @Autowired + private ProjectService projectService; + + @Autowired + private MatchCollegePdfMapper matchCollegePdfMapper; + + @Autowired + private MatchDictDAO matchDictDAO; + + @Autowired + private FinalMatchMemberDAO finalMatchMemberDAO; + + @Autowired + private StudentDAO studentDAO; + + @Autowired + private ProjectDAO projectDAO; + + @Autowired + private ProjectMemberDAO projectMemberDAO; + + @Autowired + private CollegesDictDAO collegesDictDAO; + + @Override + @Transactional(rollbackFor = Exception.class) + public CollegesVO login(LoginDTO loginDTO) { + CollegesVO collegesVO = new CollegesVO(); + CollegesDictDO collegesDict = this.baseMapper.selectOne(new QueryWrapper().lambda() + .eq(CollegesDictDO::getAccount, loginDTO.getAccount())); + if (collegesDict == null) { + throw new HttpException(10060); + } + + if (!collegesDict.getPassword().equals(loginDTO.getPassword())) { + throw new HttpException(10061); + } + + if (collegesDict.getLoginStatus() == 0) { + throw new HttpException(10067); + } + + BeanUtils.copyProperties(collegesDict, collegesVO); + if (collegesDict.getLoginTime() != null) { + collegesVO.setIsLogin(1); + } else { + collegesVO.setIsLogin(0); + } + + String token = JwtUtil.generateToken(collegesDict.getId(), Platform.school); + collegesVO.setToken(token); + return collegesVO; + } + + @Override + public IPage getCollegesPage(CollegesPageDTO collegesPageDTO) { + Page page = new Page(collegesPageDTO.getPageNo(), collegesPageDTO.getPageSize()); + IPage iPage = this.baseMapper.listPage(page, collegesPageDTO.getName()); + return iPage; + } + + @Override + public void createColleges(CollegesDictDO collegesDictDO) { + CollegesDictDO collegesDict = this.baseMapper.selectOne(new QueryWrapper().lambda() + .eq(CollegesDictDO::getAccount, collegesDictDO.getAccount())); + if (collegesDict != null) { + throw new HttpException(10062); + } + + if (collegesDictDO.getName().equals(collegesDict.getName())) { + throw new HttpException(10063); + } + + if (collegesDictDO.getCode().equals(collegesDict.getCode())) { + throw new HttpException(10064); + } + + collegesDictDO.setAccount("shzc" + collegesDictDO.getCode()); + collegesDictDO.setPassword(RandomUtil.randomPass(8)); + this.baseMapper.insert(collegesDictDO); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Map importColleges(MultipartFile file) { + Map map = new HashMap<>(); + if (file == null) { + throw new HttpException(10066); + } + + List list = ExcelUtil.readExcel(CollegesDOT.class, file); + int success = 0; + int fail = 0; + List error = new ArrayList<>(); + if (list.size() > 0) { + for (CollegesDOT collegesDOT : list) { + CollegesDictDO collegesDictDO = new CollegesDictDO(); + BeanUtils.copyProperties(collegesDOT, collegesDictDO); + + CollegesDictDO collegesDict = this.baseMapper.selectOne(new QueryWrapper() + .lambda() + .eq(CollegesDictDO::getAccount, collegesDictDO.getAccount())); + if (collegesDict != null) { + fail++; + collegesDOT.setFailReason("院校账户已存在"); + continue; + + } + + if (collegesDictDO.getName().equals(collegesDict.getName())) { + fail++; + collegesDOT.setFailReason("院校名称重复"); + continue; + } + + if (collegesDictDO.getCode().equals(collegesDict.getCode())) { + fail++; + collegesDOT.setFailReason("院校代码重复"); + continue; + } + + if (fail > 0) { + error.add(collegesDOT); + } + + collegesDictDO.setAccount("shzc" + collegesDictDO.getCode()); + collegesDictDO.setPassword(RandomUtil.randomPass(8)); + this.baseMapper.insert(collegesDictDO); + success++; + } + } + map.put("success", success); + map.put("fail", fail); + map.put("errorData", error); + return map; + } + + @Override + public void downloadErrorData(DownloadErrorDataDTO downloadErrorDataDTO) { + List list = ExcelUtil.getField(CollegesDOT.class); + List data = new ArrayList<>(); + if (downloadErrorDataDTO.getErrorData().size() > 0) { + for (CollegesDOT errorDatum : downloadErrorDataDTO.getErrorData()) { + if (errorDatum != null) { + data.add(JSON.parseObject(JSON.toJSONString(errorDatum), Map.class)); + } + } + } + ExcelUtil.writeExcel(list, data); + } + + @Override + public IPage getAwardedList(AwardedListDTO awardedListDTO) { + IPage iPage = this.baseMapper.getAwardedList(new Page<>(awardedListDTO.getPageNo(), awardedListDTO.getPageSize()), + awardedListDTO.getName()); + for (AwardedListVO record : iPage.getRecords()) { + List list = projectService.getList(awardedListDTO.getMatchId(), record.getName(), awardedListDTO.getProjectGroup()); + if (list != null && list.size() > 0) { + Integer schoolCompetitionNum = 0; + Integer rematchNum = 0; + Integer finalNum = 0; + Integer winningPrizeNum = 0; + Integer bronzeAwardNum = 0; + Integer silverAwardNum = 0; + Integer goldAwardNum = 0; + for (ProjectDO projectDO : list) { + /** + * 奖项 + */ + if (projectDO.getProjectStatus().equals(ProjectStatus.REMATCH_BRONZE_AWARD)) { + bronzeAwardNum++; + } else if (projectDO.getProjectStatus().equals(ProjectStatus.REMATCH_SILVER_AWARD)) { + silverAwardNum++; + } else if (projectDO.getProjectStatus().equals(ProjectStatus.REMATCH_FINALS_GOLD_AWARD)) { + goldAwardNum++; + } else if (projectDO.getProjectStatus().equals(ProjectStatus.REMATCH_WINNING_AWARD)) { + winningPrizeNum++; + } + + /** + * 项目进度 + */ + if (projectDO.getProjectSchedule().equals(ProjectSchedule.SCHOOL_REVIEW)) { + schoolCompetitionNum++; + } else if (projectDO.getProjectSchedule().equals(ProjectSchedule.SEMI_FINAL_REVIEW)) { + rematchNum++; + } else if (projectDO.getProjectSchedule().equals(ProjectSchedule.FINAL_REVIEW)) { + finalNum++; + } + } + record.setSchoolCompetitionNum(schoolCompetitionNum + rematchNum + finalNum); + record.setRematchNum(rematchNum); + record.setFinalNum(finalNum); + record.setBronzeAwardNum(bronzeAwardNum); + record.setSilverAwardNum(silverAwardNum); + record.setGoldAwardNum(goldAwardNum); + record.setWinningPrizeNum(winningPrizeNum); + + //盖章pdf + MatchCollegePdfDO matchCollegePdfDO = matchCollegePdfMapper.selectOne(new QueryWrapper() + .lambda() + .eq(MatchCollegePdfDO::getMatchId, awardedListDTO.getMatchId()) + .eq(MatchCollegePdfDO::getCollegeId, record.getId())); + if (null != matchCollegePdfDO) { + record.setAttachment(matchCollegePdfDO.getAttachment()); + record.setFileName(matchCollegePdfDO.getFileName()); + } + } + } + return iPage; + } + + @Override + public void exportAwardedList(AwardedListDTO awardedListDTO) { + List data = new ArrayList<>(); + List listAll = this.baseMapper.getAwardedListAll(); + for (AwardedListVO awardedListVO : listAll) { + + List list = projectService.getList(awardedListDTO.getMatchId(), awardedListVO.getName(), awardedListDTO.getProjectGroup()); + Integer schoolCompetitionNum = 0; + Integer rematchNum = 0; + Integer finalNum = 0; + Integer winningPrizeNum = 0; + Integer bronzeAwardNum = 0; + Integer silverAwardNum = 0; + Integer goldAwardNum = 0; + for (ProjectDO projectDO : list) { + /** + * 奖项 + */ + if (projectDO.getProjectStatus().equals(ProjectStatus.REMATCH_BRONZE_AWARD)) { + bronzeAwardNum++; + } else if (projectDO.getProjectStatus().equals(ProjectStatus.REMATCH_SILVER_AWARD)) { + silverAwardNum++; + } else if (projectDO.getProjectStatus().equals(ProjectStatus.REMATCH_FINALS_GOLD_AWARD)) { + goldAwardNum++; + } else if (projectDO.getProjectStatus().equals(ProjectStatus.REMATCH_WINNING_AWARD)) { + winningPrizeNum++; + } + + /** + * 项目进度 + */ + if (projectDO.getProjectSchedule().equals(ProjectSchedule.SCHOOL_REVIEW)) { + schoolCompetitionNum++; + } else if (projectDO.getProjectSchedule().equals(ProjectSchedule.SEMI_FINAL_REVIEW)) { + rematchNum++; + } else if (projectDO.getProjectSchedule().equals(ProjectSchedule.FINAL_REVIEW)) { + finalNum++; + } + } + awardedListVO.setSchoolCompetitionNum(schoolCompetitionNum + rematchNum + finalNum); + awardedListVO.setRematchNum(rematchNum); + awardedListVO.setFinalNum(finalNum); + awardedListVO.setBronzeAwardNum(bronzeAwardNum); + awardedListVO.setSilverAwardNum(silverAwardNum); + awardedListVO.setGoldAwardNum(goldAwardNum); + awardedListVO.setWinningPrizeNum(winningPrizeNum); + data.add(JSON.parseObject(JSON.toJSONString(awardedListVO), Map.class)); + } + ExcelUtil.writeExcel(ExcelUtil.getField(AwardedListVO.class), data); + } + + @Override + public void exportCollege() { + List field = ExcelUtil.getField(ExportCollegeDTO.class); + List data = new ArrayList<>(); + List list = this.baseMapper.selectList(new QueryWrapper<>()); + if (list != null && list.size() > 0) { + for (CollegesDictDO collegesDictDO : list) { + data.add(JSON.parseObject(JSON.toJSONString(collegesDictDO), Map.class)); + } + } + ExcelUtil.writeExcel(field, data); + } + + @Override + public void updatePwd(UpdatePwdDTO updatePwdDTO) { + CollegesDictDO collegesDict = (CollegesDictDO) Localstorage.getUser(); + if (collegesDict == null) { + throw new HttpException(10060); + } + + CollegesDictDO collegesDictDO = new CollegesDictDO(); + collegesDictDO.setLoginTime(DateFormatUtil.dateToLocalDateTime(new Date())); + collegesDictDO.setId(collegesDict.getId()); + collegesDictDO.setPassword(updatePwdDTO.getPassword()); + this.baseMapper.updateById(collegesDictDO); + } + + public List projects(ProjectDO projectDO) { + CollegesDictDO collegesDict = (CollegesDictDO) Localstorage.getUser(); + + //除去已经报名了的项目 + List list = projectDAO.projects(projectDO.getMatchId(), collegesDict.getId(), collegesDict.getName()); + return list; + } + + public ProjectMemberDO projectLeader(ProjectMemberDO projectMemberDO) { + ProjectMemberDO projectMemberDO1 = projectMemberDAO.selectOne(new QueryWrapper() + .lambda() + .eq(ProjectMemberDO::getType, "团队负责人") + .eq(ProjectMemberDO::getProjectId, projectMemberDO.getProjectId())); + + ProjectDO projectDO = projectDAO.selectById(projectMemberDO.getProjectId()); + StudentDO studentDO = studentDAO.selectById(projectDO.getProposerId()); + projectMemberDO1.setIdCard(studentDO.getIdCard()); + return projectMemberDO1; + } + + public List projectMembers(ProjectMemberDO projectMemberDO) { + List projectMemberDOS = projectMemberDAO.projectMembers(projectMemberDO.getProjectId()); + return projectMemberDOS; + } + + public void addProjectMember(AddProjectMemberDTO addProjectMemberDTO) throws Exception { + + CollegesDictDO collegesDict = (CollegesDictDO) Localstorage.getUser(); + + ProjectDO projectDO = projectDAO.selectById(addProjectMemberDTO.getProjectId()); + + MatchDictDO matchDictDO = matchDictDAO.selectById(addProjectMemberDTO.getMatchId()); + + if (StringUtils.isEmpty(matchDictDO.getRegistrationDeadline()) || StringUtils.isEmpty(matchDictDO.getRegistrationStart())){ + throw new HttpException(10031); + } + + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + if (new Date().before(simpleDateFormat.parse(matchDictDO.getRegistrationStart())) || new Date().after(simpleDateFormat.parse(matchDictDO.getRegistrationDeadline()))) { + throw new HttpException(10031); + } + + List studentIds = addProjectMemberDTO.getStudentIds(); + for (Long studentId : studentIds) { + FinalMatchMemberDO finalMatchMemberDO = new FinalMatchMemberDO(); + finalMatchMemberDO.setCollegeId(collegesDict.getId()); + finalMatchMemberDO.setMemberId(studentId); + finalMatchMemberDO.setProjectId(addProjectMemberDTO.getProjectId()); + StudentDO studentDO = studentDAO.selectById(projectDO.getProposerId()); + finalMatchMemberDO.setIdCard(studentDO.getIdCard()); + ProjectMemberDO projectMemberDO = projectMemberDAO.selectById(studentId); + finalMatchMemberDO.setIdCard(projectMemberDO.getIdCard()); + finalMatchMemberDO.setMatchId(addProjectMemberDTO.getMatchId()); + finalMatchMemberDO.setTelephone(projectMemberDO.getTelephone()); + finalMatchMemberDO.setUserName(projectMemberDO.getName()); + if ("团队负责人".equals(projectMemberDO.getType())) { + finalMatchMemberDO.setMemberType("参赛人员(负责人)"); + finalMatchMemberDO.setIdCard(studentDO.getIdCard()); + finalMatchMemberDO.setOrderNo(0); + } else { + finalMatchMemberDO.setMemberType("参赛人员"); + finalMatchMemberDO.setOrderNo(1); + } + finalMatchMemberDO.setUpdateTime(LocalDateTime.now()); + finalMatchMemberDAO.insert(finalMatchMemberDO); + } + } + + public void removeProject(AddProjectMemberDTO addProjectMemberDTO) throws Exception { + + MatchDictDO matchDictDO = matchDictDAO.selectById(addProjectMemberDTO.getMatchId()); + + if (StringUtils.isEmpty(matchDictDO.getRegistrationDeadline()) || StringUtils.isEmpty(matchDictDO.getRegistrationStart())){ + throw new HttpException(10031); + } + + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + if (new Date().before(simpleDateFormat.parse(matchDictDO.getRegistrationStart())) || new Date().after(simpleDateFormat.parse(matchDictDO.getRegistrationDeadline()))) { + throw new HttpException(10031); + } + + finalMatchMemberDAO.delete(new QueryWrapper() + .lambda() + .eq(FinalMatchMemberDO::getProjectId, addProjectMemberDTO.getProjectId())); + } + + public void addObservations(FinalMatchMemberDO finalMatchMemberDO) throws Exception { + + CollegesDictDO collegesDict = (CollegesDictDO) Localstorage.getUser(); + + MatchDictDO matchDictDO = matchDictDAO.selectById(finalMatchMemberDO.getMatchId()); + + if (null == matchDictDO.getRegistrationDeadline() || null == matchDictDO.getRegistrationStart()){ + throw new HttpException(10031); + } + + if (null != matchDictDO.getRegistrationDeadline()) { + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + if (new Date().before(simpleDateFormat.parse(matchDictDO.getRegistrationStart())) || new Date().after(simpleDateFormat.parse(matchDictDO.getRegistrationDeadline()))) { + throw new HttpException(10031); + } + } + + if ("观摩人员".equals(finalMatchMemberDO.getMemberType())) { + + //当前有几个观摩人员 + int count = finalMatchMemberDAO.selectCount(new QueryWrapper() + .lambda() + .eq(FinalMatchMemberDO::getCollegeId, collegesDict.getId()) + .eq(FinalMatchMemberDO::getMemberType, "观摩人员")); + + if (count >=2) { + throw new HttpException(10029); + } + finalMatchMemberDO.setOrderNo(4); + finalMatchMemberDO.setCollegeId(collegesDict.getId()); + finalMatchMemberDO.setUpdateTime(LocalDateTime.now()); + finalMatchMemberDAO.insert(finalMatchMemberDO); + } + if ("学校领队".equals(finalMatchMemberDO.getMemberType())) { + //当前有几个学校领队 + int count = finalMatchMemberDAO.selectCount(new QueryWrapper() + .lambda() + .eq(FinalMatchMemberDO::getCollegeId, collegesDict.getId()) + .eq(FinalMatchMemberDO::getMemberType, "学校领队")); + + if (count > 0) { + throw new HttpException(10019); + } + finalMatchMemberDO.setCollegeId(collegesDict.getId()); + finalMatchMemberDO.setOrderNo(3); + finalMatchMemberDO.setUpdateTime(LocalDateTime.now()); + finalMatchMemberDAO.insert(finalMatchMemberDO); + } + + if ("车".equals(finalMatchMemberDO.getMemberType())){ + finalMatchMemberDO.setCollegeId(collegesDict.getId()); + finalMatchMemberDO.setOrderNo(5); + finalMatchMemberDO.setUpdateTime(LocalDateTime.now()); + finalMatchMemberDAO.insert(finalMatchMemberDO); + } + } + + public void updateObservations(FinalMatchMemberDO finalMatchMemberDO) throws Exception { + + MatchDictDO matchDictDO = matchDictDAO.selectById(finalMatchMemberDO.getMatchId()); + if (StringUtils.isEmpty(matchDictDO.getRegistrationDeadline()) || StringUtils.isEmpty(matchDictDO.getRegistrationStart())){ + throw new HttpException(10031); + } + + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + if (new Date().before(simpleDateFormat.parse(matchDictDO.getRegistrationStart())) || new Date().after(simpleDateFormat.parse(matchDictDO.getRegistrationDeadline()))) { + throw new HttpException(10031); + } + + finalMatchMemberDAO.updateById(finalMatchMemberDO); + } + + public void deleteObservations(FinalMatchMemberDO finalMatchMemberDO) throws Exception { + + MatchDictDO matchDictDO = matchDictDAO.selectById(finalMatchMemberDO.getMatchId()); + + if (StringUtils.isEmpty(matchDictDO.getRegistrationDeadline()) || StringUtils.isEmpty(matchDictDO.getRegistrationStart())){ + throw new HttpException(10031); + } + + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + if (new Date().before(simpleDateFormat.parse(matchDictDO.getRegistrationStart()))||new Date().after(simpleDateFormat.parse(matchDictDO.getRegistrationDeadline()))) { + throw new HttpException(10031); + } + + finalMatchMemberDAO.deleteById(finalMatchMemberDO.getId()); + } + + public List registerMembers(RegisterMembersDTO registerMembersDTO) { + CollegesDictDO collegesDict = collegesDictDAO.selectById(registerMembersDTO.getCollegeId()); + return finalMatchMemberDAO.registerMembers(collegesDict.getId(),registerMembersDTO.getMatchId()); + } + + public List otherMembers(RegisterMembersDTO registerMembersDTO) { + CollegesDictDO collegesDict = collegesDictDAO.selectById(registerMembersDTO.getCollegeId()); + return finalMatchMemberDAO.otherMembers(collegesDict.getId(),registerMembersDTO.getMatchId()); + } + + public List cars(RegisterMembersDTO registerMembersDTO){ + CollegesDictDO collegesDict = collegesDictDAO.selectById(registerMembersDTO.getCollegeId()); + return finalMatchMemberDAO.cars(collegesDict.getId(),registerMembersDTO.getMatchId()); + } + + public DetailVO detail(RegisterMembersDTO registerMembersDTO) { + CollegesDictDO collegesDict = collegesDictDAO.selectById(registerMembersDTO.getId()); + DetailVO detailVO = new DetailVO(); + + MatchDictDO matchDictDO = matchDictDAO.selectById(registerMembersDTO.getMatchId()); + detailVO.setRegistrationDeadline(matchDictDO.getRegistrationDeadline()); + + //最近一次更新时间 + String latestUpdateTime = finalMatchMemberDAO.latestUpdateTime(collegesDict.getId()); + detailVO.setLatestUpdateTime(latestUpdateTime); + + return detailVO; + } + + public List schools(RegisterMembersDTO registerMembersDTO) { + return finalMatchMemberDAO.schools(registerMembersDTO.getMatchId(), registerMembersDTO.getName()); + } + + public void exportList(FinalMatchMemberDO finalMatchMemberDO){ + + MatchDictDO matchDictDO1 = matchDictDAO.selectById(finalMatchMemberDO.getId()); + + //导出所有名单 + List exportListVOS = finalMatchMemberDAO.exportList(matchDictDO1.getId(),finalMatchMemberDO.getCollegeId()); + + List field = ExcelUtil.getField(ExportListVO.class); + List data = new ArrayList<>(); + if (exportListVOS != null && exportListVOS.size() > 0) { + for (ExportListVO exportListVO : exportListVOS) { + data.add(JSON.parseObject(JSON.toJSONString(exportListVO), Map.class)); + } + } + ExcelUtil.writeExcel(field, data); + } + + @Override + public void addContact(CollegesDictDO collegesDictDO) { + CollegesDictDO collegesDict = (CollegesDictDO) Localstorage.getUser(); + if (collegesDict == null) { + throw new HttpException(10060); + } + + collegesDictDO.setId(collegesDict.getId()); + this.baseMapper.updateById(collegesDictDO); + } + + @Override + public void updateAllLoginStatus(LoginStatusDTO loginStatusDTO) { + List list = this.baseMapper.selectList(new QueryWrapper()); + if (list != null && list.size() > 0) { + for (CollegesDictDO collegesDictDO : list) { + CollegesDictDO collegesDict = new CollegesDictDO(); + collegesDict.setId(collegesDictDO.getId()); + collegesDict.setLoginStatus(loginStatusDTO.getLoginStatus()); + this.baseMapper.updateById(collegesDict); + } + } + } + + @Override + public void batchUpdateLoginStatus(LoginStatusDTO loginStatusDTO) { + if (loginStatusDTO.getIds().length > 0) { + for (Long id : loginStatusDTO.getIds()) { + CollegesDictDO collegesDict = new CollegesDictDO(); + collegesDict.setId(id); + collegesDict.setLoginStatus(loginStatusDTO.getLoginStatus()); + this.baseMapper.updateById(collegesDict); + } + } + } + + @Override + public void updateLoginStatus(LoginStatusDTO loginStatusDTO) { + CollegesDictDO collegesDict = new CollegesDictDO(); + collegesDict.setId(loginStatusDTO.getId()); + collegesDict.setLoginStatus(loginStatusDTO.getLoginStatus()); + this.baseMapper.updateById(collegesDict); + } +} diff --git a/src/main/java/com/zhongzhi/service/impl/CourseDictServiceImpl.java b/src/main/java/com/zhongzhi/service/impl/CourseDictServiceImpl.java new file mode 100644 index 0000000..35dbde1 --- /dev/null +++ b/src/main/java/com/zhongzhi/service/impl/CourseDictServiceImpl.java @@ -0,0 +1,87 @@ +package com.zhongzhi.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.zhongzhi.dao.YearDictDAO; +import com.zhongzhi.dto.course.CoursesDTO; +import com.zhongzhi.dao.VodDictDAO; +import com.zhongzhi.model.CourseDictDO; +import com.zhongzhi.dao.CourseDictDAO; +import com.zhongzhi.model.VodDictDO; +import com.zhongzhi.model.YearDictDO; +import com.zhongzhi.service.CourseDictService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.zhongzhi.vo.course.CourseVodsVO; +import com.zhongzhi.vo.course.CoursesVO; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; + +/** + *

+ * 服务实现类 + *

+ * + * @author DengMin + * @since 2022-11-14 + */ +@Service +public class CourseDictServiceImpl extends ServiceImpl implements CourseDictService { + + @Autowired + private VodDictDAO vodDictMapper; + + @Autowired + private YearDictDAO yearDictDAO; + + public void addCourse(CourseDictDO courseDictDO) { + this.baseMapper.insert(courseDictDO); + } + + public void updateCourse(CourseDictDO courseDictDO) { + this.updateById(courseDictDO); + } + + public IPage courses(CoursesDTO coursesDTO) { + Page page = new Page(coursesDTO.getPageNo(), coursesDTO.getPageSize()); + return this.baseMapper.courses(page, coursesDTO.getCourseName(),coursesDTO.getYearId()); + } + + public void deleteCourse(CourseDictDO courseDictDO) { + + this.baseMapper.deleteById(courseDictDO.getId()); + + //删除视频 + vodDictMapper.delete(new QueryWrapper() + .lambda() + .eq(VodDictDO::getCourseId, courseDictDO.getId())); + } + + public List courseVods(CourseDictDO courseDictDO) { + + List courseVodsVOS = new ArrayList<>(); + + YearDictDO yearDictDO = yearDictDAO.selectById(courseDictDO.getYearId()); + if ("1".equals(yearDictDO.getStatus())){ + List courseDictDOS = this.baseMapper.selectList(new QueryWrapper() + .lambda() + .eq(CourseDictDO::getYearId,courseDictDO.getYearId())); + for (CourseDictDO cdd : courseDictDOS) { + CourseVodsVO courseVodsVO = new CourseVodsVO(); + BeanUtils.copyProperties(cdd, courseVodsVO); + List vodDictDOS = vodDictMapper.selectList(new QueryWrapper() + .lambda() + .eq(VodDictDO::getCourseId,cdd.getId()) + .orderByAsc(VodDictDO::getOrderNo)); + courseVodsVO.setVodDictDOS(vodDictDOS); + courseVodsVOS.add(courseVodsVO); + } + } + return courseVodsVOS; + } + +} diff --git a/src/main/java/com/zhongzhi/service/impl/FinalMatchMemberServiceImpl.java b/src/main/java/com/zhongzhi/service/impl/FinalMatchMemberServiceImpl.java new file mode 100644 index 0000000..c2f5586 --- /dev/null +++ b/src/main/java/com/zhongzhi/service/impl/FinalMatchMemberServiceImpl.java @@ -0,0 +1,20 @@ +package com.zhongzhi.service.impl; + +import com.zhongzhi.model.FinalMatchMemberDO; +import com.zhongzhi.dao.FinalMatchMemberDAO; +import com.zhongzhi.service.FinalMatchMemberService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** +*

+ * 服务实现类 + *

+* +* @author DengMin +* @since 2024-07-12 +*/ +@Service + public class FinalMatchMemberServiceImpl extends ServiceImpl implements FinalMatchMemberService { + + } diff --git a/src/main/java/com/zhongzhi/service/impl/FundDictServiceImpl.java b/src/main/java/com/zhongzhi/service/impl/FundDictServiceImpl.java new file mode 100644 index 0000000..71e60ac --- /dev/null +++ b/src/main/java/com/zhongzhi/service/impl/FundDictServiceImpl.java @@ -0,0 +1,20 @@ +package com.zhongzhi.service.impl; + +import com.zhongzhi.model.FundDictDO; +import com.zhongzhi.dao.FundDictDAO; +import com.zhongzhi.service.FundDictService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + *

+ * 届数表 服务实现类 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +@Service +public class FundDictServiceImpl extends ServiceImpl implements FundDictService { + +} diff --git a/src/main/java/com/zhongzhi/service/impl/ItemFieldDictServiceImpl.java b/src/main/java/com/zhongzhi/service/impl/ItemFieldDictServiceImpl.java new file mode 100644 index 0000000..258a05e --- /dev/null +++ b/src/main/java/com/zhongzhi/service/impl/ItemFieldDictServiceImpl.java @@ -0,0 +1,20 @@ +package com.zhongzhi.service.impl; + +import com.zhongzhi.model.ItemFieldDictDO; +import com.zhongzhi.dao.ItemFieldDictDAO; +import com.zhongzhi.service.ItemFieldDictService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + *

+ * 行业领域字典表 服务实现类 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +@Service +public class ItemFieldDictServiceImpl extends ServiceImpl implements ItemFieldDictService { + +} diff --git a/src/main/java/com/zhongzhi/service/impl/MajorDictServiceImpl.java b/src/main/java/com/zhongzhi/service/impl/MajorDictServiceImpl.java new file mode 100644 index 0000000..75dae97 --- /dev/null +++ b/src/main/java/com/zhongzhi/service/impl/MajorDictServiceImpl.java @@ -0,0 +1,20 @@ +package com.zhongzhi.service.impl; + +import com.zhongzhi.model.MajorDictDO; +import com.zhongzhi.dao.MajorDictDAO; +import com.zhongzhi.service.MajorDictService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + *

+ * 专业字典表 服务实现类 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +@Service +public class MajorDictServiceImpl extends ServiceImpl implements MajorDictService { + +} diff --git a/src/main/java/com/zhongzhi/service/impl/MatchCollegePdfServiceImpl.java b/src/main/java/com/zhongzhi/service/impl/MatchCollegePdfServiceImpl.java new file mode 100644 index 0000000..56ec298 --- /dev/null +++ b/src/main/java/com/zhongzhi/service/impl/MatchCollegePdfServiceImpl.java @@ -0,0 +1,80 @@ +package com.zhongzhi.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.zhongzhi.common.exception.HttpException; +import com.zhongzhi.common.utils.Localstorage; +import com.zhongzhi.dao.MatchCollegePdfMapper; +import com.zhongzhi.dao.MatchDictDAO; +import com.zhongzhi.model.CollegesDictDO; +import com.zhongzhi.model.MatchCollegePdfDO; +import com.zhongzhi.model.MatchDictDO; +import com.zhongzhi.service.MatchCollegePdfService; +import com.zhongzhi.vo.project.QueryPdfStatusVO; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Date; + +/** + *

+ * 服务实现类 + *

+ * + * @author DengMin + * @since 2024-06-25 + */ +@Service +public class MatchCollegePdfServiceImpl extends ServiceImpl implements MatchCollegePdfService { + + @Autowired + private MatchDictDAO matchDictDAO; + + public void uploadPdf(MatchCollegePdfDO matchCollegePdfDO) { + + + MatchDictDO matchDictDO = matchDictDAO.selectById(matchCollegePdfDO.getMatchId()); + + //时间范围 当前时间在范围内 + if (null != matchDictDO.getStartTime() && null != matchDictDO.getEndTime() && (matchDictDO.getStartTime().after(new Date()) || matchDictDO.getEndTime().before(new Date(new Date().getTime() - 24 * 60 * 60 * 1000)))) { + throw new HttpException(10018); + } + + CollegesDictDO collegesDictDO = (CollegesDictDO) Localstorage.getUser(); + + this.baseMapper.delete(new QueryWrapper() + .lambda() + .eq(MatchCollegePdfDO::getMatchId, matchCollegePdfDO.getMatchId()) + .eq(MatchCollegePdfDO::getCollegeId, collegesDictDO.getId())); + matchCollegePdfDO.setCollegeId(collegesDictDO.getId()); + this.baseMapper.insert(matchCollegePdfDO); + } + + public void dropPdf(MatchCollegePdfDO matchCollegePdfDO) { + + MatchDictDO matchDictDO = matchDictDAO.selectById(matchCollegePdfDO.getMatchId()); + if (null != matchDictDO.getStartTime() && null != matchDictDO.getEndTime() && (matchDictDO.getStartTime().after(new Date()) || matchDictDO.getEndTime().before(new Date(new Date().getTime() - 24 * 60 * 60 * 1000)))) { + throw new HttpException(10018); + } + + CollegesDictDO collegesDictDO = (CollegesDictDO) Localstorage.getUser(); + this.baseMapper.delete(new QueryWrapper() + .lambda() + .eq(MatchCollegePdfDO::getCollegeId, collegesDictDO.getId()) + .eq(MatchCollegePdfDO::getMatchId, matchCollegePdfDO.getMatchId())); + } + + public MatchCollegePdfDO queryPdfStatus(MatchCollegePdfDO matchCollegePdfDO) { + + CollegesDictDO collegesDictDO = (CollegesDictDO) Localstorage.getUser(); + + matchCollegePdfDO = this.baseMapper.selectOne(new QueryWrapper() + .lambda() + .eq(MatchCollegePdfDO::getCollegeId, collegesDictDO.getId()) + .eq(MatchCollegePdfDO::getMatchId, matchCollegePdfDO.getMatchId())); + + return matchCollegePdfDO; + } + + +} diff --git a/src/main/java/com/zhongzhi/service/impl/MatchDictServiceImpl.java b/src/main/java/com/zhongzhi/service/impl/MatchDictServiceImpl.java new file mode 100644 index 0000000..e226b2b --- /dev/null +++ b/src/main/java/com/zhongzhi/service/impl/MatchDictServiceImpl.java @@ -0,0 +1,177 @@ +package com.zhongzhi.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.zhongzhi.common.constant.ProjectType; +import com.zhongzhi.common.utils.DateFormatUtil; +import com.zhongzhi.dto.match.MatchDictDTO; +import com.zhongzhi.dto.match.SelectListPageDTO; +import com.zhongzhi.model.MatchDictDO; +import com.zhongzhi.dao.MatchDictDAO; +import com.zhongzhi.model.MatchScheduleDO; +import com.zhongzhi.service.MatchDictService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.zhongzhi.service.MatchScheduleService; +import com.zhongzhi.vo.match.MatchDictVO; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +/** + *

+ * 赛事年份管理 服务实现类 + *

+ * + * @author DengMin + * @since 2021-05-17 + */ +@Service +public class MatchDictServiceImpl extends ServiceImpl implements MatchDictService { + + @Autowired + private MatchScheduleService matchScheduleService; + + @Override + public MatchDictDO getMainTrackMatch() { + return this.baseMapper.selectOne(new QueryWrapper() + .lambda() + .eq(MatchDictDO::getMatchType, ProjectType.MAIN_TRACK) + .eq(MatchDictDO::getStatus, 1)); + } + + @Override + public MatchDictDO getSeedTrackMatch() { + return this.baseMapper.selectOne(new QueryWrapper() + .lambda() + .eq(MatchDictDO::getMatchType, ProjectType.SEED_TRACK) + .eq(MatchDictDO::getStatus, 1)); + } + + @Override + public void updateMatch(MatchDictDTO matchDictDTO) { + MatchDictDO matchDict = this.baseMapper.selectById(matchDictDTO.getId()); + MatchDictDO match = this.baseMapper.selectOne(new QueryWrapper() + .lambda() + .eq(MatchDictDO::getMatchType, matchDict.getMatchType()) + .eq(MatchDictDO::getStatus, 1)); + if (matchDictDTO.getStatus() != null) { + if (match != null && !match.getId().equals(matchDictDTO.getId())) { + match.setStatus(0); + this.baseMapper.updateById(match); + } + } + + MatchDictDO matchDictDO = new MatchDictDO(); + BeanUtils.copyProperties(matchDictDTO, matchDictDO); + this.baseMapper.updateById(matchDictDO); + + if (matchDictDTO.getSchedule() != null && matchDictDTO.getSchedule().size() > 0) { + List list = matchScheduleService.list(new QueryWrapper() + .lambda() + .eq(MatchScheduleDO::getMatchId, matchDictDTO.getId())); + if (list.size() > 0) { + for (MatchScheduleDO matchScheduleDO : list) { + if (matchDictDTO.getSchedule().stream().filter(ms -> ms.getScheduleTime().equals(matchScheduleDO.getScheduleTime()) && + ms.getExplains().equals(matchScheduleDO.getExplains())).findAny().isPresent()) { + continue; + } else { + matchScheduleService.removeById(matchScheduleDO.getId()); + } + } + } + + for (MatchScheduleDO matchScheduleDO : matchDictDTO.getSchedule()) { + if (list.stream().filter(ms -> ms.getExplains().equals(matchScheduleDO.getExplains()) && + DateFormatUtil.format(ms.getScheduleTime(), DateFormatUtil.FMT_sdf_yMd).equals(DateFormatUtil.format(matchScheduleDO.getScheduleTime(), DateFormatUtil.FMT_sdf_yMd))).findAny().isPresent()) { + MatchScheduleDO matchSchedule = matchScheduleService.getOne(new QueryWrapper() + .lambda() + .eq(MatchScheduleDO::getMatchId, matchScheduleDO.getMatchId()) + .eq(MatchScheduleDO::getExplains, matchScheduleDO.getExplains()) + .eq(MatchScheduleDO::getScheduleTime, DateFormatUtil.format(matchScheduleDO.getScheduleTime(), DateFormatUtil.FMT_sdf_yMd))); + if (matchSchedule != null) { + matchScheduleDO.setId(matchSchedule.getId()); + matchScheduleService.updateById(matchScheduleDO); + } + } else { + matchScheduleDO.setMatchId(matchDictDTO.getId()); + matchScheduleService.save(matchScheduleDO); + } + } + } + } + + @Override + public IPage getSeedTrackMatchPage(SelectListPageDTO selectListPageDTO) { + Page page = new Page(selectListPageDTO.getPageNo(), selectListPageDTO.getPageSize()); + IPage iPage = this.baseMapper.getSeedTrackMatchPage(page, ProjectType.SEED_TRACK); + for (MatchDictVO record : iPage.getRecords()) { + List list = matchScheduleService.list(new QueryWrapper() + .lambda() + .eq(MatchScheduleDO::getMatchId, record.getId())); + record.setSchedule(list); + } + return iPage; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void createMatch(MatchDictDTO matchDictDTO) { + MatchDictDO matchDictDO = new MatchDictDO(); + BeanUtils.copyProperties(matchDictDTO, matchDictDO); + this.baseMapper.insert(matchDictDO); + + if (matchDictDTO.getSchedule().size() > 0) { + for (MatchScheduleDO matchScheduleDO : matchDictDTO.getSchedule()) { + MatchScheduleDO matchSchedule = new MatchScheduleDO(); + BeanUtils.copyProperties(matchScheduleDO, matchSchedule); + matchSchedule.setMatchId(matchDictDO.getId()); + matchScheduleService.save(matchSchedule); + } + } + } + + @Override + public List getMatch() { + return this.baseMapper.selectList(new QueryWrapper() + .lambda() + .eq(MatchDictDO::getStatus, 1)); + } + + @Override + public MatchDictDO getVocationalMatch() { + return this.baseMapper.selectOne(new QueryWrapper() + .lambda() + .eq(MatchDictDO::getStatus, 1) + .eq(MatchDictDO::getMatchType, ProjectType.VOCATIONAL)); + } + + public void updateMatchDate(MatchDictDO matchDictDO) { + this.baseMapper.updateById(matchDictDO); + } + + public MatchDictDO getMatch(MatchDictDO matchDictDO) { + return this.baseMapper.selectById(matchDictDO.getId()); + } + + @Override + public List getList(String projectType, String projectGroup) { + return this.baseMapper.getList(projectType, projectGroup); + } + + @Override + public IPage getVocationalPage(SelectListPageDTO selectListPageDTO) { + Page page = new Page(selectListPageDTO.getPageNo(), selectListPageDTO.getPageSize()); + IPage iPage = this.baseMapper.getSeedTrackMatchPage(page, ProjectType.VOCATIONAL); + for (MatchDictVO record : iPage.getRecords()) { + List list = matchScheduleService.list(new QueryWrapper() + .lambda() + .eq(MatchScheduleDO::getMatchId, record.getId())); + record.setSchedule(list); + } + return iPage; + } +} \ No newline at end of file diff --git a/src/main/java/com/zhongzhi/service/impl/MatchScheduleServiceImpl.java b/src/main/java/com/zhongzhi/service/impl/MatchScheduleServiceImpl.java new file mode 100644 index 0000000..e886844 --- /dev/null +++ b/src/main/java/com/zhongzhi/service/impl/MatchScheduleServiceImpl.java @@ -0,0 +1,20 @@ +package com.zhongzhi.service.impl; + +import com.zhongzhi.model.MatchScheduleDO; +import com.zhongzhi.dao.MatchScheduleDAO; +import com.zhongzhi.service.MatchScheduleService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + *

+ * 时间安排 服务实现类 + *

+ * + * @author DengMin + * @since 2021-05-27 + */ +@Service +public class MatchScheduleServiceImpl extends ServiceImpl implements MatchScheduleService { + +} diff --git a/src/main/java/com/zhongzhi/service/impl/MessageServiceImpl.java b/src/main/java/com/zhongzhi/service/impl/MessageServiceImpl.java new file mode 100644 index 0000000..1879416 --- /dev/null +++ b/src/main/java/com/zhongzhi/service/impl/MessageServiceImpl.java @@ -0,0 +1,49 @@ +package com.zhongzhi.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.zhongzhi.common.constant.Code; +import com.zhongzhi.common.exception.HttpException; +import com.zhongzhi.common.utils.Localstorage; +import com.zhongzhi.dto.message.MessagePageDTO; +import com.zhongzhi.model.AdministerDO; +import com.zhongzhi.model.MessageDO; +import com.zhongzhi.dao.MessageDAO; +import com.zhongzhi.service.AdministerService; +import com.zhongzhi.service.MessageService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + *

+ * 通知消息表 服务实现类 + *

+ * + * @author DengMin + * @since 2021-05-17 + */ +@Service +public class MessageServiceImpl extends ServiceImpl implements MessageService { + + @Override + public void createMessage(MessageDO messageDO) { + AdministerDO administerDO = (AdministerDO) Localstorage.getUser(); + if (administerDO == null) { + throw new HttpException(Code.TOKEN_EXPIRED.getCode(), Code.TOKEN_EXPIRED.getMessage()); + } + + messageDO.setUsername(administerDO.getUsername()); + this.baseMapper.insert(messageDO); + } + + @Override + public IPage getMessagePage(MessagePageDTO messagePageDTO) { + IPage iPage = this.baseMapper.selectPage(new Page(messagePageDTO.getPageNo(), messagePageDTO.getPageSize()), + new QueryWrapper() + .lambda() + .orderByDesc(MessageDO::getCreateTime)); + return iPage; + } +} diff --git a/src/main/java/com/zhongzhi/service/impl/PermissionsServiceImpl.java b/src/main/java/com/zhongzhi/service/impl/PermissionsServiceImpl.java new file mode 100644 index 0000000..0e078a8 --- /dev/null +++ b/src/main/java/com/zhongzhi/service/impl/PermissionsServiceImpl.java @@ -0,0 +1,27 @@ +package com.zhongzhi.service.impl; + +import com.zhongzhi.model.PermissionsDO; +import com.zhongzhi.dao.PermissionsDAO; +import com.zhongzhi.service.PermissionsService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.zhongzhi.vo.permission.PermissionVO; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + *

+ * 权限表 服务实现类 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +@Service +public class PermissionsServiceImpl extends ServiceImpl implements PermissionsService { + + @Override + public List getPermissionById(Long id) { + return this.baseMapper.getPermissionById(id); + } +} diff --git a/src/main/java/com/zhongzhi/service/impl/ProjectAwardServiceImpl.java b/src/main/java/com/zhongzhi/service/impl/ProjectAwardServiceImpl.java new file mode 100644 index 0000000..342450c --- /dev/null +++ b/src/main/java/com/zhongzhi/service/impl/ProjectAwardServiceImpl.java @@ -0,0 +1,20 @@ +package com.zhongzhi.service.impl; + +import com.zhongzhi.model.ProjectAwardDO; +import com.zhongzhi.dao.ProjectAwardMapper; +import com.zhongzhi.service.ProjectAwardService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + *

+ * 项目奖项 服务实现类 + *

+ * + * @author DengMin + * @since 2022-04-25 + */ +@Service +public class ProjectAwardServiceImpl extends ServiceImpl implements ProjectAwardService { + +} diff --git a/src/main/java/com/zhongzhi/service/impl/ProjectCopyrightServiceImpl.java b/src/main/java/com/zhongzhi/service/impl/ProjectCopyrightServiceImpl.java new file mode 100644 index 0000000..dca1e30 --- /dev/null +++ b/src/main/java/com/zhongzhi/service/impl/ProjectCopyrightServiceImpl.java @@ -0,0 +1,20 @@ +package com.zhongzhi.service.impl; + +import com.zhongzhi.model.ProjectCopyrightDO; +import com.zhongzhi.dao.ProjectCopyrightMapper; +import com.zhongzhi.service.ProjectCopyrightService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + *

+ * 项目软件著作权 服务实现类 + *

+ * + * @author DengMin + * @since 2022-04-25 + */ +@Service +public class ProjectCopyrightServiceImpl extends ServiceImpl implements ProjectCopyrightService { + +} diff --git a/src/main/java/com/zhongzhi/service/impl/ProjectJudgeServiceImpl.java b/src/main/java/com/zhongzhi/service/impl/ProjectJudgeServiceImpl.java new file mode 100644 index 0000000..fb01909 --- /dev/null +++ b/src/main/java/com/zhongzhi/service/impl/ProjectJudgeServiceImpl.java @@ -0,0 +1,182 @@ +package com.zhongzhi.service.impl; + +import com.alibaba.fastjson.JSON; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.zhongzhi.common.constant.SmsCode; +import com.zhongzhi.common.exception.HttpException; +import com.zhongzhi.common.utils.ExcelUtil; +import com.zhongzhi.common.utils.JwtUtil; +import com.zhongzhi.dto.administer.LoginDTO; +import com.zhongzhi.dto.judge.ProjectJudgePageDTO; +import com.zhongzhi.dto.projectJudge.ImportJudge; +import com.zhongzhi.model.ProjectJudgeDO; +import com.zhongzhi.dao.ProjectJudgeDAO; +import com.zhongzhi.model.ProjectReviewDO; +import com.zhongzhi.model.SmsCodeDO; +import com.zhongzhi.service.ProjectJudgeService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.zhongzhi.service.ProjectReviewService; +import com.zhongzhi.service.SmsCodeService; +import com.zhongzhi.vo.ExcelFieldVO; +import com.zhongzhi.vo.judge.JudgeInfoVO; +import com.zhongzhi.vo.judge.ProjectJudgePageVO; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + *

+ * 项目评审员 服务实现类 + *

+ * + * @author DengMin + * @since 2021-05-28 + */ +@Service +public class ProjectJudgeServiceImpl extends ServiceImpl implements ProjectJudgeService { + + @Autowired + private ProjectReviewService projectReviewService; + + @Autowired + private SmsCodeService smsCodeService; + + @Override + public IPage getProjectJudgePage(ProjectJudgePageDTO projectJudgePageDTO) { + IPage iPage = this.baseMapper.getProjectJudgePage(new Page(projectJudgePageDTO.getPageNo(), projectJudgePageDTO.getPageSize()), projectJudgePageDTO.getUsername(), projectJudgePageDTO.getStatus()); + for (ProjectJudgePageVO record : iPage.getRecords()) { + Integer count = projectReviewService.count(new QueryWrapper() + .lambda() + .eq(ProjectReviewDO::getJudgeId, record.getId())); + record.setAssignedQuantity(count); + } + return iPage; + } + + @Override + public void createProjectJudge(ProjectJudgeDO projectJudgeDO) { + ProjectJudgeDO projectJudge = this.baseMapper.selectOne(new QueryWrapper() + .lambda() + .eq(ProjectJudgeDO::getTelephone, projectJudgeDO.getTelephone())); + if (projectJudge != null) { + throw new HttpException(10020); + } + + this.baseMapper.insert(projectJudgeDO); + } + + @Override + public void updateProjectJudge(ProjectJudgeDO projectJudgeDO) { + ProjectJudgeDO projectJudge = this.baseMapper.selectById(projectJudgeDO.getId()); + if (projectJudge != null) { + if (projectJudge.getTelephone().equals(projectJudgeDO.getTelephone())) { + this.baseMapper.updateById(projectJudgeDO); + } else { + ProjectJudgeDO p = this.baseMapper.selectOne(new QueryWrapper() + .lambda() + .eq(ProjectJudgeDO::getTelephone, projectJudgeDO.getTelephone())); + if (p != null) { + throw new HttpException(10020); + } else { + this.baseMapper.updateById(projectJudgeDO); + } + } + } + } + + @Override + public JudgeInfoVO login(LoginDTO loginDTO) { + JudgeInfoVO judgeInfoVO = new JudgeInfoVO(); + + ProjectJudgeDO projectJudgeDO = this.baseMapper.selectOne(new QueryWrapper() + .lambda() + .eq(ProjectJudgeDO::getTelephone, loginDTO.getTelephone())); + + if (null != projectJudgeDO){ + + if (null != projectJudgeDO.getPasswordFree() && projectJudgeDO.getPasswordFree() != 1){ + SmsCodeDO smsCodeDO = smsCodeService.getOneByTelePhone(loginDTO.getTelephone(), SmsCode.login, SmsCode.review); + if (smsCodeDO == null) { + throw new HttpException(10025); + } + + if (!smsCodeDO.getCode().equals(loginDTO.getCode())) { + throw new HttpException(10021); + } + + smsCodeService.removeById(smsCodeDO.getId()); + + if (projectJudgeDO == null) { + throw new HttpException(10024); + } + + if (projectJudgeDO.getStatus() == 0) { + throw new HttpException(10024); + } + } + } + + + + String token = JwtUtil.generateToken(projectJudgeDO.getId(), SmsCode.review); + judgeInfoVO.setTelephone(projectJudgeDO.getTelephone()); + judgeInfoVO.setPosition(projectJudgeDO.getPosition()); + judgeInfoVO.setUnit(projectJudgeDO.getUnit()); + judgeInfoVO.setUsername(projectJudgeDO.getUsername()); + judgeInfoVO.setToken(token); + return judgeInfoVO; + } + + @Override + public IPage projectJudgesAssigned(ProjectJudgePageDTO projectJudgePageDTO) { + IPage iPage = this.baseMapper.projectJudgesAssigned(new Page(projectJudgePageDTO.getPageNo(), projectJudgePageDTO.getPageSize()), + projectJudgePageDTO.getMatchId(), projectJudgePageDTO.getProjectGroup(), projectJudgePageDTO.getProjectSchedule()); + if (iPage.getRecords() != null && iPage.getRecords().size() > 0) { + for (ProjectJudgePageVO record : iPage.getRecords()) { + Integer count = projectReviewService.selectCount(record.getId(), projectJudgePageDTO.getMatchId()); + record.setAssignedQuantity(count); + Integer notReviewNum = projectReviewService.selectNotReviewCount(record.getId(), projectJudgePageDTO.getMatchId()); + record.setNotReviewedNum(notReviewNum); + } + } + return iPage; + } + + @Override + public void importJudge(MultipartFile file) { + List list = ExcelUtil.readExcel(ImportJudge.class, file); + if (list != null) { + for (ImportJudge importJudge : list) { + ProjectJudgeDO projectJudgeDO = new ProjectJudgeDO(); + BeanUtils.copyProperties(importJudge, projectJudgeDO); + this.baseMapper.insert(projectJudgeDO); + } + } + } + + @Override + public void downloadTemplate() { + List list = ExcelUtil.getField(ImportJudge.class); + ExcelUtil.writeExcel(list, new ArrayList<>()); + } + + @Override + public void exportProjectJudge() { + List field = ExcelUtil.getField(ImportJudge.class); + List list = this.baseMapper.selectList(new QueryWrapper<>()); + List data = new ArrayList<>(); + if (list != null && list.size() > 0) { + for (ProjectJudgeDO projectJudgeDO : list) { + data.add(JSON.parseObject(JSON.toJSONString(projectJudgeDO), Map.class)); + } + } + ExcelUtil.writeExcel(field, data); + } +} diff --git a/src/main/java/com/zhongzhi/service/impl/ProjectMaterialsServiceImpl.java b/src/main/java/com/zhongzhi/service/impl/ProjectMaterialsServiceImpl.java new file mode 100644 index 0000000..7097415 --- /dev/null +++ b/src/main/java/com/zhongzhi/service/impl/ProjectMaterialsServiceImpl.java @@ -0,0 +1,20 @@ +package com.zhongzhi.service.impl; + +import com.zhongzhi.model.ProjectMaterialsDO; +import com.zhongzhi.dao.ProjectMaterialsDAO; +import com.zhongzhi.service.ProjectMaterialsService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + *

+ * 项目材料 服务实现类 + *

+ * + * @author DengMin + * @since 2021-05-11 + */ +@Service +public class ProjectMaterialsServiceImpl extends ServiceImpl implements ProjectMaterialsService { + +} diff --git a/src/main/java/com/zhongzhi/service/impl/ProjectMemberServiceImpl.java b/src/main/java/com/zhongzhi/service/impl/ProjectMemberServiceImpl.java new file mode 100644 index 0000000..856948c --- /dev/null +++ b/src/main/java/com/zhongzhi/service/impl/ProjectMemberServiceImpl.java @@ -0,0 +1,20 @@ +package com.zhongzhi.service.impl; + +import com.zhongzhi.model.ProjectMemberDO; +import com.zhongzhi.dao.ProjectMemberDAO; +import com.zhongzhi.service.ProjectMemberService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + *

+ * 项目团队信息表 服务实现类 + *

+ * + * @author DengMin + * @since 2021-05-11 + */ +@Service +public class ProjectMemberServiceImpl extends ServiceImpl implements ProjectMemberService { + +} diff --git a/src/main/java/com/zhongzhi/service/impl/ProjectOwnershipStructureServiceImpl.java b/src/main/java/com/zhongzhi/service/impl/ProjectOwnershipStructureServiceImpl.java new file mode 100644 index 0000000..d7effda --- /dev/null +++ b/src/main/java/com/zhongzhi/service/impl/ProjectOwnershipStructureServiceImpl.java @@ -0,0 +1,20 @@ +package com.zhongzhi.service.impl; + +import com.zhongzhi.model.ProjectOwnershipStructureDO; +import com.zhongzhi.dao.ProjectOwnershipStructureDAO; +import com.zhongzhi.service.ProjectOwnershipStructureService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + *

+ * 股权结构表 服务实现类 + *

+ * + * @author DengMin + * @since 2021-05-11 + */ +@Service +public class ProjectOwnershipStructureServiceImpl extends ServiceImpl implements ProjectOwnershipStructureService { + +} diff --git a/src/main/java/com/zhongzhi/service/impl/ProjectPaperServiceImpl.java b/src/main/java/com/zhongzhi/service/impl/ProjectPaperServiceImpl.java new file mode 100644 index 0000000..95a67be --- /dev/null +++ b/src/main/java/com/zhongzhi/service/impl/ProjectPaperServiceImpl.java @@ -0,0 +1,20 @@ +package com.zhongzhi.service.impl; + +import com.zhongzhi.model.ProjectPaperDO; +import com.zhongzhi.dao.ProjectPaperMapper; +import com.zhongzhi.service.ProjectPaperService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + *

+ * 项目论文 服务实现类 + *

+ * + * @author DengMin + * @since 2022-04-25 + */ +@Service +public class ProjectPaperServiceImpl extends ServiceImpl implements ProjectPaperService { + +} diff --git a/src/main/java/com/zhongzhi/service/impl/ProjectPatentServiceImpl.java b/src/main/java/com/zhongzhi/service/impl/ProjectPatentServiceImpl.java new file mode 100644 index 0000000..ced2a5f --- /dev/null +++ b/src/main/java/com/zhongzhi/service/impl/ProjectPatentServiceImpl.java @@ -0,0 +1,20 @@ +package com.zhongzhi.service.impl; + +import com.zhongzhi.model.ProjectPatentDO; +import com.zhongzhi.dao.ProjectPatentMapper; +import com.zhongzhi.service.ProjectPatentService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + *

+ * 项目专利 服务实现类 + *

+ * + * @author DengMin + * @since 2022-04-25 + */ +@Service +public class ProjectPatentServiceImpl extends ServiceImpl implements ProjectPatentService { + +} diff --git a/src/main/java/com/zhongzhi/service/impl/ProjectReviewPeriodServiceImpl.java b/src/main/java/com/zhongzhi/service/impl/ProjectReviewPeriodServiceImpl.java new file mode 100644 index 0000000..bfb30a7 --- /dev/null +++ b/src/main/java/com/zhongzhi/service/impl/ProjectReviewPeriodServiceImpl.java @@ -0,0 +1,55 @@ +package com.zhongzhi.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.zhongzhi.common.utils.DateFormatUtil; +import com.zhongzhi.dto.period.ProjectReviewPeriodDTO; +import com.zhongzhi.model.ProjectReviewPeriodDO; +import com.zhongzhi.dao.ProjectReviewPeriodMapper; +import com.zhongzhi.service.ProjectReviewPeriodService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.zhongzhi.vo.projectReviewPeriod.ProjectReviewPeriodVO; +import org.springframework.stereotype.Service; + +/** + *

+ * 评审时段 服务实现类 + *

+ * + * @author DengMin + * @since 2021-06-10 + */ +@Service +public class ProjectReviewPeriodServiceImpl extends ServiceImpl implements ProjectReviewPeriodService { + + @Override + public ProjectReviewPeriodVO getProjectReviewPeriod(ProjectReviewPeriodDTO projectReviewPeriodDTO) { + ProjectReviewPeriodVO projectReviewPeriodVO = new ProjectReviewPeriodVO(); + ProjectReviewPeriodDO projectReviewPeriodDO = this.baseMapper.selectOne(new QueryWrapper() + .lambda() + .eq(ProjectReviewPeriodDO::getMatchId, projectReviewPeriodDTO.getMatchId()) + .eq(ProjectReviewPeriodDO::getProjectGroup, projectReviewPeriodDTO.getProjectGroup()) + .eq(ProjectReviewPeriodDO::getProjectSchedule, projectReviewPeriodDTO.getProjectSchedule())); + if (projectReviewPeriodDO != null) { + projectReviewPeriodVO.setId(projectReviewPeriodDO.getId()); + projectReviewPeriodVO.setStartTime(DateFormatUtil.format(projectReviewPeriodDO.getStartTime(), DateFormatUtil.FMT_sdf14_L)); + projectReviewPeriodVO.setEndTime(DateFormatUtil.format(projectReviewPeriodDO.getEndTime(), DateFormatUtil.FMT_sdf14_L)); + } + + return projectReviewPeriodVO; + } + + @Override + public void updateProjectReviewPeriod(ProjectReviewPeriodDO projectReviewPeriodDO) { + ProjectReviewPeriodDO projectReviewPeriod = this.baseMapper.selectOne(new QueryWrapper() + .lambda() + .eq(ProjectReviewPeriodDO::getMatchId, projectReviewPeriodDO.getMatchId()) + .eq(ProjectReviewPeriodDO::getProjectSchedule, projectReviewPeriodDO.getProjectSchedule()) + .eq(ProjectReviewPeriodDO::getProjectGroup, projectReviewPeriodDO.getProjectGroup())); + if (projectReviewPeriod != null) { + projectReviewPeriodDO.setId(projectReviewPeriod.getId()); + this.baseMapper.updateById(projectReviewPeriodDO); + } else { + this.baseMapper.insert(projectReviewPeriodDO); + } + } +} diff --git a/src/main/java/com/zhongzhi/service/impl/ProjectReviewServiceImpl.java b/src/main/java/com/zhongzhi/service/impl/ProjectReviewServiceImpl.java new file mode 100644 index 0000000..e443355 --- /dev/null +++ b/src/main/java/com/zhongzhi/service/impl/ProjectReviewServiceImpl.java @@ -0,0 +1,304 @@ +package com.zhongzhi.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.zhongzhi.common.constant.ProjectReview; +import com.zhongzhi.common.constant.ProjectType; +import com.zhongzhi.common.constant.SMSTemplate; +import com.zhongzhi.common.exception.HttpException; +import com.zhongzhi.common.utils.AliyunSmsUtil; +import com.zhongzhi.common.utils.DateFormatUtil; +import com.zhongzhi.dao.ProjectDAO; +import com.zhongzhi.dto.review.CancelReviewDTO; +import com.zhongzhi.dto.review.ProjectReviewDTO; +import com.zhongzhi.dto.review.SetReviewDTO; +import com.zhongzhi.model.*; +import com.zhongzhi.dao.ProjectReviewDAO; +import com.zhongzhi.service.*; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.zhongzhi.vo.judge.ProjectReviewVO; +import com.zhongzhi.vo.review.SendNoticeVO; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + *

+ * 项目评审 服务实现类 + *

+ * + * @author DengMin + * @since 2021-05-18 + */ +@Service +public class ProjectReviewServiceImpl extends ServiceImpl implements ProjectReviewService { + + @Autowired + private ProjectService projectService; + + @Autowired + private ProjectJudgeService projectJudgeService; + + @Autowired + private MatchDictService matchDictService; + + @Autowired + private ProjectReviewPeriodService projectReviewPeriodService; + + @Autowired + private AliyunSmsUtil aliyunSmsUtil; + + @Override + @Transactional(rollbackFor = Exception.class) + public void setReview(SetReviewDTO setReviewDTO) { + if (setReviewDTO.getProjectId().size() == 0) { + throw new HttpException(10047); + } + + if (setReviewDTO.getJudgeId().size() == 0) { + throw new HttpException(10048); + } + +// Date startTime = null; +// Date endTime = null; + + for (Long judgeId : setReviewDTO.getJudgeId()) { + ProjectJudgeDO projectJudgeDO = projectJudgeService.getById(judgeId); + if (projectJudgeDO != null) { + for (Long projectId : setReviewDTO.getProjectId()) { + ProjectDO projectDO = projectService.getById(projectId); + MatchDictDO matchDictDO = matchDictService.getById(projectDO.getMatchId()); + if ("种子赛道".equals(matchDictDO.getMatchType())) { + if (projectDO != null) { + ProjectReviewPeriodDO projectReviewPeriodDO = projectReviewPeriodService.getOne(new QueryWrapper() + .lambda() + .eq(ProjectReviewPeriodDO::getMatchId, projectDO.getMatchId()) + .eq(ProjectReviewPeriodDO::getProjectGroup, projectDO.getProjectProgress()) + .eq(ProjectReviewPeriodDO::getProjectSchedule, projectDO.getProjectSchedule())); +// startTime = projectReviewPeriodDO.getStartTime(); +// endTime = projectReviewPeriodDO.getEndTime(); + if (projectReviewPeriodDO == null) { + throw new HttpException(10076); + } + + if (projectDO.getProjectAssigned().equals(ProjectReview.UNASSIGNED)) { + ProjectDO project = new ProjectDO(); + project.setId(projectId); + project.setProjectAssigned(ProjectReview.ASSIGNED); + if (projectDO.getProjectReview().equals(ProjectReview.SUBMITTED)) { + project.setProjectReview(ProjectReview.TO_REVIEWED); + } + projectService.updateById(project); + } + + ProjectReviewDO projectReview = this.baseMapper.selectOne(new QueryWrapper() + .lambda() + .eq(ProjectReviewDO::getProjectId, projectId) + .eq(ProjectReviewDO::getJudgeId, judgeId) + .eq(ProjectReviewDO::getProjectSchedule, projectDO.getProjectSchedule())); + if (projectReview != null) { + throw new HttpException(10053); + } + + ProjectReviewDO projectReviewDO = new ProjectReviewDO(); + projectReviewDO.setProjectId(projectId); + projectReviewDO.setJudgeId(judgeId); + projectReviewDO.setProjectSchedule(projectDO.getProjectSchedule()); + projectReviewDO.setReviewStatus(ProjectReview.ASSIGNED); + this.baseMapper.insert(projectReviewDO); + } + } + else { + if (projectDO != null) { + ProjectReviewPeriodDO projectReviewPeriodDO = projectReviewPeriodService.getOne(new QueryWrapper() + .lambda() + .eq(ProjectReviewPeriodDO::getMatchId, projectDO.getMatchId()) + .eq(ProjectReviewPeriodDO::getProjectGroup, projectDO.getProjectGroup()) + .eq(ProjectReviewPeriodDO::getProjectSchedule, projectDO.getProjectSchedule())); +// startTime = projectReviewPeriodDO.getStartTime(); +// endTime = projectReviewPeriodDO.getEndTime(); + if (projectReviewPeriodDO == null) { + throw new HttpException(10076); + } + + if (projectDO.getProjectAssigned().equals(ProjectReview.UNASSIGNED)) { + ProjectDO project = new ProjectDO(); + project.setId(projectId); + project.setProjectAssigned(ProjectReview.ASSIGNED); + if (projectDO.getProjectReview().equals(ProjectReview.SUBMITTED)) { + project.setProjectReview(ProjectReview.TO_REVIEWED); + } + projectService.updateById(project); + } + + ProjectReviewDO projectReview = this.baseMapper.selectOne(new QueryWrapper() + .lambda() + .eq(ProjectReviewDO::getProjectId, projectId) + .eq(ProjectReviewDO::getJudgeId, judgeId) + .eq(ProjectReviewDO::getProjectSchedule, projectDO.getProjectSchedule())); + if (projectReview != null) { + throw new HttpException(10053); + } + + ProjectReviewDO projectReviewDO = new ProjectReviewDO(); + projectReviewDO.setProjectId(projectId); + projectReviewDO.setJudgeId(judgeId); + projectReviewDO.setProjectSchedule(projectDO.getProjectSchedule()); + projectReviewDO.setReviewStatus(ProjectReview.ASSIGNED); + this.baseMapper.insert(projectReviewDO); + } + } + } + + + if (setReviewDTO.getSmsMessage() == 1) { + MatchDictDO matchDictDO = matchDictService.getById(setReviewDTO.getMatchId()); + int count = this.baseMapper.selectCount(new QueryWrapper() + .lambda() + .eq(ProjectReviewDO::getReviewStatus, ProjectReview.ASSIGNED) + .eq(ProjectReviewDO::getJudgeId, judgeId)); + String msg = ""; + if (matchDictDO != null) { +// msg = matchDictDO.getMatchName() +","+count+","+ DateFormatUtil.format(startTime,DateFormatUtil.FMT_sdf14_L)+"~"+DateFormatUtil.format(endTime,DateFormatUtil.FMT_sdf14_L); + msg = matchDictDO.getMatchName() + "," + count; + } + + aliyunSmsUtil.sendTemplateMsg(msg, projectJudgeDO.getTelephone(), SMSTemplate.REVIEW_INVITATION_OLD); + } + } + } + } + + @Override + public void sendNotice(SendNoticeVO sendNoticeVO) { + MatchDictDO matchDictDO = matchDictService.getById(sendNoticeVO.getMatchId()); + if (matchDictDO != null) { + for (Long id : sendNoticeVO.getId()) { + ProjectJudgeDO projectJudgeDO = projectJudgeService.getById(id); + if (projectJudgeDO != null) { + int count = this.baseMapper.selectCount(new QueryWrapper() + .lambda() + .eq(ProjectReviewDO::getReviewStatus, ProjectReview.ASSIGNED) + .eq(ProjectReviewDO::getJudgeId, id)); + List list = projectReviewPeriodService.list(new QueryWrapper() + .lambda() + .eq(ProjectReviewPeriodDO::getMatchId, matchDictDO.getId())); + + StringBuffer stringBuffer = new StringBuffer(); + for (int i = 0; i < list.size(); i++) { + stringBuffer.append(list.get(i).getProjectGroup() + ":" + DateFormatUtil.format(list.get(i).getStartTime(), DateFormatUtil.FMT_sdf14_L) + "~" + DateFormatUtil.format(list.get(i).getEndTime(), DateFormatUtil.FMT_sdf14_L)); + if (i != list.size()) { + stringBuffer.append(";"); + } + } + + String msg = matchDictDO.getMatchName() + "," + count + "," + stringBuffer.toString(); + aliyunSmsUtil.sendTemplateMsgP(msg, projectJudgeDO.getTelephone(), SMSTemplate.REVIEW_INVITATION_NEW); + } + } + } + } + + @Override + public Integer selectCount(Long judgeId, Long matchId) { + return this.baseMapper.selectCountByMatchId(judgeId, matchId); + } + + @Override + public Integer selectNotReviewCount(Long judgeId, Long matchId) { + return this.baseMapper.selectNotReviewCount(judgeId, matchId); + } + + @Override + public List getList(String projectSchedule, Long projectId) { + return this.baseMapper.getList(projectSchedule, projectId); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void cancelReview(CancelReviewDTO cancelReviewDTO) { + if (cancelReviewDTO.getProjectId() == null) { + throw new HttpException(10047); + } + + if (cancelReviewDTO.getJudgeId().size() == 0) { + throw new HttpException(10048); + } + + for (Long judgeId : cancelReviewDTO.getJudgeId()) { + ProjectJudgeDO projectJudgeDO = projectJudgeService.getById(judgeId); + if (projectJudgeDO == null) { + throw new HttpException(10070); + } + + ProjectDO projectDO = projectService.getById(cancelReviewDTO.getProjectId()); + if (projectDO != null) { + ProjectReviewPeriodDO projectReviewPeriodDO = projectReviewPeriodService.getOne(new QueryWrapper() + .lambda() + .eq(ProjectReviewPeriodDO::getMatchId, projectDO.getMatchId()) + .eq(ProjectReviewPeriodDO::getProjectGroup, projectDO.getProjectGroup()) + .eq(ProjectReviewPeriodDO::getProjectSchedule, projectDO.getProjectSchedule())); + if (projectReviewPeriodDO.getStartTime().before(new Date())) { + throw new HttpException(10075); + } + + if (projectDO != null) { + Integer count = this.baseMapper.selectCount(new QueryWrapper() + .lambda() + .eq(ProjectReviewDO::getProjectId, projectDO.getId()) + .eq(ProjectReviewDO::getProjectSchedule, projectDO.getProjectSchedule())); + /* + 只有最后一个评委是撤销修改项目分配状态 + */ + if (count == 1) { + ProjectDO project = new ProjectDO(); + project.setId(projectDO.getId()); + project.setProjectAssigned(ProjectReview.UNASSIGNED); + projectService.updateById(project); + } + + ProjectReviewDO projectReview = this.baseMapper.selectOne(new QueryWrapper() + .lambda() + .eq(ProjectReviewDO::getProjectId, projectDO.getId()) + .eq(ProjectReviewDO::getJudgeId, judgeId) + .eq(ProjectReviewDO::getProjectSchedule, projectDO.getProjectSchedule())); + if (projectReview == null) { + throw new HttpException(10071); + } + + if (projectReview.getReviewStatus().equals(ProjectReview.SUBMITTED)) { + throw new HttpException(10059); + } + + this.baseMapper.deleteById(projectReview.getId()); + } + + aliyunSmsUtil.sendTemplateMsg(projectDO.getProjectName(), projectJudgeDO.getTelephone(), SMSTemplate.CANCEL_REVIEW); + } + } + } + + @Override + public List getProjectReview(ProjectReviewDTO projectReviewDTO) { + List data = new ArrayList<>(); + + ProjectDO projectDO = projectService.getById(projectReviewDTO.getProjectId()); + if (projectDO != null) { + List list = this.baseMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectReviewDO::getProjectSchedule, projectDO.getProjectSchedule()) + .eq(ProjectReviewDO::getProjectId, projectReviewDTO.getProjectId())); + for (ProjectReviewDO projectReviewDO : list) { + ProjectJudgeDO projectJudgeDO = projectJudgeService.getById(projectReviewDO.getJudgeId()); + if (projectJudgeDO != null) { + data.add(projectJudgeDO); + } + + } + } + return data; + } +} diff --git a/src/main/java/com/zhongzhi/service/impl/ProjectScheduleRecordServiceImpl.java b/src/main/java/com/zhongzhi/service/impl/ProjectScheduleRecordServiceImpl.java new file mode 100644 index 0000000..546e09f --- /dev/null +++ b/src/main/java/com/zhongzhi/service/impl/ProjectScheduleRecordServiceImpl.java @@ -0,0 +1,74 @@ +package com.zhongzhi.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.zhongzhi.common.constant.ProjectSchedule; +import com.zhongzhi.dto.scheduleRecord.ProjectScheduleRecordDTO; +import com.zhongzhi.model.MatchDictDO; +import com.zhongzhi.model.ProjectScheduleRecordDO; +import com.zhongzhi.dao.ProjectScheduleRecordDAO; +import com.zhongzhi.service.MatchDictService; +import com.zhongzhi.service.ProjectScheduleRecordService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.zhongzhi.vo.scheduleRecord.ProjectScheduleRecordVO; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + *

+ * 项目进度记录 服务实现类 + *

+ * + * @author DengMin + * @since 2021-06-02 + */ +@Service +public class ProjectScheduleRecordServiceImpl extends ServiceImpl implements ProjectScheduleRecordService { + + @Autowired + private MatchDictService matchDictService; + + @Override + public IPage getProjectScheduleRecord(ProjectScheduleRecordDTO projectScheduleRecordDTO) { + Page page = new Page(projectScheduleRecordDTO.getPageNo(), projectScheduleRecordDTO.getPageSize()); + + MatchDictDO matchDictDO = matchDictService.getOne(new QueryWrapper() + .lambda() + .eq(MatchDictDO::getStatus, 1)); + if (matchDictDO != null) { + IPage iPage = this.baseMapper.getProjectScheduleRecord(page, matchDictDO.getId(), projectScheduleRecordDTO.getName()); + for (ProjectScheduleRecordVO record : iPage.getRecords()) { + List list = this.baseMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectScheduleRecordDO::getCollege, record.getCollegeName())); + Integer schoolProject = 0; + Integer rematchProject = 0; + Integer finalProject = 0; + if (list.size() > 0) { + for (ProjectScheduleRecordDO projectScheduleRecordDO : list) { + if (projectScheduleRecordDO.getProjectSchedule().equals(ProjectSchedule.SCHOOL_REVIEW)) { + schoolProject++; + } else if (projectScheduleRecordDO.getProjectSchedule().equals(ProjectSchedule.SEMI_FINAL_REVIEW)) { + rematchProject++; + } else if (projectScheduleRecordDO.getProjectSchedule().equals(ProjectSchedule.FINAL_REVIEW)) { + finalProject++; + } + } + } + record.setSchoolProject(schoolProject); + record.setRematchProject(rematchProject); + record.setFinalProject(finalProject); + } + return iPage; + } + return null; + } + + @Override + public List getList(Long matchId, String name, String projectGroup) { + return this.baseMapper.getList(matchId, name, projectGroup); + } +} diff --git a/src/main/java/com/zhongzhi/service/impl/ProjectServiceImpl.java b/src/main/java/com/zhongzhi/service/impl/ProjectServiceImpl.java new file mode 100644 index 0000000..8fbec24 --- /dev/null +++ b/src/main/java/com/zhongzhi/service/impl/ProjectServiceImpl.java @@ -0,0 +1,4800 @@ +package com.zhongzhi.service.impl; + +import com.alibaba.fastjson.JSON; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.zhongzhi.common.constant.*; +import com.zhongzhi.common.exception.HttpException; +import com.zhongzhi.common.utils.*; +import com.zhongzhi.dao.*; +import com.zhongzhi.dto.member.CreateProjectMemberDTO; +import com.zhongzhi.dto.member.MentorDTO; +import com.zhongzhi.dto.member.TeamMemberDTO; +import com.zhongzhi.dto.project.*; +import com.zhongzhi.dto.review.ProjectReviewPageDTO; +import com.zhongzhi.dto.review.ProjectReviewScoreDTO; +import com.zhongzhi.dto.review.ReviewScoreDTO; +import com.zhongzhi.model.*; +import com.zhongzhi.service.*; +import com.zhongzhi.vo.ExcelFieldVO; +import com.zhongzhi.vo.judge.ProjectReviewVO; +import com.zhongzhi.vo.member.ProjectMemberVO; +import com.zhongzhi.vo.project.*; +import com.zhongzhi.vo.review.FinalsReviewVO; +import com.zhongzhi.vo.review.ReMatchReviewVO; +import org.apache.commons.lang3.StringUtils; +import org.apache.poi.ss.formula.functions.T; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.math.BigDecimal; +import java.util.*; +import java.util.stream.Collectors; + +/** + *

+ * 项目表 服务实现类 + *

+ * + * @author DengMin + * @since 2021-05-11 + */ +@Service +public class ProjectServiceImpl extends ServiceImpl implements ProjectService { + + @Autowired + private ProjectOwnershipStructureService projectOwnershipStructureService; + + @Autowired + private ProjectMaterialsService projectMaterialsService; + + @Autowired + private ProjectMemberService projectMemberService; + + @Autowired + private ProjectReviewService projectReviewService; + + @Autowired + private MatchDictService matchDictService; + + @Autowired + private ProjectJudgeService projectJudgeService; + + @Autowired + private ProjectScheduleRecordService projectScheduleRecordService; + + @Autowired + private ProjectReviewPeriodService projectReviewPeriodService; + + @Autowired + private StudentService studentService; + + @Autowired + private ProjectPatentMapper patentMapper; + + @Autowired + private ProjectPaperMapper paperMapper; + + @Autowired + private ProjectAwardMapper awardMapper; + + @Autowired + private ProjectCopyrightMapper copyrightMapper; + + @Autowired + private ProjectWorksMapper worksMapper; + + @Autowired + private ProjectTrademarkMapper trademarkMapper; + + @Autowired + private AliyunSmsUtil aliyunSmsUtil; + + @Autowired + private CollegesDictDAO collegesDictDAO; + + @Override + public IPage getMainTrackProject(ProjectListPageDTO projectListPageDTO) { + StudentDO studentDO = (StudentDO) Localstorage.getUser(); + if (studentDO == null) { + throw new HttpException(Code.TOKEN_EXPIRED.getCode(), Code.TOKEN_EXPIRED.getMessage()); + } + + Page page = new Page(projectListPageDTO.getPageNo(), projectListPageDTO.getPageSize()); + IPage iPage = this.baseMapper.getListPage(page, projectListPageDTO.getMatchId(), studentDO.getId(), ProjectType.MAIN_TRACK); + for (ProjectPageVO record : iPage.getRecords()) { + if (record.getProjectStatus().equals(ProjectReview.TO_REVIEWED)) { + record.setStatus(0); + } else { + record.setStatus(1); + } + } + return iPage; + } + + @Override + public IPage getVocationalProject(ProjectListPageDTO projectListPageDTO) { + StudentDO studentDO = (StudentDO) Localstorage.getUser(); + if (studentDO == null) { + throw new HttpException(Code.TOKEN_EXPIRED.getCode(), Code.TOKEN_EXPIRED.getMessage()); + } + + Page page = new Page(projectListPageDTO.getPageNo(), projectListPageDTO.getPageSize()); + IPage iPage = this.baseMapper.getListPage(page, projectListPageDTO.getMatchId(), studentDO.getId(), ProjectType.VOCATIONAL); + for (ProjectPageVO record : iPage.getRecords()) { + MatchDictDO matchDictDO = matchDictService.getById(record.getMatchId()); + if (matchDictDO != null) { + record.setMatchName(matchDictDO.getMatchName()); + } + + if (record.getProjectStatus().equals(ProjectReview.TO_REVIEWED)) { + record.setStatus(0); + } else { + record.setStatus(1); + } + } + return iPage; + } + + @Override + public IPage getVocationalReviewList(ReviewListDTO reviewListDTO) { + if (reviewListDTO.getProjectReview() != null) { + if (reviewListDTO.getProjectReview().equals(ProjectReview.TO_REVIEWED) || + reviewListDTO.getProjectReview().equals(ProjectReview.SUBMITTED)) { + reviewListDTO.setProjectReview(reviewListDTO.getProjectReview()); + } else if (reviewListDTO.getProjectReview().equals(ProjectReview.UNASSIGNED) || + reviewListDTO.getProjectReview().equals(ProjectReview.ASSIGNED)) { + reviewListDTO.setProjectAssigned(reviewListDTO.getProjectReview()); + reviewListDTO.setProjectReview(""); + } + } + + IPage iPage = this.baseMapper.getReviewList(new Page(reviewListDTO.getPageNo(), reviewListDTO.getPageSize()), + reviewListDTO.getProjectName(), + reviewListDTO.getProjectGroup(), + reviewListDTO.getProjectReview(), + reviewListDTO.getMatchId(), + reviewListDTO.getProjectStatus(), + reviewListDTO.getProjectAssigned(), null); + + for (ReviewListVO record : iPage.getRecords()) { + StudentDO studentDO = studentService.getById(record.getProposerId()); + if (studentDO != null) { + record.setSchool(studentDO.getCollege()); + record.setName(studentDO.getName()); + } + + List list = projectReviewService.getList(record.getProjectSchedule(), record.getId()); + if (list.size() > 0) { + String review = ""; + for (ProjectReviewVO projectReviewVO : list) { + if (projectReviewVO.getScore() != null) { + review += projectReviewVO.getJudgesName() + "(" + projectReviewVO.getScore() + "); "; + } else { + review += projectReviewVO.getJudgesName() + "(-); "; + } + } + record.setReviewResult(review.substring(0, review.length() - 2)); + } + } + return iPage; + } + + @Override + public SeedTrackProjectDetailVO getVocationalProjectDetail(Long id) { + Map map = Localstorage.getMap(); + String type = (String) map.get("type"); + ProjectJudgeDO projectJudge = new ProjectJudgeDO(); + CollegesDictDO collegesDict = new CollegesDictDO(); + if (type.equals(Platform.review)) { + projectJudge = (ProjectJudgeDO) map.get("user"); + } else if (type.equals(Platform.school)) { + collegesDict = (CollegesDictDO) map.get("user"); + } + + SeedTrackProjectDetailVO seedTrackProjectDetailVO = new SeedTrackProjectDetailVO(); + ProjectDO projectDO = this.baseMapper.selectById(id); + if (projectDO != null) { + BeanUtils.copyProperties(projectDO, seedTrackProjectDetailVO); + List materials = projectMaterialsService.list(new QueryWrapper() + .lambda() + .eq(ProjectMaterialsDO::getProjectId, projectDO.getId())); + seedTrackProjectDetailVO.setMaterials(materials); + + List list = projectMemberService.list(new QueryWrapper() + .lambda() + .eq(ProjectMemberDO::getProjectId, projectDO.getId())); + List teamMember = new ArrayList<>(); + List mentor = new ArrayList<>(); + for (ProjectMemberDO projectMemberDO : list) { + if (projectMemberDO.getType().equals(MemberType.PRINCIPAL)) { + seedTrackProjectDetailVO.setName(projectMemberDO.getName()); + seedTrackProjectDetailVO.setSchool(projectMemberDO.getSchool()); + seedTrackProjectDetailVO.setGrade(projectMemberDO.getGrade()); + seedTrackProjectDetailVO.setMajor(projectMemberDO.getMajor()); + seedTrackProjectDetailVO.setSex(projectMemberDO.getSex()); + seedTrackProjectDetailVO.setIdCard(projectMemberDO.getIdCard()); + if (projectMemberDO.getTelephone() == null) { + StudentDO studentDO = studentService.getById(projectDO.getId()); + seedTrackProjectDetailVO.setTelephone(studentDO.getTelephone()); + } else { + seedTrackProjectDetailVO.setTelephone(projectMemberDO.getTelephone()); + } + seedTrackProjectDetailVO.setStudentNo(projectMemberDO.getStudentNo()); + seedTrackProjectDetailVO.setEmail(projectMemberDO.getEmail()); + seedTrackProjectDetailVO.setFiveYears(projectMemberDO.getFiveYears()); + } else if (projectMemberDO.getType().equals(MemberType.TEAM_MEMBER)) { + TeamMemberDTO teamMemberDTO = new TeamMemberDTO(); + teamMemberDTO.setId(projectMemberDO.getId()); + teamMemberDTO.setGrade(projectMemberDO.getGrade()); + teamMemberDTO.setMajor(projectMemberDO.getMajor()); + teamMemberDTO.setSchool(projectMemberDO.getSchool()); + teamMemberDTO.setSex(projectMemberDO.getSex()); + teamMemberDTO.setStudentNo(projectMemberDO.getStudentNo()); + teamMemberDTO.setTeamName(projectMemberDO.getName()); + teamMemberDTO.setTeamTelephone(projectMemberDO.getTelephone()); + teamMemberDTO.setIdCard(projectMemberDO.getIdCard()); + teamMember.add(teamMemberDTO); + } else if (projectMemberDO.getType().equals(MemberType.MENTOR)) { + MentorDTO mentorDTO = new MentorDTO(); + mentorDTO.setId(projectMemberDO.getId()); + mentorDTO.setCompany(projectMemberDO.getCompany()); + mentorDTO.setPosition(projectMemberDO.getPosition()); + mentorDTO.setPositionTitle(projectMemberDO.getPositionTitle()); + mentorDTO.setTeacherName(projectMemberDO.getName()); + mentorDTO.setTelephone(projectMemberDO.getTelephone()); + mentorDTO.setIdCard(projectMemberDO.getIdCard()); + mentor.add(mentorDTO); + } + } + seedTrackProjectDetailVO.setMentor(mentor); + seedTrackProjectDetailVO.setTeamMember(teamMember); + + QueryWrapper queryWrapper = new QueryWrapper(); + if (projectJudge.getId() != null) { + queryWrapper.lambda().eq(ProjectReviewDO::getJudgeId, projectJudge.getId()); + } + queryWrapper.lambda().eq(ProjectReviewDO::getProjectId, id); + List review = projectReviewService.list(queryWrapper); + if (review.size() > 0) { + List rematch = new ArrayList<>(); + List finals = new ArrayList<>(); + for (ProjectReviewDO pr : review) { + ProjectJudgeDO projectJudgeDO = projectJudgeService.getById(pr.getJudgeId()); + if (pr.getProjectSchedule().equals(ProjectSchedule.SEMI_FINAL_REVIEW)) { + ReMatchReviewVO reMatchReviewVO = new ReMatchReviewVO(); + reMatchReviewVO.setId(pr.getId()); + if (projectJudgeDO != null) { + reMatchReviewVO.setRematchJudgeName(projectJudgeDO.getUsername()); + } + + if (collegesDict.getId() == null) { + reMatchReviewVO.setRematchScore(pr.getScore()); + } + reMatchReviewVO.setRematchTime(DateFormatUtil.format(pr.getReviewTime(), DateFormatUtil.FMT_sdf_yMd)); + rematch.add(reMatchReviewVO); + } else { + FinalsReviewVO finalsReviewVO = new FinalsReviewVO(); + finalsReviewVO.setId(pr.getId()); + if (projectJudgeDO != null) { + finalsReviewVO.setFinalsJudgeName(projectJudgeDO.getUsername()); + } + + if (collegesDict.getId() == null) { + finalsReviewVO.setFinalsScore(pr.getScore()); + } + finalsReviewVO.setFinalsTime(DateFormatUtil.format(pr.getReviewTime(), DateFormatUtil.FMT_sdf_yMd)); + finals.add(finalsReviewVO); + } + } + seedTrackProjectDetailVO.setRematch(rematch); + seedTrackProjectDetailVO.setFinals(finals); + } + + if (projectJudge.getId() != null) { + ProjectReviewDO projectReviewDO = projectReviewService.getOne(new QueryWrapper() + .lambda() + .eq(ProjectReviewDO::getProjectId, id) + .eq(ProjectReviewDO::getProjectSchedule, projectDO.getProjectSchedule()) + .eq(ProjectReviewDO::getJudgeId, projectJudge.getId())); + if (projectReviewDO != null) { + if (projectReviewDO.getReviewStatus().equals(ProjectReview.SUBMITTED)) { + seedTrackProjectDetailVO.setReviewStatus(ProjectReview.SUBMITTED); + } + seedTrackProjectDetailVO.setReviewScore(projectReviewDO.getReviewScore()); + seedTrackProjectDetailVO.setReviewOpinion(projectReviewDO.getReviewOpinion()); + } + } + + + // 股权结构 + List ownershipStructureDOList = projectOwnershipStructureService.list(new QueryWrapper() + .lambda() + .eq(ProjectOwnershipStructureDO::getProjectId, projectDO.getId())); + seedTrackProjectDetailVO.setOwnership(ownershipStructureDOList); + + /** + * 专利 + */ + List patentDOList = patentMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectPatentDO::getProjectId, projectDO.getId())); + seedTrackProjectDetailVO.setPatent(patentDOList); + + /** + * 论文 + */ + List paperDOList = paperMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectPaperDO::getProjectId, projectDO.getId())); + seedTrackProjectDetailVO.setPaper(paperDOList); + + /** + * 奖项 + */ + List awardDOList = awardMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectAwardDO::getProjectId, projectDO.getId())); + seedTrackProjectDetailVO.setAward(awardDOList); + + /** + * 软件著作权 + */ + List copyrightDOList = copyrightMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectCopyrightDO::getProjectId, projectDO.getId())); + seedTrackProjectDetailVO.setCopyright(copyrightDOList); + + /** + * 作品著作 + */ + List worksDOList = worksMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectWorksDO::getProjectId, projectDO.getId())); + seedTrackProjectDetailVO.setWorks(worksDOList); + + /** + * 商标 + */ + List trademarkDOList = trademarkMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectTrademarkDO::getProjectId, projectDO.getId())); + seedTrackProjectDetailVO.setTrademark(trademarkDOList); + } + return seedTrackProjectDetailVO; + } + + @Override + public IPage getVocationalProjectPage(ProjectListPageDTO projectListPageDTO) { + Page page = new Page(projectListPageDTO.getPageNo(), projectListPageDTO.getPageSize()); + Long matchId = null; + if (projectListPageDTO.getMatchId() == null) { + MatchDictDO matchDictDO = matchDictService.getOne(new QueryWrapper() + .lambda() + .eq(MatchDictDO::getStatus, 1) + .eq(MatchDictDO::getMatchType, ProjectType.VOCATIONAL)); + if (matchDictDO != null) { + matchId = matchDictDO.getId(); + } + } else { + matchId = projectListPageDTO.getMatchId(); + } + + IPage iPage = this.baseMapper.getSeedTrackProjectPage(page, matchId, projectListPageDTO.getProjectGroup(), MemberType.PRINCIPAL, ProjectType.VOCATIONAL, null, + projectListPageDTO.getProjectSchedule(), projectListPageDTO.getProjectStatus(), projectListPageDTO.getItemField(), projectListPageDTO.getName(), projectListPageDTO.getProjectProgress()); + for (SeedTrackProjectPageVO record : iPage.getRecords()) { + List list = projectMaterialsService.list(new QueryWrapper() + .lambda() + .eq(ProjectMaterialsDO::getProjectId, record.getId())); + record.setMaterials(list); + } + return iPage; + } + + @Override + public IPage getVocationalProjectList(ProjectListPageDTO projectListPageDTO) { + CollegesDictDO collegesDictDO = (CollegesDictDO) Localstorage.getUser(); + if (collegesDictDO == null) { + throw new HttpException(Code.TOKEN_EXPIRED.getCode(), Code.TOKEN_EXPIRED.getMessage()); + } + + Page page = new Page(projectListPageDTO.getPageNo(), projectListPageDTO.getPageSize()); + IPage iPage = this.baseMapper.getSeedTrackProjectPage(page, projectListPageDTO.getMatchId(), projectListPageDTO.getProjectGroup(), MemberType.PRINCIPAL, ProjectType.VOCATIONAL, collegesDictDO.getName(), + projectListPageDTO.getProjectSchedule(), projectListPageDTO.getProjectStatus(), projectListPageDTO.getItemField(), projectListPageDTO.getName(), projectListPageDTO.getProjectProgress()); + for (SeedTrackProjectPageVO record : iPage.getRecords()) { + List list = projectMaterialsService.list(new QueryWrapper() + .lambda() + .eq(ProjectMaterialsDO::getProjectId, record.getId())); + record.setMaterials(list); + } + return iPage; + } + + @Override + public IPage getVocationalProjectReviewPage(ProjectReviewPageDTO projectReviewPageDTO) { + ProjectJudgeDO projectJudgeDO = (ProjectJudgeDO) Localstorage.getUser(); + if (projectJudgeDO == null) { + throw new HttpException(Code.TOKEN_EXPIRED.getCode(), Code.TOKEN_EXPIRED.getMessage()); + } + + ProjectReviewPeriodDO projectReviewPeriodDO = projectReviewPeriodService.getOne(new QueryWrapper() + .lambda() + .eq(ProjectReviewPeriodDO::getMatchId, projectReviewPageDTO.getMatchId()) + .eq(ProjectReviewPeriodDO::getProjectGroup, projectReviewPageDTO.getProjectGroup()) + .eq(ProjectReviewPeriodDO::getProjectSchedule, projectReviewPageDTO.getProjectSchedule())); + if (projectReviewPeriodDO != null) { + if ((new Date().after(projectReviewPeriodDO.getStartTime()) || DateFormatUtil.format(new Date(), DateFormatUtil.FMT_sdf14_L).equals(DateFormatUtil.format(projectReviewPeriodDO.getStartTime(), DateFormatUtil.FMT_sdf14_L))) + && + (new Date().before(projectReviewPeriodDO.getEndTime()) || DateFormatUtil.format(new Date(), DateFormatUtil.FMT_sdf14_L).equals(DateFormatUtil.format(projectReviewPeriodDO.getEndTime(), DateFormatUtil.FMT_sdf14_L)))) { + String projectReview = ""; + if (projectReviewPageDTO.getStatus().equals(ProjectReview.TO_REVIEWED)) { + projectReview = ProjectReview.ASSIGNED; + } else { + projectReview = projectReviewPageDTO.getStatus(); + } + + IPage iPage = this.baseMapper.getProjectReviewPage(new Page(projectReviewPageDTO.getPageNo(), projectReviewPageDTO.getPageSize()), + projectJudgeDO.getId(), + projectReviewPageDTO.getMatchId(), + projectReviewPageDTO.getProjectName(), + projectReviewPageDTO.getProjectStatus(), + projectReview, + projectReviewPageDTO.getProjectGroup(), + null); + + for (ProjectPageVO record : iPage.getRecords()) { + /** + * 项目负责人 + */ + StudentDO studentDO = studentService.getById(record.getProposerId()); + if (studentDO != null) { + record.setName(studentDO.getName()); + } + + if (record.getReviewStatus().equals(ProjectReview.ASSIGNED)) { + record.setProjectStatus(ProjectReview.TO_REVIEWED); + } else if (record.getReviewStatus().equals(ProjectReview.SUBMITTED)) { + record.setProjectStatus(ProjectReview.SUBMITTED); + } + + List list = projectMaterialsService.list(new QueryWrapper() + .lambda() + .eq(ProjectMaterialsDO::getProjectId, record.getId())); + record.setMaterials(list); + } + return iPage; + } + } + return null; + } + + @Override + public void importVocationalProject(ImportVocationalProjectDTO importVocationalProjectDTO) { + List list = this.baseMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectDO::getProjectType, ProjectType.VOCATIONAL)); + List data = new ArrayList<>(); + if (list.size() > 0) { + for (ProjectDO projectDO : list) { + VocationalProjectVO vocationalProjectVO = new VocationalProjectVO(); + vocationalProjectVO.setId(projectDO.getId()); + vocationalProjectVO.setProjectName(projectDO.getProjectName()); + vocationalProjectVO.setProjectProgress(projectDO.getProjectProgress()); + + List memberDOList = projectMemberService.list(new QueryWrapper() + .lambda() + .eq(ProjectMemberDO::getProjectId, projectDO.getId())); + String teamMember = ""; + String mentor = ""; + for (ProjectMemberDO projectMemberDO : memberDOList) { + if (projectMemberDO.getType().equals(MemberType.PRINCIPAL)) { + vocationalProjectVO.setName(projectMemberDO.getName()); + if (projectMemberDO.getTelephone() == null) { + StudentDO studentDO = studentService.getById(projectDO.getProposerId()); + vocationalProjectVO.setTelephone(studentDO.getTelephone()); + } else { + vocationalProjectVO.setTelephone(projectMemberDO.getTelephone()); + } + } else if (projectMemberDO.getType().equals(MemberType.TEAM_MEMBER)) { + teamMember += projectMemberDO.getName() + "、"; + } else if (projectMemberDO.getType().equals(MemberType.MENTOR)) { + mentor += projectMemberDO.getName() + "、"; + } + } + vocationalProjectVO.setTeamMember(teamMember); + vocationalProjectVO.setMentor(mentor); + data.add(JSON.parseObject(JSON.toJSONString(vocationalProjectVO), Map.class)); + } + } + String title = "上海市" + importVocationalProjectDTO.getProjectGroup() + "高专大学生创新创业大赛暨中国国际“互联网+”大学生创新创业大赛上海赛区职教赛道选拔赛参赛作品"; + ExcelUtil.writeExcel(title, ExcelUtil.getField(VocationalProjectVO.class), data); + } + + @Override + public void importProjectByGroup(ImportVocationalProjectDTO importVocationalProjectDTO) { + String projectSchedule = ""; +// if(importVocationalProjectDTO.getProjectGroup().equals(ProjectType.SECONDARY_GROUP)) { + projectSchedule = ProjectSchedule.SEMI_FINAL_REVIEW; +// } else if(importVocationalProjectDTO.getProjectGroup().equals(ProjectType.VOCATIONAL_GROUP)) { +// projectSchedule = ProjectSchedule.PRELIMINARY_REVIEW; +// } + + MatchDictDO matchDictDO = matchDictService.getOne(new QueryWrapper() + .lambda() + .eq(MatchDictDO::getStatus, 1) + .eq(MatchDictDO::getMatchType, importVocationalProjectDTO.getProjectType())); + + List list = this.baseMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectDO::getProjectSchedule, projectSchedule) + .eq(ProjectDO::getProjectType, importVocationalProjectDTO.getProjectType()) + .eq(ProjectDO::getCollege, importVocationalProjectDTO.getCollege()) + .eq(ProjectDO::getMatchId, matchDictDO.getId())); + List data = new ArrayList<>(); + if (list.size() > 0) { + int index = 1; + for (ProjectDO projectDO : list) { + VocationalProjectVO vocationalProjectVO = new VocationalProjectVO(); + vocationalProjectVO.setId(Long.valueOf(index)); + vocationalProjectVO.setProjectName(projectDO.getProjectName()); + vocationalProjectVO.setProjectProgress(projectDO.getProjectProgress()); + List memberDOList = projectMemberService.list(new QueryWrapper() + .lambda() + .eq(ProjectMemberDO::getProjectId, projectDO.getId())); + String teamMember = ""; + String mentor = ""; + for (ProjectMemberDO projectMemberDO : memberDOList) { + if (projectMemberDO.getType().equals(MemberType.PRINCIPAL)) { + vocationalProjectVO.setName(projectMemberDO.getName()); + if (projectMemberDO.getTelephone() == null) { + StudentDO studentDO = studentService.getById(projectDO.getProposerId()); + vocationalProjectVO.setTelephone(studentDO.getTelephone()); + } else { + vocationalProjectVO.setTelephone(projectMemberDO.getTelephone()); + } + } else if (projectMemberDO.getType().equals(MemberType.TEAM_MEMBER)) { + teamMember += projectMemberDO.getName() + "、"; + } else if (projectMemberDO.getType().equals(MemberType.MENTOR)) { + mentor += projectMemberDO.getName() + "、"; + } + } + vocationalProjectVO.setTeamMember(teamMember); + vocationalProjectVO.setMentor(mentor); + data.add(JSON.parseObject(JSON.toJSONString(vocationalProjectVO), Map.class)); + index++; + } + } + ExcelUtil.writeExcel(ExcelUtil.getField(VocationalProjectVO.class), data); + } + + @Override + public void exportProjectByGroup(ImportVocationalProjectDTO importVocationalProjectDTO) { + String projectSchedule = ""; +// if(importVocationalProjectDTO.getProjectGroup().equals(ProjectType.SECONDARY_GROUP)) { + projectSchedule = ProjectSchedule.SEMI_FINAL_REVIEW; +// } else if(importVocationalProjectDTO.getProjectGroup().equals(ProjectType.VOCATIONAL_GROUP)) { +// projectSchedule = ProjectSchedule.PRELIMINARY_REVIEW; +// } + + MatchDictDO matchDictDO = matchDictService.getById(importVocationalProjectDTO.getMatchId()); + + List list = this.baseMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectDO::getProjectSchedule, projectSchedule) + .eq(ProjectDO::getProjectType, importVocationalProjectDTO.getProjectType()) + .eq(ProjectDO::getCollege, importVocationalProjectDTO.getCollege()) + .eq(ProjectDO::getMatchId, importVocationalProjectDTO.getMatchId())); +// List data = new ArrayList<>(); + List result = new ArrayList<>(); + if (list.size() > 0) { + int index = 1; + for (ProjectDO projectDO : list) { + VocationalProjectVO vocationalProjectVO = new VocationalProjectVO(); + vocationalProjectVO.setId(Long.valueOf(index)); + vocationalProjectVO.setProjectName(projectDO.getProjectName()); + vocationalProjectVO.setProjectProgress(projectDO.getProjectProgress()); + + String teamMember = ""; + String mentor = ""; + + //老师 + List mentors = projectMemberService.list(new QueryWrapper() + .lambda() + .eq(ProjectMemberDO::getProjectId, projectDO.getId()) + .eq(ProjectMemberDO::getType, MemberType.MENTOR)); + for (int i = 0; i < mentors.size(); i++) { + if (i != mentors.size() - 1) { + mentor += mentors.get(i).getName() + "、"; + } else { + mentor += mentors.get(i).getName(); + } + } + + //学生--负责人 + List principle = projectMemberService.list(new QueryWrapper() + .lambda() + .eq(ProjectMemberDO::getProjectId, projectDO.getId()) + .eq(ProjectMemberDO::getType, MemberType.PRINCIPAL)); + for (ProjectMemberDO projectMemberDO : principle) { + vocationalProjectVO.setName(projectMemberDO.getName()); + if (projectMemberDO.getTelephone() == null) { + StudentDO studentDO = studentService.getById(projectDO.getProposerId()); + vocationalProjectVO.setTelephone(studentDO.getTelephone()); + } else { + vocationalProjectVO.setTelephone(projectMemberDO.getTelephone()); + } + } + + //学生--团队成员 + List members = projectMemberService.list(new QueryWrapper() + .lambda() + .eq(ProjectMemberDO::getProjectId, projectDO.getId()) + .eq(ProjectMemberDO::getType, MemberType.TEAM_MEMBER)); + for (int i = 0; i < members.size(); i++) { + if (i != members.size() - 1) { + teamMember += members.get(i).getName() + "、"; + } else { + teamMember += members.get(i).getName(); + } + } + + vocationalProjectVO.setTeamMember(teamMember); + vocationalProjectVO.setMentor(mentor); + result.add(vocationalProjectVO); + index++; + } + } + + //写PDF + PDFUtil.createProjectPDF(result, importVocationalProjectDTO.getCollege(), matchDictDO.getDeadline(), matchDictDO.getMatchName()); + } + + @Override + public VocationalNumVO getVocationalProjectNum(SeedTrackProjectNumDTO seedTrackProjectNumDTO) { + Map map = Localstorage.getMap(); + CollegesDictDO collegesDictDO = new CollegesDictDO(); + if (map.get("type").equals(Platform.school)) { + collegesDictDO = (CollegesDictDO) map.get("user"); + } + + List list = new ArrayList<>(); + if (map.get("type").equals(Platform.review)) { + ProjectJudgeDO projectJudgeDO = (ProjectJudgeDO) map.get("user"); + list = this.baseMapper.getListByJudgeId(seedTrackProjectNumDTO.getMatchId(), seedTrackProjectNumDTO.getProjectGroup(), projectJudgeDO.getId()); + } else { + list = this.baseMapper.getSeedTrackProjectList(seedTrackProjectNumDTO.getMatchId(), seedTrackProjectNumDTO.getProjectGroup(), collegesDictDO.getName(), null); + } + + VocationalNumVO vocationalNumVO = new VocationalNumVO(); + Integer schoolProjectNum = 0; + Integer registerNum = 0; + Integer rematchProjectNum = 0; + Integer finalProjectNum = 0; + if (list != null && list.size() > 0) { + for (ProjectDO projectDO : list) { + if (projectDO.getProjectSchedule().equals(ProjectSchedule.SCHOOL_REVIEW)) { + schoolProjectNum++; + } else if (projectDO.getProjectSchedule().equals(ProjectSchedule.REGISTER)) { + registerNum++; + } else if (projectDO.getProjectSchedule().equals(ProjectSchedule.SEMI_FINAL_REVIEW)) { + rematchProjectNum++; + } else if (projectDO.getProjectSchedule().equals(ProjectSchedule.FINAL_REVIEW)) { + finalProjectNum++; + } + } + } + vocationalNumVO.setRegisterNum(registerNum); + vocationalNumVO.setSchoolProjectNum(schoolProjectNum); + vocationalNumVO.setRematchNum(rematchProjectNum); + vocationalNumVO.setFinalNum(finalProjectNum); + return vocationalNumVO; + } + + @Override + public VocationalReviewNumVO getVocationalReviewNum(ReviewListDTO reviewListDTO) { + VocationalReviewNumVO vo = new VocationalReviewNumVO(); + List list = this.baseMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectDO::getMatchId, reviewListDTO.getMatchId()) + .and(w -> w.eq(ProjectDO::getProjectReview, ProjectReview.TO_SCORE) + .or() + .eq(ProjectDO::getProjectReview, ProjectReview.SUBMITTED)) + ); + + Long review = list.stream().filter(projectDO -> projectDO.getProjectReview().equals(ProjectReview.REVIEW) && + projectDO.getProjectSchedule().equals(reviewListDTO.getProjectStatus()) && projectDO.getProjectGroup().equals(reviewListDTO.getProjectGroup())).count(); + + Long notReview = list.stream().filter(projectDO -> projectDO.getProjectReview().equals(ProjectReview.TO_REVIEWED) && + projectDO.getProjectSchedule().equals(reviewListDTO.getProjectStatus()) && projectDO.getProjectGroup().equals(reviewListDTO.getProjectGroup())).count(); + + Long vocRematchNum = list.stream().filter(projectDO -> projectDO.getProjectSchedule().equals(ProjectSchedule.SEMI_FINAL_REVIEW) && projectDO.getProjectGroup().equals(ProjectType.SECONDARY_GROUP)).count(); + Long vocFinalNum = list.stream().filter(projectDO -> projectDO.getProjectSchedule().equals(ProjectSchedule.FINAL_REVIEW) && projectDO.getProjectGroup().equals(ProjectType.SECONDARY_GROUP)).count(); + Long secRematchNum = list.stream().filter(projectDO -> projectDO.getProjectSchedule().equals(ProjectSchedule.SEMI_FINAL_REVIEW) && projectDO.getProjectGroup().equals(ProjectType.VOCATIONAL_GROUP)).count(); + Long secFinalNum = list.stream().filter(projectDO -> projectDO.getProjectSchedule().equals(ProjectSchedule.FINAL_REVIEW) && projectDO.getProjectGroup().equals(ProjectType.VOCATIONAL_GROUP)).count(); +// Long secPreliminaryNUm = list.stream().filter(projectDO -> projectDO.getProjectSchedule().equals(ProjectSchedule.PRELIMINARY_REVIEW) && projectDO.getProjectGroup().equals(ProjectType.VOCATIONAL_GROUP)).count(); + + vo.setReview(review); + vo.setNotReview(notReview); + vo.setVocRematchNum(vocRematchNum); + vo.setVocFinalNum(vocFinalNum); + vo.setSecRematchNum(secRematchNum); + vo.setSecFinalNum(secFinalNum); +// vo.setSecPreliminaryNUm(secPreliminaryNUm); + return vo; + } + + @Override + public void exportProjectById(ReviewListDTO reviewListDTO) { + List data = new ArrayList<>(); + List fieldList = ExcelUtil.getField(ProjectJudgeVO.class); + ProjectJudgeVO projectJudgeVO = new ProjectJudgeVO(); + List projectList = this.baseMapper.getProjectById(reviewListDTO.getId().stream().toArray(Long[]::new)); + for (ProjectDO projectDO : projectList) { + if (projectDO != null) { + projectJudgeVO.setProjectName(projectDO.getProjectName()); + projectJudgeVO.setProjectProgress(projectDO.getProjectProgress()); + projectJudgeVO.setProjectSchedule(projectDO.getProjectSchedule()); + projectJudgeVO.setCollege(projectDO.getCollege()); + + MatchDictDO matchDictDO = matchDictService.getById(projectDO.getMatchId()); + if (matchDictDO != null) { + projectJudgeVO.setMatchName(matchDictDO.getMatchName()); + } + + StudentDO studentDO = studentService.getById(projectDO.getProposerId()); + if (studentDO != null) { + projectJudgeVO.setLeader(studentDO.getName()); + } + + Map map = JSON.parseObject(JSON.toJSONString(projectJudgeVO), Map.class); + List list = projectReviewService.list(new QueryWrapper() + .lambda() + .eq(ProjectReviewDO::getProjectSchedule, projectDO.getProjectSchedule()) + .eq(ProjectReviewDO::getProjectId, projectDO.getId())); + for (ProjectReviewDO projectReviewDO : list) { + ProjectJudgeDO projectJudgeDO = projectJudgeService.getById(projectReviewDO.getJudgeId()); + ExcelFieldVO excelFieldVO = new ExcelFieldVO(); + if (projectJudgeDO != null) { + if (!fieldList.stream().filter(e -> e.getName().equals(projectJudgeDO.getUsername())).findAny().isPresent()) { + excelFieldVO.setName(projectJudgeDO.getUsername()); + excelFieldVO.setField(projectJudgeDO.getUsername()); + fieldList.add(excelFieldVO); + } + + if (projectReviewDO.getScore() != null) { + map.put(projectJudgeDO.getUsername(), projectReviewDO.getScore().toString()); + } else { + map.put(projectJudgeDO.getUsername(), "-"); + } + } + } + data.add(map); + } + } + ExcelUtil.writeExcel(fieldList, data); + } + + @Override + public VocationalProjectNum getReviewVocationalNum(ReviewVocationalNumDTO reviewVocationalNumDTO) { + ProjectJudgeDO projectJudgeDO = (ProjectJudgeDO) Localstorage.getUser(); +// ProjectJudgeDO projectJudgeDO = projectJudgeService.getById(reviewVocationalNumDTO.getProjectJudgeId()); + if (projectJudgeDO == null) { + throw new HttpException(Code.TOKEN_EXPIRED.getCode(), Code.TOKEN_EXPIRED.getMessage()); + } + VocationalProjectNum vocationalProjectNum = new VocationalProjectNum(); + ProjectReviewPeriodDO projectReviewPeriodDO = projectReviewPeriodService.getOne(new QueryWrapper() + .lambda() + .eq(ProjectReviewPeriodDO::getMatchId, reviewVocationalNumDTO.getMatchId()) + .eq(ProjectReviewPeriodDO::getProjectGroup, reviewVocationalNumDTO.getProjectGroup()) + .eq(ProjectReviewPeriodDO::getProjectSchedule, reviewVocationalNumDTO.getProjectStatus())); + if (projectReviewPeriodDO != null) { + if ((new Date().after(projectReviewPeriodDO.getStartTime()) || + DateFormatUtil.format(new Date(), DateFormatUtil.FMT_sdf14_L).equals(DateFormatUtil.format(projectReviewPeriodDO.getStartTime(), DateFormatUtil.FMT_sdf14_L))) + && + (new Date().before(projectReviewPeriodDO.getEndTime()) || + DateFormatUtil.format(new Date(), DateFormatUtil.FMT_sdf14_L).equals(DateFormatUtil.format(projectReviewPeriodDO.getEndTime(), DateFormatUtil.FMT_sdf14_L)))) { + List list = this.baseMapper.getProjectReviewList(projectJudgeDO.getId(), reviewVocationalNumDTO.getMatchId(), null); + Long vocRematchNum = list.stream().filter(p -> p.getProjectSchedule().equals(ProjectSchedule.SEMI_FINAL_REVIEW) && p.getProjectGroup().equals(ProjectType.SECONDARY_GROUP)).count(); + Long vocFinalNum = list.stream().filter(p -> p.getProjectSchedule().equals(ProjectSchedule.FINAL_REVIEW) && p.getProjectGroup().equals(ProjectType.SECONDARY_GROUP)).count(); + Long secRematchNum = list.stream().filter(p -> p.getProjectSchedule().equals(ProjectSchedule.SEMI_FINAL_REVIEW) && p.getProjectGroup().equals(ProjectType.VOCATIONAL_GROUP)).count(); + Long secFinalNum = list.stream().filter(p -> p.getProjectSchedule().equals(ProjectSchedule.FINAL_REVIEW) && p.getProjectGroup().equals(ProjectType.VOCATIONAL_GROUP)).count(); +// Long secPreliminaryNUm = list.stream().filter(p -> p.getProjectSchedule().equals(ProjectSchedule.PRELIMINARY_REVIEW) && p.getProjectGroup().equals(ProjectType.VOCATIONAL_GROUP)).count(); + Long reviewedNum = list.stream().filter(p -> p.getProjectSchedule().equals(reviewVocationalNumDTO.getProjectStatus()) + && p.getProjectGroup().equals(reviewVocationalNumDTO.getProjectGroup()) && p.getProjectReview().equals(ProjectReview.REVIEW)).count(); + + Long notReviewedNum = list.stream().filter(p -> p.getProjectSchedule().equals(reviewVocationalNumDTO.getProjectStatus()) + && p.getProjectGroup().equals(reviewVocationalNumDTO.getProjectGroup()) && p.getProjectReview().equals(ProjectReview.ASSIGNED)).count(); + vocationalProjectNum.setVocRematchNum(vocRematchNum); + vocationalProjectNum.setVocFinalNum(vocFinalNum); + vocationalProjectNum.setSecRematchNum(secRematchNum); + vocationalProjectNum.setSecFinalNum(secFinalNum); +// vocationalProjectNum.setSecPreliminaryNUm(secPreliminaryNUm); + vocationalProjectNum.setReviewedNum(reviewedNum); + vocationalProjectNum.setNotReviewedNum(notReviewedNum); + } + } + return vocationalProjectNum; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void batchUpdateEditStatus(EditStatusDTO editStatusDTO) { + if (editStatusDTO.getIds().length > 0) { + for (Long id : editStatusDTO.getIds()) { + ProjectDO projectDO = new ProjectDO(); + projectDO.setId(id); + projectDO.setEditStatus(editStatusDTO.getEditStatus()); + this.baseMapper.updateById(projectDO); + } + } + } + + @Override + public void updateEditStatus(EditStatusDTO editStatusDTO) { + ProjectDO projectDO = new ProjectDO(); + projectDO.setId(editStatusDTO.getId()); + projectDO.setEditStatus(editStatusDTO.getEditStatus()); + this.baseMapper.updateById(projectDO); + } + + @Override + public void updateAllEditStatus(EditStatusDTO editStatusDTO) { + List list = this.baseMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectDO::getMatchId, editStatusDTO.getMatchId()) + .eq(ProjectDO::getProjectGroup, editStatusDTO.getProjectGroup()) + .eq(ProjectDO::getProjectSchedule, editStatusDTO.getProjectSchedule())); + if (list != null && list.size() > 0) { + for (ProjectDO projectDO : list) { + ProjectDO project = new ProjectDO(); + project.setId(projectDO.getId()); + project.setEditStatus(editStatusDTO.getEditStatus()); + this.baseMapper.updateById(project); + } + } + } + + @Override + public ProjectAssignNumVO getVocationalAssignNum(ReviewListDTO reviewListDTO) { + ProjectAssignNumVO projectAssignNumVO = new ProjectAssignNumVO(); + + List list = this.baseMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectDO::getMatchId, reviewListDTO.getMatchId()) + .isNotNull(ProjectDO::getProjectAssigned) + ); + + Long assignNum = list.stream().filter(projectDO -> projectDO.getProjectAssigned().equals(ProjectReview.ASSIGNED) && + projectDO.getProjectSchedule().equals(reviewListDTO.getProjectStatus()) && projectDO.getProjectGroup().equals(reviewListDTO.getProjectGroup())).count(); + + Long unassignedNum = list.stream().filter(projectDO -> projectDO.getProjectAssigned().equals(ProjectReview.UNASSIGNED) && + projectDO.getProjectSchedule().equals(reviewListDTO.getProjectStatus()) && projectDO.getProjectGroup().equals(reviewListDTO.getProjectGroup())).count(); + + Long vocRematchNum = list.stream().filter(projectDO -> projectDO.getProjectSchedule().equals(ProjectSchedule.SEMI_FINAL_REVIEW) && projectDO.getProjectGroup().equals(ProjectType.SECONDARY_GROUP)).count(); + Long vocFinalNum = list.stream().filter(projectDO -> projectDO.getProjectSchedule().equals(ProjectSchedule.FINAL_REVIEW) && projectDO.getProjectGroup().equals(ProjectType.SECONDARY_GROUP)).count(); + Long secRematchNum = list.stream().filter(projectDO -> projectDO.getProjectSchedule().equals(ProjectSchedule.SEMI_FINAL_REVIEW) && projectDO.getProjectGroup().equals(ProjectType.VOCATIONAL_GROUP)).count(); + Long secFinalNum = list.stream().filter(projectDO -> projectDO.getProjectSchedule().equals(ProjectSchedule.FINAL_REVIEW) && projectDO.getProjectGroup().equals(ProjectType.VOCATIONAL_GROUP)).count(); +// Long secPreliminaryNUm = list.stream().filter(projectDO -> projectDO.getProjectSchedule().equals(ProjectSchedule.PRELIMINARY_REVIEW) && projectDO.getProjectGroup().equals(ProjectType.VOCATIONAL_GROUP)).count(); + + projectAssignNumVO.setAssignNum(assignNum); + projectAssignNumVO.setUnassignedNum(unassignedNum); + projectAssignNumVO.setVocRematchNum(vocRematchNum); + projectAssignNumVO.setVocFinalNum(vocFinalNum); + projectAssignNumVO.setSecRematchNum(secRematchNum); + projectAssignNumVO.setSecFinalNum(secFinalNum); +// projectAssignNumVO.setSecPreliminaryNUm(secPreliminaryNUm); + return projectAssignNumVO; + } + +// @Override +// public ProjectDataOverview getCollegeVocationalDataOverview() { +// CollegesDictDO collegesDictDO = (CollegesDictDO) Localstorage.getUser(); +// if (collegesDictDO == null) { +// throw new HttpException(Code.TOKEN_EXPIRED.getCode(), Code.TOKEN_EXPIRED.getMessage()); +// } +// +// ProjectDataOverview projectDataOverview = new ProjectDataOverview(); +// +// /* +// 注册人数 +// */ +// Integer registeredNum = studentService.count(new QueryWrapper() +// .lambda() +// .eq(StudentDO::getCollege, collegesDictDO.getName())); +// projectDataOverview.setRegisteredNum(registeredNum); +// +// +// List list = this.baseMapper.selectListByCollege(ProjectType.VOCATIONAL, collegesDictDO.getName()); +// /* +// 全部项目数量 +// */ +// projectDataOverview.setProjectNum(list.size()); +// +// Integer schoolProjectNum = 0; +// Integer rematchProjectNum = 0; +// Integer finalProjectNum = 0; +// Integer preliminaryProjectNum = 0; +// +// Integer rematchBronzeAwardNum = 0; +// Integer rematchSilverAwardNum = 0; +// Integer rematchWinningAwardNum = 0; +// Integer finalsSilverAwardNum = 0; +// Integer finalsGoldAwardNum = 0; +// for (ProjectDO projectDO : list) { +// if (projectDO.getProjectSchedule().equals(ProjectSchedule.SCHOOL_REVIEW)) { +// /* +// 校内赛项目数 +// */ +// schoolProjectNum++; +// } else if(projectDO.getProjectSchedule().equals(ProjectSchedule.PRELIMINARY_REVIEW)) { +// /* +// 初赛项目数量 +// */ +// preliminaryProjectNum ++; +// } else if (projectDO.getProjectSchedule().equals(ProjectSchedule.SEMI_FINAL_REVIEW)) { +// /* +// 复赛项目数 +// */ +// rematchProjectNum++; +// } else if (projectDO.getProjectSchedule().equals(ProjectSchedule.FINAL_REVIEW)) { +// /* +// 决赛项目数 +// */ +// finalProjectNum++; +// } +// +// if (projectDO.getProjectStatus().equals(ProjectStatus.REMATCH_BRONZE_AWARD)) { +// rematchBronzeAwardNum++; +// } else if (projectDO.getProjectStatus().equals(ProjectStatus.REMATCH_SILVER_AWARD)) { +// rematchSilverAwardNum++; +// } else if (projectDO.getProjectStatus().equals(ProjectStatus.REMATCH_WINNING_AWARD)) { +// rematchWinningAwardNum++; +// } else if (projectDO.getProjectStatus().equals(ProjectStatus.REMATCH_FINALS_GOLD_AWARD)) { +// finalsGoldAwardNum++; +// } +// } +// +// projectDataOverview.setPreliminaryProjectNum(preliminaryProjectNum); +// projectDataOverview.setRematchBronzeAwardNum(rematchBronzeAwardNum); +// projectDataOverview.setRematchSilverAwardNum(rematchSilverAwardNum); +// projectDataOverview.setRematchWinningAwardNum(rematchWinningAwardNum); +// projectDataOverview.setFinalsSilverAwardNum(finalsSilverAwardNum); +// projectDataOverview.setFinalsGoldAwardNum(finalsGoldAwardNum); +// projectDataOverview.setSchoolProjectNum(schoolProjectNum + preliminaryProjectNum + rematchProjectNum + finalProjectNum); +// projectDataOverview.setRematchProjectNum(rematchProjectNum); +// /* +// 复赛比例 +// */ +// if (rematchProjectNum > 0 && schoolProjectNum > 0) { +// Double rematchProportion = new BigDecimal(rematchProjectNum).divide(new BigDecimal(preliminaryProjectNum + rematchProjectNum + finalProjectNum), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).doubleValue(); +// projectDataOverview.setRematchProportion(rematchProportion); +// } else { +// projectDataOverview.setRematchProportion(0.0); +// } +// +// projectDataOverview.setFinalProjectNum(finalProjectNum); +// /* +// 决赛比例 +// */ +// if (finalProjectNum > 0 && rematchProjectNum > 0) { +// Double finalProportion = new BigDecimal(finalProjectNum).divide(new BigDecimal(rematchProjectNum), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).doubleValue(); +// projectDataOverview.setFinalProportion(finalProportion); +// } else { +// projectDataOverview.setFinalProportion(0.0); +// } +// +// return projectDataOverview; +// } + + @Override + @Transactional(rollbackFor = Exception.class) + public void createMainTrackProject(CreateMainTrackProjectDTO createMainTrackProjectDTO) { + StudentDO studentDO = (StudentDO) Localstorage.getUser(); + if (studentDO == null) { + throw new HttpException(Code.TOKEN_EXPIRED.getCode(), Code.TOKEN_EXPIRED.getMessage()); + } + + ProjectDO project = this.baseMapper.selectOne(new QueryWrapper() + .lambda() + .eq(ProjectDO::getProposerId, studentDO.getId()) + .eq(ProjectDO::getProjectStatus, ProjectStatus.UN_SUBMITTED) + .eq(ProjectDO::getProjectName, createMainTrackProjectDTO.getProjectName())); + /** + * 根据申请人查询是不是存在同名称的项目 + */ + if (project == null) { + MatchDictDO matchDictDO = matchDictService.getOne(new QueryWrapper() + .lambda() + .eq(MatchDictDO::getMatchType, ProjectType.MAIN_TRACK) + .eq(MatchDictDO::getStatus, 1)); + + ProjectDO projectDO = new ProjectDO(); + BeanUtils.copyProperties(createMainTrackProjectDTO, projectDO); + projectDO.setCollege(studentDO.getCollege()); + projectDO.setProposerId(studentDO.getId()); + projectDO.setProjectSchedule(ProjectSchedule.SCHOOL_REVIEW); + projectDO.setProjectStatus(ProjectStatus.UN_SUBMITTED); + projectDO.setProjectType(ProjectType.MAIN_TRACK); + projectDO.setProjectGroup(ProjectType.MAIN_TRACK); + if (matchDictDO != null) { + projectDO.setMatchId(matchDictDO.getId()); + } + this.baseMapper.insert(projectDO); + + if (createMainTrackProjectDTO.getProjectProgress().equals("已注册公司")) { + if (createMainTrackProjectDTO.getPo().size() > 0) { + for (ProjectOwnershipStructureDO po : createMainTrackProjectDTO.getPo()) { + ProjectOwnershipStructureDO projectOwnershipStructureDO = new ProjectOwnershipStructureDO(); + BeanUtils.copyProperties(po, projectOwnershipStructureDO); + projectOwnershipStructureDO.setProjectId(projectDO.getId()); + projectOwnershipStructureService.save(projectOwnershipStructureDO); + } + } + } + + if (StringUtils.isNotBlank(createMainTrackProjectDTO.getMaterialsUrl())) { + ProjectMaterialsDO projectMaterialsDO = new ProjectMaterialsDO(); + projectMaterialsDO.setProjectId(projectDO.getId()); + projectMaterialsDO.setMaterialsName(createMainTrackProjectDTO.getMaterialsName()); + projectMaterialsDO.setMaterialsType(createMainTrackProjectDTO.getMaterialsType()); + projectMaterialsDO.setMaterialsSize(createMainTrackProjectDTO.getMaterialsSize()); + projectMaterialsDO.setMaterialsUrl(createMainTrackProjectDTO.getMaterialsUrl()); + projectMaterialsService.save(projectMaterialsDO); + } + } else if (project.getProjectStatus().equals(ProjectStatus.UN_SUBMITTED)) { + ProjectDO projectDO = new ProjectDO(); + BeanUtils.copyProperties(createMainTrackProjectDTO, projectDO); + projectDO.setId(project.getId()); + this.baseMapper.updateById(projectDO); + + /** + * 股权结构 + */ + if (createMainTrackProjectDTO.getPo().size() > 0) { + List posList = projectOwnershipStructureService.list(new QueryWrapper() + .lambda() + .eq(ProjectOwnershipStructureDO::getProjectId, projectDO.getId())); + + ProjectOwnershipStructureDO projectOwnershipStructureDO = new ProjectOwnershipStructureDO(); + for (ProjectOwnershipStructureDO po : createMainTrackProjectDTO.getPo()) { + /** + * 已存在股权结构:判断是否是新增还是修改 + */ + if (posList != null) { + for (ProjectOwnershipStructureDO ownershipStructureDO : posList) { + if (createMainTrackProjectDTO.getPo().stream().filter(p -> p.getShareholderName().equals(ownershipStructureDO.getShareholderName())).findAny().isPresent()) { + continue; + } else { + projectOwnershipStructureService.removeById(ownershipStructureDO.getId()); + } + } + + if (posList.stream().filter(p -> p.getShareholderName().equals(po.getShareholderName())).findAny().isPresent()) { + ProjectOwnershipStructureDO p = projectOwnershipStructureService.getOne(new QueryWrapper() + .lambda() + .eq(ProjectOwnershipStructureDO::getProjectId, projectDO.getId()) + .eq(ProjectOwnershipStructureDO::getShareholderName, po.getShareholderName())); + if (p != null) { + BeanUtils.copyProperties(po, projectOwnershipStructureDO); + projectOwnershipStructureDO.setId(p.getId()); + projectOwnershipStructureService.updateById(projectOwnershipStructureDO); + } + } else { + BeanUtils.copyProperties(po, projectOwnershipStructureDO); + projectOwnershipStructureDO.setProjectId(projectDO.getId()); + projectOwnershipStructureService.save(projectOwnershipStructureDO); + } + } else { + BeanUtils.copyProperties(po, projectOwnershipStructureDO); + projectOwnershipStructureDO.setProjectId(projectDO.getId()); + projectOwnershipStructureService.save(projectOwnershipStructureDO); + } + } + } + + /** + * 项目材料 + */ + ProjectMaterialsDO pm = projectMaterialsService.getOne(new QueryWrapper() + .lambda() + .eq(ProjectMaterialsDO::getProjectId, projectDO.getId())); + + ProjectMaterialsDO projectMaterialsDO = new ProjectMaterialsDO(); + if (StringUtils.isNotBlank(createMainTrackProjectDTO.getMaterialsUrl())) { + projectMaterialsDO.setProjectId(projectDO.getId()); + projectMaterialsDO.setMaterialsName(createMainTrackProjectDTO.getMaterialsName()); + projectMaterialsDO.setMaterialsType(createMainTrackProjectDTO.getMaterialsType()); + projectMaterialsDO.setMaterialsSize(createMainTrackProjectDTO.getMaterialsSize()); + projectMaterialsDO.setMaterialsUrl(createMainTrackProjectDTO.getMaterialsUrl()); + } + + if (pm == null) { + projectMaterialsService.save(projectMaterialsDO); + } else { + projectMaterialsDO.setId(pm.getId()); + projectMaterialsService.updateById(projectMaterialsDO); + } + } else { + throw new HttpException(10040); + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void createProjectMember(CreateProjectMemberDTO createProjectMemberDTO) { + StudentDO studentDO = (StudentDO) Localstorage.getUser(); + if (studentDO == null) { + throw new HttpException(Code.TOKEN_EXPIRED.getCode(), Code.TOKEN_EXPIRED.getMessage()); + } + + MatchDictDO matchDictDO = matchDictService.getOne(new QueryWrapper() + .lambda() + .eq(MatchDictDO::getMatchType, createProjectMemberDTO.getProjectType()) + .eq(MatchDictDO::getStatus, 1)); + if (matchDictDO == null) { + throw new HttpException(10054); + } + + ProjectDO project = this.baseMapper.selectOne(new QueryWrapper() + .lambda() + .eq(ProjectDO::getMatchId, matchDictDO.getId()) + .eq(ProjectDO::getProposerId, studentDO.getId()) + .eq(ProjectDO::getProjectStatus, ProjectStatus.UN_SUBMITTED) + .eq(ProjectDO::getProjectProgress, createProjectMemberDTO.getProjectGroup())); + if (project == null) { + throw new HttpException(10046); + } + + //five? 否 不变 是 学生 grade 123 中职 + if ("是".equals(createProjectMemberDTO.getFiveYears()) && ("一年级".equals(createProjectMemberDTO.getGrade()) || "二年级".equals(createProjectMemberDTO.getGrade()) || "三年级".equals(createProjectMemberDTO.getGrade()))) { + project.setProjectGroup("中职"); + this.baseMapper.updateById(project); + } else { + project.setProjectGroup("高职"); + this.baseMapper.updateById(project); + } + + /** + * 根据学号和姓名查询本项目下的负责人,如果有的则进行修改没有则新增 + */ + ProjectMemberDO projectMemberDO = projectMemberService.getOne(new QueryWrapper().lambda() + .eq(ProjectMemberDO::getProjectId, project.getId()) + .eq(ProjectMemberDO::getType, MemberType.PRINCIPAL)); + + ProjectMemberDO projectMember = new ProjectMemberDO(); + BeanUtils.copyProperties(createProjectMemberDTO, projectMember); + projectMember.setProjectId(project.getId()); + projectMember.setType(MemberType.PRINCIPAL); + if (projectMemberDO != null) { + projectMember.setId(projectMemberDO.getId()); + projectMemberService.updateById(projectMember); + } else { + projectMemberService.save(projectMember); + } + + /** + * 团队成员 + */ + if (createProjectMemberDTO.getTeamMember().size() > 0) { + + List list = projectMemberService.list(new QueryWrapper() + .lambda() + .eq(ProjectMemberDO::getProjectId, project.getId()) + .eq(ProjectMemberDO::getType, MemberType.TEAM_MEMBER)); + + for (ProjectMemberDO members : list) { + projectMemberService.removeById(members.getId()); + } + + for (TeamMemberDTO newMember : createProjectMemberDTO.getTeamMember()) { + ProjectMemberDO teamMember = new ProjectMemberDO(); + BeanUtils.copyProperties(newMember, teamMember); + teamMember.setTelephone(newMember.getTeamTelephone()); + teamMember.setName(newMember.getTeamName()); + teamMember.setProjectId(project.getId()); + teamMember.setType(MemberType.TEAM_MEMBER); + projectMemberService.save(teamMember); + } + + } + + /** + *指导老师 + */ + if (createProjectMemberDTO.getMentor().size() > 0) { + List list = projectMemberService.list(new QueryWrapper() + .lambda() + .eq(ProjectMemberDO::getProjectId, project.getId()) + .eq(ProjectMemberDO::getType, MemberType.MENTOR)); + + for (ProjectMemberDO mentorMember : list) { + projectMemberService.removeById(mentorMember.getId()); + } + + for (MentorDTO newMember : createProjectMemberDTO.getMentor()) { + ProjectMemberDO mentor = new ProjectMemberDO(); + BeanUtils.copyProperties(newMember, mentor); + mentor.setProjectId(project.getId()); + mentor.setName(newMember.getTeacherName()); + mentor.setType(MemberType.MENTOR); + projectMemberService.save(mentor); + } + +// for (MentorDTO mentorDTO : createProjectMemberDTO.getMentor()) { +// if (list.size() > 0) { +// for (ProjectMemberDO memberDO : list) { +// if (createProjectMemberDTO.getMentor().stream().filter(pm -> pm.getTelephone().equals(memberDO.getTelephone())).findAny().isPresent()) { +// continue; +// } else { +// projectMemberService.removeById(memberDO.getId()); +// } +// } +// } +// +// if (list.stream().filter(pm -> pm.getTelephone().equals(mentorDTO.getTelephone())).findAny().isPresent()) { +// ProjectMemberDO pmDO = projectMemberService.getOne(new QueryWrapper() +// .lambda() +// .eq(ProjectMemberDO::getProjectId, project.getId()) +// .eq(ProjectMemberDO::getName, mentorDTO.getTeacherName()) +// .eq(ProjectMemberDO::getTelephone, mentorDTO.getTelephone()) +// .eq(ProjectMemberDO::getType, MemberType.MENTOR)); +// if (pmDO != null) { +// ProjectMemberDO mentor = new ProjectMemberDO(); +// BeanUtils.copyProperties(mentorDTO, mentor); +// mentor.setName(mentorDTO.getTeacherName()); +// mentor.setId(pmDO.getId()); +// projectMemberService.updateById(mentor); +// } +// } else { +// if (mentorDTO != null && StringUtils.isNotBlank(mentorDTO.getTelephone())) { +// ProjectMemberDO mentor = new ProjectMemberDO(); +// BeanUtils.copyProperties(mentorDTO, mentor); +// mentor.setProjectId(project.getId()); +// mentor.setName(mentorDTO.getTeacherName()); +// mentor.setType(MemberType.MENTOR); +// projectMemberService.save(mentor); +// } +// } +// } + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void createVocationalMember(CreateProjectMemberDTO createProjectMemberDTO) { + StudentDO studentDO = (StudentDO) Localstorage.getUser(); + if (studentDO == null) { + throw new HttpException(Code.TOKEN_EXPIRED.getCode(), Code.TOKEN_EXPIRED.getMessage()); + } + + MatchDictDO matchDictDO = matchDictService.getOne(new QueryWrapper() + .lambda() + .eq(MatchDictDO::getMatchType, ProjectType.VOCATIONAL) + .eq(MatchDictDO::getStatus, 1)); + if (matchDictDO == null) { + throw new HttpException(10054); + } + + ProjectDO project = this.baseMapper.selectOne(new QueryWrapper() + .lambda() + .eq(ProjectDO::getMatchId, matchDictDO.getId()) + .eq(ProjectDO::getProposerId, studentDO.getId()) + .eq(ProjectDO::getProjectType, ProjectType.VOCATIONAL)); + if (project == null) { + throw new HttpException(10046); + } + + //five? 否 不变 是 学生 grade 123 中职 + if ("是".equals(createProjectMemberDTO.getFiveYears()) && ("一年级".equals(createProjectMemberDTO.getGrade()) || "二年级".equals(createProjectMemberDTO.getGrade()) || "三年级".equals(createProjectMemberDTO.getGrade()))) { + project.setProjectGroup("中职"); + this.baseMapper.updateById(project); + } else { + project.setProjectGroup("高职"); + this.baseMapper.updateById(project); + } + + /** + * 根据学号和姓名查询本项目下的负责人,如果有的则进行修改没有则新增 + */ + ProjectMemberDO projectMemberDO = projectMemberService.getOne(new QueryWrapper().lambda() + .eq(ProjectMemberDO::getProjectId, project.getId()) + .eq(ProjectMemberDO::getType, MemberType.PRINCIPAL)); + + ProjectMemberDO projectMember = new ProjectMemberDO(); + BeanUtils.copyProperties(createProjectMemberDTO, projectMember); + projectMember.setProjectId(project.getId()); + projectMember.setType(MemberType.PRINCIPAL); + projectMember.setTelephone(studentDO.getTelephone()); + projectMember.setIdCard(createProjectMemberDTO.getIdCard()); + if (projectMemberDO != null) { + projectMember.setId(projectMemberDO.getId()); + projectMemberService.updateById(projectMember); + } else { + projectMemberService.save(projectMember); + } + + /** + * 团队成员 + */ + if (createProjectMemberDTO.getTeamMember().size() > 0) { + List list = projectMemberService.list(new QueryWrapper() + .lambda() + .eq(ProjectMemberDO::getProjectId, project.getId()) + .eq(ProjectMemberDO::getType, MemberType.TEAM_MEMBER)); + + for (TeamMemberDTO teamMemberDTO : createProjectMemberDTO.getTeamMember()) { + if (list != null) { + for (ProjectMemberDO memberDO : list) { +// if (createProjectMemberDTO.getTeamMember().stream().filter(pm -> pm.getStudentNo().equals(memberDO.getStudentNo())).findAny().isPresent()) { +// continue; +// } else { + projectMemberService.removeById(memberDO.getId()); +// } + } + + //判断成员的手机号和负责人的手机号是不是一致 + StudentDO studentDO1 = studentService.getById(studentDO.getId()); + if (teamMemberDTO.getTeamTelephone().equals(studentDO1.getTelephone())) { + throw new HttpException(10068); + } + + /** + * 判断团队成员是不是存在数据库,如果存在进行修改不存在新增 + */ +// if (list.stream().filter(pm -> pm.getStudentNo().equals(teamMemberDTO.getStudentNo())).findAny().isPresent()) { +// ProjectMemberDO pm = projectMemberService.getOne(new QueryWrapper() +// .lambda() +// .eq(ProjectMemberDO::getProjectId, project.getId()) +// .eq(ProjectMemberDO::getName, teamMemberDTO.getTeamName()) +// .eq(ProjectMemberDO::getStudentNo, teamMemberDTO.getStudentNo()) +// .eq(ProjectMemberDO::getType, MemberType.TEAM_MEMBER)); +// if (pm != null) { +// ProjectMemberDO teamMember = new ProjectMemberDO(); +// BeanUtils.copyProperties(teamMemberDTO, teamMember); +// teamMember.setTelephone(teamMemberDTO.getTeamTelephone()); +// teamMember.setName(teamMemberDTO.getTeamName()); +// teamMember.setId(pm.getId()); +// projectMemberService.updateById(teamMember); +// } +// } else { + ProjectMemberDO teamMember = new ProjectMemberDO(); + BeanUtils.copyProperties(teamMemberDTO, teamMember); + teamMember.setTelephone(teamMemberDTO.getTeamTelephone()); + teamMember.setName(teamMemberDTO.getTeamName()); + teamMember.setProjectId(project.getId()); + teamMember.setType(MemberType.TEAM_MEMBER); + teamMember.setIdCard(teamMember.getIdCard()); + projectMemberService.save(teamMember); +// } + } +// else { +// ProjectMemberDO teamMember = new ProjectMemberDO(); +// BeanUtils.copyProperties(teamMemberDTO, teamMember); +// teamMember.setTelephone(teamMemberDTO.getTeamTelephone()); +// teamMember.setName(teamMemberDTO.getTeamName()); +// teamMember.setProjectId(project.getId()); +// teamMember.setType(MemberType.TEAM_MEMBER); +// projectMemberService.save(teamMember); +// } + } + } + + /** + *指导老师 + */ + if (createProjectMemberDTO.getMentor().size() > 0) { + long count = createProjectMemberDTO.getMentor().stream().map(MentorDTO::getTelephone).distinct().count(); + if (createProjectMemberDTO.getMentor().size() != count) { + throw new HttpException(10079); + } + + List list = projectMemberService.list(new QueryWrapper() + .lambda() + .eq(ProjectMemberDO::getProjectId, project.getId()) + .eq(ProjectMemberDO::getType, MemberType.MENTOR)); + for (MentorDTO mentorDTO : createProjectMemberDTO.getMentor()) { + if (list.size() > 0) { + for (ProjectMemberDO memberDO : list) { +// if (createProjectMemberDTO.getMentor().stream().filter(pm -> pm.getTelephone().equals(memberDO.getTelephone()) && pm.getTeacherName().equals(memberDO.getName())).findAny().isPresent()) { +// continue; +// } else { + projectMemberService.removeById(memberDO.getId()); +// } + } + } + +// if (list.stream().filter(pm -> pm.getTelephone().equals(mentorDTO.getTelephone()) && pm.getName().equals(mentorDTO.getTeacherName())).findAny().isPresent()) { +// ProjectMemberDO pmDO = projectMemberService.getOne(new QueryWrapper() +// .lambda() +// .eq(ProjectMemberDO::getProjectId, project.getId()) +// .eq(ProjectMemberDO::getName, mentorDTO.getTeacherName()) +// .eq(ProjectMemberDO::getTelephone, mentorDTO.getTelephone()) +// .eq(ProjectMemberDO::getType, MemberType.MENTOR)); +// if (pmDO != null) { +// ProjectMemberDO mentor = new ProjectMemberDO(); +// BeanUtils.copyProperties(mentorDTO, mentor); +// mentor.setName(mentorDTO.getTeacherName()); +// mentor.setId(pmDO.getId()); +// projectMemberService.updateById(mentor); +// } +// } else { + if (mentorDTO != null && StringUtils.isNotBlank(mentorDTO.getTelephone())) { + ProjectMemberDO mentor = new ProjectMemberDO(); + BeanUtils.copyProperties(mentorDTO, mentor); + mentor.setProjectId(project.getId()); + mentor.setName(mentorDTO.getTeacherName()); + mentor.setType(MemberType.MENTOR); + projectMemberService.save(mentor); + } +// } + } + } + + if (project.getEditStatus() == 0) { + ProjectDO projectDO = new ProjectDO(); + projectDO.setId(project.getId()); + projectDO.setProjectStatus(ProjectReview.TO_REVIEWED); + this.baseMapper.updateById(projectDO); + + ProjectScheduleRecordDO psr = projectScheduleRecordService.getOne(new QueryWrapper() + .lambda() + .eq(ProjectScheduleRecordDO::getProjectId, projectDO.getId()) + .eq(ProjectScheduleRecordDO::getProposerId, studentDO.getId())); + ProjectScheduleRecordDO scheduleRecordDO = new ProjectScheduleRecordDO(); + if (psr == null) { + scheduleRecordDO.setProjectId(project.getId()); + scheduleRecordDO.setProposerId(studentDO.getId()); + scheduleRecordDO.setMatchId(project.getMatchId()); + scheduleRecordDO.setCollege(studentDO.getCollege()); + scheduleRecordDO.setProjectType(project.getProjectType()); + scheduleRecordDO.setProjectSchedule(project.getProjectSchedule()); + scheduleRecordDO.setProjectStatus(ProjectReview.TO_REVIEWED); + projectScheduleRecordService.save(scheduleRecordDO); + } + } + } + + @Override + public void updateVocationalMember(CreateProjectMemberDTO createProjectMemberDTO) { + StudentDO studentDO = (StudentDO) Localstorage.getUser(); + if (studentDO == null) { + throw new HttpException(Code.TOKEN_EXPIRED.getCode(), Code.TOKEN_EXPIRED.getMessage()); + } + createProjectMemberDTO.setProjectType(ProjectType.VOCATIONAL); + createProjectMemberDTO.setProjectGroup(studentDO.getEducation()); + + MatchDictDO matchDictDO = matchDictService.getOne(new QueryWrapper() + .lambda() + .eq(MatchDictDO::getMatchType, createProjectMemberDTO.getProjectType()) + .eq(MatchDictDO::getStatus, 1)); + if (matchDictDO == null) { + throw new HttpException(10054); + } + + ProjectDO project = this.baseMapper.selectById(createProjectMemberDTO.getId()); + if (project == null) { + throw new HttpException(10046); + } + + /** + * 根据学号和姓名查询本项目下的负责人,如果有的则进行修改没有则新增 + */ + ProjectMemberDO projectMemberDO = projectMemberService.getOne(new QueryWrapper().lambda() + .eq(ProjectMemberDO::getProjectId, project.getId()) + .eq(ProjectMemberDO::getType, MemberType.PRINCIPAL)); + + ProjectMemberDO projectMember = new ProjectMemberDO(); + BeanUtils.copyProperties(createProjectMemberDTO, projectMember); + projectMember.setProjectId(project.getId()); + projectMember.setType(MemberType.PRINCIPAL); + if (projectMemberDO != null) { + projectMember.setId(projectMemberDO.getId()); + projectMemberService.updateById(projectMember); + } + + /** + * 团队成员 + */ + if (createProjectMemberDTO.getTeamMember().size() > 0) { + List list = projectMemberService.list(new QueryWrapper() + .lambda() + .eq(ProjectMemberDO::getProjectId, project.getId()) + .eq(ProjectMemberDO::getType, MemberType.TEAM_MEMBER)); + + for (TeamMemberDTO teamMemberDTO : createProjectMemberDTO.getTeamMember()) { + if (list != null) { + for (ProjectMemberDO memberDO : list) { + if (createProjectMemberDTO.getTeamMember().stream().filter(pm -> pm.getStudentNo().equals(memberDO.getStudentNo())).findAny().isPresent()) { + continue; + } else { + projectMemberService.removeById(memberDO.getId()); + } + } + + /** + * 判断团队成员是不是存在数据库,如果存在进行修改不存在新增 + */ + if (list.stream().filter(pm -> pm.getStudentNo().equals(teamMemberDTO.getStudentNo())).findAny().isPresent()) { + ProjectMemberDO pm = projectMemberService.getOne(new QueryWrapper() + .lambda() + .eq(ProjectMemberDO::getProjectId, project.getId()) + .eq(ProjectMemberDO::getName, teamMemberDTO.getTeamName()) + .eq(ProjectMemberDO::getStudentNo, teamMemberDTO.getStudentNo()) + .eq(ProjectMemberDO::getType, MemberType.TEAM_MEMBER)); + if (pm != null) { + ProjectMemberDO teamMember = new ProjectMemberDO(); + BeanUtils.copyProperties(teamMemberDTO, teamMember); + teamMember.setTelephone(teamMemberDTO.getTeamTelephone()); + teamMember.setName(teamMemberDTO.getTeamName()); + teamMember.setId(pm.getId()); + projectMemberService.updateById(teamMember); + } + } else { + ProjectMemberDO teamMember = new ProjectMemberDO(); + BeanUtils.copyProperties(teamMemberDTO, teamMember); + teamMember.setTelephone(teamMemberDTO.getTeamTelephone()); + teamMember.setName(teamMemberDTO.getTeamName()); + teamMember.setProjectId(project.getId()); + teamMember.setType(MemberType.TEAM_MEMBER); + projectMemberService.save(teamMember); + } + } else { + ProjectMemberDO teamMember = new ProjectMemberDO(); + BeanUtils.copyProperties(teamMemberDTO, teamMember); + teamMember.setTelephone(teamMemberDTO.getTeamTelephone()); + teamMember.setName(teamMemberDTO.getTeamName()); + teamMember.setProjectId(project.getId()); + teamMember.setType(MemberType.TEAM_MEMBER); + projectMemberService.save(teamMember); + } + } + } + + /** + *指导老师 + */ + if (createProjectMemberDTO.getMentor().size() > 0) { + List list = projectMemberService.list(new QueryWrapper() + .lambda() + .eq(ProjectMemberDO::getProjectId, project.getId()) + .eq(ProjectMemberDO::getType, MemberType.MENTOR)); + for (MentorDTO mentorDTO : createProjectMemberDTO.getMentor()) { + if (list.size() > 0) { + for (ProjectMemberDO memberDO : list) { + if (createProjectMemberDTO.getMentor().stream().filter(pm -> pm.getTelephone().equals(memberDO.getTelephone())).findAny().isPresent()) { + continue; + } else { + projectMemberService.removeById(memberDO.getId()); + } + } + } + + if (list.stream().filter(pm -> pm.getTelephone().equals(mentorDTO.getTelephone())).findAny().isPresent()) { + ProjectMemberDO pmDO = projectMemberService.getOne(new QueryWrapper() + .lambda() + .eq(ProjectMemberDO::getProjectId, project.getId()) + .eq(ProjectMemberDO::getTelephone, mentorDTO.getTelephone()) + .eq(ProjectMemberDO::getType, MemberType.MENTOR)); + if (pmDO != null) { + ProjectMemberDO mentor = new ProjectMemberDO(); + BeanUtils.copyProperties(mentorDTO, mentor); + mentor.setName(mentorDTO.getTeacherName()); + mentor.setId(pmDO.getId()); + projectMemberService.updateById(mentor); + } + } else { + if (mentorDTO != null && StringUtils.isNotBlank(mentorDTO.getTelephone())) { + ProjectMemberDO mentor = new ProjectMemberDO(); + BeanUtils.copyProperties(mentorDTO, mentor); + mentor.setProjectId(project.getId()); + mentor.setName(mentorDTO.getTeacherName()); + mentor.setType(MemberType.MENTOR); + projectMemberService.save(mentor); + } + } + } + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void withdrawn(ProjectDO projectDO) { + StudentDO studentDO = (StudentDO) Localstorage.getUser(); +// StudentDO studentDO = studentService.getById(7228); + if (studentDO == null) { + throw new HttpException(Code.TOKEN_EXPIRED.getCode(), Code.TOKEN_EXPIRED.getMessage()); + } + + ProjectDO project = this.baseMapper.selectOne(new QueryWrapper() + .lambda() + .eq(ProjectDO::getId, projectDO.getId()) + .eq(ProjectDO::getProposerId, studentDO.getId())); + if (project == null) { + throw new HttpException(10044); + } + + if (project.getProjectType().equals(ProjectType.VOCATIONAL)) { + //职教 + if (!project.getProjectSchedule().equals(ProjectSchedule.REGISTER)) { + throw new HttpException(10045); + } + } else { + //种子 + if (!project.getProjectSchedule().equals(ProjectSchedule.SCHOOL_REVIEW)) { + throw new HttpException(10045); + } + } + + if (project.getProjectStatus().equals(ProjectStatus.SCHOOL_NOT_PASSED)) { + throw new HttpException(10045); + } + + MatchDictDO matchDictDO = matchDictService.getById(project.getMatchId()); + if (new Date().before(matchDictDO.getStartTime()) || new Date().after(matchDictDO.getEndTime())) { + throw new HttpException(10078); + } + + ProjectScheduleRecordDO projectScheduleRecordDO = projectScheduleRecordService.getOne(new QueryWrapper() + .lambda() + .eq(ProjectScheduleRecordDO::getProjectId, project.getId()) + .eq(ProjectScheduleRecordDO::getProjectSchedule, project.getProjectSchedule())); + if (projectScheduleRecordDO != null) { + projectScheduleRecordService.removeById(projectScheduleRecordDO.getId()); + } + + ProjectDO pd = new ProjectDO(); + pd.setId(project.getId()); + pd.setProjectStatus(ProjectStatus.UN_SUBMITTED); + this.baseMapper.updateById(pd); + } + + @Override + public IPage getSeedTrackProject(ProjectListPageDTO projectListPageDTO) { + StudentDO studentDO = (StudentDO) Localstorage.getUser(); + if (studentDO == null) { + throw new HttpException(Code.TOKEN_EXPIRED.getCode(), Code.TOKEN_EXPIRED.getMessage()); + } + + IPage iPage = this.baseMapper.getListPage(new Page(projectListPageDTO.getPageNo(), projectListPageDTO.getPageSize()), projectListPageDTO.getMatchId(), studentDO.getId(), ProjectType.SEED_TRACK); + for (ProjectPageVO record : iPage.getRecords()) { + MatchDictDO matchDictDO = matchDictService.getById(record.getMatchId()); + if (matchDictDO != null) { + record.setMatchName(matchDictDO.getMatchName()); + } + + if (!record.getProjectStatus().equals(ProjectStatus.UN_SUBMITTED) + && !record.getProjectStatus().equals(ProjectReview.TO_REVIEWED)) { + record.setReviewResult(record.getProjectStatus()); + record.setProjectStatus(ProjectReview.REVIEW); + } + } + return iPage; + } + + @Override + public void createSeedTrackProject(CreateSeedTrackProjectDTO createSeedTrackProjectDTO) { + StudentDO studentDO = (StudentDO) Localstorage.getUser(); + if (studentDO == null) { + throw new HttpException(Code.TOKEN_EXPIRED.getCode(), Code.TOKEN_EXPIRED.getMessage()); + } + + MatchDictDO matchDictDO = matchDictService.getOne(new QueryWrapper() + .lambda() + .eq(MatchDictDO::getMatchType, ProjectType.SEED_TRACK) + .eq(MatchDictDO::getStatus, 1)); + if (matchDictDO == null) { + throw new HttpException(10054); + } + + ProjectDO project = this.baseMapper.selectOne(new QueryWrapper() + .lambda() + .eq(ProjectDO::getMatchId, matchDictDO.getId()) + .eq(ProjectDO::getProposerId, studentDO.getId()) + .eq(ProjectDO::getProjectStatus, ProjectStatus.UN_SUBMITTED) +// .eq(ProjectDO::getProjectGroup, studentDO.getEducation()) + .eq(ProjectDO::getProjectProgress, createSeedTrackProjectDTO.getProjectProgress()) + ); + + ProjectDO projectDO = new ProjectDO(); + BeanUtils.copyProperties(createSeedTrackProjectDTO, projectDO); + projectDO.setCollege(studentDO.getCollege()); + + List str = createSeedTrackProjectDTO.getClassification(); + if (null != str && str.size() > 0) { + String classification = ""; + for (String s : str) { + classification += s + ","; + } + projectDO.setClassification(classification.substring(0, classification.length() - 1)); + } else if (createSeedTrackProjectDTO.getProjectProgress().equals(ProjectType.CULTURAL_CREATIVE_GROUP)) { + projectDO.setClassification(createSeedTrackProjectDTO.getCulClassification()); + } + +// List showFormList = createSeedTrackProjectDTO.getRoadShowForm(); +// if (showFormList != null && showFormList.size() > 0) { +// String showForm = ""; +// for (String s : showFormList) { +// showForm += s + ","; +// } +// projectDO.setRoadShowForm(showForm.substring(0, showForm.length() - 1)); +// } + + List restrictionList = createSeedTrackProjectDTO.getRestriction(); + if (restrictionList != null && restrictionList.size() > 0) { + String restriction = ""; + for (String s : restrictionList) { + restriction += s + ","; + } + projectDO.setRestriction(restriction.substring(0, restriction.length() - 1)); + } + + projectDO.setProposerId(studentDO.getId()); + if (matchDictDO != null) { + projectDO.setMatchId(matchDictDO.getId()); + } + projectDO.setProjectStatus(ProjectStatus.UN_SUBMITTED); + projectDO.setProjectSchedule(ProjectSchedule.SCHOOL_REVIEW); + projectDO.setProjectType(ProjectType.SEED_TRACK); + projectDO.setProjectGroup(studentDO.getEducation()); + if (project == null) { + this.baseMapper.insert(projectDO); + } else { + projectDO.setId(project.getId()); + this.baseMapper.updateById(projectDO); + } + + if (createSeedTrackProjectDTO.getMaterials().size() > 0) { + List list = projectMaterialsService.list(new QueryWrapper() + .lambda() + .eq(ProjectMaterialsDO::getProjectId, projectDO.getId())); + if (list.size() > 0) { + for (ProjectMaterialsDO projectMaterialsDO : list) { + if (createSeedTrackProjectDTO.getMaterials().stream().filter(pm -> pm.getMaterialsName().equals(projectMaterialsDO.getMaterialsName()) && + pm.getMaterialsType().equals(projectMaterialsDO.getMaterialsType())).findAny().isPresent()) { + continue; + } else { + projectMaterialsService.removeById(projectMaterialsDO.getId()); + } + } + } + + for (ProjectMaterialsDO material : createSeedTrackProjectDTO.getMaterials()) { + if (list.size() == 0) { + ProjectMaterialsDO projectMaterialsDO = new ProjectMaterialsDO(); + BeanUtils.copyProperties(material, projectMaterialsDO); + projectMaterialsDO.setProjectId(projectDO.getId()); + projectMaterialsService.save(projectMaterialsDO); + } else { + if (list.stream().filter(pm -> pm.getMaterialsName().equals(material.getMaterialsName()) && + pm.getMaterialsType().equals(material.getMaterialsType())).findAny().isPresent()) { + /*ProjectMaterialsDO pmDO = projectMaterialsService.getOne(new QueryWrapper() + .lambda() + .eq(ProjectMaterialsDO::getProjectId, projectDO.getId()) + .eq(ProjectMaterialsDO::getMaterialsName, material.getMaterialsName()) + .eq(ProjectMaterialsDO::getMaterialsType, material.getMaterialsType())); + if(pmDO != null) { + ProjectMaterialsDO projectMaterialsDO = new ProjectMaterialsDO(); + BeanUtils.copyProperties(material, projectMaterialsDO); + projectMaterialsDO.setId(pmDO.getId()); + projectMaterialsService.updateById(projectMaterialsDO); + }*/ + continue; + } else { + ProjectMaterialsDO projectMaterialsDO = new ProjectMaterialsDO(); + BeanUtils.copyProperties(material, projectMaterialsDO); + projectMaterialsDO.setProjectId(projectDO.getId()); + projectMaterialsService.save(projectMaterialsDO); + } + } + } + } + } + + @Override + public VocationalProjectInfoVO getVocationalProjectById() { + StudentDO studentDO = (StudentDO) Localstorage.getUser(); +// StudentDO studentDO = studentService.getById(7228); + if (studentDO == null) { + throw new HttpException(Code.TOKEN_EXPIRED.getCode(), Code.TOKEN_EXPIRED.getMessage()); + } + + MatchDictDO matchDictDO = matchDictService.getOne(new QueryWrapper() + .lambda() + .eq(MatchDictDO::getMatchType, ProjectType.VOCATIONAL) + .eq(MatchDictDO::getStatus, 1)); + + if (matchDictDO == null) { + throw new HttpException(10057); + } + + VocationalProjectInfoVO projectInfoVO = new VocationalProjectInfoVO(); + ProjectDO projectDO = this.baseMapper.selectOne(new QueryWrapper() + .lambda() + .eq(ProjectDO::getMatchId, matchDictDO.getId()) + .eq(ProjectDO::getProposerId, studentDO.getId())); + if (projectDO != null) { + BeanUtils.copyProperties(projectDO, projectInfoVO); + + ProjectMaterialsDO projectMaterialsDO = projectMaterialsService.getOne(new QueryWrapper() + .lambda() + .eq(ProjectMaterialsDO::getProjectId, projectDO.getId())); + if (projectMaterialsDO != null) { + projectInfoVO.setMaterialsName(projectMaterialsDO.getMaterialsName()); + projectInfoVO.setMaterialsSize(projectMaterialsDO.getMaterialsSize()); + projectInfoVO.setMaterialsType(projectMaterialsDO.getMaterialsType()); + projectInfoVO.setMaterialsUrl(projectMaterialsDO.getMaterialsUrl()); + } + + // 股权结构 + List ownershipStructureDOList = projectOwnershipStructureService.list(new QueryWrapper() + .lambda() + .eq(ProjectOwnershipStructureDO::getProjectId, projectDO.getId())); + projectInfoVO.setOwnership(ownershipStructureDOList); + + /** + * 专利 + */ + List patentDOList = patentMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectPatentDO::getProjectId, projectDO.getId())); + projectInfoVO.setPatent(patentDOList); + + /** + * 论文 + */ + List paperDOList = paperMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectPaperDO::getProjectId, projectDO.getId())); + projectInfoVO.setPaper(paperDOList); + + /** + * 奖项 + */ + List awardDOList = awardMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectAwardDO::getProjectId, projectDO.getId())); + projectInfoVO.setAward(awardDOList); + + /** + * 软件著作权 + */ + List copyrightDOList = copyrightMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectCopyrightDO::getProjectId, projectDO.getId())); + projectInfoVO.setCopyright(copyrightDOList); + + /** + * 作品著作 + */ + List worksDOList = worksMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectWorksDO::getProjectId, projectDO.getId())); + projectInfoVO.setWorks(worksDOList); + + /** + * 商标 + */ + List trademarkDOList = trademarkMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectTrademarkDO::getProjectId, projectDO.getId())); + projectInfoVO.setTrademark(trademarkDOList); + } + return projectInfoVO; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void createVocationalProject(CreateVocationalProjectDTO createVocationalProjectDTO) { + StudentDO studentDO = (StudentDO) Localstorage.getUser(); + if (studentDO == null) { + throw new HttpException(Code.TOKEN_EXPIRED.getCode(), Code.TOKEN_EXPIRED.getMessage()); + } + + MatchDictDO matchDictDO = matchDictService.getOne(new QueryWrapper() + .lambda() + .eq(MatchDictDO::getMatchType, ProjectType.VOCATIONAL) + .eq(MatchDictDO::getStatus, 1)); + if (matchDictDO == null) { + throw new HttpException(10054); + } + + if (new Date().before(matchDictDO.getStartTime()) || new Date().after(matchDictDO.getEndTime())) { + throw new HttpException(10057); + } + + ProjectDO po = this.baseMapper.selectOne(new QueryWrapper() + .lambda() + .eq(ProjectDO::getMatchId, matchDictDO.getId()) + .eq(ProjectDO::getProposerId, studentDO.getId()) + .eq(ProjectDO::getProjectType, ProjectType.VOCATIONAL)); + /** + * 验证是否存在过项目,决赛开启编辑不需要进行验证,填写中的项目也不需要进行验证 + */ + if (po != null && po.getEditStatus() == 0 && !po.getProjectStatus().equals(ProjectStatus.UN_SUBMITTED)) { + throw new HttpException(10040); + } + + ProjectDO projectDO = new ProjectDO(); + BeanUtils.copyProperties(createVocationalProjectDTO, projectDO); + projectDO.setCollege(studentDO.getCollege()); + + /** + * 第一次创建项目设置基础状态,开启编辑不需要进行设置 + */ + if (po == null) { + projectDO.setProposerId(studentDO.getId()); + if (matchDictDO != null) { + projectDO.setMatchId(matchDictDO.getId()); + } + projectDO.setProjectStatus(ProjectStatus.UN_SUBMITTED); + projectDO.setProjectSchedule(ProjectSchedule.REGISTER); + projectDO.setProjectType(ProjectType.VOCATIONAL); + projectDO.setProjectGroup(studentDO.getEducation()); + } + + if (po == null) { + this.baseMapper.insert(projectDO); + } else { + projectDO.setId(po.getId()); + this.baseMapper.updateById(projectDO); + } + + /** + * 项目材料 + */ + ProjectMaterialsDO projectMaterialsDO = projectMaterialsService.getOne(new QueryWrapper() + .lambda() + .eq(ProjectMaterialsDO::getProjectId, projectDO.getId())); + + ProjectMaterialsDO materialsDO = new ProjectMaterialsDO(); + materialsDO.setMaterialsName(createVocationalProjectDTO.getMaterialsName()); + materialsDO.setMaterialsSize(createVocationalProjectDTO.getMaterialsSize()); + materialsDO.setMaterialsType(createVocationalProjectDTO.getMaterialsType()); + materialsDO.setMaterialsUrl(createVocationalProjectDTO.getMaterialsUrl()); + materialsDO.setProjectId(projectDO.getId()); + if (projectMaterialsDO == null) { + projectMaterialsService.save(materialsDO); + } else { + materialsDO.setId(projectMaterialsDO.getId()); + projectMaterialsService.updateById(materialsDO); + } + + /** + * 项目股权 + */ + if (createVocationalProjectDTO.getOwnership() != null && createVocationalProjectDTO.getOwnership().size() > 0) { + List list = projectOwnershipStructureService.list(new QueryWrapper() + .lambda() + .eq(ProjectOwnershipStructureDO::getProjectId, projectDO.getId())); + if (list != null) { + projectOwnershipStructureService.removeByIds(list.stream().map(ProjectOwnershipStructureDO::getId).collect(Collectors.toList())); + } + + for (ProjectOwnershipStructureDO projectOwnershipStructureDO : createVocationalProjectDTO.getOwnership()) { + projectOwnershipStructureDO.setProjectId(projectDO.getId()); + projectOwnershipStructureService.save(projectOwnershipStructureDO); + } + } + + /** + * 专利 + */ + if (createVocationalProjectDTO.getPatent() != null && createVocationalProjectDTO.getPatent().size() > 0) { + List list = patentMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectPatentDO::getProjectId, projectDO.getId())); + if (list != null && list.size() > 0) { + patentMapper.deleteBatchIds(list.stream().map(ProjectPatentDO::getId).collect(Collectors.toList())); + } + + for (ProjectPatentDO patentDO : createVocationalProjectDTO.getPatent()) { + patentDO.setProjectId(projectDO.getId()); + patentMapper.insert(patentDO); + } + } + + /** + * 论文 + */ + if (createVocationalProjectDTO.getPaper() != null && createVocationalProjectDTO.getPaper().size() > 0) { + List list = paperMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectPaperDO::getProjectId, projectDO.getId())); + if (list != null && list.size() > 0) { + paperMapper.deleteBatchIds(list.stream().map(ProjectPaperDO::getId).collect(Collectors.toList())); + } + + for (ProjectPaperDO projectPaperDO : createVocationalProjectDTO.getPaper()) { + projectPaperDO.setProjectId(projectDO.getId()); + paperMapper.insert(projectPaperDO); + } + } + + /** + * 奖项 + */ + if (createVocationalProjectDTO.getAward() != null && createVocationalProjectDTO.getAward().size() > 0) { + List list = awardMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectAwardDO::getProjectId, projectDO.getId())); + if (list != null && list.size() > 0) { + awardMapper.deleteBatchIds(list.stream().map(ProjectAwardDO::getId).collect(Collectors.toList())); + } + + for (ProjectAwardDO projectAwardDO : createVocationalProjectDTO.getAward()) { + projectAwardDO.setProjectId(projectDO.getId()); + awardMapper.insert(projectAwardDO); + } + } + + /** + * 软件著作权 + */ + if (createVocationalProjectDTO.getCopyright() != null && createVocationalProjectDTO.getCopyright().size() > 0) { + List list = copyrightMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectCopyrightDO::getProjectId, projectDO.getId())); + if (list != null && list.size() > 0) { + copyrightMapper.deleteBatchIds(list.stream().map(ProjectCopyrightDO::getId).collect(Collectors.toList())); + } + + for (ProjectCopyrightDO projectCopyrightDO : createVocationalProjectDTO.getCopyright()) { + projectCopyrightDO.setProjectId(projectDO.getId()); + copyrightMapper.insert(projectCopyrightDO); + } + } + + /** + * 作品著作 + */ + if (createVocationalProjectDTO.getWorks() != null && createVocationalProjectDTO.getWorks().size() > 0) { + List list = worksMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectWorksDO::getProjectId, projectDO.getId())); + if (list != null && list.size() > 0) { + worksMapper.deleteBatchIds(list.stream().map(ProjectWorksDO::getId).collect(Collectors.toList())); + } + + for (ProjectWorksDO work : createVocationalProjectDTO.getWorks()) { + work.setProjectId(projectDO.getId()); + worksMapper.insert(work); + } + } + + /** + * 商标 + */ + if (createVocationalProjectDTO.getTrademark() != null && createVocationalProjectDTO.getTrademark().size() > 0) { + List list = trademarkMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectTrademarkDO::getProjectId, projectDO.getId())); + if (list != null && list.size() > 0) { + trademarkMapper.deleteBatchIds(list.stream().map(ProjectTrademarkDO::getId).collect(Collectors.toList())); + } + + for (ProjectTrademarkDO projectTrademarkDO : createVocationalProjectDTO.getTrademark()) { + projectTrademarkDO.setProjectId(projectDO.getId()); + trademarkMapper.insert(projectTrademarkDO); + } + } + } + + @Override + public void updateVocationalProject(CreateVocationalProjectDTO createVocationalProjectDTO) { + StudentDO studentDO = (StudentDO) Localstorage.getUser(); + if (studentDO == null) { + throw new HttpException(Code.TOKEN_EXPIRED.getCode(), Code.TOKEN_EXPIRED.getMessage()); + } + + MatchDictDO matchDictDO = matchDictService.getOne(new QueryWrapper() + .lambda() + .eq(MatchDictDO::getMatchType, ProjectType.VOCATIONAL) + .eq(MatchDictDO::getStatus, 1)); + if (matchDictDO == null) { + throw new HttpException(10054); + } + + ProjectDO po = this.baseMapper.selectById(createVocationalProjectDTO.getId()); + if (po == null) { + throw new HttpException(10046); + } + + ProjectDO projectDO = new ProjectDO(); + BeanUtils.copyProperties(createVocationalProjectDTO, projectDO); + this.baseMapper.updateById(projectDO); + + /** + * 项目材料 + */ + ProjectMaterialsDO projectMaterialsDO = projectMaterialsService.getOne(new QueryWrapper() + .lambda() + .eq(ProjectMaterialsDO::getProjectId, projectDO.getId())); + + ProjectMaterialsDO materialsDO = new ProjectMaterialsDO(); + materialsDO.setMaterialsName(createVocationalProjectDTO.getMaterialsName()); + materialsDO.setMaterialsSize(createVocationalProjectDTO.getMaterialsSize()); + materialsDO.setMaterialsType(createVocationalProjectDTO.getMaterialsType()); + materialsDO.setMaterialsUrl(createVocationalProjectDTO.getMaterialsUrl()); + materialsDO.setProjectId(projectDO.getId()); + if (projectMaterialsDO == null) { + projectMaterialsService.save(materialsDO); + } else { + materialsDO.setId(projectMaterialsDO.getId()); + projectMaterialsService.updateById(materialsDO); + } + + /** + * 项目股权 + */ + List owList = projectOwnershipStructureService.list(new QueryWrapper() + .lambda() + .eq(ProjectOwnershipStructureDO::getProjectId, projectDO.getId())); + if (createVocationalProjectDTO.getOwnership() != null && createVocationalProjectDTO.getOwnership().size() > 0) { + if (owList != null) { + projectOwnershipStructureService.removeByIds(owList.stream().map(ProjectOwnershipStructureDO::getId).collect(Collectors.toList())); + } + + for (ProjectOwnershipStructureDO projectOwnershipStructureDO : createVocationalProjectDTO.getOwnership()) { + projectOwnershipStructureDO.setProjectId(projectDO.getId()); + projectOwnershipStructureService.save(projectOwnershipStructureDO); + } + } else { + if (owList != null) { + projectOwnershipStructureService.removeByIds(owList.stream().map(ProjectOwnershipStructureDO::getId).collect(Collectors.toList())); + } + } + + /** + * 专利 + */ + List patentList = patentMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectPatentDO::getProjectId, projectDO.getId())); + if (createVocationalProjectDTO.getPatent() != null && createVocationalProjectDTO.getPatent().size() > 0) { + if (patentList != null && patentList.size() > 0) { + patentMapper.deleteBatchIds(patentList.stream().map(ProjectPatentDO::getId).collect(Collectors.toList())); + } + + for (ProjectPatentDO patentDO : createVocationalProjectDTO.getPatent()) { + patentDO.setProjectId(projectDO.getId()); + patentMapper.insert(patentDO); + } + } else { + if (patentList != null && patentList.size() > 0) { + patentMapper.deleteBatchIds(patentList.stream().map(ProjectPatentDO::getId).collect(Collectors.toList())); + } + } + + /** + * 论文 + */ + List paperList = paperMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectPaperDO::getProjectId, projectDO.getId())); + if (createVocationalProjectDTO.getPaper() != null && createVocationalProjectDTO.getPaper().size() > 0) { + if (paperList != null && paperList.size() > 0) { + paperMapper.deleteBatchIds(paperList.stream().map(ProjectPaperDO::getId).collect(Collectors.toList())); + } + + for (ProjectPaperDO projectPaperDO : createVocationalProjectDTO.getPaper()) { + projectPaperDO.setProjectId(projectDO.getId()); + paperMapper.insert(projectPaperDO); + } + } else { + if (paperList != null && paperList.size() > 0) { + paperMapper.deleteBatchIds(paperList.stream().map(ProjectPaperDO::getId).collect(Collectors.toList())); + } + } + + /** + * 奖项 + */ + List awardList = awardMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectAwardDO::getProjectId, projectDO.getId())); + if (createVocationalProjectDTO.getAward() != null && createVocationalProjectDTO.getAward().size() > 0) { + if (awardList != null && awardList.size() > 0) { + awardMapper.deleteBatchIds(awardList.stream().map(ProjectAwardDO::getId).collect(Collectors.toList())); + } + + for (ProjectAwardDO projectAwardDO : createVocationalProjectDTO.getAward()) { + projectAwardDO.setProjectId(projectDO.getId()); + awardMapper.insert(projectAwardDO); + } + } else { + if (awardList != null && awardList.size() > 0) { + awardMapper.deleteBatchIds(awardList.stream().map(ProjectAwardDO::getId).collect(Collectors.toList())); + } + } + + /** + * 软件著作权 + */ + List copyrightList = copyrightMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectCopyrightDO::getProjectId, projectDO.getId())); + if (createVocationalProjectDTO.getCopyright() != null && createVocationalProjectDTO.getCopyright().size() > 0) { + if (copyrightList != null && copyrightList.size() > 0) { + copyrightMapper.deleteBatchIds(copyrightList.stream().map(ProjectCopyrightDO::getId).collect(Collectors.toList())); + } + + for (ProjectCopyrightDO projectCopyrightDO : createVocationalProjectDTO.getCopyright()) { + projectCopyrightDO.setProjectId(projectDO.getId()); + copyrightMapper.insert(projectCopyrightDO); + } + } else { + if (copyrightList != null && copyrightList.size() > 0) { + copyrightMapper.deleteBatchIds(copyrightList.stream().map(ProjectCopyrightDO::getId).collect(Collectors.toList())); + } + } + + /** + * 作品著作 + */ + List worksDOList = worksMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectWorksDO::getProjectId, projectDO.getId())); + if (createVocationalProjectDTO.getWorks() != null && createVocationalProjectDTO.getWorks().size() > 0) { + if (worksDOList != null && worksDOList.size() > 0) { + worksMapper.deleteBatchIds(worksDOList.stream().map(ProjectWorksDO::getId).collect(Collectors.toList())); + } + + for (ProjectWorksDO work : createVocationalProjectDTO.getWorks()) { + work.setProjectId(projectDO.getId()); + worksMapper.insert(work); + } + } else { + if (worksDOList != null && worksDOList.size() > 0) { + worksMapper.deleteBatchIds(worksDOList.stream().map(ProjectWorksDO::getId).collect(Collectors.toList())); + } + } + + /** + * 商标 + */ + List trademarkDOList = trademarkMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectTrademarkDO::getProjectId, projectDO.getId())); + if (createVocationalProjectDTO.getTrademark() != null && createVocationalProjectDTO.getTrademark().size() > 0) { + if (trademarkDOList != null && trademarkDOList.size() > 0) { + trademarkMapper.deleteBatchIds(trademarkDOList.stream().map(ProjectTrademarkDO::getId).collect(Collectors.toList())); + } + + for (ProjectTrademarkDO projectTrademarkDO : createVocationalProjectDTO.getTrademark()) { + projectTrademarkDO.setProjectId(projectDO.getId()); + trademarkMapper.insert(projectTrademarkDO); + } + } else { + if (trademarkDOList != null && trademarkDOList.size() > 0) { + trademarkMapper.deleteBatchIds(trademarkDOList.stream().map(ProjectTrademarkDO::getId).collect(Collectors.toList())); + } + } + } + + @Override + public ProjectInfoVO getMainTrackProjectById() { + StudentDO studentDO = (StudentDO) Localstorage.getUser(); + if (studentDO == null) { + throw new HttpException(Code.TOKEN_EXPIRED.getCode(), Code.TOKEN_EXPIRED.getMessage()); + } + + MatchDictDO matchDictDO = matchDictService.getOne(new QueryWrapper() + .lambda() + .eq(MatchDictDO::getMatchType, ProjectType.SEED_TRACK) + .eq(MatchDictDO::getStatus, 1)); + + if (matchDictDO == null) { + throw new HttpException(10057); + } + + ProjectInfoVO projectInfoVO = new ProjectInfoVO(); + ProjectDO projectDO = this.baseMapper.selectOne(new QueryWrapper() + .lambda() + .eq(ProjectDO::getMatchId, matchDictDO.getId()) + .eq(ProjectDO::getProposerId, studentDO.getId()) + .eq(ProjectDO::getProjectStatus, ProjectStatus.UN_SUBMITTED) + .eq(ProjectDO::getProjectType, ProjectType.MAIN_TRACK)); + if (projectDO != null) { + BeanUtils.copyProperties(projectDO, projectInfoVO); + + List list = projectOwnershipStructureService.list(new QueryWrapper() + .lambda() + .eq(ProjectOwnershipStructureDO::getProjectId, projectDO.getId())); + projectInfoVO.setPo(list); + + ProjectMaterialsDO projectMaterialsDO = projectMaterialsService.getOne(new QueryWrapper() + .lambda() + .eq(ProjectMaterialsDO::getProjectId, projectDO.getId())); + if (projectMaterialsDO != null) { + projectInfoVO.setMaterialsName(projectMaterialsDO.getMaterialsName()); + projectInfoVO.setMaterialsSize(projectMaterialsDO.getMaterialsSize()); + projectInfoVO.setMaterialsType(projectMaterialsDO.getMaterialsType()); + projectInfoVO.setMaterialsUrl(projectMaterialsDO.getMaterialsUrl()); + } + } + return projectInfoVO; + } + + @Override + public ProjectMemberVO getProjectMemberById() { + StudentDO studentDO = (StudentDO) Localstorage.getUser(); + if (studentDO == null) { + throw new HttpException(Code.TOKEN_EXPIRED.getCode(), Code.TOKEN_EXPIRED.getMessage()); + } + + ProjectDO projectDO = this.baseMapper.selectOne(new QueryWrapper() + .lambda() + .eq(ProjectDO::getProposerId, studentDO.getId()) + .eq(ProjectDO::getProjectType, ProjectType.MAIN_TRACK) + .eq(ProjectDO::getProjectStatus, ProjectStatus.UN_SUBMITTED)); + + if (projectDO == null) { + throw new HttpException(10046); + } + + ProjectMemberVO projectMemberVO = new ProjectMemberVO(); + List list = projectMemberService.list(new QueryWrapper() + .lambda() + .eq(ProjectMemberDO::getProjectId, projectDO.getId())); + List teamMember = new ArrayList<>(); + List mentor = new ArrayList<>(); + for (ProjectMemberDO projectMemberDO : list) { + if (projectMemberDO.getType().equals(MemberType.PRINCIPAL)) { + BeanUtils.copyProperties(projectMemberDO, projectMemberVO); + } else if (projectMemberDO.getType().equals(MemberType.TEAM_MEMBER)) { + TeamMemberDTO teamMemberDTO = new TeamMemberDTO(); + BeanUtils.copyProperties(projectMemberDO, teamMemberDTO); + teamMember.add(teamMemberDTO); + } else if (projectMemberDO.getType().equals(MemberType.MENTOR)) { + MentorDTO mentorDTO = new MentorDTO(); + BeanUtils.copyProperties(projectMemberDO, mentorDTO); + mentor.add(mentorDTO); + } + } + projectMemberVO.setTeamMember(teamMember); + projectMemberVO.setMentor(mentor); + return projectMemberVO; + } + + @Override + public ProjectInfoVO getSeedTrackProjectById() { + StudentDO studentDO = (StudentDO) Localstorage.getUser(); + if (studentDO == null) { + throw new HttpException(Code.TOKEN_EXPIRED.getCode(), Code.TOKEN_EXPIRED.getMessage()); + } + + MatchDictDO matchDictDO = matchDictService.getOne(new QueryWrapper() + .lambda() + .eq(MatchDictDO::getMatchType, ProjectType.SEED_TRACK) + .eq(MatchDictDO::getStatus, 1)); + + if (matchDictDO == null) { + throw new HttpException(10057); + } + + ProjectInfoVO projectInfoVO = new ProjectInfoVO(); + projectInfoVO.setFillInProgress(1); + ProjectDO projectDO = this.baseMapper.selectOne(new QueryWrapper() + .lambda() + .eq(ProjectDO::getMatchId, matchDictDO.getId()) + .eq(ProjectDO::getProjectProgress, ProjectType.TECHNOLOGY_INNOVATION_GROUP) + .eq(ProjectDO::getProposerId, studentDO.getId()) + .eq(ProjectDO::getProjectStatus, ProjectStatus.UN_SUBMITTED)); + + if (projectDO != null) { + BeanUtils.copyProperties(projectDO, projectInfoVO); +// projectInfoVO.setRoadShowForm(Arrays.stream(projectDO.getRoadShowForm().split(",")).collect(Collectors.toList())); + projectInfoVO.setClassification(Arrays.stream(projectDO.getClassification().split(",")).collect(Collectors.toList())); + projectInfoVO.setRestriction(Arrays.stream(projectDO.getRestriction().split(",")).collect(Collectors.toList())); + + List list = projectMaterialsService.list(new QueryWrapper() + .lambda() + .eq(ProjectMaterialsDO::getProjectId, projectDO.getId())); + projectInfoVO.setMaterials(list); + + Integer memberCount = projectMemberService.count(new QueryWrapper() + .lambda() + .eq(ProjectMemberDO::getProjectId, projectDO.getId())); + if (memberCount > 0) { + projectInfoVO.setFillInProgress(2); + } + + if (projectDO.getPrintAttachment() != null) { + projectInfoVO.setFillInProgress(3); + } + } + return projectInfoVO; + } + + @Override + public ProjectInfoVO getCulturalProjectById() { + StudentDO studentDO = (StudentDO) Localstorage.getUser(); + if (studentDO == null) { + throw new HttpException(Code.TOKEN_EXPIRED.getCode(), Code.TOKEN_EXPIRED.getMessage()); + } + + MatchDictDO matchDictDO = matchDictService.getOne(new QueryWrapper() + .lambda() + .eq(MatchDictDO::getMatchType, ProjectType.SEED_TRACK) + .eq(MatchDictDO::getStatus, 1)); + + if (matchDictDO == null) { + throw new HttpException(10057); + } + + ProjectInfoVO projectInfoVO = new ProjectInfoVO(); + projectInfoVO.setFillInProgress(1); + ProjectDO projectDO = this.baseMapper.selectOne(new QueryWrapper() + .lambda() + .eq(ProjectDO::getMatchId, matchDictDO.getId()) + .eq(ProjectDO::getProjectProgress, ProjectType.CULTURAL_CREATIVE_GROUP) + .eq(ProjectDO::getProposerId, studentDO.getId()) + .eq(ProjectDO::getProjectStatus, ProjectStatus.UN_SUBMITTED)); + if (projectDO != null) { + BeanUtils.copyProperties(projectDO, projectInfoVO); +// projectInfoVO.setRoadShowForm(Arrays.stream(projectDO.getRoadShowForm().split(",")).collect(Collectors.toList())); + projectInfoVO.setCulClassification(projectDO.getClassification()); + + List list = projectMaterialsService.list(new QueryWrapper() + .lambda() + .eq(ProjectMaterialsDO::getProjectId, projectDO.getId())); + projectInfoVO.setMaterials(list); + + Integer memberCount = projectMemberService.count(new QueryWrapper() + .lambda() + .eq(ProjectMemberDO::getProjectId, projectDO.getId())); + if (memberCount > 0) { + projectInfoVO.setFillInProgress(2); + } + + if (projectDO.getPrintAttachment() != null) { + projectInfoVO.setFillInProgress(3); + } + } + + return projectInfoVO; + } + + @Override + public IPage getMainTrackProjectPage(ProjectListPageDTO projectListPageDTO) { + Page page = new Page(projectListPageDTO.getPageNo(), projectListPageDTO.getPageSize()); + IPage iPage = this.baseMapper.getMainTrackProjectPage(page, projectListPageDTO.getMatchId(), projectListPageDTO.getProjectGroup(), MemberType.PRINCIPAL, ProjectType.MAIN_TRACK, + projectListPageDTO.getProjectSchedule(), projectListPageDTO.getProjectStatus(), projectListPageDTO.getItemField(), projectListPageDTO.getName()); + for (MainTrackProjectPageVO record : iPage.getRecords()) { + ProjectMaterialsDO projectMaterialsDO = projectMaterialsService.getOne(new QueryWrapper() + .lambda() + .eq(ProjectMaterialsDO::getProjectId, record.getId())); + if (projectMaterialsDO != null) { + record.setMaterialsName(projectMaterialsDO.getMaterialsName()); + record.setMaterialsSize(projectMaterialsDO.getMaterialsSize()); + record.setMaterialsType(projectMaterialsDO.getMaterialsType()); + record.setMaterialsUrl(projectMaterialsDO.getMaterialsUrl()); + } + } + return iPage; + } + + @Override + public MainTrackProjectDetailVO getMainTrackProjectDetail(Long id) { + MainTrackProjectDetailVO mainTrackProjectDetailVO = new MainTrackProjectDetailVO(); + ProjectDO projectDO = this.baseMapper.selectById(id); + if (projectDO != null) { + BeanUtils.copyProperties(projectDO, mainTrackProjectDetailVO); + + /** + * 股权结构 + */ + List list = projectOwnershipStructureService.list(new QueryWrapper() + .lambda() + .eq(ProjectOwnershipStructureDO::getProjectId, id)); + mainTrackProjectDetailVO.setPo(list); + + /** + * 项目计划书/项目材料 + */ + ProjectMaterialsDO projectMaterialsDO = projectMaterialsService.getOne(new QueryWrapper() + .lambda() + .eq(ProjectMaterialsDO::getProjectId, id)); + if (projectMaterialsDO != null) { + mainTrackProjectDetailVO.setMaterialsName(projectMaterialsDO.getMaterialsName()); + mainTrackProjectDetailVO.setMaterialsSize(projectMaterialsDO.getMaterialsSize()); + mainTrackProjectDetailVO.setMaterialsType(projectMaterialsDO.getMaterialsType()); + mainTrackProjectDetailVO.setMaterialsUrl(projectMaterialsDO.getMaterialsUrl()); + } + + /** + * 项目成员(负责人、成员、指导老师) + */ + List memberList = projectMemberService.list(new QueryWrapper() + .lambda() + .eq(ProjectMemberDO::getProjectId, projectDO.getId())); + List mentor = new ArrayList<>(); + List teamMember = new ArrayList<>(); + for (ProjectMemberDO projectMemberDO : memberList) { + if (projectMemberDO.getType().equals(MemberType.PRINCIPAL)) { // 负责人 + mainTrackProjectDetailVO.setName(projectMemberDO.getName()); + mainTrackProjectDetailVO.setSchool(projectMemberDO.getSchool()); + mainTrackProjectDetailVO.setGrade(projectMemberDO.getGrade()); + mainTrackProjectDetailVO.setMajor(projectMemberDO.getMajor()); + mainTrackProjectDetailVO.setSex(projectMemberDO.getSex()); + mainTrackProjectDetailVO.setStudentNo(projectMemberDO.getStudentNo()); + } else if (projectMemberDO.getType().equals(MemberType.TEAM_MEMBER)) { // 成员 + TeamMemberDTO teamMemberDTO = new TeamMemberDTO(); + BeanUtils.copyProperties(projectMemberDO, teamMemberDTO); + teamMember.add(teamMemberDTO); + } else if (projectMemberDO.getType().equals(MemberType.MENTOR)) { // 指导老师 + MentorDTO mentorDTO = new MentorDTO(); + BeanUtils.copyProperties(projectMemberDO, mentorDTO); + mentor.add(mentorDTO); + } + } + mainTrackProjectDetailVO.setTeamMember(teamMember); + mainTrackProjectDetailVO.setMentor(mentor); + } + return mainTrackProjectDetailVO; + } + + @Override + public IPage getSeedTrackProjectPage(ProjectListPageDTO projectListPageDTO) { + Page page = new Page(projectListPageDTO.getPageNo(), projectListPageDTO.getPageSize()); + Long matchId = null; + if (projectListPageDTO.getMatchId() == null) { + MatchDictDO matchDictDO = matchDictService.getOne(new QueryWrapper() + .lambda() + .eq(MatchDictDO::getStatus, 1) + .eq(MatchDictDO::getMatchType, ProjectType.SEED_TRACK)); + if (matchDictDO != null) { + matchId = matchDictDO.getId(); + } + } else { + matchId = projectListPageDTO.getMatchId(); + } + + IPage iPage = this.baseMapper.getSeedTrackProjectPage(page, matchId, projectListPageDTO.getProjectGroup(), MemberType.PRINCIPAL, ProjectType.SEED_TRACK, null, + projectListPageDTO.getProjectSchedule(), projectListPageDTO.getProjectStatus(), projectListPageDTO.getItemField(), projectListPageDTO.getName(), projectListPageDTO.getProjectProgress()); + for (SeedTrackProjectPageVO record : iPage.getRecords()) { + List list = projectMaterialsService.list(new QueryWrapper() + .lambda() + .eq(ProjectMaterialsDO::getProjectId, record.getId())); + record.setMaterials(list); + } + return iPage; + } + + @Override + public IPage getSeedTrackProjectList(ProjectListPageDTO projectListPageDTO) { + CollegesDictDO collegesDictDO = (CollegesDictDO) Localstorage.getUser(); + if (collegesDictDO == null) { + throw new HttpException(Code.TOKEN_EXPIRED.getCode(), Code.TOKEN_EXPIRED.getMessage()); + } + + Page page = new Page(projectListPageDTO.getPageNo(), projectListPageDTO.getPageSize()); + IPage iPage = this.baseMapper.getSeedTrackProjectPage(page, projectListPageDTO.getMatchId(), projectListPageDTO.getProjectGroup(), MemberType.PRINCIPAL, ProjectType.SEED_TRACK, collegesDictDO.getName(), + projectListPageDTO.getProjectSchedule(), projectListPageDTO.getProjectStatus(), projectListPageDTO.getItemField(), projectListPageDTO.getName(), projectListPageDTO.getProjectProgress()); + for (SeedTrackProjectPageVO record : iPage.getRecords()) { + List list = projectMaterialsService.list(new QueryWrapper() + .lambda() + .eq(ProjectMaterialsDO::getProjectId, record.getId())); + record.setMaterials(list); + } + return iPage; + } + + @Override + public void downloadPDF(String projectGroup) { + StudentDO studentDO = (StudentDO) Localstorage.getUser(); + if (studentDO == null) { + throw new HttpException(Code.TOKEN_EXPIRED.getCode(), Code.TOKEN_EXPIRED.getMessage()); + } + + MatchDictDO matchDictDO = matchDictService.getOne(new QueryWrapper() + .lambda() + .eq(MatchDictDO::getMatchType, ProjectType.SEED_TRACK) + .eq(MatchDictDO::getStatus, 1)); + + SeedTrackProjectVO seedTrackProjectVO = new SeedTrackProjectVO(); + ProjectDO project = this.baseMapper.selectOne(new QueryWrapper() + .lambda() + .eq(ProjectDO::getProposerId, studentDO.getId()) + .eq(ProjectDO::getProjectProgress, projectGroup) + .eq(ProjectDO::getProjectStatus, ProjectStatus.UN_SUBMITTED) + .eq(ProjectDO::getMatchId, matchDictDO.getId())); + if (project != null) { +// MatchDictDO matchDictDO = matchDictService.getById(project.getMatchId()); + + BeanUtils.copyProperties(project, seedTrackProjectVO); + List list = projectMemberService.list(new QueryWrapper() + .lambda() + .eq(ProjectMemberDO::getProjectId, project.getId())); + List teamMember = new ArrayList<>(); + List mentor = new ArrayList<>(); + for (ProjectMemberDO projectMemberDO : list) { + if (projectMemberDO.getType().equals(MemberType.PRINCIPAL)) { + seedTrackProjectVO.setName(projectMemberDO.getName()); + seedTrackProjectVO.setSchool(projectMemberDO.getSchool()); + seedTrackProjectVO.setGrade(projectMemberDO.getGrade()); + seedTrackProjectVO.setMajor(projectMemberDO.getMajor()); + seedTrackProjectVO.setSex(projectMemberDO.getSex()); + seedTrackProjectVO.setTelephone(projectMemberDO.getTelephone()); + seedTrackProjectVO.setStudentNo(projectMemberDO.getStudentNo()); + } else if (projectMemberDO.getType().equals(MemberType.TEAM_MEMBER)) { + TeamMemberDTO teamMemberDTO = new TeamMemberDTO(); + BeanUtils.copyProperties(projectMemberDO, teamMemberDTO); + teamMemberDTO.setTeamName(projectMemberDO.getName()); + teamMemberDTO.setTeamTelephone(projectMemberDO.getTelephone()); + teamMember.add(teamMemberDTO); + } else if (projectMemberDO.getType().equals(MemberType.MENTOR)) { + MentorDTO mentorDTO = new MentorDTO(); + BeanUtils.copyProperties(projectMemberDO, mentorDTO); + mentorDTO.setTeacherName(projectMemberDO.getName()); + mentor.add(mentorDTO); + } + } + seedTrackProjectVO.setTeamMember(teamMember); + seedTrackProjectVO.setMentor(mentor); + PDFUtil.create(matchDictDO.getMatchDate(), matchDictDO, project.getProjectProgress(), seedTrackProjectVO); + } + } + + @Override + public SeedTrackProjectDetailVO getSeedTrackProjectDetail(Long id) { + Map map = Localstorage.getMap(); + String type = (String) map.get("type"); + ProjectJudgeDO projectJudge = new ProjectJudgeDO(); + CollegesDictDO collegesDict = new CollegesDictDO(); + if (type.equals(Platform.review)) { + projectJudge = (ProjectJudgeDO) map.get("user"); + } else if (type.equals(Platform.school)) { + collegesDict = (CollegesDictDO) map.get("user"); + } + + SeedTrackProjectDetailVO seedTrackProjectDetailVO = new SeedTrackProjectDetailVO(); + ProjectDO projectDO = this.baseMapper.selectById(id); + if (projectDO != null) { + BeanUtils.copyProperties(projectDO, seedTrackProjectDetailVO); + List materials = projectMaterialsService.list(new QueryWrapper() + .lambda() + .eq(ProjectMaterialsDO::getProjectId, projectDO.getId())); + seedTrackProjectDetailVO.setMaterials(materials); + + List list = projectMemberService.list(new QueryWrapper() + .lambda() + .eq(ProjectMemberDO::getProjectId, projectDO.getId())); + List teamMember = new ArrayList<>(); + List mentor = new ArrayList<>(); + for (ProjectMemberDO projectMemberDO : list) { + if (projectMemberDO.getType().equals(MemberType.PRINCIPAL)) { + seedTrackProjectDetailVO.setName(projectMemberDO.getName()); + seedTrackProjectDetailVO.setSchool(projectMemberDO.getSchool()); + seedTrackProjectDetailVO.setGrade(projectMemberDO.getGrade()); + seedTrackProjectDetailVO.setMajor(projectMemberDO.getMajor()); + seedTrackProjectDetailVO.setSex(projectMemberDO.getSex()); + seedTrackProjectDetailVO.setTelephone(projectMemberDO.getTelephone()); + seedTrackProjectDetailVO.setStudentNo(projectMemberDO.getStudentNo()); + seedTrackProjectDetailVO.setIdCard(projectMemberDO.getIdCard()); + seedTrackProjectDetailVO.setFiveYears(projectMemberDO.getFiveYears()); + } else if (projectMemberDO.getType().equals(MemberType.TEAM_MEMBER)) { + TeamMemberDTO teamMemberDTO = new TeamMemberDTO(); + teamMemberDTO.setId(projectMemberDO.getId()); + teamMemberDTO.setGrade(projectMemberDO.getGrade()); + teamMemberDTO.setMajor(projectMemberDO.getMajor()); + teamMemberDTO.setSchool(projectMemberDO.getSchool()); + teamMemberDTO.setSex(projectMemberDO.getSex()); + teamMemberDTO.setStudentNo(projectMemberDO.getStudentNo()); + teamMemberDTO.setTeamName(projectMemberDO.getName()); + teamMemberDTO.setTeamTelephone(projectMemberDO.getTelephone()); + teamMemberDTO.setIdCard(projectMemberDO.getIdCard()); + teamMember.add(teamMemberDTO); + } else if (projectMemberDO.getType().equals(MemberType.MENTOR)) { + MentorDTO mentorDTO = new MentorDTO(); + mentorDTO.setId(projectMemberDO.getId()); + mentorDTO.setCompany(projectMemberDO.getCompany()); + mentorDTO.setPosition(projectMemberDO.getPosition()); + mentorDTO.setPositionTitle(projectMemberDO.getPositionTitle()); + mentorDTO.setTeacherName(projectMemberDO.getName()); + mentorDTO.setTelephone(projectMemberDO.getTelephone()); + mentorDTO.setIdCard(projectMemberDO.getIdCard()); + mentor.add(mentorDTO); + } + } + seedTrackProjectDetailVO.setMentor(mentor); + seedTrackProjectDetailVO.setTeamMember(teamMember); + + QueryWrapper queryWrapper = new QueryWrapper(); + if (projectJudge.getId() != null) { + queryWrapper.lambda().eq(ProjectReviewDO::getJudgeId, projectJudge.getId()); + } + queryWrapper.lambda().eq(ProjectReviewDO::getProjectId, id); + List review = projectReviewService.list(queryWrapper); + if (review.size() > 0) { + List rematch = new ArrayList<>(); + List finals = new ArrayList<>(); + for (ProjectReviewDO pr : review) { + ProjectJudgeDO projectJudgeDO = projectJudgeService.getById(pr.getJudgeId()); + if (pr.getProjectSchedule().equals(ProjectSchedule.SEMI_FINAL_REVIEW)) { + ReMatchReviewVO reMatchReviewVO = new ReMatchReviewVO(); + reMatchReviewVO.setId(pr.getId()); + if (projectJudgeDO != null) { + reMatchReviewVO.setRematchJudgeName(projectJudgeDO.getUsername()); + } + + if (collegesDict.getId() == null) { + reMatchReviewVO.setRematchScore(pr.getScore()); + } + reMatchReviewVO.setRematchTime(DateFormatUtil.format(pr.getReviewTime(), DateFormatUtil.FMT_sdf_yMd)); + rematch.add(reMatchReviewVO); + } else { + FinalsReviewVO finalsReviewVO = new FinalsReviewVO(); + finalsReviewVO.setId(pr.getId()); + if (projectJudgeDO != null) { + finalsReviewVO.setFinalsJudgeName(projectJudgeDO.getUsername()); + } + + if (collegesDict.getId() == null) { + finalsReviewVO.setFinalsScore(pr.getScore()); + } + finalsReviewVO.setFinalsTime(DateFormatUtil.format(pr.getReviewTime(), DateFormatUtil.FMT_sdf_yMd)); + finals.add(finalsReviewVO); + } + } + seedTrackProjectDetailVO.setRematch(rematch); + seedTrackProjectDetailVO.setFinals(finals); + } + + if (projectJudge.getId() != null) { + ProjectReviewDO projectReviewDO = projectReviewService.getOne(new QueryWrapper() + .lambda() + .eq(ProjectReviewDO::getProjectId, id) + .eq(ProjectReviewDO::getProjectSchedule, projectDO.getProjectSchedule()) + .eq(ProjectReviewDO::getJudgeId, projectJudge.getId())); + if (projectReviewDO != null) { + if (projectReviewDO.getReviewStatus().equals(ProjectReview.SUBMITTED)) { + seedTrackProjectDetailVO.setReviewStatus(ProjectReview.SUBMITTED); + } + seedTrackProjectDetailVO.setReviewScore(projectReviewDO.getReviewScore()); + } + } + } + return seedTrackProjectDetailVO; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void batchPass(ApproveDTO approveDTO) { + for (Long id : approveDTO.getIds()) { + ProjectDO projectDO = this.baseMapper.selectById(id); + if (projectDO == null) { + throw new HttpException(10046); + } + + ProjectDO project = new ProjectDO(); + project.setId(projectDO.getId()); + + if (ProjectSchedule.REGISTER.equals(projectDO.getProjectSchedule())) { + project.setProjectSchedule(ProjectSchedule.SCHOOL_REVIEW); + } else if (ProjectReview.TO_REVIEWED.equals(projectDO.getProjectStatus()) + && ProjectSchedule.SCHOOL_REVIEW.equals(projectDO.getProjectSchedule())) { + /** + * 校内赛通过 ---> 复赛审核 + * + * 校内赛上报规则:按组别每十个项目中可以进行一个项目申报 + */ + Map map = Localstorage.getMap(); + + if (map.get("type").equals(Platform.school)) { + CollegesDictDO collegesDictDO = (CollegesDictDO) map.get("user"); + if (collegesDictDO == null) { + throw new HttpException(Code.TOKEN_EXPIRED.getCode(), Code.TOKEN_EXPIRED.getMessage()); + } + + List list = this.baseMapper.getProjectByCollege(projectDO.getMatchId(), collegesDictDO.getName(), projectDO.getProjectProgress()); + if (list != null && list.size() > 0) { + + // 十进一 + Integer r = list.size() / 10; + Integer s = list.size() % 10; + if (s > 0) { + r = r + 1; + } + +// Long count = list.stream().filter(p -> p.getProjectSchedule().equals(ProjectSchedule.SEMI_FINAL_REVIEW) || p.getProjectSchedule().equals(ProjectSchedule.FINAL_REVIEW) +// && p.getProjectProgress().equals(projectDO.getProjectProgress())).count(); +// if (count >= 10) { +// throw new HttpException(10058); +// } + } + + project.setProjectSchedule(ProjectSchedule.SEMI_FINAL_REVIEW); + + project.setProjectStatus(ProjectReview.TO_REVIEWED); + project.setProjectReview(ProjectReview.TO_SCORE); + project.setProjectAssigned(ProjectReview.UNASSIGNED); + } + } else if (ProjectReview.TO_REVIEWED.equals(projectDO.getProjectStatus()) + && ProjectSchedule.SEMI_FINAL_REVIEW.equals(projectDO.getProjectSchedule())) { + /** + * 复赛通过 ---> 决赛审核 + */ + if (approveDTO.getProjectStatus() == 1) { + project.setProjectSchedule(ProjectSchedule.FINAL_REVIEW); + project.setProjectStatus(ProjectReview.TO_REVIEWED); + project.setProjectReview(ProjectReview.TO_SCORE); + project.setProjectAssigned(ProjectReview.UNASSIGNED); + } else if (approveDTO.getProjectStatus() == 2) { + project.setProjectSchedule(ProjectSchedule.SEMI_FINAL_REVIEW); + project.setProjectStatus(ProjectStatus.REMATCH_WINNING_AWARD); + } else if (approveDTO.getProjectStatus() == 3 || approveDTO.getProjectStatus() == 6) { + project.setProjectSchedule(ProjectSchedule.SEMI_FINAL_REVIEW); + project.setProjectStatus(ProjectStatus.REMATCH_SILVER_AWARD); + } else if (approveDTO.getProjectStatus() == 4) { + project.setProjectSchedule(ProjectSchedule.SEMI_FINAL_REVIEW); + project.setProjectStatus(ProjectStatus.REMATCH_BRONZE_AWARD); + } + } else { + /** + * 决赛通过 ---> 决赛通过 + */ + if (approveDTO.getProjectStatus() == 5) { + project.setProjectSchedule(ProjectSchedule.FINAL_REVIEW); + project.setProjectStatus(ProjectStatus.REMATCH_FINALS_GOLD_AWARD); + } else if (approveDTO.getProjectStatus() == 6 || approveDTO.getProjectStatus() == 3) { + project.setProjectSchedule(ProjectSchedule.FINAL_REVIEW); + project.setProjectStatus(ProjectStatus.REMATCH_SILVER_AWARD); + } + } + this.baseMapper.updateById(project); + +// StudentDO studentDO = studentService.getById(projectDO.getProposerId()); +// +// if (ProjectReview.TO_REVIEWED.equals(projectDO.getProjectStatus()) +// && ProjectSchedule.REGISTER.equals(projectDO.getProjectSchedule())) { +// ProjectScheduleRecordDO ps = projectScheduleRecordService.getOne(new QueryWrapper().lambda() +// .eq(ProjectScheduleRecordDO::getProjectSchedule, projectDO.getProjectSchedule()) +// .eq(ProjectScheduleRecordDO::getProjectId, projectDO.getId()) +// .eq(ProjectScheduleRecordDO::getMatchId, projectDO.getMatchId())); +// if (ps != null) { +// ProjectScheduleRecordDO p = new ProjectScheduleRecordDO(); +// p.setId(ps.getId()); +// p.setProjectStatus("通过"); +// projectScheduleRecordService.updateById(p); +// } +// } else { +// ProjectScheduleRecordDO projectScheduleRecordDO = new ProjectScheduleRecordDO(); +// projectScheduleRecordDO.setProposerId(studentDO.getId()); +// projectScheduleRecordDO.setProjectId(projectDO.getId()); +// projectScheduleRecordDO.setMatchId(projectDO.getMatchId()); +// projectScheduleRecordDO.setProjectSchedule(projectDO.getProjectSchedule()); +// projectScheduleRecordDO.setProjectType(projectDO.getProjectType()); +// +// if (ProjectSchedule.REGISTER.equals(projectDO.getProjectSchedule()) || ProjectReview.TO_REVIEWED.equals(project.getProjectStatus())) { +// projectScheduleRecordDO.setProjectStatus("通过"); +// } else { +// projectScheduleRecordDO.setProjectStatus(project.getProjectStatus()); +// } +// +// if (studentDO != null) { +// projectScheduleRecordDO.setCollege(studentDO.getCollege()); +// } +// projectScheduleRecordService.save(projectScheduleRecordDO); +// } + +// String msg = project.getProjectSchedule() + "," + project.getProjectStatus(); +// aliyunSmsUtil.sendTemplateMsg(msg, studentDO.getTelephone(), SMSTemplate.PROJECT_PROGRESS); + } + } + + @Override + public List getList(Long matchId, String name, String projectGroup) { + return this.baseMapper.getList(matchId, name, projectGroup); + } + + @Override + public SeedTrackProjectDetailVO getProjectById(Long id) { + SeedTrackProjectDetailVO seedTrackProjectDetailVO = new SeedTrackProjectDetailVO(); + ProjectDO projectDO = this.baseMapper.selectById(id); + if (projectDO != null) { + BeanUtils.copyProperties(projectDO, seedTrackProjectDetailVO); + List materials = projectMaterialsService.list(new QueryWrapper() + .lambda() + .eq(ProjectMaterialsDO::getProjectId, projectDO.getId())); + seedTrackProjectDetailVO.setMaterials(materials); + + List list = projectMemberService.list(new QueryWrapper() + .lambda() + .eq(ProjectMemberDO::getProjectId, projectDO.getId())); + List teamMember = new ArrayList<>(); + List mentor = new ArrayList<>(); + for (ProjectMemberDO projectMemberDO : list) { + if (projectMemberDO.getType().equals(MemberType.PRINCIPAL)) { + seedTrackProjectDetailVO.setName(projectMemberDO.getName()); + seedTrackProjectDetailVO.setSchool(projectMemberDO.getSchool()); + seedTrackProjectDetailVO.setGrade(projectMemberDO.getGrade()); + seedTrackProjectDetailVO.setMajor(projectMemberDO.getMajor()); + seedTrackProjectDetailVO.setSex(projectMemberDO.getSex()); + seedTrackProjectDetailVO.setTelephone(projectMemberDO.getTelephone()); + seedTrackProjectDetailVO.setStudentNo(projectMemberDO.getStudentNo()); + seedTrackProjectDetailVO.setEmail(projectMemberDO.getEmail()); + seedTrackProjectDetailVO.setIdCard(projectMemberDO.getIdCard()); + seedTrackProjectDetailVO.setFiveYears(projectMemberDO.getFiveYears()); + } else if (projectMemberDO.getType().equals(MemberType.TEAM_MEMBER)) { + TeamMemberDTO teamMemberDTO = new TeamMemberDTO(); + teamMemberDTO.setId(projectMemberDO.getId()); + teamMemberDTO.setGrade(projectMemberDO.getGrade()); + teamMemberDTO.setMajor(projectMemberDO.getMajor()); + teamMemberDTO.setSchool(projectMemberDO.getSchool()); + teamMemberDTO.setSex(projectMemberDO.getSex()); + teamMemberDTO.setStudentNo(projectMemberDO.getStudentNo()); + teamMemberDTO.setTeamName(projectMemberDO.getName()); + teamMemberDTO.setTeamTelephone(projectMemberDO.getTelephone()); + teamMemberDTO.setIdCard(projectMemberDO.getIdCard()); + teamMember.add(teamMemberDTO); + } else if (projectMemberDO.getType().equals(MemberType.MENTOR)) { + MentorDTO mentorDTO = new MentorDTO(); + mentorDTO.setId(projectMemberDO.getId()); + mentorDTO.setCompany(projectMemberDO.getCompany()); + mentorDTO.setPosition(projectMemberDO.getPosition()); + mentorDTO.setPositionTitle(projectMemberDO.getPositionTitle()); + mentorDTO.setTeacherName(projectMemberDO.getName()); + mentorDTO.setTelephone(projectMemberDO.getTelephone()); + mentorDTO.setIdCard(projectMemberDO.getIdCard()); + mentor.add(mentorDTO); + } + } + seedTrackProjectDetailVO.setMentor(mentor); + seedTrackProjectDetailVO.setTeamMember(teamMember); + + /** + * 项目股权 + */ + List osList = projectOwnershipStructureService.list(new QueryWrapper() + .lambda() + .eq(ProjectOwnershipStructureDO::getProjectId, projectDO.getId())); + seedTrackProjectDetailVO.setOwnership(osList); + + /** + * 专利 + */ + List patentDOList = patentMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectPatentDO::getProjectId, projectDO.getId())); + seedTrackProjectDetailVO.setPatent(patentDOList); + + /** + * 论文 + */ + List paperDOList = paperMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectPaperDO::getProjectId, projectDO.getId())); + seedTrackProjectDetailVO.setPaper(paperDOList); + + /** + * 奖项 + */ + List awardDOList = awardMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectAwardDO::getProjectId, projectDO.getId())); + seedTrackProjectDetailVO.setAward(awardDOList); + + /** + * 软件著作权 + */ + List copyrightDOList = copyrightMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectCopyrightDO::getProjectId, projectDO.getId())); + seedTrackProjectDetailVO.setCopyright(copyrightDOList); + + /** + * 作品著作 + */ + List worksDOList = worksMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectWorksDO::getProjectId, projectDO.getId())); + seedTrackProjectDetailVO.setWorks(worksDOList); + + /** + * 商标 + */ + List trademarkDOList = trademarkMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectTrademarkDO::getProjectId, projectDO.getId())); + seedTrackProjectDetailVO.setTrademark(trademarkDOList); + } + return seedTrackProjectDetailVO; + } + + @Override + public void exportProjectAll(ProjectCollegeListDTO projectCollegeListDTO) { + List data = new ArrayList<>(); + + ExportProjectDTO project = new ExportProjectDTO(); + List list = this.baseMapper.selectList(new QueryWrapper() + .lambda() + .ne(ProjectDO::getProjectStatus, ProjectStatus.UN_SUBMITTED) + .eq(ProjectDO::getProjectGroup, projectCollegeListDTO.getProjectGroup()) + .eq(ProjectDO::getProjectSchedule, projectCollegeListDTO.getProjectSchedule()) + .eq(ProjectDO::getMatchId, projectCollegeListDTO.getMatchId())); + if (list != null && list.size() > 0) { + for (ProjectDO projectDO : list) { + if (projectDO != null) { + BeanUtils.copyProperties(projectDO, project); + + StudentDO studentDO = studentService.getById(projectDO.getProposerId()); + if (studentDO != null) { + project.setName(studentDO.getName()); + project.setMajor(studentDO.getMajor()); + project.setTelephone(studentDO.getTelephone()); + } + + MatchDictDO matchDictDO = matchDictService.getById(projectDO.getMatchId()); + if (matchDictDO != null) { + project.setMatchName(matchDictDO.getMatchName()); + } + + List memberDOS = projectMemberService.list(new QueryWrapper() + .lambda() + .eq(ProjectMemberDO::getProjectId, projectDO.getId())); + String teamMember = ""; + String teacher = ""; + for (ProjectMemberDO memberDO : memberDOS) { + if (memberDO.getType().equals(MemberType.TEAM_MEMBER)) { + teamMember += memberDO.getName() + ","; + } else if (memberDO.getType().equals(MemberType.MENTOR)) { + teacher += memberDO.getName() + ","; + } else if (memberDO.getType().equals(MemberType.PRINCIPAL)) { + project.setStudentNo(memberDO.getStudentNo()); + } + } + if (StringUtils.isNotBlank(teamMember)) { + project.setTeamMembers(teamMember.substring(0, teamMember.length() - 1)); + } else { + project.setTeamMembers(""); + } + + if (StringUtils.isNotBlank(teacher)) { + project.setTeachers(teacher.substring(0, teacher.length() - 1)); + } else { + project.setTeachers(""); + } + data.add(JSON.parseObject(JSON.toJSONString(project), Map.class)); + } + } + } + ExcelUtil.writeExcel(ExcelUtil.getField(ExportProjectDTO.class), data); + } + + public void exportProjectAllProgress(ProjectCollegeListDTO projectCollegeListDTO) { + List data = new ArrayList<>(); + + ExportProjectDTO project = new ExportProjectDTO(); + List list = this.baseMapper.selectList(new QueryWrapper() + .lambda() + .ne(ProjectDO::getProjectStatus, ProjectStatus.UN_SUBMITTED) + .eq(ProjectDO::getProjectSchedule, projectCollegeListDTO.getProjectSchedule()) + .eq(ProjectDO::getMatchId, projectCollegeListDTO.getMatchId()) + .eq(ProjectDO::getProjectProgress, projectCollegeListDTO.getProjectProgress())); + if (list != null && list.size() > 0) { + for (ProjectDO projectDO : list) { + if (projectDO != null) { + BeanUtils.copyProperties(projectDO, project); + + StudentDO studentDO = studentService.getById(projectDO.getProposerId()); + if (studentDO != null) { + project.setName(studentDO.getName()); + project.setMajor(studentDO.getMajor()); + project.setTelephone(studentDO.getTelephone()); + } + + MatchDictDO matchDictDO = matchDictService.getById(projectDO.getMatchId()); + if (matchDictDO != null) { + project.setMatchName(matchDictDO.getMatchName()); + } + + List memberDOS = projectMemberService.list(new QueryWrapper() + .lambda() + .eq(ProjectMemberDO::getProjectId, projectDO.getId())); + String teamMember = ""; + String teacher = ""; + for (ProjectMemberDO memberDO : memberDOS) { + if (memberDO.getType().equals(MemberType.TEAM_MEMBER)) { + teamMember += memberDO.getName() + ","; + } else if (memberDO.getType().equals(MemberType.MENTOR)) { + teacher += memberDO.getName() + ","; + } else if (memberDO.getType().equals(MemberType.PRINCIPAL)) { + project.setStudentNo(memberDO.getStudentNo()); + } + } + if (StringUtils.isNotBlank(teamMember)) { + project.setTeamMembers(teamMember.substring(0, teamMember.length() - 1)); + } else { + project.setTeamMembers(""); + } + + if (StringUtils.isNotBlank(teacher)) { + project.setTeachers(teacher.substring(0, teacher.length() - 1)); + } else { + project.setTeachers(""); + } + data.add(JSON.parseObject(JSON.toJSONString(project), Map.class)); + } + } + } + ExcelUtil.writeExcel(ExcelUtil.getField(ExportProjectDTO.class), data); + + } + + + @Override + @Transactional(rollbackFor = Exception.class) + public void pass(ApproveDTO approveDTO) { + ProjectDO projectDO = this.baseMapper.selectById(approveDTO.getId()); + if (projectDO == null) { + throw new HttpException(10046); + } + + ProjectDO project = new ProjectDO(); + project.setId(projectDO.getId()); + + if (ProjectSchedule.REGISTER.equals(projectDO.getProjectSchedule())) { + projectDO.setProjectSchedule(ProjectSchedule.SCHOOL_REVIEW); + } else if (ProjectReview.TO_REVIEWED.equals(projectDO.getProjectStatus()) + && ProjectSchedule.SCHOOL_REVIEW.equals(projectDO.getProjectSchedule())) { + /** + * 种子赛道: 校内赛通过 ---> 复赛审核 + * 职教赛道: 校内赛通过 ---> 初赛审核 + * + * 校内赛上报规则:按组别每十个项目中可以进行一个项目申报 + */ + Map map = Localstorage.getMap(); + if (map.get("type").equals(Platform.school)) { + CollegesDictDO collegesDictDO = (CollegesDictDO) map.get("user"); + if (collegesDictDO == null) { + throw new HttpException(Code.TOKEN_EXPIRED.getCode(), Code.TOKEN_EXPIRED.getMessage()); + } + + List list = this.baseMapper.getProjectByCollege(projectDO.getMatchId(), collegesDictDO.getName(), projectDO.getProjectProgress()); + + if (list != null && list.size() > 0) { + // count 已经上报的项目数量 +// Long count = list.stream().filter(p -> p.getProjectSchedule().equals(ProjectSchedule.SEMI_FINAL_REVIEW) || p.getProjectSchedule().equals(ProjectSchedule.FINAL_REVIEW)).count(); + + // 十进一 + Integer r = list.size() / 10; + Integer s = list.size() % 10; + if (s > 0) { + r = r + 1; + } +// Long count = list.stream().filter(p -> p.getProjectSchedule().equals(ProjectSchedule.SEMI_FINAL_REVIEW) || p.getProjectSchedule().equals(ProjectSchedule.FINAL_REVIEW) +// && p.getProjectProgress().equals(projectDO.getProjectProgress())).count(); +// if (count >= 10) { +// throw new HttpException(10058); +// } + } + + project.setProjectSchedule(ProjectSchedule.SEMI_FINAL_REVIEW); + project.setProjectStatus(ProjectReview.TO_REVIEWED); + project.setProjectReview(ProjectReview.TO_SCORE); + project.setProjectAssigned(ProjectReview.UNASSIGNED); + } + } else if (ProjectReview.TO_REVIEWED.equals(projectDO.getProjectStatus()) + && projectDO.getProjectType().equals(ProjectType.VOCATIONAL) + && projectDO.getProjectGroup().equals(ProjectType.VOCATIONAL_GROUP) +// && ProjectSchedule.PRELIMINARY_REVIEW.equals(projectDO.getProjectSchedule()) + ) { + /** + * 职教赛道市级初赛审批 市级初赛 ---> 市级复赛 + */ + if (approveDTO.getProjectStatus() == 1) { + project.setProjectStatus(ProjectReview.TO_REVIEWED); + project.setProjectSchedule(ProjectSchedule.SEMI_FINAL_REVIEW); + } else if (approveDTO.getProjectStatus() == 2) { + project.setProjectStatus(ProjectStatus.REMATCH_WINNING_AWARD); + } else if (approveDTO.getProjectStatus() == 4) { + project.setProjectStatus(ProjectStatus.REMATCH_BRONZE_AWARD); + } + + project.setProjectReview(ProjectReview.TO_SCORE); + project.setProjectAssigned(ProjectReview.UNASSIGNED); + } else if (ProjectReview.TO_REVIEWED.equals(projectDO.getProjectStatus()) + && ProjectSchedule.SEMI_FINAL_REVIEW.equals(projectDO.getProjectSchedule())) { + /** + * 复赛通过 ---> 决赛审核 + */ + if (approveDTO.getProjectStatus() == 1) { + project.setProjectSchedule(ProjectSchedule.FINAL_REVIEW); + project.setProjectStatus(ProjectReview.TO_REVIEWED); + project.setProjectReview(ProjectReview.TO_SCORE); + project.setProjectAssigned(ProjectReview.UNASSIGNED); + } else if (approveDTO.getProjectStatus() == 2) { + project.setProjectSchedule(ProjectSchedule.SEMI_FINAL_REVIEW); + project.setProjectStatus(ProjectStatus.REMATCH_WINNING_AWARD); + } else if (approveDTO.getProjectStatus() == 3) { + project.setProjectSchedule(ProjectSchedule.SEMI_FINAL_REVIEW); + project.setProjectStatus(ProjectStatus.REMATCH_SILVER_AWARD); + } else if (approveDTO.getProjectStatus() == 4) { + project.setProjectSchedule(ProjectSchedule.SEMI_FINAL_REVIEW); + project.setProjectStatus(ProjectStatus.REMATCH_BRONZE_AWARD); + } + } else { + /** + * 决赛通过 ---> 决赛通过 + */ + if (approveDTO.getProjectStatus() == 5) { + project.setProjectSchedule(ProjectSchedule.FINAL_REVIEW); + project.setProjectStatus(ProjectStatus.REMATCH_FINALS_GOLD_AWARD); + } else if (approveDTO.getProjectStatus() == 6) { + project.setProjectSchedule(ProjectSchedule.FINAL_REVIEW); + project.setProjectStatus(ProjectStatus.REMATCH_SILVER_AWARD); + } + } + this.baseMapper.updateById(project); + +// StudentDO studentDO = studentService.getById(projectDO.getProposerId()); +// if (ProjectReview.TO_REVIEWED.equals(projectDO.getProjectStatus()) +// && ProjectSchedule.SCHOOL_REVIEW.equals(projectDO.getProjectSchedule())) { +// ProjectScheduleRecordDO ps = projectScheduleRecordService.getOne(new QueryWrapper().lambda() +// .eq(ProjectScheduleRecordDO::getProjectSchedule, projectDO.getProjectSchedule()) +// .eq(ProjectScheduleRecordDO::getProjectId, projectDO.getId()) +// .eq(ProjectScheduleRecordDO::getMatchId, projectDO.getMatchId())); +// if (ps != null) { +// ProjectScheduleRecordDO p = new ProjectScheduleRecordDO(); +// p.setId(ps.getId()); +// p.setProjectStatus("通过"); +// projectScheduleRecordService.updateById(p); +// } +// } else { +// ProjectScheduleRecordDO projectScheduleRecordDO = new ProjectScheduleRecordDO(); +// projectScheduleRecordDO.setProposerId(studentDO.getId()); +// projectScheduleRecordDO.setProjectId(projectDO.getId()); +// projectScheduleRecordDO.setMatchId(projectDO.getMatchId()); +// projectScheduleRecordDO.setProjectSchedule(project.getProjectSchedule()); +// projectScheduleRecordDO.setProjectType(projectDO.getProjectType()); +// if (project.getProjectStatus().equals(ProjectReview.TO_REVIEWED)) { +// projectScheduleRecordDO.setProjectStatus("通过"); +// } else { +// projectScheduleRecordDO.setProjectStatus(project.getProjectStatus()); +// } +// +// if (studentDO != null) { +// projectScheduleRecordDO.setCollege(studentDO.getCollege()); +// } +// projectScheduleRecordService.save(projectScheduleRecordDO); +// } + +// String msg = project.getProjectSchedule() + "," + project.getProjectStatus(); +// aliyunSmsUtil.sendTemplateMsg(msg, studentDO.getTelephone(), SMSTemplate.PROJECT_PROGRESS); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void weedOut(ApproveDTO approveDTO) { + ProjectDO projectDO = this.baseMapper.selectById(approveDTO.getId()); + + if (projectDO == null) { + throw new HttpException(10046); + } + + if (!projectDO.getProjectStatus().equals(ProjectReview.TO_REVIEWED)) { + throw new HttpException(10065); + } + + String projectStatus = ""; + if (ProjectReview.TO_REVIEWED.equals(projectDO.getProjectStatus()) + && ProjectSchedule.REGISTER.equals(projectDO.getProjectSchedule())) { + projectStatus = ProjectStatus.REGISTER_NOT_PASSED; + } else if (ProjectReview.TO_REVIEWED.equals(projectDO.getProjectStatus()) + && ProjectSchedule.SCHOOL_REVIEW.equals(projectDO.getProjectSchedule())) { + projectStatus = ProjectStatus.SCHOOL_NOT_PASSED; + } + + //StudentDO studentDO = studentService.getById(projectDO.getProposerId()); + + ProjectDO project = new ProjectDO(); + project.setId(projectDO.getId()); + project.setProjectStatus(projectStatus); + project.setProjectSchedule(projectDO.getProjectSchedule()); + this.baseMapper.updateById(project); + + ProjectScheduleRecordDO ps = projectScheduleRecordService.getOne(new QueryWrapper().lambda() + .eq(ProjectScheduleRecordDO::getProjectSchedule, projectDO.getProjectSchedule()) + .eq(ProjectScheduleRecordDO::getProjectId, projectDO.getId()) + .eq(ProjectScheduleRecordDO::getMatchId, projectDO.getMatchId())); + if (ps != null) { + ProjectScheduleRecordDO projectScheduleRecordDO = new ProjectScheduleRecordDO(); + projectScheduleRecordDO.setId(ps.getId()); + projectScheduleRecordDO.setProjectStatus(projectStatus); + projectScheduleRecordService.updateById(projectScheduleRecordDO); + } + +// if (studentDO != null) { +// String msg = ProjectSchedule.SCHOOL_REVIEW + "," + ProjectStatus.SCHOOL_NOT_PASSED; +// aliyunSmsUtil.sendTemplateMsg(msg, studentDO.getTelephone(), SMSTemplate.PROJECT_PROGRESS); +// } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void batchWeedOut(ApproveDTO approveDTO) { + if (approveDTO.getIds() != null && approveDTO.getIds().size() > 0) { + for (Long id : approveDTO.getIds()) { + ProjectDO projectDO = this.baseMapper.selectById(id); + if (projectDO == null) { + throw new HttpException(10046); + } + + if (!projectDO.getProjectStatus().equals(ProjectReview.TO_REVIEWED)) { + throw new HttpException(10065); + } + + String projectStatus = ""; + + if (ProjectReview.TO_REVIEWED.equals(projectDO.getProjectStatus()) + && ProjectSchedule.REGISTER.equals(projectDO.getProjectSchedule())) { + projectStatus = ProjectStatus.REGISTER_NOT_PASSED; + } else if (ProjectReview.TO_REVIEWED.equals(projectDO.getProjectStatus()) + && ProjectSchedule.SCHOOL_REVIEW.equals(projectDO.getProjectSchedule())) { + projectStatus = ProjectStatus.SCHOOL_NOT_PASSED; + } + + //StudentDO studentDO = studentService.getById(projectDO.getProposerId()); + + ProjectDO project = new ProjectDO(); + project.setId(projectDO.getId()); + project.setProjectStatus(projectStatus); + project.setProjectSchedule(projectDO.getProjectSchedule()); + this.baseMapper.updateById(project); + +// ProjectScheduleRecordDO ps = projectScheduleRecordService.getOne(new QueryWrapper().lambda() +// .eq(ProjectScheduleRecordDO::getProjectSchedule, projectDO.getProjectSchedule()) +// .eq(ProjectScheduleRecordDO::getProjectId, projectDO.getId()) +// .eq(ProjectScheduleRecordDO::getMatchId, projectDO.getMatchId())); +// if (ps != null) { +// ProjectScheduleRecordDO projectScheduleRecordDO = new ProjectScheduleRecordDO(); +// projectScheduleRecordDO.setId(ps.getId()); +// projectScheduleRecordDO.setProjectStatus(projectStatus); +// projectScheduleRecordService.updateById(projectScheduleRecordDO); +// } + +// if (studentDO != null) { +// String msg = ProjectSchedule.SCHOOL_REVIEW + "," + ProjectStatus.SCHOOL_NOT_PASSED; +// aliyunSmsUtil.sendTemplateMsg(msg, studentDO.getTelephone(), SMSTemplate.PROJECT_PROGRESS); +// } + } + } + } + + @Override + public void exportProjectList(ProjectCollegeListDTO projectCollegeListDTO) { + List data = new ArrayList<>(); + for (Long id : projectCollegeListDTO.getIds()) { + ExportProjectDTO project = new ExportProjectDTO(); + ProjectDO projectDO = this.baseMapper.selectById(id); + if (projectDO != null) { + BeanUtils.copyProperties(projectDO, project); + + StudentDO studentDO = studentService.getById(projectDO.getProposerId()); + if (studentDO != null) { + project.setName(studentDO.getName()); + project.setMajor(studentDO.getMajor()); + project.setTelephone(studentDO.getTelephone()); + } + + MatchDictDO matchDictDO = matchDictService.getById(projectDO.getMatchId()); + if (matchDictDO != null) { + project.setMatchName(matchDictDO.getMatchName()); + } + + List memberDOS = projectMemberService.list(new QueryWrapper() + .lambda() + .eq(ProjectMemberDO::getProjectId, projectDO.getId())); + String teamMember = ""; + String teacher = ""; + for (ProjectMemberDO memberDO : memberDOS) { + if (memberDO.getType().equals(MemberType.TEAM_MEMBER)) { + teamMember += memberDO.getName() + ","; + } else if (memberDO.getType().equals(MemberType.MENTOR)) { + teacher += memberDO.getName() + ","; + } else if (memberDO.getType().equals(MemberType.PRINCIPAL)) { + project.setStudentNo(memberDO.getStudentNo()); + } + } + if (StringUtils.isNotBlank(teamMember)) { + project.setTeamMembers(teamMember.substring(0, teamMember.length() - 1)); + } else { + project.setTeamMembers(""); + } + + if (StringUtils.isNotBlank(teacher)) { + project.setTeachers(teacher.substring(0, teacher.length() - 1)); + } else { + project.setTeachers(""); + } + data.add(JSON.parseObject(JSON.toJSONString(project), Map.class)); + } + } + ExcelUtil.writeExcel(ExcelUtil.getField(ExportProjectDTO.class), data); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void uploadPrintAttachment(PrintAttachmentDTO printAttachmentDTO) { + StudentDO studentDO = (StudentDO) Localstorage.getUser(); + if (studentDO == null) { + throw new HttpException(Code.TOKEN_EXPIRED.getCode(), Code.TOKEN_EXPIRED.getMessage()); + } + + MatchDictDO matchDictDO = matchDictService.getOne(new QueryWrapper() + .lambda() + .eq(MatchDictDO::getMatchType, ProjectType.SEED_TRACK) + .eq(MatchDictDO::getStatus, 1)); + if (matchDictDO != null) { + if (matchDictDO.getStartTime().after(new Date())) { + throw new HttpException(10055); + } + + if (matchDictDO.getEndTime().before(new Date())) { + throw new HttpException(10056); + } + } else { + throw new HttpException(10057); + } + + ProjectDO project = this.baseMapper.selectOne(new QueryWrapper() + .lambda() + .eq(ProjectDO::getProposerId, studentDO.getId()) + .eq(ProjectDO::getProjectStatus, ProjectStatus.UN_SUBMITTED) + .eq(ProjectDO::getProjectProgress, printAttachmentDTO.getProjectGroup()) + .eq(ProjectDO::getMatchId, matchDictDO.getId())); + if (project == null) { + throw new HttpException(10046); + } + + ProjectDO projectDO = new ProjectDO(); + projectDO.setId(project.getId()); + projectDO.setPrintAttachment(printAttachmentDTO.getPrintAttachment()); + projectDO.setPrintAttachmentName(printAttachmentDTO.getPrintAttachmentName()); + projectDO.setPrintAttachmentType(printAttachmentDTO.getPrintAttachmentType()); + projectDO.setProjectStatus(ProjectReview.TO_REVIEWED); + this.baseMapper.updateById(projectDO); + + ProjectScheduleRecordDO psr = projectScheduleRecordService.getOne(new QueryWrapper() + .lambda() + .eq(ProjectScheduleRecordDO::getProjectId, projectDO.getId()) + .eq(ProjectScheduleRecordDO::getProposerId, studentDO.getId())); + ProjectScheduleRecordDO scheduleRecordDO = new ProjectScheduleRecordDO(); + if (psr == null) { + scheduleRecordDO.setProjectId(project.getId()); + scheduleRecordDO.setProposerId(studentDO.getId()); + scheduleRecordDO.setMatchId(project.getMatchId()); + scheduleRecordDO.setCollege(studentDO.getCollege()); + scheduleRecordDO.setProjectType(project.getProjectType()); + scheduleRecordDO.setProjectSchedule(project.getProjectSchedule()); + scheduleRecordDO.setProjectStatus(ProjectReview.TO_REVIEWED); + projectScheduleRecordService.save(scheduleRecordDO); + } + + aliyunSmsUtil.sendTemplateMsg("", studentDO.getTelephone(), SMSTemplate.PROJECT_SUBMIT); + } + + @Override + public IPage getReviewList(ReviewListDTO reviewListDTO) { + if (reviewListDTO.getProjectReview() != null) { + if (reviewListDTO.getProjectReview().equals(ProjectReview.TO_REVIEWED) || + reviewListDTO.getProjectReview().equals(ProjectReview.SUBMITTED)) { + reviewListDTO.setProjectReview(reviewListDTO.getProjectReview()); + } else if (reviewListDTO.getProjectReview().equals(ProjectReview.UNASSIGNED) || + reviewListDTO.getProjectReview().equals(ProjectReview.ASSIGNED)) { + reviewListDTO.setProjectAssigned(reviewListDTO.getProjectReview()); + reviewListDTO.setProjectReview(""); + } + } + + IPage iPage = this.baseMapper.getReviewList(new Page(reviewListDTO.getPageNo(), reviewListDTO.getPageSize()), + reviewListDTO.getProjectName(), + reviewListDTO.getProjectGroup(), + reviewListDTO.getProjectReview(), + reviewListDTO.getMatchId(), + reviewListDTO.getProjectStatus(), + reviewListDTO.getProjectAssigned(), + reviewListDTO.getProjectProgress()); + + for (ReviewListVO record : iPage.getRecords()) { + StudentDO studentDO = studentService.getById(record.getProposerId()); + if (studentDO != null) { + record.setSchool(studentDO.getCollege()); + record.setName(studentDO.getName()); + } + + List list = projectReviewService.getList(record.getProjectSchedule(), record.getId()); + if (list.size() > 0) { + String review = ""; + for (ProjectReviewVO projectReviewVO : list) { + if (projectReviewVO.getScore() != null) { + review += projectReviewVO.getJudgesName() + "(" + projectReviewVO.getScore() + "); "; + } else { + review += projectReviewVO.getJudgesName() + "(-); "; + } + } + record.setReviewResult(review.substring(0, review.length() - 2)); + } + } + return iPage; + } + + @Override + public ProjectNumVO getProjectReviewNum(ReviewListDTO reviewListDTO) { + ProjectNumVO projectNumVO = new ProjectNumVO(); + List list = this.baseMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectDO::getMatchId, reviewListDTO.getMatchId()) + .eq(ProjectDO::getProjectProgress, reviewListDTO.getProjectProgress()) + .and(w -> w.eq(ProjectDO::getProjectReview, ProjectReview.TO_SCORE) + .or() + .eq(ProjectDO::getProjectReview, ProjectReview.SUBMITTED)) + ); + Integer technologyRematchNum = 0; + Integer technologyFinalNum = 0; + Integer culturalRematchNum = 0; + Integer culturalFinalNum = 0; + + Integer reviewTS = 0; + Integer notReviewTS = 0; + Integer reviewTF = 0; + Integer notReviewTF = 0; + Integer reviewCS = 0; + Integer notReviewCS = 0; + Integer reviewCF = 0; + Integer notReviewCF = 0; + if (list != null && list.size() > 0) { + for (ProjectDO projectDO : list) { + if (projectDO.getProjectProgress().equals(ProjectType.TECHNOLOGY_INNOVATION_GROUP) + && projectDO.getProjectSchedule().equals(ProjectSchedule.SEMI_FINAL_REVIEW)) { + technologyRematchNum++; + + if (projectDO.getProjectReview().equals(ProjectReview.TO_SCORE)) { + notReviewTS++; + } else if (projectDO.getProjectReview().equals(ProjectReview.SUBMITTED)) { + reviewTS++; + } + } else if (projectDO.getProjectProgress().equals(ProjectType.TECHNOLOGY_INNOVATION_GROUP) + && projectDO.getProjectSchedule().equals(ProjectSchedule.FINAL_REVIEW)) { + technologyFinalNum++; + + if (projectDO.getProjectReview().equals(ProjectReview.TO_SCORE)) { + notReviewTF++; + } else if (projectDO.getProjectReview().equals(ProjectReview.SUBMITTED)) { + reviewTF++; + } + } else if (projectDO.getProjectProgress().equals(ProjectType.CULTURAL_CREATIVE_GROUP) + && projectDO.getProjectSchedule().equals(ProjectSchedule.SEMI_FINAL_REVIEW)) { + culturalRematchNum++; + + if (projectDO.getProjectReview().equals(ProjectReview.TO_SCORE)) { + notReviewCS++; + } else if (projectDO.getProjectReview().equals(ProjectReview.SUBMITTED)) { + reviewCS++; + } + } else if (projectDO.getProjectProgress().equals(ProjectType.CULTURAL_CREATIVE_GROUP) + && projectDO.getProjectSchedule().equals(ProjectSchedule.FINAL_REVIEW)) { + culturalFinalNum++; + + if (projectDO.getProjectReview().equals(ProjectReview.TO_SCORE)) { + notReviewCF++; + } else if (projectDO.getProjectReview().equals(ProjectReview.SUBMITTED)) { + reviewCF++; + } + } + + projectNumVO.setTechnologyRematchNum(technologyRematchNum); + projectNumVO.setTechnologyFinalNum(technologyFinalNum); + projectNumVO.setCulturalRematchNum(culturalRematchNum); + projectNumVO.setCulturalFinalNum(culturalFinalNum); + projectNumVO.setProjectGroup(projectDO.getProjectGroup()); + + if (StringUtils.isNotBlank(reviewListDTO.getProjectStatus())) { + if (reviewListDTO.getProjectProgress().equals(ProjectType.TECHNOLOGY_INNOVATION_GROUP) + && reviewListDTO.getProjectStatus().equals(ProjectSchedule.SEMI_FINAL_REVIEW)) { + projectNumVO.setReviewedNum(reviewTS); + projectNumVO.setNotReviewedNum(notReviewTS); + } else if (reviewListDTO.getProjectProgress().equals(ProjectType.TECHNOLOGY_INNOVATION_GROUP) + && reviewListDTO.getProjectStatus().equals(ProjectSchedule.FINAL_REVIEW)) { + projectNumVO.setReviewedNum(reviewTF); + projectNumVO.setNotReviewedNum(notReviewTF); + } else if (reviewListDTO.getProjectProgress().equals(ProjectType.CULTURAL_CREATIVE_GROUP) + && reviewListDTO.getProjectStatus().equals(ProjectSchedule.SEMI_FINAL_REVIEW)) { + projectNumVO.setReviewedNum(reviewCS); + projectNumVO.setNotReviewedNum(notReviewCS); + } else if (reviewListDTO.getProjectProgress().equals(ProjectType.CULTURAL_CREATIVE_GROUP) + && reviewListDTO.getProjectStatus().equals(ProjectSchedule.FINAL_REVIEW)) { + projectNumVO.setReviewedNum(reviewCF); + projectNumVO.setNotReviewedNum(notReviewCF); + } + } + } + } + return projectNumVO; + } + + @Override + public ProjectNumVO getProjectReviewAssignNum(ReviewListDTO reviewListDTO) { + ProjectNumVO projectNumVO = new ProjectNumVO(); + List list = this.baseMapper.selectList(new QueryWrapper() + .lambda() + .eq(ProjectDO::getMatchId, reviewListDTO.getMatchId()) + .eq(ProjectDO::getProjectProgress, reviewListDTO.getProjectProgress()) + .and(w -> w.eq(ProjectDO::getProjectAssigned, ProjectReview.UNASSIGNED) + .or() + .eq(ProjectDO::getProjectAssigned, ProjectReview.ASSIGNED)) + ); + + Integer technologyRematchNum = 0; + Integer technologyFinalNum = 0; + Integer culturalRematchNum = 0; + Integer culturalFinalNum = 0; + + Integer reviewTS = 0; + Integer notReviewTS = 0; + Integer reviewTF = 0; + Integer notReviewTF = 0; + Integer reviewCS = 0; + Integer notReviewCS = 0; + Integer reviewCF = 0; + Integer notReviewCF = 0; + if (list != null && list.size() > 0) { + for (ProjectDO projectDO : list) { + if (projectDO.getProjectProgress().equals(ProjectType.TECHNOLOGY_INNOVATION_GROUP) + && projectDO.getProjectSchedule().equals(ProjectSchedule.SEMI_FINAL_REVIEW)) { + technologyRematchNum++; + + if (projectDO.getProjectAssigned().equals(ProjectReview.UNASSIGNED)) { + notReviewTS++; + } else if (projectDO.getProjectAssigned().equals(ProjectReview.ASSIGNED)) { + reviewTS++; + } + } else if (projectDO.getProjectProgress().equals(ProjectType.TECHNOLOGY_INNOVATION_GROUP) + && projectDO.getProjectSchedule().equals(ProjectSchedule.FINAL_REVIEW)) { + technologyFinalNum++; + + if (projectDO.getProjectAssigned().equals(ProjectReview.UNASSIGNED)) { + notReviewTF++; + } else if (projectDO.getProjectAssigned().equals(ProjectReview.ASSIGNED)) { + reviewTF++; + } + } else if (projectDO.getProjectProgress().equals(ProjectType.CULTURAL_CREATIVE_GROUP) + && projectDO.getProjectSchedule().equals(ProjectSchedule.SEMI_FINAL_REVIEW)) { + culturalRematchNum++; + + if (projectDO.getProjectAssigned().equals(ProjectReview.UNASSIGNED)) { + notReviewCS++; + } else if (projectDO.getProjectAssigned().equals(ProjectReview.ASSIGNED)) { + reviewCS++; + } + } else if (projectDO.getProjectProgress().equals(ProjectType.CULTURAL_CREATIVE_GROUP) + && projectDO.getProjectSchedule().equals(ProjectSchedule.FINAL_REVIEW)) { + culturalFinalNum++; + + if (projectDO.getProjectAssigned().equals(ProjectReview.UNASSIGNED)) { + notReviewCF++; + } else if (projectDO.getProjectAssigned().equals(ProjectReview.ASSIGNED)) { + reviewCF++; + } + } + + projectNumVO.setTechnologyRematchNum(technologyRematchNum); + projectNumVO.setTechnologyFinalNum(technologyFinalNum); + projectNumVO.setCulturalRematchNum(culturalRematchNum); + projectNumVO.setCulturalFinalNum(culturalFinalNum); + + if (StringUtils.isNotBlank(reviewListDTO.getProjectStatus())) { + if (reviewListDTO.getProjectProgress().equals(ProjectType.TECHNOLOGY_INNOVATION_GROUP) + && reviewListDTO.getProjectStatus().equals(ProjectSchedule.SEMI_FINAL_REVIEW)) { + projectNumVO.setReviewedNum(reviewTS); + projectNumVO.setNotReviewedNum(notReviewTS); + } else if (reviewListDTO.getProjectProgress().equals(ProjectType.TECHNOLOGY_INNOVATION_GROUP) + && reviewListDTO.getProjectStatus().equals(ProjectSchedule.FINAL_REVIEW)) { + projectNumVO.setReviewedNum(reviewTF); + projectNumVO.setNotReviewedNum(notReviewTF); + } else if (reviewListDTO.getProjectProgress().equals(ProjectType.CULTURAL_CREATIVE_GROUP) + && reviewListDTO.getProjectStatus().equals(ProjectSchedule.SEMI_FINAL_REVIEW)) { + projectNumVO.setReviewedNum(reviewCS); + projectNumVO.setNotReviewedNum(notReviewCS); + } else if (reviewListDTO.getProjectProgress().equals(ProjectType.CULTURAL_CREATIVE_GROUP) + && reviewListDTO.getProjectStatus().equals(ProjectSchedule.FINAL_REVIEW)) { + projectNumVO.setReviewedNum(reviewCF); + projectNumVO.setNotReviewedNum(notReviewCF); + } + } + } + } + return projectNumVO; + } + + @Override + public List getExportProjectField() { + return ExcelUtil.getField(ExportProjectDTO.class); + } + + @Override + public List getExportProjectReviewField() { + return ExcelUtil.getField(ProjectJudgeVO.class); + } + + @Override + public IPage getProjectReviewPage(ProjectReviewPageDTO projectReviewPageDTO) { + ProjectJudgeDO projectJudgeDO = (ProjectJudgeDO) Localstorage.getUser(); + if (projectJudgeDO == null) { + throw new HttpException(Code.TOKEN_EXPIRED.getCode(), Code.TOKEN_EXPIRED.getMessage()); + } + + String projectReview = ""; + if (projectReviewPageDTO.getStatus().equals(ProjectReview.TO_REVIEWED)) { + projectReview = ProjectReview.ASSIGNED; + } else { + projectReview = projectReviewPageDTO.getStatus(); + } + + IPage iPage = this.baseMapper.getProjectReviewPage(new Page(projectReviewPageDTO.getPageNo(), projectReviewPageDTO.getPageSize()), + projectJudgeDO.getId(), + projectReviewPageDTO.getMatchId(), + projectReviewPageDTO.getProjectName(), + projectReviewPageDTO.getProjectStatus(), + projectReview, + projectReviewPageDTO.getProjectGroup(), + projectReviewPageDTO.getProjectProgress()); + + for (ProjectPageVO record : iPage.getRecords()) { + /** + * 项目负责人 + */ + StudentDO studentDO = studentService.getById(record.getProposerId()); + if (studentDO != null) { + record.setCollege(studentDO.getCollege()); + record.setName(studentDO.getName()); + } + + ProjectReviewDO projectReviewDO = projectReviewService.getOne(new QueryWrapper() + .lambda() + .eq(ProjectReviewDO::getProjectId, record.getId()) + .eq(ProjectReviewDO::getJudgeId, projectJudgeDO.getId()) + .eq(ProjectReviewDO::getProjectSchedule, record.getProjectSchedule())); + if (projectReviewDO != null) { + if (projectReviewDO.getReviewStatus().equals(ProjectReview.ASSIGNED)) { + record.setProjectStatus(ProjectReview.TO_REVIEWED); + } else if (projectReviewDO.getReviewStatus().equals(ProjectReview.SUBMITTED)) { + record.setProjectStatus(ProjectReview.SUBMITTED); + } + } + + List list = projectMaterialsService.list(new QueryWrapper() + .lambda() + .eq(ProjectMaterialsDO::getProjectId, record.getId())); + record.setMaterials(list); + } + return iPage; + } + + @Override + public void setScore(ProjectReviewScoreDTO projectReviewScoreDTO) { + ProjectJudgeDO projectJudgeDO = (ProjectJudgeDO) Localstorage.getUser(); + if (projectJudgeDO == null) { + throw new HttpException(Code.TOKEN_EXPIRED.getCode(), Code.TOKEN_EXPIRED.getMessage()); + } + + // 批量 + if (projectReviewScoreDTO.getReviewScore() != null && projectReviewScoreDTO.getReviewScore().size() > 0) { + for (ReviewScoreDTO reviewScoreDTO : projectReviewScoreDTO.getReviewScore()) { + ProjectDO projectDO = this.baseMapper.selectById(reviewScoreDTO.getId()); + if (projectDO == null) { + throw new HttpException(10049); + } + + ProjectReviewPeriodDO projectReviewPeriodDO = projectReviewPeriodService.getOne(new QueryWrapper() + .lambda() + .eq(ProjectReviewPeriodDO::getMatchId, projectDO.getMatchId()) + .eq(ProjectReviewPeriodDO::getProjectGroup, projectDO.getProjectGroup()) + .eq(ProjectReviewPeriodDO::getProjectSchedule, projectDO.getProjectSchedule())); + if (projectReviewPeriodDO != null) { + if (projectReviewPeriodDO.getStartTime().after(new Date())) { + throw new HttpException(10074); + } + + if (projectReviewPeriodDO.getEndTime().before(new Date())) { + throw new HttpException(10074); + } + } + + ProjectReviewDO projectReviewDO = projectReviewService.getOne(new QueryWrapper() + .lambda() + .eq(ProjectReviewDO::getProjectId, reviewScoreDTO.getId()) + .eq(ProjectReviewDO::getProjectSchedule, projectDO.getProjectSchedule()) + .eq(ProjectReviewDO::getJudgeId, projectJudgeDO.getId())); + if (projectReviewDO == null) { + throw new HttpException(10050); + } + + if (projectReviewDO.getReviewStatus() != null && + projectReviewDO.getReviewStatus().equals(ProjectReview.SUBMITTED)) { + throw new HttpException(10051); + } + + ProjectReviewDO projectReview = new ProjectReviewDO(); + projectReview.setId(projectReviewDO.getId()); + projectReview.setReviewScore(reviewScoreDTO.getScore()); + projectReview.setReviewOpinion(reviewScoreDTO.getReviewOpinion()); + projectReviewService.updateById(projectReview); + } + } else if (projectReviewScoreDTO.getId() != null) { + ProjectDO projectDO = this.baseMapper.selectById(projectReviewScoreDTO.getId()); + if (projectDO == null) { + throw new HttpException(10049); + } + + ProjectReviewPeriodDO projectReviewPeriodDO = projectReviewPeriodService.getOne(new QueryWrapper() + .lambda() + .eq(ProjectReviewPeriodDO::getMatchId, projectDO.getMatchId()) + .eq(ProjectReviewPeriodDO::getProjectGroup, projectDO.getProjectGroup()) + .eq(ProjectReviewPeriodDO::getProjectSchedule, projectDO.getProjectSchedule())); + if (projectReviewPeriodDO != null) { + if (projectReviewPeriodDO.getStartTime().after(new Date())) { + throw new HttpException(10074); + } + + if (projectReviewPeriodDO.getEndTime().before(new Date())) { + throw new HttpException(10074); + } + } + + ProjectReviewDO projectReviewDO = projectReviewService.getOne(new QueryWrapper() + .lambda() + .eq(ProjectReviewDO::getProjectId, projectReviewScoreDTO.getId()) + .eq(ProjectReviewDO::getProjectSchedule, projectDO.getProjectSchedule()) + .eq(ProjectReviewDO::getJudgeId, projectJudgeDO.getId())); + if (projectReviewDO == null) { + throw new HttpException(10050); + } + + if (projectReviewDO.getReviewStatus() != null && + projectReviewDO.getReviewStatus().equals(ProjectReview.SUBMITTED)) { + throw new HttpException(10051); + } + + ProjectReviewDO projectReview = new ProjectReviewDO(); + projectReview.setId(projectReviewDO.getId()); + projectReview.setReviewScore(projectReviewScoreDTO.getScore()); + projectReview.setReviewOpinion(projectReviewScoreDTO.getReviewOpinion()); + projectReviewService.updateById(projectReview); + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void submitted(ProjectReviewScoreDTO projectReviewScoreDTO) { + ProjectJudgeDO projectJudgeDO = (ProjectJudgeDO) Localstorage.getUser(); + if (projectJudgeDO == null) { + throw new HttpException(Code.TOKEN_EXPIRED.getCode(), Code.TOKEN_EXPIRED.getMessage()); + } + + if (projectReviewScoreDTO.getIds() != null && projectReviewScoreDTO.getIds().size() > 0) { + for (Long id : projectReviewScoreDTO.getIds()) { + ProjectDO project = this.baseMapper.selectById(id); + if (project == null) { + throw new HttpException(10049); + } + + ProjectReviewPeriodDO projectReviewPeriodDO = projectReviewPeriodService.getOne(new QueryWrapper() + .lambda() + .eq(ProjectReviewPeriodDO::getMatchId, project.getMatchId()) + .eq(ProjectReviewPeriodDO::getProjectGroup, project.getProjectGroup()) + .eq(ProjectReviewPeriodDO::getProjectSchedule, project.getProjectSchedule())); + if (projectReviewPeriodDO != null) { + if (projectReviewPeriodDO.getStartTime().after(new Date())) { + throw new HttpException(10074); + } + + if (projectReviewPeriodDO.getEndTime().before(new Date())) { + throw new HttpException(10074); + } + } + + ProjectReviewDO projectReviewDO = projectReviewService.getOne(new QueryWrapper() + .lambda() + .eq(ProjectReviewDO::getProjectId, project.getId()) + .eq(ProjectReviewDO::getProjectSchedule, project.getProjectSchedule()) + .eq(ProjectReviewDO::getJudgeId, projectJudgeDO.getId())); + if (projectReviewDO.getReviewScore() == null ) { + throw new HttpException(10077); + } + + if (projectReviewDO.getReviewStatus().equals(ProjectReview.SUBMITTED)) { + throw new HttpException(10051); + } + + Integer num = projectReviewService.count(new QueryWrapper() + .lambda() + .eq(ProjectReviewDO::getProjectId, project.getId())); + + Integer submitNum = projectReviewService.count(new QueryWrapper() + .lambda() + .eq(ProjectReviewDO::getProjectId, project.getId()) + .eq(ProjectReviewDO::getReviewStatus, ProjectReview.SUBMITTED)); + if (submitNum == num - 1) { + ProjectDO projectDO = new ProjectDO(); + projectDO.setId(id); + projectDO.setProjectReview(ProjectReview.SUBMITTED); + this.baseMapper.updateById(projectDO); + } + + ProjectReviewDO projectReview = new ProjectReviewDO(); + projectReview.setId(projectReviewDO.getId()); + projectReview.setScore(projectReviewDO.getReviewScore()); + projectReview.setReviewStatus(ProjectReview.SUBMITTED); + projectReview.setReviewTime(new Date()); + projectReview.setReviewOpinion(projectReviewDO.getReviewOpinion()); + projectReviewService.updateById(projectReview); + } + } else if (projectReviewScoreDTO.getId() != null) { + ProjectDO project = this.baseMapper.selectById(projectReviewScoreDTO.getId()); + if (project == null) { + throw new HttpException(10049); + } + + ProjectReviewPeriodDO projectReviewPeriodDO = projectReviewPeriodService.getOne(new QueryWrapper() + .lambda() + .eq(ProjectReviewPeriodDO::getMatchId, project.getMatchId()) + .eq(ProjectReviewPeriodDO::getProjectGroup, project.getProjectGroup()) + .eq(ProjectReviewPeriodDO::getProjectSchedule, project.getProjectSchedule())); + if (projectReviewPeriodDO != null) { + if (projectReviewPeriodDO.getStartTime().after(new Date())) { + throw new HttpException(10074); + } + + if (projectReviewPeriodDO.getEndTime().before(new Date())) { + throw new HttpException(10074); + } + } + + ProjectReviewDO projectReviewDO = projectReviewService.getOne(new QueryWrapper() + .lambda() + .eq(ProjectReviewDO::getProjectSchedule, project.getProjectSchedule()) + .eq(ProjectReviewDO::getProjectId, projectReviewScoreDTO.getId()) + .eq(ProjectReviewDO::getJudgeId, projectJudgeDO.getId())); + if (projectReviewDO.getReviewScore() == null ) { + throw new HttpException(10077); + } + + if (projectReviewDO.getReviewStatus().equals(ProjectReview.SUBMITTED)) { + throw new HttpException(10051); + } + + Integer num = projectReviewService.count(new QueryWrapper() + .lambda() + .eq(ProjectReviewDO::getProjectId, projectReviewScoreDTO.getId())); + + Integer submitNum = projectReviewService.count(new QueryWrapper() + .lambda() + .eq(ProjectReviewDO::getProjectId, projectReviewScoreDTO.getId()) + .eq(ProjectReviewDO::getReviewStatus, ProjectReview.SUBMITTED)); + if (submitNum == num - 1) { + ProjectDO projectDO = new ProjectDO(); + projectDO.setId(projectReviewScoreDTO.getId()); + projectDO.setProjectReview(ProjectReview.SUBMITTED); + this.baseMapper.updateById(projectDO); + } + + ProjectReviewDO projectReview = new ProjectReviewDO(); + projectReview.setId(projectReviewDO.getId()); + projectReview.setScore(projectReviewScoreDTO.getScore()); + projectReview.setReviewStatus(ProjectReview.SUBMITTED); + projectReview.setReviewTime(new Date()); + projectReview.setReviewOpinion(projectReviewDO.getReviewOpinion()); + projectReviewService.updateById(projectReview); + } + } + + @Override + public ProjectMemberVO getProjectMember(String projectGroup) { + ProjectMemberVO projectMemberVO = new ProjectMemberVO(); + StudentDO studentDO = (StudentDO) Localstorage.getUser(); + if (studentDO == null) { + throw new HttpException(Code.TOKEN_EXPIRED.getCode(), Code.TOKEN_EXPIRED.getMessage()); + } + + MatchDictDO matchDictDO = new MatchDictDO(); + + if (projectGroup.equals(ProjectType.VOCATIONAL)) { + projectGroup = studentDO.getEducation(); + matchDictDO = matchDictService.getOne(new QueryWrapper() + .lambda() + .eq(MatchDictDO::getMatchType, ProjectType.VOCATIONAL) + .eq(MatchDictDO::getStatus, 1)); + } else { + matchDictDO = matchDictService.getOne(new QueryWrapper() + .lambda() + .eq(MatchDictDO::getMatchType, ProjectType.SEED_TRACK) + .eq(MatchDictDO::getStatus, 1)); + } + + ProjectDO projectDO = this.baseMapper.selectOne(new QueryWrapper() + .lambda() + .eq(ProjectDO::getProjectProgress, projectGroup) + .eq(ProjectDO::getProposerId, studentDO.getId()) + .eq(ProjectDO::getMatchId, matchDictDO.getId())); + if (projectDO != null) { + projectMemberVO.setEditStatus(projectDO.getEditStatus()); + List list = projectMemberService.list(new QueryWrapper() + .lambda() + .eq(ProjectMemberDO::getProjectId, projectDO.getId())); + if (list.size() > 0) { + List teamMember = new ArrayList<>(); + List mentor = new ArrayList<>(); + for (ProjectMemberDO projectMemberDO : list) { + if (projectMemberDO.getType().equals(MemberType.PRINCIPAL)) { + BeanUtils.copyProperties(projectMemberDO, projectMemberVO); + } else if (projectMemberDO.getType().equals(MemberType.TEAM_MEMBER)) { + TeamMemberDTO teamMemberDTO = new TeamMemberDTO(); + BeanUtils.copyProperties(projectMemberDO, teamMemberDTO); + teamMemberDTO.setTeamName(projectMemberDO.getName()); + teamMemberDTO.setTeamTelephone(projectMemberDO.getTelephone()); + teamMember.add(teamMemberDTO); + } else if (projectMemberDO.getType().equals(MemberType.MENTOR)) { + MentorDTO mentorDTO = new MentorDTO(); + BeanUtils.copyProperties(projectMemberDO, mentorDTO); + mentorDTO.setTeacherName(projectMemberDO.getName()); + mentor.add(mentorDTO); + } + } + projectMemberVO.setTeamMember(teamMember); + projectMemberVO.setMentor(mentor); + } else { + projectMemberVO.setName(studentDO.getName()); + projectMemberVO.setTelephone(studentDO.getTelephone()); + projectMemberVO.setSchool(studentDO.getCollege()); + projectMemberVO.setMajor(studentDO.getMajor()); + } + } + return projectMemberVO; + } + + @Override + public ProjectDataOverview getCollegeDataOverview(DataOverviewDTO dataOverviewDTO) { + CollegesDictDO collegesDictDO = (CollegesDictDO) Localstorage.getUser(); + if (collegesDictDO == null) { + throw new HttpException(Code.TOKEN_EXPIRED.getCode(), Code.TOKEN_EXPIRED.getMessage()); + } + + ProjectDataOverview projectDataOverview = new ProjectDataOverview(); + + /* + 注册人数 + */ + Integer registeredNum = studentService.count(new QueryWrapper() + .lambda() + .eq(StudentDO::getCollege, collegesDictDO.getName())); + projectDataOverview.setRegisteredNum(registeredNum); + + + List list = this.baseMapper.selectListByCollege(dataOverviewDTO.getProjectType(), dataOverviewDTO.getProjectGroup(), collegesDictDO.getName()); + /* + 全部项目数量 + */ + projectDataOverview.setProjectNum(list.size()); + + Integer schoolProjectNum = 0; + Integer rematchProjectNum = 0; + Integer finalProjectNum = 0; + + Integer rematchBronzeAwardNum = 0; + Integer rematchSilverAwardNum = 0; + Integer rematchWinningAwardNum = 0; + Integer finalsSilverAwardNum = 0; + Integer finalsGoldAwardNum = 0; + for (ProjectDO projectDO : list) { + if (projectDO.getProjectSchedule().equals(ProjectSchedule.SCHOOL_REVIEW)) { + /* + 校内赛项目数 + */ + schoolProjectNum++; + } else if (projectDO.getProjectSchedule().equals(ProjectSchedule.SEMI_FINAL_REVIEW)) { + /* + 复赛项目数 + */ + rematchProjectNum++; + } else if (projectDO.getProjectSchedule().equals(ProjectSchedule.FINAL_REVIEW)) { + /* + 决赛项目数 + */ + finalProjectNum++; + } + + if (projectDO.getProjectStatus().equals(ProjectStatus.REMATCH_BRONZE_AWARD)) { + rematchBronzeAwardNum++; + } else if (projectDO.getProjectStatus().equals(ProjectStatus.REMATCH_SILVER_AWARD)) { + rematchSilverAwardNum++; + } else if (projectDO.getProjectStatus().equals(ProjectStatus.REMATCH_WINNING_AWARD)) { + rematchWinningAwardNum++; + } else if (projectDO.getProjectStatus().equals(ProjectStatus.REMATCH_FINALS_GOLD_AWARD)) { + finalsGoldAwardNum++; + } + } + + projectDataOverview.setRematchBronzeAwardNum(rematchBronzeAwardNum); + projectDataOverview.setRematchSilverAwardNum(rematchSilverAwardNum); + projectDataOverview.setRematchWinningAwardNum(rematchWinningAwardNum); + projectDataOverview.setFinalsSilverAwardNum(finalsSilverAwardNum); + projectDataOverview.setFinalsGoldAwardNum(finalsGoldAwardNum); + projectDataOverview.setSchoolProjectNum(schoolProjectNum + rematchProjectNum + finalProjectNum); + projectDataOverview.setRematchProjectNum(rematchProjectNum); + /* + 复赛比例 + */ + if (rematchProjectNum > 0 && schoolProjectNum > 0) { + Double rematchProportion = new BigDecimal(rematchProjectNum).divide(new BigDecimal(schoolProjectNum + rematchProjectNum + finalProjectNum), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).doubleValue(); + projectDataOverview.setRematchProportion(rematchProportion); + } else { + projectDataOverview.setRematchProportion(0.0); + } + + projectDataOverview.setFinalProjectNum(finalProjectNum); + /* + 决赛比例 + */ + if (finalProjectNum > 0 && rematchProjectNum > 0) { + Double finalProportion = new BigDecimal(finalProjectNum).divide(new BigDecimal(rematchProjectNum), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).doubleValue(); + projectDataOverview.setFinalProportion(finalProportion); + } else { + projectDataOverview.setFinalProportion(0.0); + } + + return projectDataOverview; + } + +// @Override +// public ProjectDataOverview getSeedTrackDataOverview() { +// ProjectDataOverview projectDataOverview = new ProjectDataOverview(); +// /* +// 注册人数 +// */ +// Integer registeredNum = studentService.count(); +// projectDataOverview.setRegisteredNum(registeredNum); +// +// List matchList = matchDictService.getList(); +// +// List list = this.baseMapper.selectList(new QueryWrapper() +// .lambda() +// .ne(ProjectDO::getProjectStatus, ProjectStatus.UN_SUBMITTED) +// .eq(ProjectDO::getProjectType, ProjectType.SEED_TRACK)); +// /* +// 全部项目数量 +// */ +// projectDataOverview.setProjectNum(list.size()); +// Integer schoolProjectNum = 0; +// Integer rematchProjectNum = 0; +// Integer finalProjectNum = 0; +// +// Integer rematchBronzeAwardNum = 0; +// Integer rematchSilverAwardNum = 0; +// Integer rematchWinningAwardNum = 0; +// Integer finalsSilverAwardNum = 0; +// Integer finalsGoldAwardNum = 0; +// for (ProjectDO projectDO : list) { +// if (projectDO.getProjectSchedule().equals(ProjectSchedule.SCHOOL_REVIEW)) { +// /* +// 校内赛项目数 +// */ +// schoolProjectNum++; +// } else if (projectDO.getProjectSchedule().equals(ProjectSchedule.SEMI_FINAL_REVIEW)) { +// /* +// 复赛项目数 +// */ +// rematchProjectNum++; +// } else if (projectDO.getProjectSchedule().equals(ProjectSchedule.FINAL_REVIEW)) { +// /* +// 决赛项目数 +// */ +// finalProjectNum++; +// } +// +// if (projectDO.getProjectStatus().equals(ProjectStatus.REMATCH_BRONZE_AWARD)) { +// rematchBronzeAwardNum++; +// } else if (projectDO.getProjectStatus().equals(ProjectStatus.REMATCH_SILVER_AWARD)) { +// rematchSilverAwardNum++; +// } else if (projectDO.getProjectStatus().equals(ProjectStatus.REMATCH_WINNING_AWARD)) { +// rematchWinningAwardNum++; +// } else if (projectDO.getProjectStatus().equals(ProjectStatus.REMATCH_FINALS_GOLD_AWARD)) { +// finalsGoldAwardNum++; +// } +// } +// +// projectDataOverview.setMatchNum(matchList.size()); +// projectDataOverview.setRematchBronzeAwardNum(rematchBronzeAwardNum); +// projectDataOverview.setRematchSilverAwardNum(rematchSilverAwardNum); +// projectDataOverview.setRematchWinningAwardNum(rematchWinningAwardNum); +// projectDataOverview.setFinalsSilverAwardNum(finalsSilverAwardNum); +// projectDataOverview.setFinalsGoldAwardNum(finalsGoldAwardNum); +// projectDataOverview.setSchoolProjectNum(schoolProjectNum + rematchProjectNum + finalProjectNum); +// projectDataOverview.setRematchProjectNum(rematchProjectNum + finalProjectNum); +// /* +// 复赛比例 +// */ +// if (rematchProjectNum > 0 && schoolProjectNum > 0) { +// Double rematchProportion = new BigDecimal(rematchProjectNum + finalProjectNum).divide(new BigDecimal(schoolProjectNum + rematchProjectNum + finalProjectNum), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).doubleValue(); +// projectDataOverview.setRematchProportion(rematchProportion); +// } else { +// projectDataOverview.setRematchProportion(0.0); +// } +// +// projectDataOverview.setFinalProjectNum(finalProjectNum); +// /* +// 决赛比例 +// */ +// if (finalProjectNum > 0 && rematchProjectNum > 0) { +// Double finalProportion = new BigDecimal(finalProjectNum).divide(new BigDecimal(rematchProjectNum + finalProjectNum), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).doubleValue(); +// projectDataOverview.setFinalProportion(finalProportion); +// } else { +// projectDataOverview.setFinalProportion(0.0); +// } +// +// return projectDataOverview; +// } + + @Override + public ProjectDataOverview getVocationalDataOverview(DataOverviewDTO dataOverviewDTO) { + ProjectDataOverview projectDataOverview = new ProjectDataOverview(); + /* + 注册人数 + */ + Integer registeredNum = studentService.count(); + projectDataOverview.setRegisteredNum(registeredNum); + + List matchList = matchDictService.getList(dataOverviewDTO.getProjectType(), dataOverviewDTO.getProjectGroup()); + + List list = this.baseMapper.selectList(new QueryWrapper() + .lambda() + .ne(ProjectDO::getProjectStatus, ProjectStatus.UN_SUBMITTED) + .eq(ProjectDO::getProjectGroup, dataOverviewDTO.getProjectGroup()) + .eq(ProjectDO::getProjectType, dataOverviewDTO.getProjectType())); + /* + 全部项目数量 + */ + projectDataOverview.setProjectNum(list.size()); + Integer schoolProjectNum = 0; + Integer rematchProjectNum = 0; + Integer finalProjectNum = 0; + Integer preliminaryProjectNum = 0; + + Integer rematchBronzeAwardNum = 0; + Integer rematchSilverAwardNum = 0; + Integer rematchWinningAwardNum = 0; + Integer finalsSilverAwardNum = 0; + Integer finalsGoldAwardNum = 0; + for (ProjectDO projectDO : list) { + if (projectDO.getProjectSchedule().equals(ProjectSchedule.SCHOOL_REVIEW)) { + /* + 校内赛项目数 + */ + schoolProjectNum++; + } +// else if(projectDO.getProjectSchedule().equals(ProjectSchedule.PRELIMINARY_REVIEW)) { +// /* +// 初赛项目数量 +// */ +// preliminaryProjectNum ++; +// } + else if (projectDO.getProjectSchedule().equals(ProjectSchedule.SEMI_FINAL_REVIEW)) { + /* + 复赛项目数 + */ + rematchProjectNum++; + } else if (projectDO.getProjectSchedule().equals(ProjectSchedule.FINAL_REVIEW)) { + /* + 决赛项目数 + */ + finalProjectNum++; + } + + if (projectDO.getProjectStatus().equals(ProjectStatus.REMATCH_BRONZE_AWARD)) { + rematchBronzeAwardNum++; + } else if (projectDO.getProjectStatus().equals(ProjectStatus.REMATCH_SILVER_AWARD)) { + rematchSilverAwardNum++; + } else if (projectDO.getProjectStatus().equals(ProjectStatus.REMATCH_WINNING_AWARD)) { + rematchWinningAwardNum++; + } else if (projectDO.getProjectStatus().equals(ProjectStatus.REMATCH_FINALS_GOLD_AWARD)) { + finalsGoldAwardNum++; + } + } + + projectDataOverview.setMatchNum(matchList.size()); + projectDataOverview.setRematchBronzeAwardNum(rematchBronzeAwardNum); + projectDataOverview.setRematchSilverAwardNum(rematchSilverAwardNum); + projectDataOverview.setRematchWinningAwardNum(rematchWinningAwardNum); + projectDataOverview.setFinalsSilverAwardNum(finalsSilverAwardNum); + projectDataOverview.setFinalsGoldAwardNum(finalsGoldAwardNum); + projectDataOverview.setSchoolProjectNum(schoolProjectNum + preliminaryProjectNum + rematchProjectNum + finalProjectNum); + projectDataOverview.setRematchProjectNum(rematchProjectNum + finalProjectNum); + /* + 复赛比例 + */ + if (rematchProjectNum > 0 && schoolProjectNum > 0) { + Double rematchProportion = new BigDecimal(rematchProjectNum + finalProjectNum).divide(new BigDecimal(preliminaryProjectNum + rematchProjectNum + finalProjectNum), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).doubleValue(); + projectDataOverview.setRematchProportion(rematchProportion); + } else { + projectDataOverview.setRematchProportion(0.0); + } + + projectDataOverview.setFinalProjectNum(finalProjectNum); + /* + 决赛比例 + */ + if (finalProjectNum > 0 && rematchProjectNum > 0) { + Double finalProportion = new BigDecimal(finalProjectNum).divide(new BigDecimal(rematchProjectNum + finalProjectNum), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).doubleValue(); + projectDataOverview.setFinalProportion(finalProportion); + } else { + projectDataOverview.setFinalProportion(0.0); + } + + return projectDataOverview; + } + +// @Override +// public ProjectDataOverview getMainTrackDataOverview() { +// MatchDictDO matchDictDO = matchDictService.getOne(new QueryWrapper() +// .lambda() +// .eq(MatchDictDO::getMatchType, ProjectType.MAIN_TRACK) +// .eq(MatchDictDO::getStatus, 1)); +// ProjectDataOverview projectDataOverview = new ProjectDataOverview(); +// if (matchDictDO != null) { +// throw new HttpException(10054); +// } +// +// List list = this.baseMapper.selectList(new QueryWrapper() +// .lambda() +// .eq(ProjectDO::getMatchId, matchDictDO.getId()) +// .eq(ProjectDO::getProjectType, ProjectType.MAIN_TRACK)); +// projectDataOverview.setProjectNum(list.size()); +// +// List scheduleRecordDOS = projectScheduleRecordService.list(new QueryWrapper().lambda() +// .eq(ProjectScheduleRecordDO::getMatchId, matchDictDO.getId()) +// .eq(ProjectScheduleRecordDO::getProjectType, ProjectType.MAIN_TRACK)); +// Integer schoolProjectNum = 0; +// Integer rematchProjectNum = 0; +// Integer finalProjectNum = 0; +// for (ProjectScheduleRecordDO scheduleRecordDO : scheduleRecordDOS) { +// if (scheduleRecordDO.getProjectSchedule().equals(ProjectSchedule.SCHOOL_REVIEW)) { +// schoolProjectNum++; +// } else if (scheduleRecordDO.getProjectSchedule().equals(ProjectSchedule.SEMI_FINAL_REVIEW)) { +// rematchProjectNum++; +// } else if (scheduleRecordDO.getProjectSchedule().equals(ProjectSchedule.FINAL_REVIEW)) { +// finalProjectNum++; +// } +// } +// projectDataOverview.setSchoolProjectNum(schoolProjectNum); +// projectDataOverview.setRematchProjectNum(rematchProjectNum); +// projectDataOverview.setFinalProjectNum(finalProjectNum); +// return projectDataOverview; +// } + + @Override + public void exportProjectReview(ReviewListDTO reviewListDTO) { + List data = new ArrayList<>(); + List fieldList = ExcelUtil.getField(ProjectJudgeVO.class); + ProjectJudgeVO projectJudgeVO = new ProjectJudgeVO(); + List projectList = this.baseMapper.selectList(new QueryWrapper() + .lambda() + .ne(ProjectDO::getProjectSchedule, ProjectSchedule.SCHOOL_REVIEW) + .eq(StringUtils.isNotBlank(reviewListDTO.getProjectGroup()), ProjectDO::getProjectGroup, reviewListDTO.getProjectGroup()) + .eq(StringUtils.isNotBlank(reviewListDTO.getProjectSchedule()), ProjectDO::getProjectSchedule, reviewListDTO.getProjectSchedule()) + .eq(ProjectDO::getMatchId, reviewListDTO.getMatchId())); + for (ProjectDO projectDO : projectList) { + if (projectDO != null) { + projectJudgeVO.setProjectName(projectDO.getProjectName()); + projectJudgeVO.setProjectProgress(projectDO.getProjectProgress()); + projectJudgeVO.setProjectSchedule(projectDO.getProjectSchedule()); + projectJudgeVO.setCollege(projectDO.getCollege()); + + MatchDictDO matchDictDO = matchDictService.getById(projectDO.getMatchId()); + if (matchDictDO != null) { + projectJudgeVO.setMatchName(matchDictDO.getMatchName()); + } + + StudentDO studentDO = studentService.getById(projectDO.getProposerId()); + if (studentDO != null) { + projectJudgeVO.setLeader(studentDO.getName()); + } + + Map map = JSON.parseObject(JSON.toJSONString(projectJudgeVO), Map.class); + List list = projectReviewService.list(new QueryWrapper() + .lambda() + .eq(ProjectReviewDO::getProjectSchedule, projectDO.getProjectSchedule()) + .eq(ProjectReviewDO::getProjectId, projectDO.getId())); + for (ProjectReviewDO projectReviewDO : list) { + ProjectJudgeDO projectJudgeDO = projectJudgeService.getById(projectReviewDO.getJudgeId()); + ExcelFieldVO excelFieldVO = new ExcelFieldVO(); + if (projectJudgeDO != null) { + if (!fieldList.stream().filter(e -> e.getName().equals(projectJudgeDO.getUsername())).findAny().isPresent()) { + excelFieldVO.setName(projectJudgeDO.getUsername()); + excelFieldVO.setField(projectJudgeDO.getUsername()); + fieldList.add(excelFieldVO); + } + + if (projectReviewDO.getScore() != null) { + map.put(projectJudgeDO.getUsername(), projectReviewDO.getScore().toString()); + } else { + map.put(projectJudgeDO.getUsername(), "-"); + } + } + } + data.add(map); + } + } + ExcelUtil.writeExcel(fieldList, data); + } + + @Override + public void exportProjectNew(ReviewListDTO reviewListDTO) { + List data = new ArrayList<>(); + List fieldList = ExcelUtil.getField(ProjectJudgeVO.class); + ProjectJudgeVO projectJudgeVO = new ProjectJudgeVO(); + List projectList = this.baseMapper.selectList(new QueryWrapper() + .lambda() + .ne(ProjectDO::getProjectSchedule, ProjectSchedule.SCHOOL_REVIEW) + .eq(StringUtils.isNotBlank(reviewListDTO.getProjectProgress()), ProjectDO::getProjectProgress, reviewListDTO.getProjectProgress()) + .eq(StringUtils.isNotBlank(reviewListDTO.getProjectSchedule()), ProjectDO::getProjectSchedule, reviewListDTO.getProjectSchedule()) + .eq(ProjectDO::getMatchId, reviewListDTO.getMatchId())); + for (ProjectDO projectDO : projectList) { + if (projectDO != null) { + projectJudgeVO.setProjectName(projectDO.getProjectName()); + projectJudgeVO.setProjectProgress(projectDO.getProjectProgress()); + projectJudgeVO.setProjectSchedule(projectDO.getProjectSchedule()); + projectJudgeVO.setCollege(projectDO.getCollege()); + + MatchDictDO matchDictDO = matchDictService.getById(projectDO.getMatchId()); + if (matchDictDO != null) { + projectJudgeVO.setMatchName(matchDictDO.getMatchName()); + } + + StudentDO studentDO = studentService.getById(projectDO.getProposerId()); + if (studentDO != null) { + projectJudgeVO.setLeader(studentDO.getName()); + } + + Map map = JSON.parseObject(JSON.toJSONString(projectJudgeVO), Map.class); + List list = projectReviewService.list(new QueryWrapper() + .lambda() + .eq(ProjectReviewDO::getProjectSchedule, projectDO.getProjectSchedule()) + .eq(ProjectReviewDO::getProjectId, projectDO.getId())); + for (ProjectReviewDO projectReviewDO : list) { + ProjectJudgeDO projectJudgeDO = projectJudgeService.getById(projectReviewDO.getJudgeId()); + ExcelFieldVO excelFieldVO = new ExcelFieldVO(); + if (projectJudgeDO != null) { + if (!fieldList.stream().filter(e -> e.getName().equals(projectJudgeDO.getUsername())).findAny().isPresent()) { + excelFieldVO.setName(projectJudgeDO.getUsername()); + excelFieldVO.setField(projectJudgeDO.getUsername()); + fieldList.add(excelFieldVO); + } + + if (projectReviewDO.getScore() != null) { + map.put(projectJudgeDO.getUsername(), projectReviewDO.getScore().toString()); + } else { + map.put(projectJudgeDO.getUsername(), "-"); + } + } + } + data.add(map); + } + } + ExcelUtil.writeExcel(fieldList, data); + } + + @Override + public ProjectNumVO getReviewProjectNum(ReviewListDTO reviewListDTO) { + ProjectJudgeDO projectJudgeDO = (ProjectJudgeDO) Localstorage.getUser(); + if (projectJudgeDO == null) { + throw new HttpException(Code.TOKEN_EXPIRED.getCode(), Code.TOKEN_EXPIRED.getMessage()); + } + + ProjectNumVO projectNumVO = new ProjectNumVO(); + List list = this.baseMapper.getProjectReviewList(projectJudgeDO.getId(), reviewListDTO.getMatchId(), reviewListDTO.getProjectProgress()); + + Integer technologyRematchNum = 0; + Integer technologyFinalNum = 0; + Integer culturalRematchNum = 0; + Integer culturalFinalNum = 0; + Integer rematchReviewedTNum = 0; + Integer rematchNotReviewedTNum = 0; + Integer finalReviewedTNum = 0; + Integer finalNotReviewedTNum = 0; + Integer rematchReviewedCNum = 0; + Integer rematchNotReviewedCNum = 0; + Integer finalReviewedCNum = 0; + Integer finalNotReviewedCNum = 0; + if (list.size() > 0) { + for (ProjectDO projectDO : list) { + if (projectDO.getProjectGroup().equals(ProjectType.SECONDARY_GROUP)) { + if (projectDO.getProjectSchedule().equals(ProjectSchedule.SEMI_FINAL_REVIEW)) { + technologyRematchNum++; + if (StringUtils.isNotBlank(reviewListDTO.getProjectStatus())) { + if (projectDO.getProjectReview().equals(ProjectReview.ASSIGNED)) { + rematchNotReviewedTNum++; + } else { + rematchReviewedTNum++; + } + } + } else if (projectDO.getProjectSchedule().equals(ProjectSchedule.FINAL_REVIEW)) { + technologyFinalNum++; + if (StringUtils.isNotBlank(reviewListDTO.getProjectStatus())) { + if (projectDO.getProjectReview().equals(ProjectReview.ASSIGNED)) { + finalNotReviewedTNum++; + } else { + finalReviewedTNum++; + } + } + } + } else if (projectDO.getProjectGroup().equals(ProjectType.VOCATIONAL_GROUP)) { + if (projectDO.getProjectSchedule().equals(ProjectSchedule.SEMI_FINAL_REVIEW)) { + culturalRematchNum++; + if (StringUtils.isNotBlank(reviewListDTO.getProjectStatus())) { + if (projectDO.getProjectReview().equals(ProjectReview.ASSIGNED)) { + rematchNotReviewedCNum++; + } else { + rematchReviewedCNum++; + } + } + } else if (projectDO.getProjectSchedule().equals(ProjectSchedule.FINAL_REVIEW)) { + culturalFinalNum++; + if (StringUtils.isNotBlank(reviewListDTO.getProjectStatus())) { + if (projectDO.getProjectReview().equals(ProjectReview.ASSIGNED)) { + finalNotReviewedCNum++; + } else { + finalReviewedCNum++; + } + } + } + } + } + } + projectNumVO.setTechnologyRematchNum(technologyRematchNum); + projectNumVO.setTechnologyFinalNum(technologyFinalNum); + projectNumVO.setCulturalRematchNum(culturalRematchNum); + projectNumVO.setCulturalFinalNum(culturalFinalNum); + if (reviewListDTO.getProjectStatus().equals(ProjectSchedule.SEMI_FINAL_REVIEW) && + reviewListDTO.getProjectGroup().equals(ProjectType.SECONDARY_GROUP)) { + projectNumVO.setReviewedNum(rematchReviewedTNum); + projectNumVO.setNotReviewedNum(rematchNotReviewedTNum); + } else if (reviewListDTO.getProjectStatus().equals(ProjectSchedule.FINAL_REVIEW) && + reviewListDTO.getProjectGroup().equals(ProjectType.SECONDARY_GROUP)) { + projectNumVO.setReviewedNum(finalReviewedTNum); + projectNumVO.setNotReviewedNum(finalNotReviewedTNum); + } else if (reviewListDTO.getProjectStatus().equals(ProjectSchedule.SEMI_FINAL_REVIEW) && + reviewListDTO.getProjectGroup().equals(ProjectType.VOCATIONAL_GROUP)) { + projectNumVO.setReviewedNum(rematchReviewedCNum); + projectNumVO.setNotReviewedNum(rematchNotReviewedCNum); + } else if (reviewListDTO.getProjectStatus().equals(ProjectSchedule.FINAL_REVIEW) && + reviewListDTO.getProjectGroup().equals(ProjectType.VOCATIONAL_GROUP)) { + projectNumVO.setReviewedNum(finalReviewedCNum); + projectNumVO.setNotReviewedNum(finalNotReviewedCNum); + } + return projectNumVO; + } + + @Override + public void exportCollegeProject(CollegeProjectDTO collegeProjectDTO) { + List data = new ArrayList<>(); + if (collegeProjectDTO.getId().size() > 0) { + for (Long id : collegeProjectDTO.getId()) { + CollegeProjectVO collegeProjectVO = new CollegeProjectVO(); + ProjectDO projectDO = this.baseMapper.selectById(id); + if (projectDO != null) { + StudentDO studentDO = studentService.getById(projectDO.getProposerId()); + if (studentDO != null) { + collegeProjectVO.setName(studentDO.getName()); + collegeProjectVO.setMajor(studentDO.getMajor()); + collegeProjectVO.setTelephone(studentDO.getTelephone()); + } + + collegeProjectVO.setCollege(projectDO.getCollege()); + collegeProjectVO.setProjectName(projectDO.getProjectName()); + collegeProjectVO.setProjectGroup(projectDO.getProjectGroup()); + collegeProjectVO.setApplicationTime(DateFormatUtil.format(DateFormatUtil.localDateTimeToDate(projectDO.getCreateTime()), DateFormatUtil.FMT_sdf_yMd)); + } + data.add(JSON.parseObject(JSON.toJSONString(collegeProjectVO), Map.class)); + } + } + ExcelUtil.writeExcel(ExcelUtil.getField(CollegeProjectVO.class), data); + } + + @Override + public void getProjectByStudentId(StudentProjectDTO studentProjectDTO) { + StudentDO studentDO = (StudentDO) Localstorage.getUser(); + if (studentDO == null) { + throw new HttpException(Code.TOKEN_EXPIRED.getCode(), Code.TOKEN_EXPIRED.getMessage()); + } + + List projectDO = this.baseMapper.selectList(new QueryWrapper() + .lambda() + .ne(ProjectDO::getProjectStatus, ProjectStatus.UN_SUBMITTED) + .ne(ProjectDO::getProjectStatus, ProjectStatus.SCHOOL_NOT_PASSED) + .eq(ProjectDO::getProposerId, studentDO.getId()) + .eq(ProjectDO::getProjectGroup, studentProjectDTO.getProjectGroup()) + .eq(ProjectDO::getMatchId, studentProjectDTO.getMatchId())); + if (projectDO != null && projectDO.size() > 0) { + throw new HttpException(10072); + } + + MatchDictDO matchDictDO = matchDictService.getById(studentProjectDTO.getMatchId()); + if (matchDictDO != null) { + if (new Date().before(matchDictDO.getStartTime())) { + throw new HttpException(10055); + } + + if (new Date().after(matchDictDO.getEndTime())) { + throw new HttpException(10055); + } + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void rollback(ProjectDO projectDO) { + ProjectDO project = this.baseMapper.selectById(projectDO.getId()); + if (project == null) { + throw new HttpException(10046); + } + + /** + * 学生上报撤回 没有限制,项目不为空既可以撤回 + * 校内赛上报撤回,没有分配评委 + 没有评分 + */ + + if (!project.getProjectStatus().equals(ProjectReview.TO_REVIEWED)) { + throw new HttpException(10073); + } + + if (project.getProjectAssigned() != null && !project.getProjectAssigned().equals(ProjectReview.UNASSIGNED)) { + throw new HttpException(10073); + } + + MatchDictDO matchDictDO = matchDictService.getById(project.getMatchId()); + if (new Date().before(matchDictDO.getStartTime()) || new Date().after(matchDictDO.getEndTime())) { + throw new HttpException(10078); + } + +// ProjectScheduleRecordDO projectScheduleRecordDO = projectScheduleRecordService.getOne(new QueryWrapper() +// .lambda() +// .eq(ProjectScheduleRecordDO::getProjectId, project.getId()) +// .orderByDesc(ProjectScheduleRecordDO::getId)); +// if (projectScheduleRecordDO != null) { +// projectScheduleRecordService.removeById(projectScheduleRecordDO.getId()); +// } + + ProjectDO p = new ProjectDO(); + p.setId(project.getId()); + + if (ProjectSchedule.SCHOOL_REVIEW.equals(project.getProjectSchedule())) { + p.setProjectSchedule(ProjectSchedule.REGISTER); + } + if (ProjectSchedule.SEMI_FINAL_REVIEW.equals(project.getProjectSchedule())) { + p.setProjectSchedule(ProjectSchedule.SCHOOL_REVIEW); + } + + if (project.getProjectSchedule().equals(ProjectSchedule.REGISTER)) { + p.setProjectStatus(ProjectStatus.UN_SUBMITTED); + } + + this.baseMapper.updateById(p); + + /* + 学生短信通知 + StudentDO studentDO = studentService.getById(project.getProposerId()); + if (studentDO != null) { + String msg = ProjectSchedule.SCHOOL_REVIEW + "," + ProjectReview.TO_REVIEWED; + aliyunSmsUtil.sendTemplateMsg(msg, studentDO.getTelephone(), SMSTemplate.PROJECT_PROGRESS); + } + + 评审短信通知 + List list = projectReviewService.list(new QueryWrapper() + .lambda() + .eq(ProjectReviewDO::getProjectId, projectDO.getId())); + if(list != null && list.size() > 0) { + for (ProjectReviewDO projectReviewDO : list) { + projectReviewService.removeById(projectReviewDO.getId()); + + ProjectJudgeDO projectJudgeDO = projectJudgeService.getById(projectReviewDO.getJudgeId()); + String msg = project.getProjectName(); + aliyunSmsUtil.sendTemplateMsg(msg, projectJudgeDO.getTelephone(), SMSTemplate.CANCEL_REVIEW); + } + } + */ + } + + @Override + public SeedTrackProjectNumVO getSeedTrackProjectNum(SeedTrackProjectNumDTO seedTrackProjectNumDTO) { + Map map = Localstorage.getMap(); + CollegesDictDO collegesDictDO = new CollegesDictDO(); + if (map.get("type").equals(Platform.school)) { + collegesDictDO = (CollegesDictDO) map.get("user"); + } + + SeedTrackProjectNumVO seedTrackProjectNumVO = new SeedTrackProjectNumVO(); + List list = this.baseMapper.getSeedTrackProjectList(seedTrackProjectNumDTO.getMatchId(), seedTrackProjectNumDTO.getProjectGroup(), collegesDictDO.getName(), seedTrackProjectNumDTO.getProjectProgress()); + Integer schoolProjectNum = 0; + Integer rematchProjectNum = 0; + Integer finalProjectNum = 0; + if (list != null && list.size() > 0) { + for (ProjectDO projectDO : list) { + if (projectDO.getProjectSchedule().equals(ProjectSchedule.SCHOOL_REVIEW)) { + schoolProjectNum++; + } else if (projectDO.getProjectSchedule().equals(ProjectSchedule.SEMI_FINAL_REVIEW)) { + rematchProjectNum++; + } else if (projectDO.getProjectSchedule().equals(ProjectSchedule.FINAL_REVIEW)) { + finalProjectNum++; + } + } + } + seedTrackProjectNumVO.setSchoolProjectNum(schoolProjectNum); + seedTrackProjectNumVO.setRematchProjectNum(rematchProjectNum); + seedTrackProjectNumVO.setFinalProjectNum(finalProjectNum); + return seedTrackProjectNumVO; + } + + @Override + public void exportProjectCollegeList(ProjectCollegeListDTO projectCollegeListDTO) { + CollegesDictDO collegesDictDO = (CollegesDictDO) Localstorage.getUser(); + if (collegesDictDO == null) { + throw new HttpException(Code.TOKEN_EXPIRED.getCode(), Code.TOKEN_EXPIRED.getMessage()); + } + + List data = new ArrayList<>(); + for (Long id : projectCollegeListDTO.getIds()) { + ProjectDO projectDO = this.baseMapper.selectById(id); + if (projectDO != null) { + ExportProjectDTO project = new ExportProjectDTO(); + BeanUtils.copyProperties(projectDO, project); + + MatchDictDO matchDictDO = matchDictService.getById(projectDO.getMatchId()); + if (matchDictDO != null) { + project.setMatchName(matchDictDO.getMatchName()); + } + + List memberDOS = projectMemberService.list(new QueryWrapper() + .lambda() + .eq(ProjectMemberDO::getProjectId, projectDO.getId())); + + String teamMember = ""; + String teacher = ""; + for (ProjectMemberDO memberDO : memberDOS) { + if (memberDO.getType().equals(MemberType.PRINCIPAL)) { + project.setName(memberDO.getName()); + project.setMajor(memberDO.getMajor()); + if (memberDO.getTelephone() == null) { + StudentDO studentDO = studentService.getById(projectDO.getProposerId()); + project.setTelephone(studentDO.getTelephone()); + } else { + project.setTelephone(memberDO.getTelephone()); + } + project.setStudentNo(memberDO.getStudentNo()); + } else if (memberDO.getType().equals(MemberType.TEAM_MEMBER)) { + teamMember += memberDO.getName() + ","; + } else if (memberDO.getType().equals(MemberType.MENTOR)) { + teacher += memberDO.getName() + ","; + } + } + if (StringUtils.isNotBlank(teamMember)) { + project.setTeamMembers(teamMember.substring(0, teamMember.length() - 1)); + } else { + project.setTeamMembers(""); + } + + if (StringUtils.isNotBlank(teacher)) { + project.setTeachers(teacher.substring(0, teacher.length() - 1)); + } else { + project.setTeachers(""); + } + data.add(JSON.parseObject(JSON.toJSONString(project), Map.class)); + } + } + ExcelUtil.writeExcel(ExcelUtil.getField(ExportProjectDTO.class), data); + } +} diff --git a/src/main/java/com/zhongzhi/service/impl/ProjectTrademarkServiceImpl.java b/src/main/java/com/zhongzhi/service/impl/ProjectTrademarkServiceImpl.java new file mode 100644 index 0000000..6bc63c0 --- /dev/null +++ b/src/main/java/com/zhongzhi/service/impl/ProjectTrademarkServiceImpl.java @@ -0,0 +1,20 @@ +package com.zhongzhi.service.impl; + +import com.zhongzhi.model.ProjectTrademarkDO; +import com.zhongzhi.dao.ProjectTrademarkMapper; +import com.zhongzhi.service.ProjectTrademarkService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + *

+ * 项目作品 服务实现类 + *

+ * + * @author DengMin + * @since 2022-04-25 + */ +@Service +public class ProjectTrademarkServiceImpl extends ServiceImpl implements ProjectTrademarkService { + +} diff --git a/src/main/java/com/zhongzhi/service/impl/ProjectWorksServiceImpl.java b/src/main/java/com/zhongzhi/service/impl/ProjectWorksServiceImpl.java new file mode 100644 index 0000000..94a77f6 --- /dev/null +++ b/src/main/java/com/zhongzhi/service/impl/ProjectWorksServiceImpl.java @@ -0,0 +1,20 @@ +package com.zhongzhi.service.impl; + +import com.zhongzhi.model.ProjectWorksDO; +import com.zhongzhi.dao.ProjectWorksMapper; +import com.zhongzhi.service.ProjectWorksService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + *

+ * 项目作品 服务实现类 + *

+ * + * @author DengMin + * @since 2022-04-25 + */ +@Service +public class ProjectWorksServiceImpl extends ServiceImpl implements ProjectWorksService { + +} diff --git a/src/main/java/com/zhongzhi/service/impl/SmsCodeServiceImpl.java b/src/main/java/com/zhongzhi/service/impl/SmsCodeServiceImpl.java new file mode 100644 index 0000000..eee73e6 --- /dev/null +++ b/src/main/java/com/zhongzhi/service/impl/SmsCodeServiceImpl.java @@ -0,0 +1,180 @@ +package com.zhongzhi.service.impl; + +import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.zhongzhi.common.constant.SmsCode; +import com.zhongzhi.common.exception.HttpException; +import com.zhongzhi.common.utils.AliyunSmsUtil; +import com.zhongzhi.common.utils.RandomUtil; +import com.zhongzhi.model.AdministerDO; +import com.zhongzhi.model.CollegesDictDO; +import com.zhongzhi.model.ProjectJudgeDO; +import com.zhongzhi.model.SmsCodeDO; +import com.zhongzhi.dao.SmsCodeDAO; +import com.zhongzhi.model.StudentDO; +import com.zhongzhi.service.AdministerService; +import com.zhongzhi.service.CollegesDictService; +import com.zhongzhi.service.ProjectJudgeService; +import com.zhongzhi.service.SmsCodeService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.zhongzhi.service.StudentService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + *

+ * 短信验证码 服务实现类 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +@Service +public class SmsCodeServiceImpl extends ServiceImpl implements SmsCodeService { + + @Autowired + private AliyunSmsUtil aliyunSmsUtil; + + @Autowired + private StudentService studentService; + + @Autowired + private AdministerService administerService; + + @Autowired + private ProjectJudgeService projectJudgeService; + + @Autowired + private CollegesDictService collegesDictService; + + @Override + public void sendRegisterCode(SmsCodeDO smsCodeDO) { + StudentDO studentDO = studentService.getOne(new QueryWrapper() + .lambda() + .eq(StudentDO::getTelephone, smsCodeDO.getTelephone())); + if (studentDO != null) { + throw new HttpException(10020); + } + + int code = RandomUtil.getCode(); + SendSmsResponse sendSmsResponse = aliyunSmsUtil.send(smsCodeDO.getTelephone(), code); + if (sendSmsResponse != null && sendSmsResponse.getCode().equals("OK")) { + SmsCodeDO smsCode = this.baseMapper.selectOne(new QueryWrapper() + .lambda() + .eq(SmsCodeDO::getTelephone, smsCodeDO.getTelephone())); + if (smsCode != null) { + this.baseMapper.deleteById(smsCode.getId()); + } + + smsCodeDO.setCode(String.valueOf(code)); + smsCodeDO.setPlatform(SmsCode.student); + smsCodeDO.setType(SmsCode.register); + this.baseMapper.insert(smsCodeDO); + } else { + throw new HttpException(10011); + } + } + + @Override + public void sendStudentLoginCode(SmsCodeDO smsCodeDO) { + StudentDO studentDO = studentService.getOne(new QueryWrapper() + .lambda() + .eq(StudentDO::getTelephone, smsCodeDO.getTelephone())); + if (studentDO == null) { + throw new HttpException(10024); + } + + CollegesDictDO collegesDictDO = collegesDictService.getOne(new QueryWrapper() + .lambda() + .eq(CollegesDictDO::getName, studentDO.getCollege())); + if (collegesDictDO.getLoginStatus() == 0) { + throw new HttpException(10067); + } + + int code = RandomUtil.getCode(); + SendSmsResponse sendSmsResponse = aliyunSmsUtil.send(smsCodeDO.getTelephone(), code); + if (sendSmsResponse != null && sendSmsResponse.getCode().equals("OK")) { + SmsCodeDO smsCode = this.baseMapper.selectOne(new QueryWrapper() + .lambda() + .eq(SmsCodeDO::getTelephone, smsCodeDO.getTelephone())); + if (smsCode != null) { + this.baseMapper.deleteById(smsCode.getId()); + } + + smsCodeDO.setCode(String.valueOf(code)); + smsCodeDO.setPlatform(SmsCode.student); + smsCodeDO.setType(SmsCode.login); + this.baseMapper.insert(smsCodeDO); + } else { + throw new HttpException(10011); + } + } + + @Override + public SmsCodeDO getOneByTelePhone(String telephone, String type, String platform) { + return this.baseMapper.getOneByTelePhone(telephone, type, platform); + } + + @Override + public void sendAdministerLoginCode(AdministerDO administerDO) { + AdministerDO administer = administerService.getOne(new QueryWrapper() + .lambda() + .eq(AdministerDO::getTelephone, administerDO.getTelephone())); + if (administer == null) { + throw new HttpException(10060); + } + + int code = RandomUtil.getCode(); + SendSmsResponse sendSmsResponse = aliyunSmsUtil.send(administerDO.getTelephone(), code); + if (sendSmsResponse != null && sendSmsResponse.getCode().equals("OK")) { + SmsCodeDO smsCode = this.baseMapper.selectOne(new QueryWrapper() + .lambda() + .eq(SmsCodeDO::getTelephone, administerDO.getTelephone())); + if (smsCode != null) { + this.baseMapper.deleteById(smsCode.getId()); + } + + SmsCodeDO smsCodeDO = new SmsCodeDO(); + smsCodeDO.setTelephone(administerDO.getTelephone()); + smsCodeDO.setCode(String.valueOf(code)); + smsCodeDO.setPlatform(SmsCode.center); + smsCodeDO.setType(SmsCode.login); + this.baseMapper.insert(smsCodeDO); + } else { + throw new HttpException(10011); + } + } + + @Override + public void sendJudgeLoginCode(SmsCodeDO smsCodeDO) { + + ProjectJudgeDO projectJudgeDO = projectJudgeService.getOne(new QueryWrapper() + .lambda() + .eq(ProjectJudgeDO::getTelephone, smsCodeDO.getTelephone())); + if (projectJudgeDO == null) { + throw new HttpException(10060); + } + + if (projectJudgeDO.getPasswordFree() == null || projectJudgeDO.getPasswordFree() != 1) { + int code = RandomUtil.getCode(); + SendSmsResponse sendSmsResponse = aliyunSmsUtil.send(smsCodeDO.getTelephone(), code); + if (sendSmsResponse != null && sendSmsResponse.getCode().equals("OK")) { + SmsCodeDO smsCode = this.baseMapper.selectOne(new QueryWrapper() + .lambda() + .eq(SmsCodeDO::getTelephone, smsCodeDO.getTelephone())); + if (smsCode != null) { + this.baseMapper.deleteById(smsCode.getId()); + } + + SmsCodeDO sc = new SmsCodeDO(); + sc.setTelephone(smsCodeDO.getTelephone()); + sc.setCode(String.valueOf(code)); + sc.setPlatform(SmsCode.review); + sc.setType(SmsCode.login); + this.baseMapper.insert(sc); + } else { + throw new HttpException(10011); + } + } + } +} diff --git a/src/main/java/com/zhongzhi/service/impl/SmsNoticeServiceImpl.java b/src/main/java/com/zhongzhi/service/impl/SmsNoticeServiceImpl.java new file mode 100644 index 0000000..5d3b3c6 --- /dev/null +++ b/src/main/java/com/zhongzhi/service/impl/SmsNoticeServiceImpl.java @@ -0,0 +1,90 @@ +package com.zhongzhi.service.impl; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.zhongzhi.common.constant.SMSTemplate; +import com.zhongzhi.common.utils.AliyunSmsUtil; +import com.zhongzhi.dao.ProjectDAO; +import com.zhongzhi.dao.StudentDAO; +import com.zhongzhi.dto.notice.SmsNoticeDTO; +import com.zhongzhi.dto.notice.SmsNoticePageDTO; +import com.zhongzhi.model.ProjectDO; +import com.zhongzhi.model.SmsNoticeDO; +import com.zhongzhi.dao.SmsNoticeMapper; +import com.zhongzhi.model.StudentDO; +import com.zhongzhi.service.SmsNoticeService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.zhongzhi.vo.project.SeedTrackProjectPageVO; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +/** + *

+ * 短信通知记录 服务实现类 + *

+ * + * @author DengMin + * @since 2022-04-15 + */ +@Service +public class SmsNoticeServiceImpl extends ServiceImpl implements SmsNoticeService { + + @Autowired + private AliyunSmsUtil aliyunSmsUtil; + + @Autowired + private ProjectDAO projectDAO; + + @Autowired + private StudentDAO studentDAO; + + @Override + @Transactional(rollbackFor = Exception.class) + public void batchSend(SmsNoticeDTO smsNoticeDTO) { + List list = projectDAO.getProjectList(smsNoticeDTO.getMatchId(), smsNoticeDTO.getProjectGroup(), smsNoticeDTO.getProjectSchedule(), smsNoticeDTO.getProjectStatus(), smsNoticeDTO.getName()); + if (list.size() > 0) { + for (SeedTrackProjectPageVO projectDO : list) { + String msg = projectDO.getProjectSchedule() + "," + projectDO.getProjectStatus(); + aliyunSmsUtil.sendTemplateMsg(msg, projectDO.getTelephone(), SMSTemplate.PROJECT_PROGRESS); + + SmsNoticeDO smsNoticeDO = new SmsNoticeDO(); + smsNoticeDO.setProjectId(projectDO.getId()); + smsNoticeDO.setName(projectDO.getName()); + smsNoticeDO.setTelephone(projectDO.getTelephone()); + smsNoticeDO.setContent(msg); + this.baseMapper.insert(smsNoticeDO); + } + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void send(SmsNoticeDTO smsNoticeDTO) { + if (smsNoticeDTO.getIds().size() > 0) { + for (Long id : smsNoticeDTO.getIds()) { + ProjectDO projectDO = projectDAO.selectById(id); + if (projectDO != null) { + StudentDO studentDO = studentDAO.selectById(projectDO.getProposerId()); + String msg = projectDO.getProjectSchedule() + "," + projectDO.getProjectStatus(); + aliyunSmsUtil.sendTemplateMsg(msg, studentDO.getTelephone(), SMSTemplate.PROJECT_PROGRESS); + + SmsNoticeDO smsNoticeDO = new SmsNoticeDO(); + smsNoticeDO.setProjectId(projectDO.getId()); + smsNoticeDO.setName(studentDO.getName()); + smsNoticeDO.setTelephone(studentDO.getTelephone()); + smsNoticeDO.setContent(msg); + this.baseMapper.insert(smsNoticeDO); + } + } + } + } + + @Override + public IPage getListByPage(SmsNoticePageDTO smsNoticePageDTO) { + Page page = new Page(smsNoticePageDTO.getPageNo(), smsNoticePageDTO.getPageSize()); + return this.baseMapper.getListByPage(page, smsNoticePageDTO.getDate(), smsNoticePageDTO.getName()); + } +} diff --git a/src/main/java/com/zhongzhi/service/impl/StudentServiceImpl.java b/src/main/java/com/zhongzhi/service/impl/StudentServiceImpl.java new file mode 100644 index 0000000..7799377 --- /dev/null +++ b/src/main/java/com/zhongzhi/service/impl/StudentServiceImpl.java @@ -0,0 +1,129 @@ +package com.zhongzhi.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.zhongzhi.common.constant.Code; +import com.zhongzhi.common.constant.SmsCode; +import com.zhongzhi.common.exception.HttpException; +import com.zhongzhi.common.utils.JwtUtil; +import com.zhongzhi.common.utils.Localstorage; +import com.zhongzhi.dto.student.LoginDTO; +import com.zhongzhi.dto.student.RegisterDTO; +import com.zhongzhi.model.CollegesDictDO; +import com.zhongzhi.model.SmsCodeDO; +import com.zhongzhi.model.StudentDO; +import com.zhongzhi.dao.StudentDAO; +import com.zhongzhi.service.CollegesDictService; +import com.zhongzhi.service.SmsCodeService; +import com.zhongzhi.service.StudentService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.zhongzhi.vo.student.StudentInfoVO; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + *

+ * 服务实现类 + *

+ * + * @author DengMin + * @since 2021-04-28 + */ +@Service +public class StudentServiceImpl extends ServiceImpl implements StudentService { + + @Autowired + private SmsCodeService smsCodeService; + + @Autowired + private CollegesDictService collegesDictService; + + @Override + public StudentInfoVO register(RegisterDTO registerDTO) { + StudentInfoVO studentInfoVO = new StudentInfoVO(); + SmsCodeDO smsCodeDO = smsCodeService.getOneByTelePhone(registerDTO.getTelephone(), SmsCode.register, SmsCode.student); + if (smsCodeDO == null) { + throw new HttpException(10025); + } + + if (!smsCodeDO.getCode().equals(registerDTO.getCode())) { + throw new HttpException(10021); + } + + smsCodeService.removeById(smsCodeDO.getId()); + + if (!registerDTO.getTelephone().equals(smsCodeDO.getTelephone())) { + throw new HttpException(10022); + } + + StudentDO telephone = this.baseMapper.selectOne(new QueryWrapper() + .lambda() + .eq(StudentDO::getTelephone, registerDTO.getTelephone())); + if (telephone != null) { + throw new HttpException(10020); + } + + Integer count = this.baseMapper.selectCount(new QueryWrapper() + .lambda() + .eq(StudentDO::getIdCard, registerDTO.getIdCard())); + if (count > 0) { + throw new HttpException(10023); + } + + StudentDO student = new StudentDO(); + BeanUtils.copyProperties(registerDTO, student); + student.setCollege(registerDTO.getSchool()); + this.baseMapper.insert(student); + + String token = JwtUtil.generateToken(student.getId(), SmsCode.student); + BeanUtils.copyProperties(registerDTO, studentInfoVO); + studentInfoVO.setCollege(registerDTO.getSchool()); + studentInfoVO.setToken(token); + return studentInfoVO; + } + + @Override + public StudentInfoVO login(LoginDTO loginDTO) { + StudentInfoVO studentInfoVO = new StudentInfoVO(); + SmsCodeDO smsCodeDO = smsCodeService.getOneByTelePhone(loginDTO.getTelephone(), SmsCode.login, SmsCode.student); + if (smsCodeDO == null) { + throw new HttpException(10025); + } + + if (!smsCodeDO.getCode().equals(loginDTO.getCode())) { + throw new HttpException(10021); + } + + smsCodeService.removeById(smsCodeDO.getId()); + + StudentDO studentDO = this.baseMapper.selectOne(new QueryWrapper() + .lambda() + .eq(StudentDO::getTelephone, loginDTO.getTelephone())); + if (studentDO == null) { + throw new HttpException(10024); + } + + CollegesDictDO collegesDictDO = collegesDictService.getOne(new QueryWrapper() + .lambda() + .eq(CollegesDictDO::getName, studentDO.getCollege())); + if(collegesDictDO.getLoginStatus() == 0) { + throw new HttpException(10067); + } + + String token = JwtUtil.generateToken(studentDO.getId(), SmsCode.student); + BeanUtils.copyProperties(studentDO, studentInfoVO); + studentInfoVO.setToken(token); + return studentInfoVO; + } + + @Override + public void updateStudentInfo(StudentDO studentDO) { + StudentDO student = (StudentDO) Localstorage.getUser(); + if (studentDO == null) { + throw new HttpException(Code.TOKEN_EXPIRED.getCode(), Code.TOKEN_EXPIRED.getMessage()); + } + + studentDO.setId(student.getId()); + this.baseMapper.updateById(studentDO); + } +} diff --git a/src/main/java/com/zhongzhi/service/impl/VodDictServiceImpl.java b/src/main/java/com/zhongzhi/service/impl/VodDictServiceImpl.java new file mode 100644 index 0000000..5e6a1af --- /dev/null +++ b/src/main/java/com/zhongzhi/service/impl/VodDictServiceImpl.java @@ -0,0 +1,111 @@ +package com.zhongzhi.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.zhongzhi.common.configure.VODConfig; +import com.zhongzhi.common.utils.Signature; +import com.zhongzhi.common.utils.VodUtil; +import com.zhongzhi.dto.course.ChangeOrdersDTO; +import com.zhongzhi.dto.course.VodsDTO; +import com.zhongzhi.model.CourseDictDO; +import com.zhongzhi.model.VodDictDO; +import com.zhongzhi.dao.VodDictDAO; +import com.zhongzhi.service.VodDictService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.zhongzhi.vo.course.SignatureVO; +import com.zhongzhi.vo.course.VodsVO; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Random; + +/** + *

+ * 服务实现类 + *

+ * + * @author DengMin + * @since 2022-11-14 + */ +@Service +public class VodDictServiceImpl extends ServiceImpl implements VodDictService { + + @Autowired + private VODConfig vodConfig; + + @Value("${spring.profiles.active}") + private String env; + + public SignatureVO signature() { +// + SignatureVO signatureVO = new SignatureVO(); + + Signature signature = new Signature(); + signature.setSecretId(vodConfig.getSecretId()); + signature.setSecretKey(vodConfig.getSecretKey()); + signature.setCurrentTime(System.currentTimeMillis()); + signature.setRandom(new Random().nextInt(Integer.MAX_VALUE)); + signature.setSignValidDuration(3600 * 24 * 2); + signature.setClassId(vodConfig.getClassId()); + String sign = ""; + try { + sign = signature.getUploadSignature(); + signatureVO.setSign(sign); + } catch (Exception ex) { + ex.printStackTrace(); +// throw new MyException(ResultEnum.UNKNOWN_ERROR); + } + return signatureVO; + } + + public void deleteVod(VodDictDO vodDictDO) { + this.baseMapper.deleteById(vodDictDO.getId()); + } + + public void addVod(VodDictDO vodDictDO) { + + //查看这个课程当前最大的no + List vodDictDOS = this.baseMapper.selectList(new QueryWrapper() + .lambda() + .eq(VodDictDO::getCourseId, vodDictDO.getCourseId()) + .orderByDesc(VodDictDO::getOrderNo)); + + int orderNo = 1; + + if (vodDictDOS.size() > 0) { + orderNo += vodDictDOS.get(0).getOrderNo(); + } + vodDictDO.setOrderNo(orderNo); + this.baseMapper.insert(vodDictDO); + + //测试环境就不转码了 + if (env.equals("prod")){ + VodUtil.processMedia(vodConfig, vodDictDO.getVodCode()); + } + } + + public void updateVod(VodDictDO vodDictDO) { + this.baseMapper.updateById(vodDictDO); + } + + public void changeOrders(ChangeOrdersDTO changeOrdersDTO) { + List ids = changeOrdersDTO.getIds(); + int i = 1; + for (Long id : ids) { + VodDictDO vodDictDO = this.baseMapper.selectById(id); + vodDictDO.setOrderNo(i); + this.baseMapper.updateById(vodDictDO); + i++; + } + } + + public List vods(VodsDTO vodsDTO) { + return this.baseMapper.vods(vodsDTO.getCourseId(), vodsDTO.getVodName(),vodsDTO.getYearId()); + } + + public List fourVods(CourseDictDO courseDictDO) { + return this.baseMapper.fourVods(courseDictDO); + } + +} diff --git a/src/main/java/com/zhongzhi/service/impl/YearDictServiceImpl.java b/src/main/java/com/zhongzhi/service/impl/YearDictServiceImpl.java new file mode 100644 index 0000000..9447361 --- /dev/null +++ b/src/main/java/com/zhongzhi/service/impl/YearDictServiceImpl.java @@ -0,0 +1,55 @@ +package com.zhongzhi.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.zhongzhi.common.exception.HttpException; +import com.zhongzhi.model.YearDictDO; +import com.zhongzhi.dao.YearDictDAO; +import com.zhongzhi.service.YearDictService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + *

+ * 年份字典表 服务实现类 + *

+ * + * @author DengMin + * @since 2023-04-11 + */ +@Service +public class YearDictServiceImpl extends ServiceImpl implements YearDictService { + + + public List queryYears() { + return this.baseMapper.selectList(null); + } + + public void updateYear(YearDictDO yearDictDO) { + + int count = this.baseMapper.selectCount(new QueryWrapper() + .lambda() + .eq(YearDictDO::getYear,yearDictDO.getYear()) + .ne(YearDictDO::getId,yearDictDO.getId())); + + if (count > 0 ){ + throw new HttpException(90001); + } + + this.baseMapper.updateById(yearDictDO); + } + + public void addYear(YearDictDO yearDictDO) { + int count = this.baseMapper.selectCount(new QueryWrapper() + .lambda() + .eq(YearDictDO::getYear,yearDictDO.getYear())); + + if (count > 0 ){ + throw new HttpException(90001); + } + yearDictDO.setStatus("1"); + this.baseMapper.insert(yearDictDO); + } + +} diff --git a/src/main/java/com/zhongzhi/vo/ExcelFieldVO.java b/src/main/java/com/zhongzhi/vo/ExcelFieldVO.java new file mode 100644 index 0000000..bea28df --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/ExcelFieldVO.java @@ -0,0 +1,11 @@ +package com.zhongzhi.vo; + +import lombok.Data; + +@Data +public class ExcelFieldVO { + + private String field; + + private String name; +} diff --git a/src/main/java/com/zhongzhi/vo/ResponseVO.java b/src/main/java/com/zhongzhi/vo/ResponseVO.java new file mode 100644 index 0000000..6cbadd0 --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/ResponseVO.java @@ -0,0 +1,21 @@ +package com.zhongzhi.vo; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class ResponseVO { + + private Integer code; + + private String message; + + private T data; + + private String path; +} diff --git a/src/main/java/com/zhongzhi/vo/administer/AdministerVO.java b/src/main/java/com/zhongzhi/vo/administer/AdministerVO.java new file mode 100644 index 0000000..4627d04 --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/administer/AdministerVO.java @@ -0,0 +1,22 @@ +package com.zhongzhi.vo.administer; + +import com.zhongzhi.vo.permission.PermissionVO; +import lombok.Data; + +import java.util.List; + +@Data +public class AdministerVO { + + private String token; + + private String username; + + private String avatar; + + private String telephone; + + private String role; + + private List permission; +} diff --git a/src/main/java/com/zhongzhi/vo/college/AwardedListVO.java b/src/main/java/com/zhongzhi/vo/college/AwardedListVO.java new file mode 100644 index 0000000..b7431b4 --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/college/AwardedListVO.java @@ -0,0 +1,40 @@ +package com.zhongzhi.vo.college; + +import com.zhongzhi.common.utils.ExcelColumn; +import lombok.Data; + +@Data +public class AwardedListVO { + + private Long id; + + @ExcelColumn(col = 1, value = "院校") + private String name; + + @ExcelColumn(col = 2, value = "校内上报项目数") + private Integer schoolCompetitionNum; + + @ExcelColumn(col = 3, value = "市级复赛项目数") + private Integer rematchNum; + + @ExcelColumn(col = 4, value = "市级决赛项目数") + private Integer finalNum; + + @ExcelColumn(col = 5, value = "市级优胜奖") + private Integer winningPrizeNum; + + @ExcelColumn(col = 6, value = "市级铜奖") + private Integer bronzeAwardNum; + + @ExcelColumn(col = 7, value = "市级银奖") + private Integer silverAwardNum; + + @ExcelColumn(col = 8, value = "市级金奖") + private Integer goldAwardNum; + + private String attachment; + + private String fileName; + + +} diff --git a/src/main/java/com/zhongzhi/vo/college/CollegePageVO.java b/src/main/java/com/zhongzhi/vo/college/CollegePageVO.java new file mode 100644 index 0000000..da4d1aa --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/college/CollegePageVO.java @@ -0,0 +1,55 @@ +package com.zhongzhi.vo.college; + +import lombok.Data; + +import java.time.LocalDateTime; + +@Data +public class CollegePageVO { + + private Long id; + + /** + * 学校代码 + */ + private String code; + + /** + * 院校名称 + */ + private String name; + + /** + * 账户 + */ + private String account; + + /** + * 密码 + */ + private String password; + + /** + * 联系地址 + */ + private String address; + + /** + * 登陆时间 + */ + private LocalDateTime loginTime; + + private String leaderName; + + private String leaderPost; + + private String leaderPhone; + + private String contactName; + + private String contactPost; + + private String contactPhone; + + private Integer loginStatus; +} diff --git a/src/main/java/com/zhongzhi/vo/college/CollegesVO.java b/src/main/java/com/zhongzhi/vo/college/CollegesVO.java new file mode 100644 index 0000000..ef15371 --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/college/CollegesVO.java @@ -0,0 +1,37 @@ +package com.zhongzhi.vo.college; + +import lombok.Data; + +import java.time.LocalDateTime; + +@Data +public class CollegesVO { + + private Long id; + + private String name; + + private String account; + + private String education; + + private String address; + + private LocalDateTime loginTime; + + private Integer isLogin; + + private String leaderName; + + private String leaderPost; + + private String leaderPhone; + + private String contactName; + + private String contactPost; + + private String contactPhone; + + private String token; +} diff --git a/src/main/java/com/zhongzhi/vo/college/DetailVO.java b/src/main/java/com/zhongzhi/vo/college/DetailVO.java new file mode 100644 index 0000000..349548d --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/college/DetailVO.java @@ -0,0 +1,11 @@ +package com.zhongzhi.vo.college; + +import lombok.Data; + +@Data +public class DetailVO { + + private String registrationDeadline; + + private String latestUpdateTime; +} diff --git a/src/main/java/com/zhongzhi/vo/college/ExportListVO.java b/src/main/java/com/zhongzhi/vo/college/ExportListVO.java new file mode 100644 index 0000000..d90cbd9 --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/college/ExportListVO.java @@ -0,0 +1,28 @@ +package com.zhongzhi.vo.college; + +import com.zhongzhi.common.utils.ExcelColumn; +import lombok.Data; + +@Data +public class ExportListVO { + + @ExcelColumn(col = 1, value = "学校") + private String collegeName; + + @ExcelColumn(col = 2, value = "姓名") + private String userName; + + @ExcelColumn(col = 3, value = "类型") + private String memberType; + + @ExcelColumn(col = 4, value = "手机号") + private String telephone; + + @ExcelColumn(col = 5, value = "证件号码") + private String idCard; + + @ExcelColumn(col = 6, value = "项目名称") + private String projectName; + + +} diff --git a/src/main/java/com/zhongzhi/vo/college/RegisterMembersVO.java b/src/main/java/com/zhongzhi/vo/college/RegisterMembersVO.java new file mode 100644 index 0000000..6ff43af --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/college/RegisterMembersVO.java @@ -0,0 +1,28 @@ +package com.zhongzhi.vo.college; + +import lombok.Data; + +@Data +public class RegisterMembersVO { + + private Long id; + + private Long projectId; + + private String college; + + private String name; + + private String type; + + private String telephone; + + private String memberType; + + private String userName; + + private String idCard; + + private String projectName; + +} diff --git a/src/main/java/com/zhongzhi/vo/college/SchoolsVO.java b/src/main/java/com/zhongzhi/vo/college/SchoolsVO.java new file mode 100644 index 0000000..3374bdb --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/college/SchoolsVO.java @@ -0,0 +1,14 @@ +package com.zhongzhi.vo.college; + +import lombok.Data; + +@Data +public class SchoolsVO { + + private Long collegeId; + + private String name; + + private Integer cnt; + +} diff --git a/src/main/java/com/zhongzhi/vo/course/CourseVodsVO.java b/src/main/java/com/zhongzhi/vo/course/CourseVodsVO.java new file mode 100644 index 0000000..e10987f --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/course/CourseVodsVO.java @@ -0,0 +1,13 @@ +package com.zhongzhi.vo.course; + +import com.zhongzhi.model.CourseDictDO; +import com.zhongzhi.model.VodDictDO; +import lombok.Data; + +import java.util.List; + +@Data +public class CourseVodsVO extends CourseDictDO { + + private List vodDictDOS; +} diff --git a/src/main/java/com/zhongzhi/vo/course/CoursesVO.java b/src/main/java/com/zhongzhi/vo/course/CoursesVO.java new file mode 100644 index 0000000..e25df59 --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/course/CoursesVO.java @@ -0,0 +1,14 @@ +package com.zhongzhi.vo.course; + +import lombok.Data; + +@Data +public class CoursesVO { + + private Long id; + + private String courseName; + + private Integer vodCnt; + +} diff --git a/src/main/java/com/zhongzhi/vo/course/SignatureVO.java b/src/main/java/com/zhongzhi/vo/course/SignatureVO.java new file mode 100644 index 0000000..f02103c --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/course/SignatureVO.java @@ -0,0 +1,10 @@ +package com.zhongzhi.vo.course; + +import lombok.Data; + +@Data +public class SignatureVO { + + private String sign; + +} diff --git a/src/main/java/com/zhongzhi/vo/course/VodsVO.java b/src/main/java/com/zhongzhi/vo/course/VodsVO.java new file mode 100644 index 0000000..852cb50 --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/course/VodsVO.java @@ -0,0 +1,12 @@ +package com.zhongzhi.vo.course; + +import com.zhongzhi.model.VodDictDO; +import lombok.Data; + +@Data +public class VodsVO extends VodDictDO { + + + private String courseName; + +} diff --git a/src/main/java/com/zhongzhi/vo/judge/JudgeInfoVO.java b/src/main/java/com/zhongzhi/vo/judge/JudgeInfoVO.java new file mode 100644 index 0000000..1b06a62 --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/judge/JudgeInfoVO.java @@ -0,0 +1,17 @@ +package com.zhongzhi.vo.judge; + +import lombok.Data; + +@Data +public class JudgeInfoVO { + + private String username; + + private String telephone; + + private String position; + + private String unit; + + private String token; +} diff --git a/src/main/java/com/zhongzhi/vo/judge/ProjectJudgePageVO.java b/src/main/java/com/zhongzhi/vo/judge/ProjectJudgePageVO.java new file mode 100644 index 0000000..9f0c41f --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/judge/ProjectJudgePageVO.java @@ -0,0 +1,59 @@ +package com.zhongzhi.vo.judge; + +import lombok.Data; + +@Data +public class ProjectJudgePageVO { + + private Long id; + + /** + * 姓名 + */ + private String username; + + /** + * 手机号 + */ + private String telephone; + + /** + * 职务 + */ + private String position; + + /** + * 单位 + */ + private String unit; + + /** + * 身份证号 + */ + private String idCard; + + /** + * 开户行 + */ + private String bankName; + + /** + * 银行卡号 + */ + private String bankCard; + + /** + * 状态 + */ + private Integer status; + + /** + * 分配数量 + */ + private Integer assignedQuantity; + + /** + * 待评审数量 + */ + private Integer notReviewedNum; +} diff --git a/src/main/java/com/zhongzhi/vo/judge/ProjectReviewVO.java b/src/main/java/com/zhongzhi/vo/judge/ProjectReviewVO.java new file mode 100644 index 0000000..cbdd9fb --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/judge/ProjectReviewVO.java @@ -0,0 +1,11 @@ +package com.zhongzhi.vo.judge; + +import lombok.Data; + +@Data +public class ProjectReviewVO { + + private String judgesName; + + private Double score; +} diff --git a/src/main/java/com/zhongzhi/vo/match/MatchDictVO.java b/src/main/java/com/zhongzhi/vo/match/MatchDictVO.java new file mode 100644 index 0000000..79c864c --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/match/MatchDictVO.java @@ -0,0 +1,27 @@ +package com.zhongzhi.vo.match; + +import com.zhongzhi.model.MatchScheduleDO; +import lombok.Data; + +import java.util.Date; +import java.util.List; + +@Data +public class MatchDictVO { + + private Long id; + + private String matchName; + + private String matchDate; + + private Date startTime; + + private Date endTime; + + private Integer status; + + private String matchType; + + private List schedule; +} diff --git a/src/main/java/com/zhongzhi/vo/member/ProjectMemberVO.java b/src/main/java/com/zhongzhi/vo/member/ProjectMemberVO.java new file mode 100644 index 0000000..7964ac6 --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/member/ProjectMemberVO.java @@ -0,0 +1,63 @@ +package com.zhongzhi.vo.member; + +import com.zhongzhi.dto.member.MentorDTO; +import com.zhongzhi.dto.member.TeamMemberDTO; +import lombok.Data; + +import java.util.List; + +@Data +public class ProjectMemberVO { + + private Long id; + + /** + * 姓名 + */ + private String name; + + /** + * 就读学校 + */ + private String school; + + /** + * 年级 + */ + private String grade; + + /** + * 就读专业 + */ + private String major; + + private String idCard; + + /** + * 性别 + */ + private String sex; + + /** + * 学籍号 + */ + private String studentNo; + + private String telephone; + + private String email; + + /** + * 团队成员 + */ + private List teamMember; + + /** + * 指导老师 + */ + private List mentor; + + private Integer editStatus; + + private String fiveYears; +} diff --git a/src/main/java/com/zhongzhi/vo/message/MessageVO.java b/src/main/java/com/zhongzhi/vo/message/MessageVO.java new file mode 100644 index 0000000..9feb246 --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/message/MessageVO.java @@ -0,0 +1,26 @@ +package com.zhongzhi.vo.message; + +import lombok.Data; + +@Data +public class MessageVO { + + private Long id; + + /** + * 标题 + */ + private String title; + + /** + * 内容 + */ + private String content; + + /** + * 创建时间 + */ + private String releaseTime; + + private String attachmentUrl; +} diff --git a/src/main/java/com/zhongzhi/vo/notice/SmsNoticeVO.java b/src/main/java/com/zhongzhi/vo/notice/SmsNoticeVO.java new file mode 100644 index 0000000..ddc6795 --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/notice/SmsNoticeVO.java @@ -0,0 +1,18 @@ +package com.zhongzhi.vo.notice; + +import lombok.Data; +import java.time.LocalDateTime; + +@Data +public class SmsNoticeVO { + + private Long id; + + private String projectName; + + private String name; + + private String telephone; + + private String createTime; +} diff --git a/src/main/java/com/zhongzhi/vo/oss/GetSecretVO.java b/src/main/java/com/zhongzhi/vo/oss/GetSecretVO.java new file mode 100644 index 0000000..686f8f3 --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/oss/GetSecretVO.java @@ -0,0 +1,13 @@ +package com.zhongzhi.vo.oss; + +import lombok.Data; + +@Data +public class GetSecretVO { + + private String key; + + private String secret; + + +} diff --git a/src/main/java/com/zhongzhi/vo/oss/UploadFileVO.java b/src/main/java/com/zhongzhi/vo/oss/UploadFileVO.java new file mode 100644 index 0000000..fd0ecd5 --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/oss/UploadFileVO.java @@ -0,0 +1,10 @@ +package com.zhongzhi.vo.oss; + +import lombok.Data; + +@Data +public class UploadFileVO { + + private String url; + +} diff --git a/src/main/java/com/zhongzhi/vo/permission/PermissionVO.java b/src/main/java/com/zhongzhi/vo/permission/PermissionVO.java new file mode 100644 index 0000000..088ba33 --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/permission/PermissionVO.java @@ -0,0 +1,17 @@ +package com.zhongzhi.vo.permission; + +import lombok.Data; + +import java.util.List; + +@Data +public class PermissionVO { + + private Long id; + + private Long parentId; + + private String name; + + private List childNodeList; +} diff --git a/src/main/java/com/zhongzhi/vo/project/CollegeProjectVO.java b/src/main/java/com/zhongzhi/vo/project/CollegeProjectVO.java new file mode 100644 index 0000000..96a5325 --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/project/CollegeProjectVO.java @@ -0,0 +1,29 @@ +package com.zhongzhi.vo.project; + +import com.zhongzhi.common.utils.ExcelColumn; +import lombok.Data; + +@Data +public class CollegeProjectVO { + + @ExcelColumn(col = 1, value = "项目名称") + private String projectName; + + @ExcelColumn(col = 2, value = "项目组别") + private String projectGroup; + + @ExcelColumn(col = 3, value = "负责人") + private String name; + + @ExcelColumn(col = 4, value = "院校") + private String college; + + @ExcelColumn(col = 5, value = "专业") + private String major; + + @ExcelColumn(col = 6, value = "手机号") + private String telephone; + + @ExcelColumn(col = 7, value = "申请时间") + private String applicationTime; +} diff --git a/src/main/java/com/zhongzhi/vo/project/MainTrackProjectDetailVO.java b/src/main/java/com/zhongzhi/vo/project/MainTrackProjectDetailVO.java new file mode 100644 index 0000000..7b5a1df --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/project/MainTrackProjectDetailVO.java @@ -0,0 +1,183 @@ +package com.zhongzhi.vo.project; + +import com.zhongzhi.model.ProjectOwnershipStructureDO; +import com.zhongzhi.vo.member.ProjectMemberVO; +import lombok.Data; + +import java.util.List; + +@Data +public class MainTrackProjectDetailVO extends ProjectMemberVO { + + private Long id; + + /** + * 所属领域 + */ + private String itemField; + + /** + * 项目LOGO + */ + private String logoUri; + + /** + * 项目名称 + */ + private String projectName; + + /** + * 组别 + */ + private String projectGroup; + + /** + * 类别 + */ + private String classification; + + /** + * 所在地址 + */ + private String address; + + /** + * 项目概述 + */ + private String projectIntro; + + /** + * 设计背景 + */ + private String projectCreativity; + + /** + * 科学设计 + */ + private String scientificPrinciple; + + /** + * 应用前景 + */ + private String applicationProspect; + + /** + * 路演形式 + */ + private String roadShowForm; + + /** + * 创意实施或实验所受条件的限制 + */ + private String restriction; + + /** + * 国家级重大、重点科研项目的科研成果转化项目 + */ + private String projectTransform; + + /** + * 学校科技成果转化 + */ + private String resultTransfer; + + /** + * 参赛申报人为科技成果的完成人或所有人 + */ + private String competitionOwner; + + /** + * 参赛申报人为科技成果的第一完成人或所有人 + */ + private String competitionFirst; + + /** + * 师生共创 + */ + private String bothInvention; + + /** + * 项目进展 + */ + private String projectProgress; + + /** + * 公司名称 + */ + private String companyName; + + /** + * 法人身份 + */ + private String legalPersonStatus; + + /** + * 法人姓名 + */ + private String legalPersonName; + + /** + * 职务 + */ + private String position; + + /** + * 注册资金 + */ + private String registerFund; + + /** + * 注册时间 + */ + private String registerDate; + + /** + * 注册省份 + */ + private String registerProvince; + + /** + * 注册地址 + */ + private String registerAddress; + + /** + * 统一社会信用代码 + */ + private String unifyCode; + + /** + * 财务报表 + */ + private String financialStatement; + + /** + * 隐私设置 + */ + private String privacySetting; + + /** + * 类型 + */ + private String materialsType; + + /** + * 大小 + */ + private String materialsSize; + + /** + * 名称 + */ + private String materialsName; + + /** + * 地址 + */ + private String materialsUrl; + + /** + * 股权结构 + */ + private List po; +} diff --git a/src/main/java/com/zhongzhi/vo/project/MainTrackProjectPageVO.java b/src/main/java/com/zhongzhi/vo/project/MainTrackProjectPageVO.java new file mode 100644 index 0000000..579e1ee --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/project/MainTrackProjectPageVO.java @@ -0,0 +1,33 @@ +package com.zhongzhi.vo.project; + +import lombok.Data; + +@Data +public class MainTrackProjectPageVO { + + private Long id; + + private String projectName; + + private String itemField; + + private String name; + + private String major; + + private String telephone; + + private String projectStatus; + + private String applicationTime; + + private String materialsType; + + private String materialsSize; + + private String materialsName; + + private String materialsUrl; + + +} diff --git a/src/main/java/com/zhongzhi/vo/project/ProjectAssignNumVO.java b/src/main/java/com/zhongzhi/vo/project/ProjectAssignNumVO.java new file mode 100644 index 0000000..7db3089 --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/project/ProjectAssignNumVO.java @@ -0,0 +1,39 @@ +package com.zhongzhi.vo.project; + +import lombok.Data; + +@Data +public class ProjectAssignNumVO { + + /** + * 中职复赛项目数量 + */ + private Long vocRematchNum; + /** + * 中职决赛项目数量 + */ + private Long vocFinalNum; + /** + * 高职复赛项目数量 + */ + private Long secRematchNum; + /** + * 高职决赛项目数量 + */ + private Long secFinalNum; + + /** + * 高职初赛项目数量 + */ +// private Long secPreliminaryNUm; + + /** + * 已分配 + */ + private Long assignNum; + + /** + * 未分配 + */ + private Long unassignedNum; +} diff --git a/src/main/java/com/zhongzhi/vo/project/ProjectDataOverview.java b/src/main/java/com/zhongzhi/vo/project/ProjectDataOverview.java new file mode 100644 index 0000000..b1c4bc0 --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/project/ProjectDataOverview.java @@ -0,0 +1,77 @@ +package com.zhongzhi.vo.project; + +import lombok.Data; + +@Data +public class ProjectDataOverview { + + /* + 注册人数 + */ + private Integer registeredNum; + + /* + 已提交项目的院校数量 + */ + private Integer matchNum; + + /* + 全部项目数量 + */ + private Integer projectNum; + + /* + 校级项目申请数量 + */ + private Integer schoolProjectNum; + + /* + 初赛项目数量 + */ + private Integer preliminaryProjectNum; + + /* + 复赛项目数量 + */ + private Integer rematchProjectNum; + + /* + 复赛项目比例 + */ + private Double rematchProportion; + + /* + 决赛项目数量 + */ + private Integer finalProjectNum; + + /* + 决赛项目比例 + */ + private Double finalProportion; + + /* + 市级复赛铜奖 + */ + private Integer rematchBronzeAwardNum; + + /* + 市级复赛银奖 + */ + private Integer rematchSilverAwardNum; + + /* + 市级复赛金奖 + */ + private Integer rematchWinningAwardNum; + + /* + 市级决赛银奖 + */ + private Integer finalsSilverAwardNum; + + /* + 市级决赛金奖 + */ + private Integer finalsGoldAwardNum; +} diff --git a/src/main/java/com/zhongzhi/vo/project/ProjectInfoVO.java b/src/main/java/com/zhongzhi/vo/project/ProjectInfoVO.java new file mode 100644 index 0000000..e82b004 --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/project/ProjectInfoVO.java @@ -0,0 +1,203 @@ +package com.zhongzhi.vo.project; + +import com.zhongzhi.model.ProjectMaterialsDO; +import com.zhongzhi.model.ProjectOwnershipStructureDO; +import lombok.Data; + +import java.util.List; + +@Data +public class ProjectInfoVO { + + private Long id; + + /** + * 所属领域 + */ + private String itemField; + + /** + * 项目LOGO + */ + private String logoUri; + + /** + * 项目名称 + */ + private String projectName; + + /** + * 组别 + */ + private String projectGroup; + + /** + * 赛事年份 + */ + private String matchId; + + /** + * 红色文创组类别 + */ + private String culClassification; + + /** + * 类别 + */ + private List classification; + + /** + * 所在地址 + */ + private String address; + + /** + * 项目概述 + */ + private String projectIntro; + + /** + * 设计背景 + */ + private String projectCreativity; + + /** + * 科学设计 + */ + private String scientificPrinciple; + + /** + * 应用前景 + */ + private String applicationProspect; + + /** + * 路演形式 + */ + private List roadShowForm; + + /** + * 创意实施或实验所受条件的限制 + */ + private List restriction; + + /** + * 国家级重大、重点科研项目的科研成果转化项目 + */ + private String projectTransform; + + /** + * 学校科技成果转化 + */ + private String resultTransfer; + + /** + * 参赛申报人为科技成果的完成人或所有人 + */ + private String competitionOwner; + + /** + * 参赛申报人为科技成果的第一完成人或所有人 + */ + private String competitionFirst; + + /** + * 师生共创 + */ + private String bothInvention; + + /** + * 项目进展 + */ + private String projectProgress; + + /** + * 公司名称 + */ + private String companyName; + + /** + * 法人身份 + */ + private String legalPersonStatus; + + /** + * 法人姓名 + */ + private String legalPersonName; + + /** + * 职务 + */ + private String position; + + /** + * 注册资金 + */ + private String registerFund; + + /** + * 注册时间 + */ + private String registerDate; + + /** + * 注册省份 + */ + private String registerProvince; + + /** + * 注册地址 + */ + private String registerAddress; + + /** + * 统一社会信用代码 + */ + private String unifyCode; + + /** + * 财务报表 + */ + private String financialStatement; + + /** + * 隐私设置 + */ + private String privacySetting; + + /** + * 类型 + */ + private String materialsType; + + /** + * 大小 + */ + private String materialsSize; + + /** + * 名称 + */ + private String materialsName; + + /** + * 地址 + */ + private String materialsUrl; + + /** + * 股权结构 + */ + private List po; + + /** + * 项目材料 + */ + private List materials; + + /** + * 填写进度 + */ + private Integer fillInProgress; +} diff --git a/src/main/java/com/zhongzhi/vo/project/ProjectJudgeVO.java b/src/main/java/com/zhongzhi/vo/project/ProjectJudgeVO.java new file mode 100644 index 0000000..1cbfbcb --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/project/ProjectJudgeVO.java @@ -0,0 +1,26 @@ +package com.zhongzhi.vo.project; + +import com.zhongzhi.common.utils.ExcelColumn; +import lombok.Data; + +@Data +public class ProjectJudgeVO { + + @ExcelColumn(col = 1, value = "届数") + private String matchName; + + @ExcelColumn(col = 2, value = "项目名称") + private String projectName; + + @ExcelColumn(col = 3, value = "负责人") + private String leader; + + @ExcelColumn(col = 4, value = "组别") + private String projectProgress; + + @ExcelColumn(col = 5, value = "院校") + private String college; + + @ExcelColumn(col = 6, value = "阶段") + private String projectSchedule; +} diff --git a/src/main/java/com/zhongzhi/vo/project/ProjectNumVO.java b/src/main/java/com/zhongzhi/vo/project/ProjectNumVO.java new file mode 100644 index 0000000..2347f35 --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/project/ProjectNumVO.java @@ -0,0 +1,40 @@ +package com.zhongzhi.vo.project; + +import lombok.Data; + +@Data +public class ProjectNumVO { + + /* + 科技创新组复赛项目数量 + */ + private Integer technologyRematchNum; + + /* + 科技创新组决赛项目数量 + */ + private Integer technologyFinalNum; + + /* + 红色文创组复赛项目数量 + */ + private Integer culturalRematchNum; + + /* + 红色文创组决赛项目数量 + */ + private Integer culturalFinalNum; + + /* + 已评审数量 + */ + private Integer reviewedNum; + + /* + 未评审数量 + */ + private Integer notReviewedNum; + + private String projectGroup; + +} diff --git a/src/main/java/com/zhongzhi/vo/project/ProjectPageVO.java b/src/main/java/com/zhongzhi/vo/project/ProjectPageVO.java new file mode 100644 index 0000000..82f16a7 --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/project/ProjectPageVO.java @@ -0,0 +1,50 @@ +package com.zhongzhi.vo.project; + +import com.zhongzhi.model.ProjectMaterialsDO; +import lombok.Data; + +import java.util.List; + +@Data +public class ProjectPageVO { + + private Long id; + + private Long proposerId; + + private Long matchId; + + private String matchName; + + private String projectName; + + private String itemField; + + private String projectGroup; + + private String college; + + private String name; + + private Double score; + + private String reviewOpinion; + + private Double reviewScore; + + private String projectProgress; + + private String projectSchedule; + + private String projectStatus; + + private Integer status; + + private Integer editStatus; + + private String reviewStatus; + + private String reviewResult; + + private List materials; +} diff --git a/src/main/java/com/zhongzhi/vo/project/QueryPdfStatusVO.java b/src/main/java/com/zhongzhi/vo/project/QueryPdfStatusVO.java new file mode 100644 index 0000000..cbec88e --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/project/QueryPdfStatusVO.java @@ -0,0 +1,10 @@ +package com.zhongzhi.vo.project; + +import lombok.Data; + +@Data +public class QueryPdfStatusVO { + + private Boolean uploadStatus; + +} diff --git a/src/main/java/com/zhongzhi/vo/project/ReviewListVO.java b/src/main/java/com/zhongzhi/vo/project/ReviewListVO.java new file mode 100644 index 0000000..02e7fd2 --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/project/ReviewListVO.java @@ -0,0 +1,27 @@ +package com.zhongzhi.vo.project; + +import lombok.Data; + +@Data +public class ReviewListVO { + + private Long id; + + private Long proposerId; + + private String name; + + private String projectName; + + private String projectGroup; + + private String school; + + private String projectSchedule; + + private String reviewResult; + + private String projectAssigned; + + private String projectProgress; +} diff --git a/src/main/java/com/zhongzhi/vo/project/SeedTrackProjectDetailVO.java b/src/main/java/com/zhongzhi/vo/project/SeedTrackProjectDetailVO.java new file mode 100644 index 0000000..b7312c0 --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/project/SeedTrackProjectDetailVO.java @@ -0,0 +1,299 @@ +package com.zhongzhi.vo.project; + +import com.zhongzhi.model.ProjectAwardDO; +import com.zhongzhi.model.ProjectCopyrightDO; +import com.zhongzhi.model.ProjectMaterialsDO; +import com.zhongzhi.model.ProjectOwnershipStructureDO; +import com.zhongzhi.model.ProjectPaperDO; +import com.zhongzhi.model.ProjectPatentDO; +import com.zhongzhi.model.ProjectTrademarkDO; +import com.zhongzhi.model.ProjectWorksDO; +import com.zhongzhi.vo.member.ProjectMemberVO; +import com.zhongzhi.vo.review.FinalsReviewVO; +import com.zhongzhi.vo.review.ReMatchReviewVO; +import lombok.Data; + +import java.util.List; + +@Data +public class SeedTrackProjectDetailVO extends ProjectMemberVO { + + private Long id; + + /** + * 申请人ID + */ + private Long proposerId; + + /** + * 所属领域 + */ + private String itemField; + + /** + * 项目LOGO + */ + private String logoUri; + + /** + * 项目名称 + */ + private String projectName; + + /** + * 组别 + */ + private String projectGroup; + + /** + * 赛事年份 + */ + private Long matchId; + + /** + * 申报项目时所在院校 + */ + private String college; + + /** + * 类别 + */ + private String classification; + + /** + * 所在地址 + */ + private String address; + + /** + * 项目概述 + */ + private String projectIntro; + + /** + * 设计背景 + */ + private String projectCreativity; + + /** + * 科学设计 + */ + private String scientificPrinciple; + + /** + * 应用前景 + */ + private String applicationProspect; + + /** + * 路演形式 + */ + private String roadShowForm; + + /** + * 创意实施或实验所受条件的限制 + */ + private String restriction; + + /** + * 国家级重大、重点科研项目的科研成果转化项目 + */ + private String projectTransform; + + /** + * 学校科技成果转化 + */ + private String resultTransfer; + + /** + * 参赛申报人为科技成果的完成人或所有人 + */ + private String competitionOwner; + + /** + * 参赛申报人为科技成果的第一完成人或所有人 + */ + private String competitionFirst; + + /** + * 师生共创 + */ + private String bothInvention; + + /** + * 项目进展 + */ + private String projectProgress; + + /** + * 项目阶段 + */ + private String projectStage; + + /** + * 公司名称 + */ + private String companyName; + + /** + * 法人身份 + */ + private String legalPersonStatus; + + /** + * 法人姓名 + */ + private String legalPersonName; + + /** + * 职务 + */ + private String position; + + /** + * 注册资金 + */ + private String registerFund; + + /** + * 注册时间 + */ + private String registerDate; + + /** + * 注册省份 + */ + private String registerProvince; + + /** + * 注册地址 + */ + private String registerAddress; + + /** + * 统一社会信用代码 + */ + private String unifyCode; + + /** + * 财务报表 + */ + private String financialStatement; + + /** + * 隐私设置 + */ + private String privacySetting; + + /** + * 项目状态 + */ + private String projectStatus; + + /** + * 项目进度 + */ + private String projectSchedule; + + /** + * 项目类型 + */ + private String projectType; + + /** + * 上传加盖公章的附件 + */ + private String printAttachment; + + /** + * 上传加盖公章的附件类型 + */ + private String printAttachmentType; + + /** + * 上传加盖公章的附件名称 + */ + private String printAttachmentName; + + /** + * 项目是否获得投资 + */ + private String investment; + + /** + * 项目PPT + */ + private String projectPptUrl; + + /** + * 项目PPT类型 + */ + private String projectPptType; + + /** + * 项目PPT名称 + */ + private String projectPptName; + + private String email; + + private String reviewStatus; + + private Double reviewScore; + + private String reviewOpinion; + + /** + * 项目材料 + */ + private List materials; + + /** + * 复赛评分 + */ + private List rematch; + + /** + * 决赛评分 + */ + private List finals; + + /** + * 股权结构 + */ + private List ownership; + + /** + * 专利 + */ + private List patent; + + /** + * 论文 + */ + private List paper; + + /** + * 奖项 + */ + private List award; + + /** + * 软件著作权 + */ + private List copyright; + + /** + * 作品著作 + */ + private List works; + + /** + * 商标 + */ + private List trademark; + + private Integer editStatus; + + private String vodUrl; +} diff --git a/src/main/java/com/zhongzhi/vo/project/SeedTrackProjectNumVO.java b/src/main/java/com/zhongzhi/vo/project/SeedTrackProjectNumVO.java new file mode 100644 index 0000000..0e82e74 --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/project/SeedTrackProjectNumVO.java @@ -0,0 +1,13 @@ +package com.zhongzhi.vo.project; + +import lombok.Data; + +@Data +public class SeedTrackProjectNumVO { + + private Integer schoolProjectNum; + + private Integer rematchProjectNum; + + private Integer finalProjectNum; +} diff --git a/src/main/java/com/zhongzhi/vo/project/SeedTrackProjectPageVO.java b/src/main/java/com/zhongzhi/vo/project/SeedTrackProjectPageVO.java new file mode 100644 index 0000000..b372220 --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/project/SeedTrackProjectPageVO.java @@ -0,0 +1,68 @@ +package com.zhongzhi.vo.project; + +import com.zhongzhi.model.ProjectMaterialsDO; +import lombok.Data; + +import java.util.List; + +@Data +public class SeedTrackProjectPageVO { + + private Long id; + + private String projectName; + + private String projectGroup; + + private String college; + + private String name; + + private String major; + + private String telephone; + + private String projectStatus; + + private String applicationTime; + + private String projectSchedule; + + private String projectProgress; + + /** + * 上传加盖公章的附件 + */ + private String printAttachment; + + private String printAttachmentType; + + private String printAttachmentName; + + /** + * 项目材料 + */ + private List materials; + + /** + * 项目是否获得投资 + */ + private String investment; + + /** + * 项目PPT + */ + private String projectPptUrl; + + /** + * 项目PPT类型 + */ + private String projectPptType; + + /** + * 项目PPT名称 + */ + private String projectPptName; + + private Integer editStatus; +} diff --git a/src/main/java/com/zhongzhi/vo/project/SeedTrackProjectVO.java b/src/main/java/com/zhongzhi/vo/project/SeedTrackProjectVO.java new file mode 100644 index 0000000..413d9ac --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/project/SeedTrackProjectVO.java @@ -0,0 +1,46 @@ +package com.zhongzhi.vo.project; + +import com.zhongzhi.vo.member.ProjectMemberVO; +import lombok.Data; + +@Data +public class SeedTrackProjectVO extends ProjectMemberVO { + + private Long id; + + private String projectName; + + private String classification; + + /** + * 设计背景、思路 + */ + private String projectCreativity; + + /** + * 科学设计 + */ + private String scientificPrinciple; + + /** + * 应用前景 + */ + private String applicationProspect; + + /** + * 路演形式 + */ + private String roadShowForm; + + /** + * 创意实施或实验所受条件的限制 + */ + private String restriction; + + // 红色文创 + /** + * + */ + private String projectIntro; + +} diff --git a/src/main/java/com/zhongzhi/vo/project/VocationalNumVO.java b/src/main/java/com/zhongzhi/vo/project/VocationalNumVO.java new file mode 100644 index 0000000..c2ff6dc --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/project/VocationalNumVO.java @@ -0,0 +1,27 @@ +package com.zhongzhi.vo.project; + +import lombok.Data; + +@Data +public class VocationalNumVO { + + /** + * 校内赛 + */ + private Integer schoolProjectNum; + + /** + * 复赛 + */ + private Integer rematchNum; + + /** + * 报名阶段 + */ + private Integer registerNum; + + /** + * 决赛 + */ + private Integer finalNum; +} diff --git a/src/main/java/com/zhongzhi/vo/project/VocationalProjectInfoVO.java b/src/main/java/com/zhongzhi/vo/project/VocationalProjectInfoVO.java new file mode 100644 index 0000000..1e28a7d --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/project/VocationalProjectInfoVO.java @@ -0,0 +1,263 @@ +package com.zhongzhi.vo.project; + +import com.zhongzhi.model.ProjectAwardDO; +import com.zhongzhi.model.ProjectCopyrightDO; +import com.zhongzhi.model.ProjectOwnershipStructureDO; +import com.zhongzhi.model.ProjectPaperDO; +import com.zhongzhi.model.ProjectPatentDO; +import com.zhongzhi.model.ProjectTrademarkDO; +import com.zhongzhi.model.ProjectWorksDO; +import lombok.Data; +import java.util.List; + +@Data +public class VocationalProjectInfoVO { + + private Long id; + + /** + * 所属领域 + */ + private String itemField; + + /** + * 项目LOGO + */ + private String logoUri; + + /** + * 项目名称 + */ + private String projectName; + + /** + * 组别 + */ + private String projectGroup; + + /** + * 赛事年份 + */ + private Long matchId; + + /** + * 类别 + */ + private String classification; + + /** + * 所在地址 + */ + private String address; + + /** + * 项目概述 + */ + private String projectIntro; + + /** + * 设计背景 + */ + private String projectCreativity; + + /** + * 科学设计 + */ + private String scientificPrinciple; + + /** + * 应用前景 + */ + private String applicationProspect; + + /** + * 路演形式 + */ + private String roadShowForm; + + /** + * 创意实施或实验所受条件的限制 + */ + private String restriction; + + /** + * 国家级重大、重点科研项目的科研成果转化项目 + */ + private String projectTransform; + + /** + * 学校科技成果转化 + */ + private String resultTransfer; + + /** + * 参赛申报人为科技成果的完成人或所有人 + */ + private String competitionOwner; + + /** + * 参赛申报人为科技成果的第一完成人或所有人 + */ + private String competitionFirst; + + /** + * 师生共创 + */ + private String bothInvention; + + /** + * 项目进展 + */ + private String projectProgress; + + /** + * 项目阶段 + */ + private String projectStage; + + /** + * 公司名称 + */ + private String companyName; + + /** + * 法人身份 + */ + private String legalPersonStatus; + + /** + * 法人姓名 + */ + private String legalPersonName; + + /** + * 职务 + */ + private String position; + + /** + * 注册资金 + */ + private String registerFund; + + /** + * 注册时间 + */ + private String registerDate; + + /** + * 注册省份 + */ + private String registerProvince; + + /** + * 注册地址 + */ + private String registerAddress; + + /** + * 统一社会信用代码 + */ + private String unifyCode; + + /** + * 财务报表 + */ + private String financialStatement; + + /** + * 隐私设置 + */ + private String privacySetting; + + /** + * 项目状态 + */ + private String projectStatus; + + /** + * 项目进度 + */ + private String projectSchedule; + + /** + * 项目类型 + */ + private String projectType; + + /** + * 上传加盖公章的附件 + */ + private String printAttachment; + + /** + * 上传加盖公章的附件类型 + */ + private String printAttachmentType; + + /** + * 上传加盖公章的附件名称 + */ + private String printAttachmentName; + + /** + * 项目是否获得投资 + */ + private String investment; + + /** + * 项目PPT + */ + private String projectPptUrl; + + /** + * 项目PPT类型 + */ + private String projectPptType; + + /** + * 项目PPT名称 + */ + private String projectPptName; + + /** + * 项目材料名称 + */ + private String materialsName; + + /** + * 项目材料大小 + */ + private String materialsSize; + + /** + * 项目材料类型 + */ + private String materialsType; + + /** + * 视频地址 + */ + private String vodUrl; + + /** + * 项目材料地址 + */ + private String materialsUrl; + + private List Ownership; + + private List Patent; + + private List Paper; + + private List Award; + + private List Copyright; + + private List Works; + + private List Trademark; + + private Integer editStatus; +} diff --git a/src/main/java/com/zhongzhi/vo/project/VocationalProjectNum.java b/src/main/java/com/zhongzhi/vo/project/VocationalProjectNum.java new file mode 100644 index 0000000..b643557 --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/project/VocationalProjectNum.java @@ -0,0 +1,39 @@ +package com.zhongzhi.vo.project; + +import lombok.Data; + +@Data +public class VocationalProjectNum { + + /** + * 中职复赛项目数量 + */ + private Long vocRematchNum; + /** + * 中职决赛项目数量 + */ + private Long vocFinalNum; + /** + * 高职复赛项目数量 + */ + private Long secRematchNum; + /** + * 高职决赛项目数量 + */ + private Long secFinalNum; + + /** + * 高职初赛项目数量 + */ +// private Long secPreliminaryNUm; + + /** + * 已评审项目数量 + */ + private Long reviewedNum; + + /** + * 待评审项目数量 + */ + private Long notReviewedNum; +} diff --git a/src/main/java/com/zhongzhi/vo/project/VocationalProjectVO.java b/src/main/java/com/zhongzhi/vo/project/VocationalProjectVO.java new file mode 100644 index 0000000..446fe27 --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/project/VocationalProjectVO.java @@ -0,0 +1,29 @@ +package com.zhongzhi.vo.project; + +import com.zhongzhi.common.utils.ExcelColumn; +import lombok.Data; + +@Data +public class VocationalProjectVO { + + @ExcelColumn(col = 1, value = "序号") + private Long id; + + @ExcelColumn(col = 2, value = "项目名称") + private String projectName; + + @ExcelColumn(col = 3, value = "赛道组别") + private String projectProgress; + + @ExcelColumn(col = 4, value = "负责人姓名") + private String name; + + @ExcelColumn(col = 5, value = "负责人手机号") + private String telephone; + + @ExcelColumn(col = 6, value = "成员姓名") + private String teamMember; + + @ExcelColumn(col = 7, value = "指导老师") + private String mentor; +} diff --git a/src/main/java/com/zhongzhi/vo/project/VocationalReviewNumVO.java b/src/main/java/com/zhongzhi/vo/project/VocationalReviewNumVO.java new file mode 100644 index 0000000..7f5322e --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/project/VocationalReviewNumVO.java @@ -0,0 +1,33 @@ +package com.zhongzhi.vo.project; + +import lombok.Data; + +@Data +public class VocationalReviewNumVO { + + /** + * 中职复赛项目数量 + */ + private Long vocRematchNum; + /** + * 中职决赛项目数量 + */ + private Long vocFinalNum; + /** + * 高职复赛项目数量 + */ + private Long secRematchNum; + /** + * 高职决赛项目数量 + */ + private Long secFinalNum; + + /** + * 高职初赛项目数量 + */ + private Long secPreliminaryNUm; + + private Long review; + + private Long notReview; +} diff --git a/src/main/java/com/zhongzhi/vo/projectReviewPeriod/ProjectReviewPeriodVO.java b/src/main/java/com/zhongzhi/vo/projectReviewPeriod/ProjectReviewPeriodVO.java new file mode 100644 index 0000000..f39e987 --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/projectReviewPeriod/ProjectReviewPeriodVO.java @@ -0,0 +1,13 @@ +package com.zhongzhi.vo.projectReviewPeriod; + +import lombok.Data; + +@Data +public class ProjectReviewPeriodVO { + + private Long id; + + private String startTime; + + private String endTime; +} diff --git a/src/main/java/com/zhongzhi/vo/review/FinalsReviewVO.java b/src/main/java/com/zhongzhi/vo/review/FinalsReviewVO.java new file mode 100644 index 0000000..6f8bd22 --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/review/FinalsReviewVO.java @@ -0,0 +1,24 @@ +package com.zhongzhi.vo.review; + +import lombok.Data; + +@Data +public class FinalsReviewVO { + + private Long id; + + /** + * 评审分数 + */ + private Double finalsScore; + + /** + * 评委名字 + */ + private String finalsJudgeName; + + /** + * 评审时间 + */ + private String finalsTime; +} diff --git a/src/main/java/com/zhongzhi/vo/review/ReMatchReviewVO.java b/src/main/java/com/zhongzhi/vo/review/ReMatchReviewVO.java new file mode 100644 index 0000000..9b5c546 --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/review/ReMatchReviewVO.java @@ -0,0 +1,24 @@ +package com.zhongzhi.vo.review; + +import lombok.Data; + +@Data +public class ReMatchReviewVO { + + private Long id; + + /** + * 评审分数 + */ + private Double rematchScore; + + /** + * 评委名字 + */ + private String rematchJudgeName; + + /** + * 评审时间 + */ + private String rematchTime; +} diff --git a/src/main/java/com/zhongzhi/vo/review/SchoolReviewVO.java b/src/main/java/com/zhongzhi/vo/review/SchoolReviewVO.java new file mode 100644 index 0000000..2d4cbfb --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/review/SchoolReviewVO.java @@ -0,0 +1,29 @@ +package com.zhongzhi.vo.review; + +import lombok.Data; + +@Data +public class SchoolReviewVO { + + private Long id; + + /** + * 评审分数 + */ + private Double schoolScore; + + /** + * 评审意见 + */ + private String schoolOpinion; + + /** + * 评审结果 + */ + private String schoolResult; + + /** + * 评审时间 + */ + private String schoolTime; +} diff --git a/src/main/java/com/zhongzhi/vo/review/SendNoticeVO.java b/src/main/java/com/zhongzhi/vo/review/SendNoticeVO.java new file mode 100644 index 0000000..3c693fd --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/review/SendNoticeVO.java @@ -0,0 +1,13 @@ +package com.zhongzhi.vo.review; + +import lombok.Data; + +import java.util.List; + +@Data +public class SendNoticeVO { + + private List id; + + private Long matchId; +} diff --git a/src/main/java/com/zhongzhi/vo/scheduleRecord/ProjectScheduleRecordVO.java b/src/main/java/com/zhongzhi/vo/scheduleRecord/ProjectScheduleRecordVO.java new file mode 100644 index 0000000..743dbcf --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/scheduleRecord/ProjectScheduleRecordVO.java @@ -0,0 +1,17 @@ +package com.zhongzhi.vo.scheduleRecord; + +import lombok.Data; + +@Data +public class ProjectScheduleRecordVO { + + private Long id; + + private String collegeName; + + private Integer schoolProject; + + private Integer rematchProject; + + private Integer finalProject; +} diff --git a/src/main/java/com/zhongzhi/vo/student/StudentInfoVO.java b/src/main/java/com/zhongzhi/vo/student/StudentInfoVO.java new file mode 100644 index 0000000..3494cc0 --- /dev/null +++ b/src/main/java/com/zhongzhi/vo/student/StudentInfoVO.java @@ -0,0 +1,37 @@ +package com.zhongzhi.vo.student; + +import lombok.Data; + +@Data +public class StudentInfoVO { + + private String token; + + private String name; + + private String avatar; + + private String telephone; + + private String education; + + /** + * 就读院校 + */ + private String college; + + /** + * 就读专业 + */ + private String major; + + /** + * 入学年份 + */ + private String enrollmentDate; + + /** + * 毕业年份 + */ + private String graduateDate; +} diff --git a/src/main/resources/application-dev.properties b/src/main/resources/application-dev.properties new file mode 100644 index 0000000..a53ac03 --- /dev/null +++ b/src/main/resources/application-dev.properties @@ -0,0 +1,24 @@ +# 本地环境配置 +# 端口号 +server.port=11210 +# 数据源配置 +spring.datasource.url=jdbc:mysql://116.62.57.92:3306/zhongzhi?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai +spring.datasource.type=com.alibaba.druid.pool.DruidDataSource +spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver +spring.datasource.username=devloper +spring.datasource.password=dev@1553$ +spring.datasource.druid.initialSize=5 +spring.datasource.druid.minIdle=5 +spring.datasource.druid.maxActive=20 +spring.datasource.druid.maxWait=60000 +spring.datasource.druid.timeBetweenEvictionRunsMillis=60000 +spring.datasource.druid.minEvictableIdleTimeMillis=300000 +spring.datasource.druid.validationQuery=SELECT 1 FROM DUAL +spring.datasource.druid.testWhileIdle=true +spring.datasource.druid.testOnBorrow=false +spring.datasource.druid.testOnReturn=false +spring.datasource.druid.poolPreparedStatements=true +spring.datasource.druid.maxPoolPreparedStatementPerConnectionSize=20 +spring.datasource.druid.useGlobalDataSourceStat=true +# 控制台日志打印 +mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl \ No newline at end of file diff --git a/src/main/resources/application-pre.properties b/src/main/resources/application-pre.properties new file mode 100644 index 0000000..29105f0 --- /dev/null +++ b/src/main/resources/application-pre.properties @@ -0,0 +1,24 @@ +# 预生产环境配置 +# 端口号 +server.port=11210 +# 数据源配置 +spring.datasource.url=jdbc:mysql://116.62.57.92:3306/zhongzhi?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai +spring.datasource.type=com.alibaba.druid.pool.DruidDataSource +spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver +spring.datasource.username=devloper +spring.datasource.password=dev@1553$ +spring.datasource.druid.initialSize=5 +spring.datasource.druid.minIdle=5 +spring.datasource.druid.maxActive=20 +spring.datasource.druid.maxWait=60000 +spring.datasource.druid.timeBetweenEvictionRunsMillis=60000 +spring.datasource.druid.minEvictableIdleTimeMillis=300000 +spring.datasource.druid.validationQuery=SELECT 1 FROM DUAL +spring.datasource.druid.testWhileIdle=true +spring.datasource.druid.testOnBorrow=false +spring.datasource.druid.testOnReturn=false +spring.datasource.druid.poolPreparedStatements=true +spring.datasource.druid.maxPoolPreparedStatementPerConnectionSize=20 +spring.datasource.druid.useGlobalDataSourceStat=true +# 控制台日志打印 +mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl \ No newline at end of file diff --git a/src/main/resources/application-prod.properties b/src/main/resources/application-prod.properties new file mode 100644 index 0000000..bb4de7f --- /dev/null +++ b/src/main/resources/application-prod.properties @@ -0,0 +1,24 @@ +# 生产环境配置 +# 端口号 +server.port=11210 +# 数据源配置 +spring.datasource.url=jdbc:mysql://rm-uf69w46mo6agw0ahao.mysql.rds.aliyuncs.com:3306/zhongzhi?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai +spring.datasource.type=com.alibaba.druid.pool.DruidDataSource +spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver +spring.datasource.username=ykadmin +spring.datasource.password=youkedb608@good +spring.datasource.druid.initialSize=5 +spring.datasource.druid.minIdle=5 +spring.datasource.druid.maxActive=20 +spring.datasource.druid.maxWait=60000 +spring.datasource.druid.timeBetweenEvictionRunsMillis=60000 +spring.datasource.druid.minEvictableIdleTimeMillis=300000 +spring.datasource.druid.validationQuery=SELECT 1 FROM DUAL +spring.datasource.druid.testWhileIdle=true +spring.datasource.druid.testOnBorrow=false +spring.datasource.druid.testOnReturn=false +spring.datasource.druid.poolPreparedStatements=true +spring.datasource.druid.maxPoolPreparedStatementPerConnectionSize=20 +spring.datasource.druid.useGlobalDataSourceStat=true + +mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl \ No newline at end of file diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties new file mode 100644 index 0000000..bd3a617 --- /dev/null +++ b/src/main/resources/application.properties @@ -0,0 +1,40 @@ +# 环境配置 +spring.profiles.active=prod +# 文件编码 UTF8 +spring.mandatory-file-encoding=UTF-8 +spring.jackson.time-zone=GMT+8 +spring.servlet.multipart.max-file-size=100MB +spring.servlet.multipart.max-request-size=50MB +# 404 交给异常处理器处理 +spring.mvc.throw-exception-if-no-handler-found=true +# 关闭静态资源的映射 +spring.resources.add-mappings=false +# 关闭banner打印 +mybatis-plus.global-config.banner=false +# mybatis-plus相关配置 +mybatis-plus.mapper-locations=classpath:mapper/*.xml +# 是否开启自动驼峰命名规则映射 +mybatis-plus.configuration.map-underscore-to-camel-case=true +# 如果查询结果中包含空值的列,则 MyBatis 在映射的时候,不会映射这个字段 +mybatis-plus.configuration.call-setters-on-nulls=true +# 逻辑删除 +mybatis-plus.global-config.db-config.logic-delete-value=NOW() +mybatis-plus.global-config.db-config.logic-not-delete-value=NULL +#日志配置 +logging.config=classpath:logback-spring.xml +# 阿里云短信 +sms.product=Dysmsapi +sms.domain=dysmsapi.aliyuncs.com +sms.accessKeyId=LTAI5tPAH7P7WQVeowo517BE +sms.accessKeySecret=0ueqhIfdAZyw5lWlBVSLpAxTtx37RY +sms.rcsapi=http://rcsapi.wo.cn:8000/umcinterface/sendtempletmsg +sms.cpcode=AABNUV +sms.excode=210120 +sms.key=49197e89c95c9c6be46a1b420ff0d84d + +vod.appId=1302252447 +vod.secretId=AKIDOcePHvZ2C5VeYHQGSO5aqtlNxJQLqfz2 +vod.secretKey=vjHYRmrfDbw0rWxA7oFcj7F8lDPKCm8E +vod.api=vod.tencentcloudapi.com +vod.region=ap-shanghai +vod.classId=848920 diff --git a/src/main/resources/banner.txt b/src/main/resources/banner.txt new file mode 100644 index 0000000..c12247c --- /dev/null +++ b/src/main/resources/banner.txt @@ -0,0 +1,7 @@ + ___ ___ __ ___ __ __ ___ +|" \/" ||/"| / ")/" | | "\ |" | + \ \ / (: |/ /(: (__) :)|| | + \\ \/ | __/ \/ \/ |: | + / / (// _ \ // __ \\ \ |___ + / / |: | \ \(: ( ) :)( \_|: \ +|___/ (__| \__)\__| |__/ \_______) diff --git a/src/main/resources/code.properties b/src/main/resources/code.properties new file mode 100644 index 0000000..1afc95b --- /dev/null +++ b/src/main/resources/code.properties @@ -0,0 +1,57 @@ +c.code-message[0]=成功 +c.code-message[10010]=PDF下载失败 +c.code-message[10011]=发送失败,获取验证码频繁 +# 学生 +c.code-message[10020]=手机号已注册 +c.code-message[10025]=验证码已过期 +c.code-message[10021]=验证码不正确 +c.code-message[10022]=输入的手机号和接收验证码手机号不一致 +c.code-message[10023]=该身份证号已注册 +c.code-message[10024]=手机号未注册 +# 项目 +c.code-message[10040]=项目已申请 +c.code-message[10041]=项目负责人已存在 +c.code-message[10042]=提交失败,您填写的项目信息不完整 +c.code-message[10043]=项目已提交,请等待项目审核 +c.code-message[10044]=撤回失败,您未申请项目 +c.code-message[10045]=撤回失败,您的项目已进入审批状态 +c.code-message[10046]=项目不存在 +c.code-message[10047]=请选择要分配的项目 +c.code-message[10048]=请选择要分配的评委 +c.code-message[10049]=项目信息不完整 +c.code-message[10050]=您不是该项目的评委 +c.code-message[10051]=项目评分已提交 +c.code-message[10052]=请先进行预评分 +c.code-message[10053]=评委已分配了该项目 +c.code-message[10054]=未指定赛事年份 +c.code-message[10055]=创建失败,尚未处于大赛规定的报名时间 +c.code-message[10056]=项目赛事已结束报名 +c.code-message[10057]=赛事暂未开放 +c.code-message[10058]=您已超过规定的项目上报数量 +c.code-message[10059]=撤回失败,评委已进行了项目评分 +c.code-message[10070]=撤回失败,评委不存在 +c.code-message[10071]=撤回失败,项目未分配该评委 +c.code-message[10072]=您已创建了类型的项目 +c.code-message[10073]=撤回失败,项目已评审 +c.code-message[10074]=不在评审时间内 +c.code-message[10075]=评审已开始,不能撤回评委 +c.code-message[10076]=请先设置评审起始时间 +c.code-message[10077]=提交失败,有信息尚未填写 +c.code-message[10078]=撤回失败,当前时间不在大赛时间段内 +c.code-message[10079]=指导老师手机号不能重复 +# 院校 +c.code-message[10060]=账户不存在 +c.code-message[10061]=密码错误 +c.code-message[10062]=账户已存在 +c.code-message[10063]=院校名称已存在 +c.code-message[10064]=学校代码已存在 +c.code-message[10065]=项目未分配评审 +c.code-message[10066]=上传文件为空 +c.code-message[10067]=系统已暂停登录功能 +c.code-message[10068]=成员不能是负责人 +c.code-message[10018]=不在大赛时间范围内 + +c.code-message[10019]=最多只能添加1位学校领队 +c.code-message[10029]=最多只能添加2位观摩人员 +c.code-message[10030]=车牌号已存在 +c.code-message[10031]=不在申报时间范围内 \ No newline at end of file diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml new file mode 100644 index 0000000..7bf4c9e --- /dev/null +++ b/src/main/resources/logback-spring.xml @@ -0,0 +1,74 @@ + + + + + ${APP_NAME} + + + + + debug + + + %d [%t] %5p %c:%L - %m%n + UTF-8 + + + + ${LOG_PATH}${APP_NAME}-info.log + + %d [%t] %5p %c:%L - %m%n + + + + 100MB + + ${LOG_PATH}${APP_NAME}/info/%d{yyyy-MM-dd}-%i.log.gz + + 30 + + + + ${LOG_PATH}${APP_NAME}-error.log + + error + + + %d [%t] %5p %c:%L - %m%n + + + + 256MB + + ${LOG_PATH}${APP_NAME}/error/%d{yyyy-MM-dd}-%i.log.gz + + 30 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/AdministerDAO.xml b/src/main/resources/mapper/AdministerDAO.xml new file mode 100644 index 0000000..84b27ed --- /dev/null +++ b/src/main/resources/mapper/AdministerDAO.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + id, telephone, username, avatar, role, create_time, update_time, delete_time + + + diff --git a/src/main/resources/mapper/AdministerPermissionDAO.xml b/src/main/resources/mapper/AdministerPermissionDAO.xml new file mode 100644 index 0000000..3c40f56 --- /dev/null +++ b/src/main/resources/mapper/AdministerPermissionDAO.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + id, administer_id, permission_id, create_time, update_time, delete_time + + + diff --git a/src/main/resources/mapper/CollegesDictDAO.xml b/src/main/resources/mapper/CollegesDictDAO.xml new file mode 100644 index 0000000..389fa09 --- /dev/null +++ b/src/main/resources/mapper/CollegesDictDAO.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id, code, name, education, account, password, address, login_time, create_time, update_time, delete_time,loginStatus + + + + + + + + + diff --git a/src/main/resources/mapper/CourseDictDAO.xml b/src/main/resources/mapper/CourseDictDAO.xml new file mode 100644 index 0000000..69c40fa --- /dev/null +++ b/src/main/resources/mapper/CourseDictDAO.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + create_time, + update_time, + delete_time, + id, course_name, vod_cnt + + + + + diff --git a/src/main/resources/mapper/FinalMatchMemberMapper.xml b/src/main/resources/mapper/FinalMatchMemberMapper.xml new file mode 100644 index 0000000..ad0c356 --- /dev/null +++ b/src/main/resources/mapper/FinalMatchMemberMapper.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/mapper/FundDictDAO.xml b/src/main/resources/mapper/FundDictDAO.xml new file mode 100644 index 0000000..52de833 --- /dev/null +++ b/src/main/resources/mapper/FundDictDAO.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + id, fund_name, year, status, create_time, update_time, delete_time + + + diff --git a/src/main/resources/mapper/ItemFieldDictDAO.xml b/src/main/resources/mapper/ItemFieldDictDAO.xml new file mode 100644 index 0000000..648ad6b --- /dev/null +++ b/src/main/resources/mapper/ItemFieldDictDAO.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + id, field, create_time, update_time, delete_time + + + diff --git a/src/main/resources/mapper/MajorDictDAO.xml b/src/main/resources/mapper/MajorDictDAO.xml new file mode 100644 index 0000000..a249a67 --- /dev/null +++ b/src/main/resources/mapper/MajorDictDAO.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + id, code, major, education, create_time, update_time, delete_time + + + diff --git a/src/main/resources/mapper/MatchCollegePdfMapper.xml b/src/main/resources/mapper/MatchCollegePdfMapper.xml new file mode 100644 index 0000000..c4621ef --- /dev/null +++ b/src/main/resources/mapper/MatchCollegePdfMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/src/main/resources/mapper/MatchDictDAO.xml b/src/main/resources/mapper/MatchDictDAO.xml new file mode 100644 index 0000000..7e105d6 --- /dev/null +++ b/src/main/resources/mapper/MatchDictDAO.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + create_time, + update_time, + delete_time, + id, match_name, match_date, status, match_type + + + + + + + diff --git a/src/main/resources/mapper/MatchScheduleDAO.xml b/src/main/resources/mapper/MatchScheduleDAO.xml new file mode 100644 index 0000000..6ae4fc6 --- /dev/null +++ b/src/main/resources/mapper/MatchScheduleDAO.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + create_time, + update_time, + delete_time, + id, match_id, schedule_time, explains + + + diff --git a/src/main/resources/mapper/MessageDAO.xml b/src/main/resources/mapper/MessageDAO.xml new file mode 100644 index 0000000..85635a6 --- /dev/null +++ b/src/main/resources/mapper/MessageDAO.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + create_time, + update_time, + delete_time, + id, title, username, content, top, release_time, status, attachment_url, attachment_name, attachment_type + + + diff --git a/src/main/resources/mapper/PermissionsDAO.xml b/src/main/resources/mapper/PermissionsDAO.xml new file mode 100644 index 0000000..dc39742 --- /dev/null +++ b/src/main/resources/mapper/PermissionsDAO.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + id, parent_id, name, create_time, update_time, delete_time + + + + + diff --git a/src/main/resources/mapper/ProjectAwardMapper.xml b/src/main/resources/mapper/ProjectAwardMapper.xml new file mode 100644 index 0000000..22050fc --- /dev/null +++ b/src/main/resources/mapper/ProjectAwardMapper.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + create_time, + update_time, + delete_time, + id, project_id, award_title, award_project_title, level, prizewinner, winning_time + + + diff --git a/src/main/resources/mapper/ProjectCopyrightMapper.xml b/src/main/resources/mapper/ProjectCopyrightMapper.xml new file mode 100644 index 0000000..ca047b1 --- /dev/null +++ b/src/main/resources/mapper/ProjectCopyrightMapper.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + create_time + , + update_time, + delete_time, + id, project_id, dynacomm, copyright_owner, right_acquisition_method, development_date, published_date, interest_field, register_number + + + diff --git a/src/main/resources/mapper/ProjectDAO.xml b/src/main/resources/mapper/ProjectDAO.xml new file mode 100644 index 0000000..f5318db --- /dev/null +++ b/src/main/resources/mapper/ProjectDAO.xml @@ -0,0 +1,424 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + create_time, + update_time, + id, proposer_id, item_field, logo_uri, project_name, project_group, match_id,college ,classification, address, + project_intro, project_creativity, scientific_principle, application_prospect, road_show_form, restriction, + project_transform, result_transfer, competition_owner, competition_first, both_invention, project_progress, + company_name, legal_person_status, legal_person_name, position, register_fund, register_date, register_province, + register_address, unify_code, privacy_setting, project_status, project_schedule, project_type, delelte_time + ,print_attachment, print_attachment_type, print_attachment_name, project_review, project_assigned,edit_status + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/mapper/ProjectJudgeDAO.xml b/src/main/resources/mapper/ProjectJudgeDAO.xml new file mode 100644 index 0000000..73f2d7c --- /dev/null +++ b/src/main/resources/mapper/ProjectJudgeDAO.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + id, username, telephone, position, unit, status, create_time, update_time, delete_time + + + + + + + diff --git a/src/main/resources/mapper/ProjectMaterialsDAO.xml b/src/main/resources/mapper/ProjectMaterialsDAO.xml new file mode 100644 index 0000000..3f26aaf --- /dev/null +++ b/src/main/resources/mapper/ProjectMaterialsDAO.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + create_time, + update_time, + delete_time, + id, project_id, materials_type, materials_size, materials_name, materials_url + + + diff --git a/src/main/resources/mapper/ProjectMemberDAO.xml b/src/main/resources/mapper/ProjectMemberDAO.xml new file mode 100644 index 0000000..beb0ace --- /dev/null +++ b/src/main/resources/mapper/ProjectMemberDAO.xml @@ -0,0 +1,23 @@ + + + + + + diff --git a/src/main/resources/mapper/ProjectOwnershipStructureDAO.xml b/src/main/resources/mapper/ProjectOwnershipStructureDAO.xml new file mode 100644 index 0000000..8574e5d --- /dev/null +++ b/src/main/resources/mapper/ProjectOwnershipStructureDAO.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + create_time, + update_time, + delete_time, + id, project_id, shareholder_status, shareholder_name, shareholding_ratio + + + diff --git a/src/main/resources/mapper/ProjectPaperMapper.xml b/src/main/resources/mapper/ProjectPaperMapper.xml new file mode 100644 index 0000000..548f98b --- /dev/null +++ b/src/main/resources/mapper/ProjectPaperMapper.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + create_time, + update_time, + delete_time, + id, project_id, paper_title, published_journals, doi, common, first_author, other_author + + + diff --git a/src/main/resources/mapper/ProjectPatentMapper.xml b/src/main/resources/mapper/ProjectPatentMapper.xml new file mode 100644 index 0000000..17945ac --- /dev/null +++ b/src/main/resources/mapper/ProjectPatentMapper.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + create_time + , + update_time, + delete_time, + id, project_id, country, publication_number, patent_title, patent_type, patent_number, patent_applicants, Issued_time, expiration_time, inventor, other_inventors + + + diff --git a/src/main/resources/mapper/ProjectReviewDAO.xml b/src/main/resources/mapper/ProjectReviewDAO.xml new file mode 100644 index 0000000..e38aa1f --- /dev/null +++ b/src/main/resources/mapper/ProjectReviewDAO.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + create_time, + update_time, + delete_time, + id, project_id, judge_id, review_score, score, review_opinion, project_schedule, review_time, review_status + + + + + + + + + diff --git a/src/main/resources/mapper/ProjectReviewPeriodMapper.xml b/src/main/resources/mapper/ProjectReviewPeriodMapper.xml new file mode 100644 index 0000000..b9ef18b --- /dev/null +++ b/src/main/resources/mapper/ProjectReviewPeriodMapper.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + create_time, + update_time, + delete_time, + id, match_id, project_group, project_schedule, start_time, end_time + + + diff --git a/src/main/resources/mapper/ProjectScheduleRecordDAO.xml b/src/main/resources/mapper/ProjectScheduleRecordDAO.xml new file mode 100644 index 0000000..a902614 --- /dev/null +++ b/src/main/resources/mapper/ProjectScheduleRecordDAO.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + create_time, + update_time, + delete_time, + id, proposer_id, project_id, match_id, project_type, project_schedule, college, project_status + + + + + + + diff --git a/src/main/resources/mapper/ProjectTrademarkMapper.xml b/src/main/resources/mapper/ProjectTrademarkMapper.xml new file mode 100644 index 0000000..bb764a3 --- /dev/null +++ b/src/main/resources/mapper/ProjectTrademarkMapper.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + create_time + , + update_time, + delete_time, + id, project_id, classification_number, trade_name, registered_person, registered_date, effective_date, trademark_number + + + diff --git a/src/main/resources/mapper/ProjectWorksMapper.xml b/src/main/resources/mapper/ProjectWorksMapper.xml new file mode 100644 index 0000000..53f4597 --- /dev/null +++ b/src/main/resources/mapper/ProjectWorksMapper.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + create_time + , + update_time, + delete_time, + id, project_id, works_name, author, completion_date, first_publication_date, works_type, register_number + + + diff --git a/src/main/resources/mapper/SmsCodeDAO.xml b/src/main/resources/mapper/SmsCodeDAO.xml new file mode 100644 index 0000000..60f333e --- /dev/null +++ b/src/main/resources/mapper/SmsCodeDAO.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + id, telephone, code, type, platform, create_time, update_time, delete_time + + + + + diff --git a/src/main/resources/mapper/SmsNoticeMapper.xml b/src/main/resources/mapper/SmsNoticeMapper.xml new file mode 100644 index 0000000..93daa2d --- /dev/null +++ b/src/main/resources/mapper/SmsNoticeMapper.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + create_time + , + update_time, + delete_time, + id, project_id, name, telephone, content + + + + + diff --git a/src/main/resources/mapper/StudentDAO.xml b/src/main/resources/mapper/StudentDAO.xml new file mode 100644 index 0000000..852ecd0 --- /dev/null +++ b/src/main/resources/mapper/StudentDAO.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + id, name, avatar, id_card, telephone, education, college, major, enrollment_date, graduate_date, create_time, + update_time, delete_time + + + diff --git a/src/main/resources/mapper/VodDictDAO.xml b/src/main/resources/mapper/VodDictDAO.xml new file mode 100644 index 0000000..3a4bfb8 --- /dev/null +++ b/src/main/resources/mapper/VodDictDAO.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + create_time, + update_time, + delete_time, + id, course_id, vod_name, vod_url, vod_code, vod_length, vod_size, vod_format, order_no + + + + + + diff --git a/src/main/resources/mapper/YearDictDAO.xml b/src/main/resources/mapper/YearDictDAO.xml new file mode 100644 index 0000000..40f6c1e --- /dev/null +++ b/src/main/resources/mapper/YearDictDAO.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/src/main/resources/mybatis-generator.properties b/src/main/resources/mybatis-generator.properties new file mode 100644 index 0000000..f2a8aba --- /dev/null +++ b/src/main/resources/mybatis-generator.properties @@ -0,0 +1,12 @@ +# 此处为本项目src所在路径(代码生成器输出路径) +outputDir=/src/main/java/ +author=DengMin +# 父的包名 +setParent=com.zhongzhi +# mapper.xml文件生成路径 +mapperPath=/src/main/resources/mapper/ +# 数据库地址 +url=jdbc:mysql://rm-uf69w46mo6agw0ahao.mysql.rds.aliyuncs.com:3306/zhongzhi?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai +driverName=com.mysql.cj.jdbc.Driver +userName=ykadmin +password=youkedb608@good \ No newline at end of file diff --git a/src/main/resources/templates/controller.java.ftl b/src/main/resources/templates/controller.java.ftl new file mode 100644 index 0000000..9ad582d --- /dev/null +++ b/src/main/resources/templates/controller.java.ftl @@ -0,0 +1,39 @@ +package ${package.Controller}; + + +import org.springframework.web.bind.annotation.RequestMapping; + +<#if restControllerStyle> + import org.springframework.web.bind.annotation.RestController; +<#else> + import org.springframework.stereotype.Controller; + +<#if superControllerClassPackage??> + import ${superControllerClassPackage}; + + +/** +*

+ * ${table.comment!} 前端控制器 + *

+* +* @author ${author} +* @since ${date} +*/ +<#if restControllerStyle> + @RestController +<#else> + @Controller + +@RequestMapping("<#if package.ModuleName?? && package.ModuleName != "">/${package.ModuleName}/<#if controllerMappingHyphenStyle??>${controllerMappingHyphen}<#else>${table.entityPath}") +<#if kotlin> + class ${table.controllerName}<#if superControllerClass??> : ${superControllerClass}() +<#else> + <#if superControllerClass??> + public class ${table.controllerName} extends ${superControllerClass} { + <#else> + public class ${table.controllerName} { + + + } + diff --git a/src/main/resources/templates/entity.java.ftl b/src/main/resources/templates/entity.java.ftl new file mode 100644 index 0000000..84cfd7e --- /dev/null +++ b/src/main/resources/templates/entity.java.ftl @@ -0,0 +1,156 @@ +package ${package.Entity}; + +<#list table.importPackages as pkg> + import ${pkg}; + +<#if swagger2> + import io.swagger.annotations.ApiModel; + import io.swagger.annotations.ApiModelProperty; + +<#if entityLombokModel> + import lombok.Data; + import lombok.EqualsAndHashCode; + <#if chainModel> + import lombok.experimental.Accessors; + + + +/** +*

+ * ${table.comment!} + *

+* +* @author ${author} +* @since ${date} +*/ +<#if entityLombokModel> + @Data + <#if superEntityClass??> + @EqualsAndHashCode(callSuper = true) + <#else> + @EqualsAndHashCode(callSuper = false) + + <#if chainModel> + @Accessors(chain = true) + + +<#if table.convert> + @TableName("${table.name}") + +<#if swagger2> + @ApiModel(value="${entity}对象", description="${table.comment!}") + +<#if superEntityClass??> + public class ${entity} extends ${superEntityClass}<#if activeRecord><${entity}> { +<#elseif activeRecord> + public class ${entity} extends Model<${entity}> { +<#else> + public class ${entity} implements Serializable { + + +<#if entitySerialVersionUID> + private static final long serialVersionUID = 1L; + +<#-- ---------- BEGIN 字段循环遍历 ----------> +<#list table.fields as field> + <#if field.keyFlag> + <#assign keyPropertyName="${field.propertyName}"/> + + + <#if field.comment!?length gt 0> + <#if swagger2> + @ApiModelProperty(value = "${field.comment}") + <#else> + /** + * ${field.comment} + */ + + + <#if field.keyFlag> + <#-- 主键 --> + <#if field.keyIdentityFlag> + @TableId(value = "${field.annotationColumnName}", type = IdType.AUTO) + <#elseif idType??> + @TableId(value = "${field.annotationColumnName}", type = IdType.${idType}) + <#elseif field.convert> + @TableId("${field.annotationColumnName}") + + <#-- 普通字段 --> + <#elseif field.fill??> + <#-- ----- 存在字段填充设置 -----> + <#if field.convert> + @TableField(value = "${field.annotationColumnName}", fill = FieldFill.${field.fill}) + <#else> + @TableField(fill = FieldFill.${field.fill}) + + <#elseif field.convert> + @TableField("${field.annotationColumnName}") + +<#-- 乐观锁注解 --> + <#if (versionFieldName!"") == field.name> + @Version + +<#-- 逻辑删除注解 --> + <#if (logicDeleteFieldName!"") == field.name> + @TableLogic + + private ${field.propertyType} ${field.propertyName}; + +<#------------ END 字段循环遍历 ----------> + +<#if !entityLombokModel> + <#list table.fields as field> + <#if field.propertyType == "boolean"> + <#assign getprefix="is"/> + <#else> + <#assign getprefix="get"/> + + public ${field.propertyType} ${getprefix}${field.capitalName}() { + return ${field.propertyName}; + } + + <#if chainModel> + public ${entity} set${field.capitalName}(${field.propertyType} ${field.propertyName}) { + <#else> + public void set${field.capitalName}(${field.propertyType} ${field.propertyName}) { + + this.${field.propertyName} = ${field.propertyName}; + <#if chainModel> + return this; + + } + + + +<#if entityColumnConstant> + <#list table.fields as field> + public static final String ${field.name?upper_case} = "${field.name}"; + + + +<#if activeRecord> + @Override + protected Serializable pkVal() { + <#if keyPropertyName??> + return this.${keyPropertyName}; + <#else> + return null; + + } + + +<#if !entityLombokModel> + @Override + public String toString() { + return "${entity}{" + + <#list table.fields as field> + <#if field_index==0> + "${field.propertyName}=" + ${field.propertyName} + + <#else> + ", ${field.propertyName}=" + ${field.propertyName} + + + + "}"; + } + +} diff --git a/src/main/resources/templates/mapper.java.ftl b/src/main/resources/templates/mapper.java.ftl new file mode 100644 index 0000000..f8182f7 --- /dev/null +++ b/src/main/resources/templates/mapper.java.ftl @@ -0,0 +1,20 @@ +package ${package.Mapper}; + +import ${package.Entity}.${entity}; +import ${superMapperClassPackage}; + +/** +*

+ * ${table.comment!} Mapper 接口 + *

+* +* @author ${author} +* @since ${date} +*/ +<#if kotlin> + interface ${table.mapperName} : ${superMapperClass}<${entity}> +<#else> + public interface ${table.mapperName} extends ${superMapperClass}<${entity}> { + + } + diff --git a/src/main/resources/templates/mapper.xml.ftl b/src/main/resources/templates/mapper.xml.ftl new file mode 100644 index 0000000..7dcff74 --- /dev/null +++ b/src/main/resources/templates/mapper.xml.ftl @@ -0,0 +1,39 @@ + + + + + <#if enableCache> + + + + + <#if baseResultMap> + + + <#list table.fields as field> + <#if field.keyFlag><#--生成主键排在第一位--> + + + + <#list table.commonFields as field><#--生成公共字段 --> + + + <#list table.fields as field> + <#if !field.keyFlag><#--生成普通字段 --> + + + + + + + <#if baseColumnList> + + + <#list table.commonFields as field> + ${field.columnName}, + + ${table.fieldNames} + + + + diff --git a/src/main/resources/templates/service.java.ftl b/src/main/resources/templates/service.java.ftl new file mode 100644 index 0000000..a47c528 --- /dev/null +++ b/src/main/resources/templates/service.java.ftl @@ -0,0 +1,20 @@ +package ${package.Service}; + +import ${package.Entity}.${entity}; +import ${superServiceClassPackage}; + +/** +*

+ * ${table.comment!} 服务类 + *

+* +* @author ${author} +* @since ${date} +*/ +<#if kotlin> + interface ${table.serviceName} : ${superServiceClass}<${entity}> +<#else> + public interface ${table.serviceName} extends ${superServiceClass}<${entity}> { + + } + diff --git a/src/main/resources/templates/serviceImpl.java.ftl b/src/main/resources/templates/serviceImpl.java.ftl new file mode 100644 index 0000000..d9c0b3d --- /dev/null +++ b/src/main/resources/templates/serviceImpl.java.ftl @@ -0,0 +1,26 @@ +package ${package.ServiceImpl}; + +import ${package.Entity}.${entity}; +import ${package.Mapper}.${table.mapperName}; +import ${package.Service}.${table.serviceName}; +import ${superServiceImplClassPackage}; +import org.springframework.stereotype.Service; + +/** +*

+ * ${table.comment!} 服务实现类 + *

+* +* @author ${author} +* @since ${date} +*/ +@Service +<#if kotlin> + open class ${table.serviceImplName} : ${superServiceImplClass}<${table.mapperName}, ${entity}>(), ${table.serviceName} { + + } +<#else> + public class ${table.serviceImplName} extends ${superServiceImplClass}<${table.mapperName}, ${entity}> implements ${table.serviceName} { + + } + -- libgit2 0.25.0