Przeglądaj źródła

改变 审批人员

master
PoffyZhang 1 rok temu
rodzic
commit
ce999c1b60
12 zmienionych plików z 94 dodań i 77 usunięć
  1. +3
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/common/helper/UserInfoHelper.java
  2. +6
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/common/helper/impl/UserInfoHelperImpl.java
  3. +11
    -13
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java
  4. +15
    -17
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java
  5. +19
    -15
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DefaultDeclaredProjectManage.java
  6. +11
    -14
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java
  7. +7
    -8
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ProjectAdjustmentManage.java
  8. +2
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ReviewByDeptJointManage.java
  9. +2
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDTO.java
  10. +4
    -4
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java
  11. +2
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java
  12. +12
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserAuthLoginManage.java

+ 3
- 0
pmapi/src/main/java/com/ningdatech/pmapi/common/helper/UserInfoHelper.java Wyświetl plik

@@ -1,6 +1,7 @@
package com.ningdatech.pmapi.common.helper;

import com.ningdatech.pmapi.user.security.auth.model.UserFullInfoDTO;
import com.ningdatech.pmapi.user.security.auth.model.UserInfoDetails;
import org.springframework.stereotype.Component;

/**
@@ -29,4 +30,6 @@ public interface UserInfoHelper {
* @return
*/
boolean isSuperOrRegionAdmin(Long userId);

UserFullInfoDTO getUserFullInfoByEmployeeCode(String employeeCode);
}

+ 6
- 0
pmapi/src/main/java/com/ningdatech/pmapi/common/helper/impl/UserInfoHelperImpl.java Wyświetl plik

@@ -54,4 +54,10 @@ public class UserInfoHelperImpl implements UserInfoHelper {
}
return Boolean.FALSE;
}

@Override
public UserFullInfoDTO getUserFullInfoByEmployeeCode(String employeeCode) {
UserFullInfoDTO userFullInfo = userAuthLoginManage.getUserFullInfoByEmployeeCode(employeeCode);
return userFullInfo;
}
}

+ 11
- 13
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java Wyświetl plik

