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());