From 7ea02816b7474cc8a7da5e8c25c0661ba95ff086 Mon Sep 17 00:00:00 2001 From: zhc077 <565291854@qq.com> Date: Wed, 23 Oct 2024 18:02:17 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E4=B9=A6-=E5=9F=BA=E6=9C=AC?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=20=E5=8A=9F=E8=83=BD=E6=B7=BB=E5=8A=A0=2010.?= =?UTF-8?q?23?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jeecg/modules/demo/departext/entity/DepartExt.java | 4 ++++ .../demo/project/controller/ProjectController.java | 10 ++++++++-- .../demo/project/service/impl/ProjectServiceImpl.java | 2 ++ .../org/jeecg/modules/demo/userext/entity/UserExt.java | 5 +++++ 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/departext/entity/DepartExt.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/departext/entity/DepartExt.java index c9e0c30..315255e 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/departext/entity/DepartExt.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/departext/entity/DepartExt.java @@ -67,6 +67,10 @@ public class DepartExt implements Serializable { @Excel(name = "部门表id", width = 15) @ApiModelProperty(value = "部门表id") private String departId; + + @ApiModelProperty(value = "项目id") + private String projectId; + /** * 单位性质 */ diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/controller/ProjectController.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/controller/ProjectController.java index 78c2f94..7df8593 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/controller/ProjectController.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/controller/ProjectController.java @@ -98,7 +98,10 @@ public class ProjectController extends JeecgController @GetMapping(value = "/getUserInfo") public Result getUserInfo(Project para,HttpServletRequest req) { Project project = projectService.getById(para.getId()); - UserExt userExt = userExtService.getOne(new LambdaQueryWrapper().eq(UserExt::getUserId, project.getProjectCharger())); + UserExt userExt = userExtService.getOne(new LambdaQueryWrapper() + .eq(UserExt::getUserId, project.getProjectCharger()) + .eq(UserExt::getProjectId, para.getId()) + ); return Result.OK(userExt); } @@ -108,7 +111,10 @@ public class ProjectController extends JeecgController Project project = projectService.getById(para.getId()); SysUser sysUser = iSysUserService.getById(project.getProjectCharger()); SysDepart sysDepart = iSysDepartService.getOne(new LambdaQueryWrapper().eq(SysDepart::getOrgCode, sysUser.getOrgCode())); - DepartExt departExt = iDepartExtService.getOne(new LambdaQueryWrapper().eq(DepartExt::getDepartId, sysDepart.getId())); + DepartExt departExt = iDepartExtService.getOne(new LambdaQueryWrapper() + .eq(DepartExt::getDepartId, sysDepart.getId()) + .eq(DepartExt::getProjectId, para.getId()) + ); return Result.OK(departExt); } diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/service/impl/ProjectServiceImpl.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/service/impl/ProjectServiceImpl.java index 93b685c..0f208d3 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/service/impl/ProjectServiceImpl.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/service/impl/ProjectServiceImpl.java @@ -74,8 +74,10 @@ public class ProjectServiceImpl extends ServiceImpl impl project.setBudgetStatus("10"); this.save(project); userExt.setUserId(loginUser.getId()); + userExt.setProjectId(project.getId()); this.iUserExtService.save(userExt); departExt.setDepartId(loginUser.getOrgId()); + departExt.setProjectId(project.getId()); this.iDepartExtService.save(departExt); } } diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/userext/entity/UserExt.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/userext/entity/UserExt.java index c00337f..711df54 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/userext/entity/UserExt.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/userext/entity/UserExt.java @@ -109,4 +109,9 @@ public class UserExt implements Serializable { @Excel(name = "现从事专业", width = 15) @ApiModelProperty(value = "现从事专业") private String currentPerfession; + + @ApiModelProperty(value = "项目id") + private String projectId; + + }