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

master
zhc077 4 weeks ago
parent be89c3458c
commit f73e485c89
  1. 25
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/controller/ProjectController.java
  2. 156
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/dto/DepartExtDto.java
  3. 47
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/dto/ProjectShenBaoDto.java
  4. 21
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/service/impl/ProjectServiceImpl.java
  5. 9
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/userext/entity/UserExt.java
  6. 4
      jeecgboot-vue3/src/views/projectApplication/kejigongguan/projectApplicationList.vue
  7. 14
      jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/JiBenXinXi.ts

@ -7,14 +7,17 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.query.QueryRuleEnum;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.modules.demo.departext.entity.DepartExt;
import org.jeecg.modules.demo.departext.service.IDepartExtService;
import org.jeecg.modules.demo.project.dto.DepartExtDto;
import org.jeecg.modules.demo.project.dto.ProjectShenBaoDto;
import org.jeecg.modules.demo.project.entity.Project;
import org.jeecg.modules.demo.project.service.IProjectService;
@ -24,6 +27,7 @@ import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.system.entity.SysUser;
import org.jeecg.modules.system.service.ISysDepartService;
import org.jeecg.modules.system.service.ISysUserService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
@ -49,7 +53,7 @@ public class ProjectController extends JeecgController<Project, IProjectService>
private IProjectService projectService;
@Autowired
private IUserExtService userExtService;
private IUserExtService iUserExtService;
@Autowired
private ISysUserService iSysUserService;
@ -97,17 +101,21 @@ public class ProjectController extends JeecgController<Project, IProjectService>
@ApiOperation(value = "获取项目负责人信息", notes = "获取项目负责人信息")
@GetMapping(value = "/getUserInfo")
public Result<UserExt> getUserInfo(Project para,HttpServletRequest req) {
// LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
Project project = projectService.getById(para.getId());
UserExt userExt = userExtService.getOne(new LambdaQueryWrapper<UserExt>()
SysUser sysUser = iSysUserService.getById(project.getProjectCharger());
UserExt userExt = iUserExtService.getOne(new LambdaQueryWrapper<UserExt>()
.eq(UserExt::getUserId, project.getProjectCharger())
.eq(UserExt::getProjectId, para.getId())
);
userExt.setIdNO(sysUser.getId());
userExt.setPhone(sysUser.getPhone());
return Result.OK(userExt);
}
@ApiOperation(value = "获取申请单位信息", notes = "获取申请单位信息")
@GetMapping(value = "/getDepartInfo")
public Result<DepartExt> getDepartInfo(Project para,HttpServletRequest req) {
public Result<DepartExtDto> getDepartInfo(Project para,HttpServletRequest req) {
Project project = projectService.getById(para.getId());
SysUser sysUser = iSysUserService.getById(project.getProjectCharger());
SysDepart sysDepart = iSysDepartService.getOne(new LambdaQueryWrapper<SysDepart>().eq(SysDepart::getOrgCode, sysUser.getOrgCode()));
@ -115,7 +123,10 @@ public class ProjectController extends JeecgController<Project, IProjectService>
.eq(DepartExt::getDepartId, sysDepart.getId())
.eq(DepartExt::getProjectId, para.getId())
);
return Result.OK(departExt);
DepartExtDto dto = new DepartExtDto();
BeanUtils.copyProperties(sysDepart,dto);
BeanUtils.copyProperties(departExt,dto);
return Result.OK(dto);
}
/**
@ -146,7 +157,7 @@ public class ProjectController extends JeecgController<Project, IProjectService>
@PostMapping(value = "/update4shenbao")
public Result<String> update4shenbao(@RequestBody ProjectShenBaoDto dto) {
projectService.update4shenbao(dto);
return Result.OK("添加成功!");
return Result.OK("修改成功!");
}
/**
@ -170,12 +181,14 @@ public class ProjectController extends JeecgController<Project, IProjectService>
* @param id
* @return
*/
@AutoLog(value = "项目表-通过id删除")
// @AutoLog(value = "项目表-通过id删除")
@ApiOperation(value = "项目表-通过id删除", notes = "项目表-通过id删除")
// @RequiresPermissions("project:project:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
projectService.removeById(id);
iUserExtService.remove(new LambdaQueryWrapper<UserExt>().eq(UserExt::getProjectId,id));
iDepartExtService.remove(new LambdaQueryWrapper<DepartExt>().eq(DepartExt::getProjectId,id));
return Result.OK("删除成功!");
}

