From 1fef75cfbca4966a743c40a950d630f01488254c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AE=B6=E4=B8=9C?= <1654135867@qq.com> Date: Tue, 30 Jul 2024 21:07:03 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=90=8C=E4=B8=80=E5=B9=B4=E9=83=BD?= =?UTF-8?q?=E6=AF=94=E8=B5=9B=E4=B8=8B=E9=A1=B9=E7=9B=AE=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E4=B8=8D=E5=8F=AF=E9=87=8D=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/AnnualCompPointServiceImpl.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/service/impl/AnnualCompPointServiceImpl.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/service/impl/AnnualCompPointServiceImpl.java index 233a316d..45636d9b 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/service/impl/AnnualCompPointServiceImpl.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/service/impl/AnnualCompPointServiceImpl.java @@ -47,6 +47,9 @@ public class AnnualCompPointServiceImpl extends ServiceImpl annualCompPointListzbc = annualCompPointService.query().eq("annual_comp_id",annualCompPoint.getAnnualCompId()).eq("obj_name",annualCompPoint.getObjName()).list(); + if (annualCompPointListzbc.size()>0){ + return Result.error("同一年度比赛下项目名称不可重复"); + } + if (annualComp.getIsopen().equals("0")) { return Result.error("请先启动年度比赛"); From bdfc82c77454f7b20b837f22eda57224806d44a0 Mon Sep 17 00:00:00 2001 From: Gitea Date: Tue, 30 Jul 2024 21:32:26 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=A5=96=E9=A1=B9=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/AwardPersionController.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/controller/AwardPersionController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/controller/AwardPersionController.java index 06967da0..7bcc2424 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/controller/AwardPersionController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/controller/AwardPersionController.java @@ -494,6 +494,21 @@ public class AwardPersionController extends JeecgController list = ExcelImportUtil.importExcel(file.getInputStream(), AwardPersion.class, params); List listsave = new ArrayList<>(); for(int i = 0 ; i < list.size() ; i++){ + if(list.get(i).getAnnualid()==null||list.get(i).getAnnualid().equals("")){ + return Result.error("文件导入失败:第"+(i+1)+"行年度为空"); + } + if(list.get(i).getAnnalComp()==null||list.get(i).getAnnalComp().equals("")){ + return Result.error("文件导入失败:第"+(i+1)+"行年度比赛为空"); + } + if(list.get(i).getAnnualCompP()==null||list.get(i).getAnnualCompP().equals("")){ + return Result.error("文件导入失败:第"+(i+1)+"行年度比赛项目为空"); + } + if(list.get(i).getEnrollCode()==null||list.get(i).getEnrollCode().equals("")){ + return Result.error("文件导入失败:第"+(i+1)+"行报名编号为空"); + } + if(list.get(i).getAwardname()==null||list.get(i).getAwardname().equals("")){ + return Result.error("文件导入失败:第"+(i+1)+"行奖项名称为空"); + } AnnualCompetitionProjectRegistration annualCompetitionProjectRegistration = new AnnualCompetitionProjectRegistration(); QueryWrapper queryWrappera = QueryGenerator.initQueryWrapper(annualCompetitionProjectRegistration, request.getParameterMap()); queryWrappera.eq("annual_compid",list.get(i).getAnnualCompP());