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; + + }