奖项导入报错提示

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

@ -512,6 +512,12 @@ public class AwardPersionController extends JeecgController<AwardPersion, IAward
if(list.get(i).getAwardname()==null||list.get(i).getAwardname().equals("")){ if(list.get(i).getAwardname()==null||list.get(i).getAwardname().equals("")){
return Result.error("文件导入失败:第"+(i+1)+"行奖项名称为空"); return Result.error("文件导入失败:第"+(i+1)+"行奖项名称为空");
} }
QueryWrapper<AnnualCompPoint> queryWrapperndbsxm = new QueryWrapper<>();
queryWrapperndbsxm.eq("obj_name",list.get(i).getAnnualCompP()).or().eq("id",list.get(i).getAnnualCompP());
List<AnnualCompPoint> listndbsxm = annualCompPointService.list(queryWrapperndbsxm);
if(listndbsxm.size()==0){
return Result.error("文件导入失败:第"+(i+1)+"行年度比赛项目不存在");
}
AnnualCompetitionProjectRegistration annualCompetitionProjectRegistration = new AnnualCompetitionProjectRegistration(); AnnualCompetitionProjectRegistration annualCompetitionProjectRegistration = new AnnualCompetitionProjectRegistration();
QueryWrapper<AnnualCompetitionProjectRegistration> queryWrappera = QueryGenerator.initQueryWrapper(annualCompetitionProjectRegistration, request.getParameterMap()); QueryWrapper<AnnualCompetitionProjectRegistration> queryWrappera = QueryGenerator.initQueryWrapper(annualCompetitionProjectRegistration, request.getParameterMap());
queryWrappera.eq("annual_compid",list.get(i).getAnnualCompP()); queryWrappera.eq("annual_compid",list.get(i).getAnnualCompP());
@ -551,12 +557,7 @@ public class AwardPersionController extends JeecgController<AwardPersion, IAward
if(listndbs.size()==0){ if(listndbs.size()==0){
return Result.error("文件导入失败:第"+(i+1)+"行年度比赛不存在"); return Result.error("文件导入失败:第"+(i+1)+"行年度比赛不存在");
} }
QueryWrapper<AnnualCompPoint> queryWrapperndbsxm = new QueryWrapper<>();
queryWrapperndbsxm.eq("obj_name",list.get(i).getAnnualCompP()).or().eq("id",list.get(i).getAnnualCompP());
List<AnnualCompPoint> listndbsxm = annualCompPointService.list(queryWrapperndbsxm);
if(listndbsxm.size()==0){
return Result.error("文件导入失败:第"+(i+1)+"行年度比赛项目不存在");
}
try { try {
for (int l = 0 ; l < listtm.size() ; l++){ for (int l = 0 ; l < listtm.size() ; l++){
SysUser sysUser = sysUserService.getById(listtm.get(l).getUserId()); SysUser sysUser = sysUserService.getById(listtm.get(l).getUserId());

Loading…
Cancel
Save