From bdfc82c77454f7b20b837f22eda57224806d44a0 Mon Sep 17 00:00:00 2001 From: Gitea Date: Tue, 30 Jul 2024 21:32:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A5=96=E9=A1=B9=E5=AF=BC=E5=85=A5=E6=8A=A5?= =?UTF-8?q?=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());