From 4c461b55520649257ae3248232f075a7e1acd70d Mon Sep 17 00:00:00 2001 From: Gitea Date: Fri, 1 Dec 2023 16:55:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=A5=96=E5=A2=9E=E5=8A=A0=E5=AD=A6?= =?UTF-8?q?=E7=94=9F=E5=AD=A6=E5=8F=B7=E5=92=8C=E5=A7=93=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/AnnualCompPointController.java | 70 +++++++++++++++++++ .../controller/AwardPersionController.java | 49 ++++++++----- .../awardpersion/entity/AwardPersion.java | 4 +- 3 files changed, 102 insertions(+), 21 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 2465261b..6288e185 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 @@ -405,6 +405,13 @@ public class AnnualCompPointController extends JeecgController queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap()); + queryWrappertm.eq("enroll_code",listsp.get(j).getEnrollCode()); + List listtm = teamManagementService.list(queryWrappertm); + SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId()); + awardPersion.setStudentname(sysUser.getRealname()); + awardPersion.setStudentcode(sysUser.getUsername()); awardPersionService.save(awardPersion); } } @@ -421,6 +428,13 @@ public class AnnualCompPointController extends JeecgController queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap()); + queryWrappertm.eq("enroll_code",listsp.get(j).getEnrollCode()); + List listtm = teamManagementService.list(queryWrappertm); + SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId()); + awardPersion.setStudentname(sysUser.getRealname()); + awardPersion.setStudentcode(sysUser.getUsername()); awardPersionService.save(awardPersion); } } @@ -438,6 +452,13 @@ public class AnnualCompPointController extends JeecgController queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap()); + queryWrappertm.eq("enroll_code",listsp.get(j).getEnrollCode()); + List listtm = teamManagementService.list(queryWrappertm); + SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId()); + awardPersion.setStudentname(sysUser.getRealname()); + awardPersion.setStudentcode(sysUser.getUsername()); awardPersionService.save(awardPersion); } } @@ -456,6 +477,13 @@ public class AnnualCompPointController extends JeecgController queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap()); + queryWrappertm.eq("enroll_code",listsp.get(j).getEnrollCode()); + List listtm = teamManagementService.list(queryWrappertm); + SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId()); + awardPersion.setStudentname(sysUser.getRealname()); + awardPersion.setStudentcode(sysUser.getUsername()); awardPersionService.save(awardPersion); } } @@ -475,6 +503,13 @@ public class AnnualCompPointController extends JeecgController queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap()); + queryWrappertm.eq("enroll_code",listsp.get(j).getEnrollCode()); + List listtm = teamManagementService.list(queryWrappertm); + SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId()); + awardPersion.setStudentname(sysUser.getRealname()); + awardPersion.setStudentcode(sysUser.getUsername()); awardPersionService.save(awardPersion); } } @@ -530,6 +565,13 @@ public class AnnualCompPointController extends JeecgController queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap()); + queryWrappertm.eq("enroll_code",listsp.get(j).getEnrollCode()); + List listtm = teamManagementService.list(queryWrappertm); + SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId()); + awardPersion.setStudentname(sysUser.getRealname()); + awardPersion.setStudentcode(sysUser.getUsername()); awardPersionService.save(awardPersion1); } } @@ -546,6 +588,13 @@ public class AnnualCompPointController extends JeecgController queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap()); + queryWrappertm.eq("enroll_code",listsp.get(j).getEnrollCode()); + List listtm = teamManagementService.list(queryWrappertm); + SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId()); + awardPersion.setStudentname(sysUser.getRealname()); + awardPersion.setStudentcode(sysUser.getUsername()); awardPersionService.save(awardPersion1); } } @@ -563,6 +612,13 @@ public class AnnualCompPointController extends JeecgController queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap()); + queryWrappertm.eq("enroll_code",listsp.get(j).getEnrollCode()); + List listtm = teamManagementService.list(queryWrappertm); + SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId()); + awardPersion.setStudentname(sysUser.getRealname()); + awardPersion.setStudentcode(sysUser.getUsername()); awardPersionService.save(awardPersion1); } } @@ -581,6 +637,13 @@ public class AnnualCompPointController extends JeecgController queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap()); + queryWrappertm.eq("enroll_code",listsp.get(j).getEnrollCode()); + List listtm = teamManagementService.list(queryWrappertm); + SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId()); + awardPersion.setStudentname(sysUser.getRealname()); + awardPersion.setStudentcode(sysUser.getUsername()); awardPersionService.save(awardPersion1); } } @@ -600,6 +663,13 @@ public class AnnualCompPointController extends JeecgController queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap()); + queryWrappertm.eq("enroll_code",listsp.get(j).getEnrollCode()); + List listtm = teamManagementService.list(queryWrappertm); + SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId()); + awardPersion.setStudentname(sysUser.getRealname()); + awardPersion.setStudentcode(sysUser.getUsername()); awardPersionService.save(awardPersion1); } } 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 cd509bfb..a8867241 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 @@ -128,15 +128,6 @@ public class AwardPersionController extends JeecgController page = new Page(pageNo, pageSize); IPage pageList = awardPersionService.page(page, queryWrapper); - for(int i = 0 ; i < pageList.getRecords().size();i++){ - TeamManagement teamManagement = new TeamManagement(); - QueryWrapper queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap()); - queryWrappertm.eq("enroll_code",pageList.getRecords().get(i).getEnrollCode()); - List listtm = teamManagementService.list(queryWrappertm); - SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId()); - pageList.getRecords().get(i).setStudentcode(sysUser.getUsername()); - pageList.getRecords().get(i).setStudentname(sysUser.getRealname()); - } return Result.OK(pageList); } @@ -144,7 +135,7 @@ public class AwardPersionController extends JeecgController page = new Page(pageNo, pageSize); IPage pageList = awardPersionService.page(page, queryWrapper); - for(int i = 0 ; i < pageList.getRecords().size();i++){ - TeamManagement teamManagement = new TeamManagement(); - QueryWrapper queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap()); - queryWrappertm.eq("enroll_code",pageList.getRecords().get(i).getEnrollCode()); - List listtm = teamManagementService.list(queryWrappertm); - SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId()); - pageList.getRecords().get(i).setStudentcode(sysUser.getUsername()); - pageList.getRecords().get(i).setStudentname(sysUser.getRealname()); - } return Result.OK(pageList); } @@ -201,6 +183,13 @@ public class AwardPersionController extends JeecgController list = annualCompAwardService.list(queryWrapper); awardPersion.setAwardid(list.get(0).getId()); + TeamManagement teamManagement = new TeamManagement(); + QueryWrapper queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap()); + queryWrappertm.eq("enroll_code",awardPersion.getEnrollCode()); + List listtm = teamManagementService.list(queryWrappertm); + SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId()); + awardPersion.setStudentname(sysUser.getRealname()); + awardPersion.setStudentcode(sysUser.getUsername()); awardPersionService.save(awardPersion); AnnualCompPoint annualCompPoint = annualCompPointService.getById(awardPersion.getAnnualCompP()); annualCompPoint.setIsPj(1); @@ -235,6 +224,13 @@ public class AwardPersionController extends JeecgController list = annualCompAwardService.list(queryWrapper); awardPersion.setAwardid(list.get(0).getId()); + TeamManagement teamManagement = new TeamManagement(); + QueryWrapper queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap()); + queryWrappertm.eq("enroll_code",awardPersion.getEnrollCode()); + List listtm = teamManagementService.list(queryWrappertm); + SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId()); + awardPersion.setStudentname(sysUser.getRealname()); + awardPersion.setStudentcode(sysUser.getUsername()); awardPersionService.updateById(awardPersion); return Result.OK("编辑成功!"); } @@ -420,21 +416,36 @@ public class AwardPersionController extends JeecgController queryWrapperaca = QueryGenerator.initQueryWrapper(annualCompAward, request.getParameterMap()); queryWrapperaca.eq("annucompid",list.get(i).getAnnualCompP()); List listaca = annualCompAwardService.list(queryWrapperaca); + TeamManagement teamManagement = new TeamManagement(); + QueryWrapper queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, request.getParameterMap()); + queryWrappertm.eq("enroll_code",list.get(i).getEnrollCode()); + List listtm = teamManagementService.list(queryWrappertm); + SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId()); if(listaca.get(0).getFirstPrize().equals(list.get(i).getAwardname())){ list.get(i).setAwardsort(1); list.get(i).setAwardid(listaca.get(0).getId()); + list.get(i).setStudentcode(sysUser.getUsername()); + list.get(i).setStudentname(sysUser.getRealname()); }else if(listaca.get(0).getSecondPrize().equals(list.get(i).getAwardname())){ list.get(i).setAwardsort(2); list.get(i).setAwardid(listaca.get(0).getId()); + list.get(i).setStudentcode(sysUser.getUsername()); + list.get(i).setStudentname(sysUser.getRealname()); }else if(listaca.get(0).getThirdPrize().equals(list.get(i).getAwardname())){ list.get(i).setAwardsort(3); list.get(i).setAwardid(listaca.get(0).getId()); + list.get(i).setStudentcode(sysUser.getUsername()); + list.get(i).setStudentname(sysUser.getRealname()); }else if(listaca.get(0).getFourthPrize().equals(list.get(i).getAwardname())){ list.get(i).setAwardsort(4); list.get(i).setAwardid(listaca.get(0).getId()); + list.get(i).setStudentcode(sysUser.getUsername()); + list.get(i).setStudentname(sysUser.getRealname()); }else if(listaca.get(0).getFifthPrize().equals(list.get(i).getAwardname())){ list.get(i).setAwardsort(5); list.get(i).setAwardid(listaca.get(0).getId()); + list.get(i).setStudentcode(sysUser.getUsername()); + list.get(i).setStudentname(sysUser.getRealname()); }else { return Result.error("文件导入失败:第"+(i+1)+"行奖项名称不存在"); } diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/entity/AwardPersion.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/entity/AwardPersion.java index b5f1d559..e8164fbf 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/entity/AwardPersion.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/entity/AwardPersion.java @@ -91,10 +91,10 @@ public class AwardPersion implements Serializable { private java.lang.String awardid; /**学生姓名*/ @Excel(name = "学生姓名", width = 15) - @TableField(exist = false) + @ApiModelProperty(value = "学生姓名") private String studentname; /**学生学号*/ @Excel(name = "学生学号", width = 15) - @TableField(exist = false) + @ApiModelProperty(value = "学生学号") private String studentcode; }