diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java index 24053d0d..5e637449 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java @@ -958,8 +958,11 @@ public class AnnualCompPointController extends JeecgController list = ExcelImportUtil.importExcel(file.getInputStream(), AnnualCompPointMb.class, params); for (int i = 0 ; i < list.size();i++){ - SysUser sysUser = sysUserService.getUserByName(list.get(i).getStudentcode()); - if(sysUser==null){ + QueryWrapper qw = new QueryWrapper<>(); + qw.eq("work_no",list.get(i).getStudentcode()); + List listsys = sysUserService.list(qw); + //SysUser sysUser = sysUserService.getUserByName(list.get(i).getStudentcode()); + if(listsys.size()==0){ return Result.error("文件导入失败:第"+(i+1)+"行学生学号不存在"); } } @@ -979,7 +982,10 @@ public class AnnualCompPointController extends JeecgController qw1 = new QueryWrapper<>(); + qw1.eq("work_no",list.get(k).getStudentcode()); + List listsys1 = sysUserService.list(qw1); + tm.setUserId(listsys1.get(0).getId()); tm.setCaptain("0"); teamManagementService.save(tm); } 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 1ec8927e..5b2bbbc8 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 @@ -120,7 +120,7 @@ public class AwardPersionController extends JeecgController page = new Page(pageNo, pageSize); QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(awardPersion, req.getParameterMap()); - queryWrapper.eq("studentcode",user.getUsername()); + queryWrapper.eq("studentcode",sysUserService.getById(user.getId()).getWorkNo()); IPage pageList = awardPersionService.page(page, queryWrapper); return Result.OK(pageList); }else if(sysRoleList.get(0).getId().equals("1693451972151386114")){ @@ -224,7 +224,7 @@ public class AwardPersionController extends JeecgController