From b55f0263cab5e5edfcb732fb3b846ae757ea5c98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AE=B6=E4=B8=9C?= <1654135867@qq.com> Date: Fri, 26 Jul 2024 14:39:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E5=90=8D=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...petitionProjectRegistrationController.java | 18 ++++++++++++----- .../AnnualCompPointListAwaitPass.vue | 16 +++++++-------- .../AnnualCompPointListAwaitReject.vue | 16 +++++++-------- .../superAdmin/AnnualCompPointListPass.vue | 20 +++++++++---------- 4 files changed, 39 insertions(+), 31 deletions(-) diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java index 67f0ec6f..dbc4d0f7 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java @@ -471,11 +471,19 @@ public class AnnualCompetitionProjectRegistrationController { //判断队伍人数是否合格 AnnualCompPoint compPoint = annualCompPointService.query().eq("id", info.getAnnualCompid()).one(); - if (managements.size() != compPoint.getTeamNumber()) - return Result.error("队伍人数要求" + compPoint.getTeamNumber() + "人,请重新组队"); - if (instructorSheetList.size() != compPoint.getTeacherNumber()) - return Result.error("老师人数要求" + compPoint.getTeacherNumber() + "人,请重新选择"); - + //只有是团队赛的时候才进行判断,个人赛值判断是不是自己一个人 + if (compPoint.getEntryForm().equals("Y")) { + if (managements.size() != compPoint.getTeamNumber()) + return Result.error("队伍人数要求" + compPoint.getTeamNumber() + "人,请重新组队"); + if (instructorSheetList.size() != compPoint.getTeacherNumber()) + return Result.error("老师人数要求" + compPoint.getTeacherNumber() + "人,请重新选择"); + } else if (compPoint.getEntryForm().equals("N")) { + if (managements.size() >1){ + return Result.error("个人赛只能一个人参加"); + } else if ( !managements.get(0).getUserId().equals(loginUser.getId())) { + return Result.error("你只能为你自己报名"); + } + } //判断队员是否已经参加这个比赛 int i = 1; for (TeamManagement management : managements) { diff --git a/jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPointListAwaitPass.vue b/jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPointListAwaitPass.vue index 3d1e7f01..94d8d398 100644 --- a/jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPointListAwaitPass.vue +++ b/jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPointListAwaitPass.vue @@ -12,25 +12,25 @@ diff --git a/jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPointListAwaitReject.vue b/jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPointListAwaitReject.vue index 702a9f99..79963da0 100644 --- a/jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPointListAwaitReject.vue +++ b/jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPointListAwaitReject.vue @@ -12,25 +12,25 @@ diff --git a/jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPointListPass.vue b/jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPointListPass.vue index 7e8bb45b..a144a693 100644 --- a/jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPointListPass.vue +++ b/jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPointListPass.vue @@ -12,25 +12,25 @@ @@ -276,13 +276,13 @@ function getTableAction(record) { { label: '详情', onClick: handleDetail.bind(null, record), - }, { + }, /*{ label: '删除', popConfirm: { title: '是否确认删除', confirm: handleDelete.bind(null, record), } - }, + },*/ ]; return actions; }