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 409ecd4..507dc10 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 @@ -108,6 +108,22 @@ public class ProjectController extends JeecgController return Result.OK(project); } + @ApiOperation(value = "预算书-获取预算书封面", notes = "预算书-获取预算书封面") + @GetMapping(value = "/getFengMian") + public Result getFengMian(Project param, HttpServletRequest req) { + Project project = projectService.getById(param.getId()); + ProjectType projectType = iProjectTypeService.getById(project.getProjectTypeid()); + project.setAnnualName(projectType.getAnnualName()); + project.setProjectTypeName(projectType.getTypeName()); + project.setAnnualName(projectType.getAnnualName()); + project.setProjectTypeName(projectType.getTypeName()); + SysDepart sysDepart = iSysDepartService.getById(project.getSysOrgCode()); + project.setDepartName(sysDepart.getDepartName()); + SysUser sysUser = iSysUserService.getById(project.getProjectCharger()); + project.setProjectCharger(sysUser.getRealname()); + return Result.OK(project); + } + @ApiOperation(value = "获取项目负责人信息", notes = "获取项目负责人信息") @GetMapping(value = "/getUserInfo") public Result getUserInfo(Project para, HttpServletRequest req) { @@ -120,6 +136,7 @@ public class ProjectController extends JeecgController ); userExt.setIdNO(sysUser.getId()); userExt.setPhone(sysUser.getPhone()); + userExt.setEmail(sysUser.getEmail()); return Result.OK(userExt); } diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/dto/ProjectShenBaoDto.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/dto/ProjectShenBaoDto.java index 89beaf0..27a94e5 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/dto/ProjectShenBaoDto.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/dto/ProjectShenBaoDto.java @@ -1,5 +1,6 @@ package org.jeecg.modules.demo.project.dto; +import com.baomidou.mybatisplus.annotation.TableField; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -366,4 +367,7 @@ public class ProjectShenBaoDto implements Serializable { @Excel(name = "用户表身份证号", width = 15) @ApiModelProperty(value = "用户表身份证号") private String idNO; + + @ApiModelProperty(value = "用户表负责人email") + private String email; } diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/entity/Project.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/entity/Project.java index 3d97009..3a5ba08 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/entity/Project.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/entity/Project.java @@ -242,6 +242,10 @@ public class Project implements Serializable { @TableField(exist = false) private String annualName; + @TableField(exist = false) + private String departName; + + /** * 批次 */ 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 9be171d..e6be6b2 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 @@ -1,7 +1,6 @@ package org.jeecg.modules.demo.project.service.impl; import com.alibaba.fastjson.JSON; -import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import lombok.extern.slf4j.Slf4j; @@ -13,7 +12,6 @@ import org.jeecg.modules.demo.project.dto.ProjectShenBaoDto; import org.jeecg.modules.demo.project.entity.Project; import org.jeecg.modules.demo.project.mapper.ProjectMapper; import org.jeecg.modules.demo.project.service.IProjectService; -import org.jeecg.modules.demo.projectType.entity.ProjectType; import org.jeecg.modules.demo.projectType.service.IProjectTypeService; import org.jeecg.modules.demo.userext.entity.UserExt; import org.jeecg.modules.demo.userext.service.IUserExtService; @@ -74,9 +72,6 @@ public class ProjectServiceImpl extends ServiceImpl impl // 预算书不存在 project.setBudgetStatus("10"); -// ProjectType projectType = iProjectTypeService.getById(project.getProjectTypeid()); -// project.setAnnualName(projectType.getAnnualName()); -// project.setProjectTypeName(projectType.getTypeName()); this.save(project); userExt.setUserId(loginUser.getId()); userExt.setProjectId(project.getId()); @@ -89,43 +84,43 @@ public class ProjectServiceImpl extends ServiceImpl impl updateDepart4ShenBao(sysDepart); } - void updateDepart4ShenBao(SysDepart depart){ + void updateDepart4ShenBao(SysDepart depart) { this.iSysDepartService.updateById(depart); } @Override public void update4shenbao(ProjectShenBaoDto dto) { - log.info(">>> the 修改项目书-文 reqParams:{}", JSON.toJSONString(dto)); + log.info(">>> the 修改项目书-正文 reqParams:{}", JSON.toJSONString(dto)); LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); - iUserExtService.remove(new LambdaQueryWrapper().eq(UserExt::getProjectId,dto.getId())); - iDepartExtService.remove(new LambdaQueryWrapper().eq(DepartExt::getProjectId,dto.getId())); + iUserExtService.remove(new LambdaQueryWrapper().eq(UserExt::getProjectId, dto.getId())); + iDepartExtService.remove(new LambdaQueryWrapper().eq(DepartExt::getProjectId, dto.getId())); SysDepart sysDepart = new SysDepart(); DepartExt departExt = new DepartExt(); -// SysUser sysUser = new SysUser(); + SysUser sysUser = new SysUser(); UserExt userExt = new UserExt(); Project project = new Project(); BeanUtils.copyProperties(dto, departExt); BeanUtils.copyProperties(dto, sysDepart); -// BeanUtils.copyProperties(dto, sysUser); BeanUtils.copyProperties(dto, userExt); BeanUtils.copyProperties(dto, project); project.setSysOrgCode(loginUser.getOrgId()); - //负责人 -// project.setProjectCharger(loginUser.getId()); this.updateById(project); userExt.setUserId(loginUser.getId()); userExt.setProjectId(project.getId()); this.iUserExtService.save(userExt); + sysUser.setId(loginUser.getId()); + sysUser.setEmail(dto.getEmail()); + this.iSysUserService.updateById(sysUser); + departExt.setDepartId(loginUser.getOrgId()); departExt.setProjectId(project.getId()); this.iDepartExtService.save(departExt); - sysDepart.setId(loginUser.getOrgId()); updateDepart4ShenBao(sysDepart); } 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 e5688e6..cf45be3 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 @@ -122,5 +122,9 @@ public class UserExt implements Serializable { @ApiModelProperty(value = "用户表负责人手机号") private String phone; + @TableField(exist = false) + @ApiModelProperty(value = "用户表负责人email") + private String email; + } diff --git a/jeecgboot-vue3/src/views/monitor/trace/index.vue b/jeecgboot-vue3/src/views/monitor/trace/index.vue index ce1e601..313ebeb 100644 --- a/jeecgboot-vue3/src/views/monitor/trace/index.vue +++ b/jeecgboot-vue3/src/views/monitor/trace/index.vue @@ -3,7 +3,7 @@