From 7470c338f8cb5a11d1784adfb935cd02042df393 Mon Sep 17 00:00:00 2001 From: Gitea Date: Tue, 30 Jul 2024 15:52:08 +0800 Subject: [PATCH 1/2] bug --- .../controller/AnnualCompPointController.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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 1c33d0e2..509acca0 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 @@ -951,8 +951,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)+"行学生学号不存在"); } } @@ -972,7 +975,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); } From b029ba9777c919992bcc13761ec7d81112679d6d Mon Sep 17 00:00:00 2001 From: Gitea Date: Tue, 30 Jul 2024 15:53:20 +0800 Subject: [PATCH 2/2] bug --- .../controller/AwardPersionController.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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