@ -0,0 +1,156 @@
package org.jeecg.modules.demo.project.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.util.Date;
/**
* @Description: TODO
* @Author: Z.H.C
* @CreateTime: 2024-10-24 11:09
* @Version: 1.0
*/
@Data
public class DepartExtDto {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
// @ApiModelProperty(value = "主键")
// private String id;
/**
* 部门表id
*/
@Excel(name = "部门表id", width = 15)
@ApiModelProperty(value = "部门表id")
private String departId;
@ApiModelProperty(value = "项目id")
private String projectId;
/**
* 单位性质
*/
@Excel(name = "单位性质", width = 15, dicCode = "depart_category")
@Dict(dicCode = "depart_category")
@ApiModelProperty(value = "单位性质")
private String category;
/**
* 企业登记注册类型
*/
@Excel(name = "企业登记注册类型", width = 15)
@ApiModelProperty(value = "企业登记注册类型")
private String type;
/**
* 开户银行
*/
@Excel(name = "开户银行", width = 15)
@ApiModelProperty(value = "开户银行")
private String bankName;
/**
* 账号
*/
@Excel(name = "账号", width = 15)
@ApiModelProperty(value = "账号")
private String bankNo;
/**
* 职工总数
*/
@Excel(name = "职工总数", width = 15)
@ApiModelProperty(value = "职工总数")
private String employeeNum;
/**
* 上年度研发经费
*/
@Excel(name = "上年度研发经费", width = 15)
@ApiModelProperty(value = "上年度研发经费")
private BigDecimal lastYearFee;
/**
* 注册时间
*/
@Excel(name = "注册时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(value = "注册时间")
private Date registerDate;
/**
* 联系人
*/
@Excel(name = "联系人", width = 15)
@ApiModelProperty(value = "联系人")
private String linkmanName;
/**
* 手机
*/
@Excel(name = "手机", width = 15)
@ApiModelProperty(value = "手机")
private String linkmanPhone;
/**
* 电子邮箱
*/
@Excel(name = "电子邮箱", width = 15)
@ApiModelProperty(value = "电子邮箱")
private String linkmanEmail;
@Excel(name = "机构/部门名称", width = 15)
private String departName;
/**
* 英文名
*/
@Excel(name = "英文名", width = 15)
private String departNameEn;
/**
* 缩写
*/
private String departNameAbbr;
/**
* 排序
*/
@Excel(name = "排序", width = 15)
private Integer departOrder;
/**
* 描述
*/
@Excel(name = "描述", width = 15)
private String description;
/**
* 机构类别 1=公司2=组织机构3=岗位
*/
@Excel(name = "机构类别", width = 15, dicCode = "org_category")
private String orgCategory;
/**
* 机构类型
*/
private String orgType;
/**
* 机构编码
*/
@Excel(name = "机构编码", width = 15)
private String orgCode;
/**
* 手机号
*/
@Excel(name = "手机号", width = 15)
private String mobile;
/**
* 传真
*/
@Excel(name = "传真", width = 15)
private String fax;
/**
* 地址
*/
@Excel(name = "地址", width = 15)
private String address;
}

@ -7,6 +7,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecg.modules.demo.project.entity.Project;
import org.jeecg.modules.demo.userext.entity.UserExt;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
@ -33,36 +35,6 @@ public class ProjectShenBaoDto implements Serializable {
// @TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**
* 创建人
*/
// @ApiModelProperty(value = "创建人")
// private String createBy;
// /**
// * 创建日期
// */
// @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
// @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
// @ApiModelProperty(value = "创建日期")
// private Date createTime;
// /**
// * 更新人
// */
// @ApiModelProperty(value = "更新人")
// private String updateBy;
// /**
// * 更新日期
// */
// @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
// @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
// @ApiModelProperty(value = "更新日期")
// private Date updateTime;
// /**
// * 所属部门
// */
// @Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
// @ApiModelProperty(value = "所属部门")
// private String sysOrgCode;
/**
* 项目名称
*/
@ -379,4 +351,19 @@ public class ProjectShenBaoDto implements Serializable {
@Excel(name = "电子邮箱", width = 15)
@ApiModelProperty(value = "电子邮箱")
private String linkmanEmail;
/**
* 地址
*/
@Excel(name = "地址", width = 15)
@ApiModelProperty(value = "部门表地址")
private String address;
@Excel(name = "传真", width = 15)
@ApiModelProperty(value = "传真")
private String fax;
@Excel(name = "用户表身份证号", width = 15)
@ApiModelProperty(value = "用户表身份证号")
private String idNO;
}

@ -54,15 +54,14 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
log.info(">>> the 新增项目审报 reqParams:{}", JSON.toJSONString(dto));
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
// SysDepart sysDepart = new SysDepart();
SysDepart sysDepart = new SysDepart();
DepartExt departExt = new DepartExt();
// SysUser sysUser = new SysUser();
UserExt userExt = new UserExt();
Project project = new Project();
BeanUtils.copyProperties(dto, departExt);
// BeanUtils.copyProperties(dto, sysDepart);
BeanUtils.copyProperties(dto, sysDepart);
// BeanUtils.copyProperties(dto, sysUser);
BeanUtils.copyProperties(dto, userExt);
BeanUtils.copyProperties(dto, project);
@ -80,6 +79,14 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
departExt.setDepartId(loginUser.getOrgId());
departExt.setProjectId(project.getId());
this.iDepartExtService.save(departExt);
sysDepart.setId(loginUser.getOrgId());
updateDepart4ShenBao(sysDepart);
}
void updateDepart4ShenBao(SysDepart depart){
this.iSysDepartService.updateById(depart);
}
@Override
@ -90,14 +97,14 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
iUserExtService.remove(new LambdaQueryWrapper<UserExt>().eq(UserExt::getProjectId,dto.getId()));
iDepartExtService.remove(new LambdaQueryWrapper<DepartExt>().eq(DepartExt::getProjectId,dto.getId()));
// SysDepart sysDepart = new SysDepart();
SysDepart sysDepart = new SysDepart();
DepartExt departExt = new DepartExt();
// SysUser sysUser = new SysUser();
UserExt userExt = new UserExt();
Project project = new Project();
BeanUtils.copyProperties(dto, departExt);
// BeanUtils.copyProperties(dto, sysDepart);
BeanUtils.copyProperties(dto, sysDepart);
// BeanUtils.copyProperties(dto, sysUser);
BeanUtils.copyProperties(dto, userExt);
BeanUtils.copyProperties(dto, project);
@ -113,5 +120,9 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
departExt.setDepartId(loginUser.getOrgId());
departExt.setProjectId(project.getId());
this.iDepartExtService.save(departExt);
sysDepart.setId(loginUser.getOrgId());
updateDepart4ShenBao(sysDepart);
}
}

@ -1,6 +1,7 @@
package org.jeecg.modules.demo.userext.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
@ -113,5 +114,13 @@ public class UserExt implements Serializable {
@ApiModelProperty(value = "项目id")
private String projectId;
@TableField(exist = false)
@ApiModelProperty(value = "用户表身份证号")
private String idNO;
@TableField(exist = false)
@ApiModelProperty(value = "用户表负责人手机号")
private String phone;
}

@ -76,6 +76,10 @@
// const { routename } = unref(currentRoute);
back();
};
function getUserDepart(){
projectBaseInfoSchemas.se
}
return { registerProjectInfo, registerUser, registerDepart, submitAll, goBack };
},
});

@ -84,6 +84,20 @@ export const userSchemas: FormSchema[] = [
// required: true,
// colProps: { span: 6 },
},
{
field: 'idNO',
component: 'Input',
label: '身份证号',
// required: true,
// colProps: { span: 6 },
},
{
field: 'phone',
component: 'Input',
label: '负责人手机号',
// required: true,
// colProps: { span: 6 },
},
{
label: '名族',
field: 'nation',

Loading…
Cancel
Save