@@ -94,8 +94,8 @@ public class ConstructionPlanManage {
@Transactional(rollbackFor = Exception.class)
public String startTheProcess(DefaultDeclaredDTO dto) {
UserInfoDetails userInfoDetails = LoginUserUtil.loginUserDetail();
Long userId = userInfoDetails.getUserId();
VUtils.isTrue(Objects.isNull(userInfoDetails) ||Objects.isNull(userInfoDetails.getUserId()))
String employeeCode = userInfoDetails.getEmployeeCode();
VUtils.isTrue(Objects.isNull(userInfoDetails) ||Objects.isNull(employeeCode))
.throwMessage("获取登录用户失败!");

ProjectDTO projectDto = dto.getProjectInfo();
@@ -122,7 +122,7 @@ public class ConstructionPlanManage {
.throwMessage("提交失败 该项目不是 方案待申报状态或者未立项阶段");

ProcessStartParamsVo params = new ProcessStartParamsVo();
params.setUser(declaredProjectManage.buildUser(userId));
params.setUser(declaredProjectManage.buildUser(employeeCode));
params.setProcessUsers(Collections.emptyMap());
//放入条件判断的项目字段
ProjectConditionDTO conditionDto = new ProjectConditionDTO();
@@ -133,7 +133,7 @@ public class ConstructionPlanManage {
);
params.setFormData(dto.getFormData());
// 获取发起单位、发起单位主管单位、发起单位上级条线主管单位信息
Map<String, OrgInfoDTO> orgModelMap = defaultDeclaredProjectManage.buildOrgModelMap(userId,projectInfo);
Map<String, OrgInfoDTO> orgModelMap = defaultDeclaredProjectManage.buildOrgModelMap(employeeCode,projectInfo);
String instanceId = processService.newStartProcess(model.getProcessDefId(),model.getFormId(), params,orgModelMap);
log.info("建设方案项目申报成功 【{}】", instanceId);

@@ -152,7 +152,7 @@ public class ConstructionPlanManage {
@Transactional(rollbackFor = Exception.class)
public String restartTheProcess(DefaultDeclaredDTO dto) {
UserInfoDetails userInfoDetails = LoginUserUtil.loginUserDetail();
VUtils.isTrue(Objects.isNull(userInfoDetails) ||Objects.isNull(userInfoDetails.getUserId()))
VUtils.isTrue(Objects.isNull(userInfoDetails) ||Objects.isNull(userInfoDetails.getEmployeeCode()))
.throwMessage("获取登录用户失败!");

ProjectDTO projectDto = dto.getProjectInfo();
@@ -207,11 +207,10 @@ public class ConstructionPlanManage {
//项目阶段 状态 已定 方案待申报
req.setStage(ProjectStatusEnum.NOT_APPROVED.getCode());
req.setStatus(ProjectStatusEnum.PLAN_TO_BE_DECLARED.getCode());
Long userId = LoginUserUtil.getUserId();
VUtils.isTrue(Objects.isNull(userId)).throwMessage("获取登录用户失败!");
UserFullInfoDTO userFullInfo = userInfoHelper.getUserFullInfo(userId);
UserInfoDetails user = LoginUserUtil.loginUserDetail();
VUtils.isTrue(Objects.isNull(user)).throwMessage("获取登录用户失败!");
//放入用户的单位
req.setBuildOrgCode(userFullInfo.getOrganizationCode());
req.setBuildOrgCode(user.getOrganizationCode());
return projectLibManage.projectLibList(req);
}

@@ -222,11 +221,10 @@ public class ConstructionPlanManage {
//项目阶段 状态 已定 方案待申报
req.setStage(ProjectStatusEnum.NOT_APPROVED.getCode());
req.setStatus(ProjectStatusEnum.PLAN_TO_BE_DECLARED.getCode());
Long userId = LoginUserUtil.getUserId();
VUtils.isTrue(Objects.isNull(userId)).throwMessage("获取登录用户失败!");
UserFullInfoDTO userFullInfo = userInfoHelper.getUserFullInfo(userId);
UserInfoDetails user = LoginUserUtil.loginUserDetail();
VUtils.isTrue(Objects.isNull(user)).throwMessage("获取登录用户失败!");
//放入用户的单位
req.setBuildOrgCode(userFullInfo.getOrganizationCode());
req.setBuildOrgCode(user.getOrganizationCode());
req.setPageNumber(CommonConst.EXPORT_PAGE_NUMBER);
req.setPageSize(CommonConst.EXPORT_PAGE_SIZE);
LambdaQueryWrapper<Project> query = ProjectHelper.projectQuery(req);


+ 15
- 17
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java Wyświetl plik

@@ -109,8 +109,8 @@ public class DeclaredProjectManage {
@Transactional(rollbackFor = Exception.class)
public String startTheProcess(DefaultDeclaredDTO dto) {
UserInfoDetails userInfoDetails = LoginUserUtil.loginUserDetail();
Long userId = userInfoDetails.getUserId();
VUtils.isTrue(Objects.isNull(userId)).throwMessage("获取登录用户失败!");
String employeeCode = userInfoDetails.getEmployeeCode();
VUtils.isTrue(StringUtils.isBlank(employeeCode)).throwMessage("获取登录用户 员工号 失败!");

ProjectDTO projectInfo = dto.getProjectInfo();

@@ -152,7 +152,7 @@ public class DeclaredProjectManage {
}

ProcessStartParamsVo params = new ProcessStartParamsVo();
params.setUser(defaultDeclaredProjectManage.buildUser(userId));
params.setUser(defaultDeclaredProjectManage.buildUser(employeeCode));
params.setProcessUsers(Collections.emptyMap());
//放入条件判断的项目字段
ProjectConditionDTO conditionDto = new ProjectConditionDTO();
@@ -166,12 +166,12 @@ public class DeclaredProjectManage {
// 获取发起单位、发起单位主管单位、发起单位上级主管条线单位信息
Project project = new Project();
BeanUtils.copyProperties(projectInfo,project);
Map<String, OrgInfoDTO> orgModelMap = defaultDeclaredProjectManage.buildOrgModelMap(userId,project);
Map<String, OrgInfoDTO> orgModelMap = defaultDeclaredProjectManage.buildOrgModelMap(employeeCode,project);
String instanceId = processService.newStartProcess(model.getProcessDefId(),model.getFormId(), params,orgModelMap);
log.info("申报项目成功 【{}】", instanceId);

//如果是重新提交的话 判断下 项目是否存在
if(saveOrUpdateProject(projectInfo, instanceId,userId) && Objects.nonNull(projectInfo.getDraftId())){
if(saveOrUpdateProject(projectInfo, instanceId,employeeCode) && Objects.nonNull(projectInfo.getDraftId())){
//如果是草稿箱提交 删除对应的草稿箱
projectDraftService.removeById(projectInfo.getDraftId());
}
@@ -189,9 +189,9 @@ public class DeclaredProjectManage {
@Transactional(rollbackFor = Exception.class)
public String reStartTheProcess(DefaultDeclaredDTO dto) {
UserInfoDetails userInfoDetails = LoginUserUtil.loginUserDetail();
VUtils.isTrue(Objects.isNull(userInfoDetails) || Objects.isNull(userInfoDetails.getUserId()))
VUtils.isTrue(Objects.isNull(userInfoDetails) || Objects.isNull(userInfoDetails.getEmployeeCode()))
.throwMessage("获取登录用户失败!");
Long userId = userInfoDetails.getUserId();
String employeeCode = userInfoDetails.getEmployeeCode();
ProjectDTO projectDto = dto.getProjectInfo();
projectDto.setAreaCode(userInfoDetails.getRegionCode());
projectDto.setArea(regionCacheHelper.getRegionName(userInfoDetails.getRegionCode(), RegionConst.RL_COUNTY));
@@ -224,7 +224,7 @@ public class DeclaredProjectManage {
.throwMessage("提交失败 该项目不是 单位内部拒绝审核状态或者未立项阶段");

ProcessStartParamsVo params = new ProcessStartParamsVo();
params.setUser(defaultDeclaredProjectManage.buildUser(userId));
params.setUser(defaultDeclaredProjectManage.buildUser(employeeCode));
params.setProcessUsers(Collections.emptyMap());
//放入条件判断的项目字段
ProjectConditionDTO conditionDto = new ProjectConditionDTO();
@@ -237,12 +237,12 @@ public class DeclaredProjectManage {
// 获取发起单位、发起单位主管单位、发起单位上级主管条线单位信息
Project project = new Project();
BeanUtils.copyProperties(projectInfo,project);
Map<String, OrgInfoDTO> orgModelMap = defaultDeclaredProjectManage.buildOrgModelMap(userId,project);
Map<String, OrgInfoDTO> orgModelMap = defaultDeclaredProjectManage.buildOrgModelMap(employeeCode,project);
String instanceId = processService.newStartProcess(model.getProcessDefId(),model.getFormId(), params,orgModelMap);
log.info("重新申报项目成功 【{}】", instanceId);

//保存项目
saveOrUpdateProject(projectDto,instanceId,userId);
saveOrUpdateProject(projectDto,instanceId,employeeCode);

return instanceId;
}
@@ -254,7 +254,7 @@ public class DeclaredProjectManage {
* @param instanceId
*/
private Boolean saveOrUpdateProject(ProjectDTO projectDto, String instanceId,
Long userId) {
String employeeCode) {
//流程启动之后 入库项目 重要业务信息 用于列表查询 展示
try {
//保存项目表信息
@@ -265,7 +265,7 @@ public class DeclaredProjectManage {
project.setStage(ProjectStatusEnum.NOT_APPROVED.getCode());
project.setStatus(ProjectStatusEnum.UNDER_INTERNAL_AUDIT.getCode());
project.setInstCode(instanceId);
project.setSponsor(userId);
project.setSponsor(employeeCode);
projectService.saveOrUpdate(project);
//保存项目应用
if (CollUtil.isNotEmpty(projectDto.getApplicationList())) {
@@ -374,9 +374,8 @@ public class DeclaredProjectManage {
* @return
*/
public PageVo<ProjectLibListItemVO> projectLibList(ProjectListReq req) {
Long userId = LoginUserUtil.getUserId();
VUtils.isTrue(Objects.isNull(userId)).throwMessage("获取登录用户失败!");
UserFullInfoDTO userFullInfo = userInfoHelper.getUserFullInfo(userId);
UserInfoDetails userFullInfo = LoginUserUtil.loginUserDetail();
VUtils.isTrue(Objects.isNull(userFullInfo)).throwMessage("获取登录用户失败!");
//放入用户的单位
req.setBuildOrgCode(userFullInfo.getOrganizationCode());
return projectlibManager.projectLibList(req);
@@ -384,8 +383,7 @@ public class DeclaredProjectManage {

public void exportList(HttpServletResponse response, ProjectListReq param) {
UserInfoDetails userInfoDetails = LoginUserUtil.loginUserDetail();
Long userId = userInfoDetails.getUserId();
VUtils.isTrue(Objects.isNull(userId)).throwMessage("获取登录用户失败!");
VUtils.isTrue(Objects.isNull(userInfoDetails)).throwMessage("获取登录用户失败!");
//放入用户的单位
param.setBuildOrgCode(userInfoDetails.getOrganizationCode());
LambdaQueryWrapper<Project> query = ProjectHelper.projectQuery(param);


+ 19
- 15
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DefaultDeclaredProjectManage.java Wyświetl plik

@@ -108,27 +108,31 @@ public class DefaultDeclaredProjectManage {
}
}

public ProcessInstanceUserDto buildUser(Long userId){
UserFullInfoDTO userFullInfo = userInfoHelper.getUserFullInfo(userId);
public ProcessInstanceUserDto buildUser(String employeeCode){
UserFullInfoDTO userInfoDetail = userInfoHelper.getUserFullInfoByEmployeeCode(employeeCode);

VUtils.isTrue(Objects.isNull(userFullInfo))
.throwMessage("当前登录用户 信息出错!");
VUtils.isTrue(Objects.isNull(userInfoDetail))
.throwMessage(String.format("【%s】获取不到用户!",employeeCode));

return ProcessInstanceUserDto.builder()
.userId(String.valueOf(userFullInfo.getUserId()))
.userName(userFullInfo.getRealName())
.orgCode(userFullInfo.getOrganizationCode())
.orgName(userFullInfo.getOrganizationName())
.userId(String.valueOf(userInfoDetail.getEmployeeCode()))
.userName(userInfoDetail.getRealName())
.orgCode(userInfoDetail.getOrganizationCode())
.orgName(userInfoDetail.getOrganizationName())
.build();
}

public Map<String, OrgInfoDTO> buildOrgModelMap(Long userId,Project project) {
public Map<String, OrgInfoDTO> buildOrgModelMap(String employeeCode,Project project) {
Map<String, OrgInfoDTO> orgMap = new HashMap<>();

// 查出所有的单位流程配置
List<WflowOrgModels> orgModelsList = orgProcdefService.list();

UserFullInfoDTO userFullInfo = userInfoHelper.getUserFullInfo(userId);
UserFullInfoDTO userFullInfo = userInfoHelper.getUserFullInfoByEmployeeCode(employeeCode);
if(Objects.isNull(userFullInfo)){
log.warn("取不到员工 返回空map");
return Collections.emptyMap();
}
DingOrganization startOrg = dingOrganizationService.getOne(Wrappers.lambdaQuery(DingOrganization.class)
.eq(DingOrganization::getOrganizationCode, userFullInfo.getOrganizationCode()));
String startOrgCode = startOrg.getOrganizationCode();
@@ -177,12 +181,12 @@ public class DefaultDeclaredProjectManage {
}

//直接提交预审方法 提取 在省级联审通过的时候 也可以用
public String directStartProcess(Project projectInfo,Long userId){
VUtils.isTrue(Objects.isNull(userId))
.throwMessage("发起人Id 不能为空!");
public String directStartProcess(Project projectInfo,String employeeCode){
VUtils.isTrue(Objects.isNull(employeeCode))
.throwMessage("发起人 员工code 不能为空!");

ProcessStartParamsVo params = new ProcessStartParamsVo();
params.setUser(buildUser(userId));
params.setUser(buildUser(employeeCode));
params.setProcessUsers(Collections.emptyMap());
//放入条件判断的项目字段
ProjectConditionDTO conditionDto = new ProjectConditionDTO();
@@ -203,7 +207,7 @@ public class DefaultDeclaredProjectManage {
}

// 获取发起单位、发起单位主管单位、发起单位上级主管条线单位信息
Map<String, OrgInfoDTO> orgModelMap = buildOrgModelMap(userId,projectInfo);
Map<String, OrgInfoDTO> orgModelMap = buildOrgModelMap(employeeCode,projectInfo);
String instanceId = processService.newStartProcess(model.getProcessDefId(),model.getFormId(), params,orgModelMap);
log.info("提交预审项目成功 【{}】", instanceId);



+ 11
- 14
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java Wyświetl plik

@@ -90,8 +90,8 @@ public class PrequalificationDeclaredProjectManage {
@Transactional(rollbackFor = Exception.class)
public String startTheProcess(DefaultDeclaredDTO dto) {
UserInfoDetails userInfoDetails = LoginUserUtil.loginUserDetail();
Long userId = userInfoDetails.getUserId();
VUtils.isTrue(Objects.isNull(userId)).throwMessage("获取登录用户失败!");
String employeeCode = userInfoDetails.getEmployeeCode();
VUtils.isTrue(Objects.isNull(employeeCode)).throwMessage("获取登录用户失败!");

ProjectDTO projectDto = dto.getProjectInfo();
VUtils.isTrue(Objects.isNull(projectDto.getId())).throwMessage("提交失败 缺少项目ID!");
@@ -117,7 +117,7 @@ public class PrequalificationDeclaredProjectManage {
//入库暂存表 后续处理 对接外部接口
projectInfo.setUpdateOn(LocalDateTime.now());
//保存一下 当前的主管单位发起人
projectInfo.setPreStartUserId(userId);
projectInfo.setPreStartUserId(employeeCode);
if(projectStagingService.addByProject(projectInfo,"省级部门联审")
&& projectService.updateById(projectInfo)){
return "提交省级部门联审成功";
@@ -126,7 +126,7 @@ public class PrequalificationDeclaredProjectManage {
}else if(ProjectStatusEnum.PRE_APPLYING
.getCode().equals(projectInfo.getStatus())){
//如果是非省级联审的项目 直接提交 预审
instanceId = defaultDeclaredProjectManage.directStartProcess(projectInfo,userId);
instanceId = defaultDeclaredProjectManage.directStartProcess(projectInfo,employeeCode);
}else{
throw new BusinessException("项目状态 错误 project :" + JSON.toJSONString(projectInfo));
}
@@ -143,8 +143,8 @@ public class PrequalificationDeclaredProjectManage {
@Transactional(rollbackFor = Exception.class)
public String restartTheProcess(DefaultDeclaredDTO dto) {
UserInfoDetails userInfoDetails = LoginUserUtil.loginUserDetail();
Long userId = userInfoDetails.getUserId();
VUtils.isTrue(Objects.isNull(userId)).throwMessage("获取登录用户失败!");
String employeeCode = userInfoDetails.getEmployeeCode();
VUtils.isTrue(Objects.isNull(employeeCode)).throwMessage("获取登录用户失败!");

ProjectDTO projectDto = dto.getProjectInfo();
VUtils.isTrue(Objects.isNull(projectDto.getId())).throwMessage("提交失败 缺少项目ID!");
@@ -168,11 +168,10 @@ public class PrequalificationDeclaredProjectManage {
//项目阶段 状态 已定 待预审
req.setStage(ProjectStatusEnum.NOT_APPROVED.getCode());
req.setStatus(ProjectStatusEnum.PENDING_PREQUALIFICATION.getCode());
Long userId = LoginUserUtil.getUserId();
VUtils.isTrue(Objects.isNull(userId)).throwMessage("获取登录用户失败!");
UserFullInfoDTO userFullInfo = userInfoHelper.getUserFullInfo(userId);
UserInfoDetails userInfoDetail = LoginUserUtil.loginUserDetail();
VUtils.isTrue(Objects.isNull(userInfoDetail)).throwMessage("获取登录用户失败!");
//放入用户的主管单位
req.setSuperOrgCode(userFullInfo.getOrganizationCode());
req.setSuperOrgCode(userInfoDetail.getOrganizationCode());
return projectLibManage.projectLibList(req);
}

@@ -182,11 +181,9 @@ public class PrequalificationDeclaredProjectManage {
//项目阶段 状态 已定 待预审
req.setStage(ProjectStatusEnum.NOT_APPROVED.getCode());
req.setStatus(ProjectStatusEnum.PENDING_PREQUALIFICATION.getCode());
Long userId = LoginUserUtil.getUserId();
VUtils.isTrue(Objects.isNull(userId)).throwMessage("获取登录用户失败!");
UserFullInfoDTO userFullInfo = userInfoHelper.getUserFullInfo(userId);
UserInfoDetails userInfoDetail = LoginUserUtil.loginUserDetail();
//放入用户的单位
req.setSuperOrgCode(userFullInfo.getOrganizationCode());
req.setSuperOrgCode(userInfoDetail.getOrganizationCode());
LambdaQueryWrapper<Project> query = ProjectHelper.projectQuery(req);
List<Project> records = projectService.list(query);



+ 7
- 8
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ProjectAdjustmentManage.java Wyświetl plik

@@ -29,6 +29,7 @@ import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO;
import com.ningdatech.pmapi.projectlib.service.IProjectApplicationService;
import com.ningdatech.pmapi.projectlib.service.IProjectService;
import com.ningdatech.pmapi.user.security.auth.model.UserFullInfoDTO;
import com.ningdatech.pmapi.user.security.auth.model.UserInfoDetails;
import com.ningdatech.pmapi.user.util.LoginUserUtil;
import com.wflow.exception.BusinessException;
import lombok.RequiredArgsConstructor;
@@ -146,11 +147,10 @@ public class ProjectAdjustmentManage {
ProjectStatusEnum.PREQUALIFICATION_FAILED.getCode(),
ProjectStatusEnum.THE_JOINT_REVIEW_OF_PROVINCIAL_DEPARTMENTS_FAILED.getCode(),
ProjectStatusEnum.SCHEME_REVIEW_FAILED.getCode()));
Long userId = LoginUserUtil.getUserId();
VUtils.isTrue(Objects.isNull(userId)).throwMessage("获取登录用户失败!");
UserFullInfoDTO userFullInfo = userInfoHelper.getUserFullInfo(userId);
UserInfoDetails user = LoginUserUtil.loginUserDetail();
VUtils.isTrue(Objects.isNull(user)).throwMessage("获取登录用户失败!");
//放入用户的单位
req.setBuildOrgCode(userFullInfo.getOrganizationCode());
req.setBuildOrgCode(user.getOrganizationCode());
return projectLibManage.projectLibList(req);
}

@@ -165,11 +165,10 @@ public class ProjectAdjustmentManage {
ProjectStatusEnum.PREQUALIFICATION_FAILED.getCode(),
ProjectStatusEnum.THE_JOINT_REVIEW_OF_PROVINCIAL_DEPARTMENTS_FAILED.getCode(),
ProjectStatusEnum.SCHEME_REVIEW_FAILED.getCode()));
Long userId = LoginUserUtil.getUserId();
VUtils.isTrue(Objects.isNull(userId)).throwMessage("获取登录用户失败!");
UserFullInfoDTO userFullInfo = userInfoHelper.getUserFullInfo(userId);
UserInfoDetails user = LoginUserUtil.loginUserDetail();
VUtils.isTrue(Objects.isNull(user)).throwMessage("获取登录用户失败!");
//放入用户的单位
req.setBuildOrgCode(userFullInfo.getOrganizationCode());
req.setBuildOrgCode(user.getOrganizationCode());

LambdaQueryWrapper<Project> query = ProjectHelper.projectQuery(req);
List<Project> records = projectService.list(query);


+ 2
- 2
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ReviewByDeptJointManage.java Wyświetl plik

@@ -58,7 +58,7 @@ public class ReviewByDeptJointManage {
@Transactional(rollbackFor = Exception.class)
public Boolean startTheProcess(Project project) {
//这里是任务发起的 所以用项目发起人
Long userId = project.getSponsor();
String startUserCode = project.getSponsor();

VUtils.isTrue(Objects.isNull(project.getId())).throwMessage("提交失败 缺少项目ID!");
Project projectInfo = projectService.getById(project.getId());
@@ -99,7 +99,7 @@ public class ReviewByDeptJointManage {
params.setFormData(formData);

// 获取发起单位、发起单位主管单位、发起单位上级主管条线单位信息
Map<String, OrgInfoDTO> orgModelMap = defaultDeclaredProjectManage.buildOrgModelMap(userId,project);
Map<String, OrgInfoDTO> orgModelMap = defaultDeclaredProjectManage.buildOrgModelMap(startUserCode,project);
String instanceId = processService.newStartProcess(model.getProcessDefId(),model.getFormId(), params,orgModelMap);
log.info("部门联审申报成功 【{}】", instanceId);



+ 2
- 2
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDTO.java Wyświetl plik

@@ -279,8 +279,8 @@ public class ProjectDTO implements Serializable {
@ApiModelProperty("流程状态")
private Integer processStatus;

@ApiModelProperty("项目发起人")
private Long sponsor;
@ApiModelProperty("项目发起人 员工code")
private String sponsor;

@ApiModelProperty("上级条线单位审核意见")
private String higherLineSuperOrgReviewComments;


+ 4
- 4
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java Wyświetl plik

@@ -294,11 +294,11 @@ public class Project implements Serializable {
@ApiModelProperty("动态表单 json")
private String dynamicForm;

@ApiModelProperty("项目发起人 用户id")
private Long sponsor;
@ApiModelProperty("项目发起人 员工code")
private String sponsor;

@ApiModelProperty("预审发起人 用户id")
private Long preStartUserId;
@ApiModelProperty("预审发起人 员工code")
private String preStartUserId;

@ApiModelProperty("上级条线单位审核意见")
private String higherLineSuperOrgReviewComments;


+ 2
- 2
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java Wyświetl plik

@@ -286,8 +286,8 @@ public class ProjectDetailVO {
@ApiModelProperty("年度投资金额详情")
private List<AnnualAmountVO> annualAccumulateAmountList;

@ApiModelProperty("项目发起人id")
private Long sponsor;
@ApiModelProperty("项目发起人 员工code")
private String sponsor;

@ApiModelProperty("上级条线单位审核意见")
private String higherLineSuperOrgReviewComments;


+ 12
- 0
pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserAuthLoginManage.java Wyświetl plik

@@ -155,4 +155,16 @@ public class UserAuthLoginManage {
userFullInfoDTO.setRealName(userInfo.getRealName());
userFullInfoDTO.setUsername(userInfo.getRealName());
}

public UserFullInfoDTO getUserFullInfoByEmployeeCode(String employeeCode) {
UserInfo userInfo = iUserInfoService.getOne(Wrappers.lambdaQuery(UserInfo.class)
.eq(UserInfo::getEmployeeCode,employeeCode).last("limit 1"));
if (Objects.isNull(userInfo)) {
return null;
}
// 返回用户全量信息
UserFullInfoDTO userFullInfoDTO = new UserFullInfoDTO();
userFullInfoDTOAssembler(userInfo, userFullInfoDTO);
return userFullInfoDTO;
}
}

Ładowanie…
Anuluj
Zapisz