From 93cb20dd90fa7754201abf2d2eaed27ed06e3ae6 Mon Sep 17 00:00:00 2001 From: Gitea Date: Tue, 9 Jul 2024 18:44:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A5=96=E9=A1=B9=E7=AE=A1=E7=90=86=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=AD=A6=E7=94=9F=E6=89=80=E5=B1=9E=E5=AD=A6=E9=99=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/AwardPersionController.java | 31 +++++++++++++++++++ .../awardpersion/entity/AwardPersion.java | 4 +++ 2 files changed, 35 insertions(+) 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 eb53ca26..7e633940 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 @@ -41,6 +41,9 @@ import lombok.extern.slf4j.Slf4j; import org.jeecg.modules.demo.comp.entity.Comp; import org.jeecg.modules.demo.comp.service.ICompService; import org.jeecg.modules.system.entity.SysUser; +import org.jeecg.modules.system.entity.SysUserDepart; +import org.jeecg.modules.system.service.ISysDepartService; +import org.jeecg.modules.system.service.ISysUserDepartService; import org.jeecg.modules.system.service.ISysUserService; import org.jeecgframework.poi.excel.ExcelImportUtil; import org.jeecgframework.poi.excel.def.NormalExcelConstants; @@ -88,6 +91,10 @@ public class AwardPersionController extends JeecgController queryWrappersud = QueryGenerator.initQueryWrapper(sysUserDepart, req.getParameterMap()); + queryWrappersud.eq("user_id",sysUser.getId()); + awardPersion.setStudentorg(sysDepartService.getById(sysUserDepartService.getOne(queryWrappersud).getDepId()).getOrgCode()); awardPersionService.save(awardPersion); AnnualCompPoint annualCompPoint = annualCompPointService.getById(awardPersion.getAnnualCompP()); annualCompPoint.setIsPj(1); @@ -206,6 +217,10 @@ public class AwardPersionController extends JeecgController queryWrappersud = QueryGenerator.initQueryWrapper(sysUserDepart, req.getParameterMap()); + queryWrappersud.eq("user_id",sysUser.getId()); + awardPersion.setStudentorg(sysDepartService.getById(sysUserDepartService.getOne(queryWrappersud).getDepId()).getOrgCode()); awardPersionService.save(awardPersion); AnnualCompPoint annualCompPoint = annualCompPointService.getById(awardPersion.getAnnualCompP()); annualCompPoint.setIsPj(1); @@ -255,12 +270,20 @@ public class AwardPersionController extends JeecgController queryWrappersud = QueryGenerator.initQueryWrapper(sysUserDepart, req.getParameterMap()); + queryWrappersud.eq("user_id",sysUser.getId()); + awardPersion.setStudentorg(sysDepartService.getById(sysUserDepartService.getOne(queryWrappersud).getDepId()).getOrgCode()); awardPersionService.updateById(awardPersion); return Result.OK("编辑成功!"); }else { SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId()); awardPersion.setStudentname(sysUser.getRealname()); awardPersion.setStudentcode(sysUser.getUsername()); + SysUserDepart sysUserDepart = new SysUserDepart(null,null); + QueryWrapper queryWrappersud = QueryGenerator.initQueryWrapper(sysUserDepart, req.getParameterMap()); + queryWrappersud.eq("user_id",sysUser.getId()); + awardPersion.setStudentorg(sysDepartService.getById(sysUserDepartService.getOne(queryWrappersud).getDepId()).getOrgCode()); awardPersionService.updateById(awardPersion); return Result.OK("编辑成功!"); } @@ -459,6 +482,10 @@ public class AwardPersionController extends JeecgController listtm1 = teamManagementService.list(queryWrappertm1); SysUser sysUser = sysUserService.getById(listtm1.get(0).getUserId()); + SysUserDepart sysUserDepart = new SysUserDepart(null,null); + QueryWrapper queryWrappersud = QueryGenerator.initQueryWrapper(sysUserDepart, request.getParameterMap()); + queryWrappersud.eq("user_id",sysUser.getId()); + list.get(i).setStudentorg(sysDepartService.getById(sysUserDepartService.getOne(queryWrappersud).getDepId()).getOrgCode()); if(listaca.get(0).getFirstPrize().equals(list.get(i).getAwardname())){ list.get(i).setAwardsort(1); list.get(i).setAwardid(listaca.get(0).getId()); @@ -490,6 +517,10 @@ public class AwardPersionController extends JeecgController queryWrappersud = QueryGenerator.initQueryWrapper(sysUserDepart, request.getParameterMap()); + queryWrappersud.eq("user_id",sysUser.getId()); + list.get(i).setStudentorg(sysDepartService.getById(sysUserDepartService.getOne(queryWrappersud).getDepId()).getOrgCode()); if(listaca.get(0).getFirstPrize().equals(list.get(i).getAwardname())){ list.get(i).setAwardsort(1); list.get(i).setAwardid(listaca.get(0).getId()); 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 d3b993fb..c6da4338 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 @@ -109,4 +109,8 @@ public class AwardPersion implements Serializable { @TableField(exist = false) @ApiModelProperty(value = "角色标识") private String rolename; + /**学生所属学院*/ + @ApiModelProperty(value = "学生所属学院") + private String studentorg; + }