奖项导入报错提示

main
Gitea 4 months ago
parent 55b613ccc7
commit e31e6f3488
  1. 4
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/controller/AwardPersionController.java

@ -546,13 +546,13 @@ public class AwardPersionController extends JeecgController<AwardPersion, IAward
list.get(i).setAnnualid(nd); list.get(i).setAnnualid(nd);
} }
QueryWrapper<AnnualComp> queryWrapperndbs = new QueryWrapper<>(); QueryWrapper<AnnualComp> queryWrapperndbs = new QueryWrapper<>();
queryWrapperndbs.eq("name",list.get(i).getAnnalComp()); queryWrapperndbs.eq("name",list.get(i).getAnnalComp()).or().eq("id",list.get(i).getAnnalComp());
List<AnnualComp> listndbs = annualCompService.list(queryWrapperndbs); List<AnnualComp> listndbs = annualCompService.list(queryWrapperndbs);
if(listndbs.size()==0){ if(listndbs.size()==0){
return Result.error("文件导入失败:第"+(i+1)+"行年度比赛不存在"); return Result.error("文件导入失败:第"+(i+1)+"行年度比赛不存在");
} }
QueryWrapper<AnnualCompPoint> queryWrapperndbsxm = new QueryWrapper<>(); QueryWrapper<AnnualCompPoint> queryWrapperndbsxm = new QueryWrapper<>();
queryWrapperndbsxm.eq("obj_name",list.get(i).getAnnualCompP()); queryWrapperndbsxm.eq("obj_name",list.get(i).getAnnualCompP()).or().eq("id",list.get(i).getAnnualCompP());
List<AnnualCompPoint> listndbsxm = annualCompPointService.list(queryWrapperndbsxm); List<AnnualCompPoint> listndbsxm = annualCompPointService.list(queryWrapperndbsxm);
if(listndbsxm.size()==0){ if(listndbsxm.size()==0){
return Result.error("文件导入失败:第"+(i+1)+"行年度比赛项目不存在"); return Result.error("文件导入失败:第"+(i+1)+"行年度比赛项目不存在");

Loading…
Cancel
Save