项目书-基本信息 功能添加 10.23

master
zhc077 1 month ago
parent 79efe8964e
commit 7ea02816b7
  1. 4
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/departext/entity/DepartExt.java
  2. 10
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/controller/ProjectController.java
  3. 2
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/service/impl/ProjectServiceImpl.java
  4. 5
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/userext/entity/UserExt.java

@ -67,6 +67,10 @@ public class DepartExt implements Serializable {
@Excel(name = "部门表id", width = 15) @Excel(name = "部门表id", width = 15)
@ApiModelProperty(value = "部门表id") @ApiModelProperty(value = "部门表id")
private String departId; private String departId;
@ApiModelProperty(value = "项目id")
private String projectId;
/** /**
* 单位性质 * 单位性质
*/ */

@ -98,7 +98,10 @@ public class ProjectController extends JeecgController<Project, IProjectService>
@GetMapping(value = "/getUserInfo") @GetMapping(value = "/getUserInfo")
public Result<UserExt> getUserInfo(Project para,HttpServletRequest req) { public Result<UserExt> getUserInfo(Project para,HttpServletRequest req) {
Project project = projectService.getById(para.getId()); Project project = projectService.getById(para.getId());
UserExt userExt = userExtService.getOne(new LambdaQueryWrapper<UserExt>().eq(UserExt::getUserId, project.getProjectCharger())); UserExt userExt = userExtService.getOne(new LambdaQueryWrapper<UserExt>()
.eq(UserExt::getUserId, project.getProjectCharger())
.eq(UserExt::getProjectId, para.getId())
);
return Result.OK(userExt); return Result.OK(userExt);
} }
@ -108,7 +111,10 @@ public class ProjectController extends JeecgController<Project, IProjectService>
Project project = projectService.getById(para.getId()); Project project = projectService.getById(para.getId());
SysUser sysUser = iSysUserService.getById(project.getProjectCharger()); SysUser sysUser = iSysUserService.getById(project.getProjectCharger());
SysDepart sysDepart = iSysDepartService.getOne(new LambdaQueryWrapper<SysDepart>().eq(SysDepart::getOrgCode, sysUser.getOrgCode())); SysDepart sysDepart = iSysDepartService.getOne(new LambdaQueryWrapper<SysDepart>().eq(SysDepart::getOrgCode, sysUser.getOrgCode()));
DepartExt departExt = iDepartExtService.getOne(new LambdaQueryWrapper<DepartExt>().eq(DepartExt::getDepartId, sysDepart.getId())); DepartExt departExt = iDepartExtService.getOne(new LambdaQueryWrapper<DepartExt>()
.eq(DepartExt::getDepartId, sysDepart.getId())
.eq(DepartExt::getProjectId, para.getId())
);
return Result.OK(departExt); return Result.OK(departExt);
} }

@ -74,8 +74,10 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
project.setBudgetStatus("10"); project.setBudgetStatus("10");
this.save(project); this.save(project);
userExt.setUserId(loginUser.getId()); userExt.setUserId(loginUser.getId());
userExt.setProjectId(project.getId());
this.iUserExtService.save(userExt); this.iUserExtService.save(userExt);
departExt.setDepartId(loginUser.getOrgId()); departExt.setDepartId(loginUser.getOrgId());
departExt.setProjectId(project.getId());
this.iDepartExtService.save(departExt); this.iDepartExtService.save(departExt);
} }
} }

@ -109,4 +109,9 @@ public class UserExt implements Serializable {
@Excel(name = "现从事专业", width = 15) @Excel(name = "现从事专业", width = 15)
@ApiModelProperty(value = "现从事专业") @ApiModelProperty(value = "现从事专业")
private String currentPerfession; private String currentPerfession;
@ApiModelProperty(value = "项目id")
private String projectId;
} }

Loading…
Cancel
Save