瀏覽代碼

年度计划库导入修改

master
CMM 1 年之前
父節點
當前提交
884575e63e
共有 3 個文件被更改,包括 33 次插入0 次删除
  1. +27
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java
  2. +1
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserAuthLoginManage.java
  3. +5
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/model/UserFullInfoDTO.java

+ 27
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java 查看文件

@@ -19,6 +19,7 @@ import com.ningdatech.basic.util.CollUtils;
import com.ningdatech.basic.util.StrPool;
import com.ningdatech.pmapi.common.constant.CommonConst;
import com.ningdatech.pmapi.common.enumeration.CommonEnum;
import com.ningdatech.pmapi.common.helper.RegionCacheHelper;
import com.ningdatech.pmapi.common.helper.UserInfoHelper;
import com.ningdatech.pmapi.common.model.entity.ExcelExportWriter;
import com.ningdatech.pmapi.common.statemachine.util.StateMachineUtils;
@@ -89,6 +90,7 @@ public class AnnualPlanLibManage {
private final INdProjectStatusChangeService statusChangeService;
private final UserInfoHelper userInfoHelper;
private final IProjectRenewalFundDeclarationService projectRenewalFundDeclarationService;
private final RegionCacheHelper regionCacheHelper;

/**
* 年度计划查询状态
@@ -306,6 +308,31 @@ public class AnnualPlanLibManage {
}

private void assemblyProjectInfo(AnnualLibImportDTO data, Project project) {
Long projectId = data.getProjectId();
// 从项目库中先查询出对应的项目ID的项目
Project projectInfo = projectService.getById(projectId);
if (Objects.nonNull(projectInfo)){
BeanUtils.copyProperties(projectInfo,project);
}else {
// 新增的年度计划库项目
log.info("项目库中不存在项目ID为:" + projectId + "的项目");
Long userId = LoginUserUtil.getUserId();
UserFullInfoDTO userFullInfo = userInfoHelper.getUserFullInfo(userId);

String regionCode = userFullInfo.getRegionCode();
Integer regionLevel = userFullInfo.getRegionLevel();
String regionName = regionCacheHelper.getRegionName(regionCode, regionLevel);
project.setAreaCode(regionCode);
project.setArea(regionName);
project.setStage(ProjectStatusEnum.NOT_APPROVED.getCode());
project.setStatus(ProjectStatusEnum.IN_THE_ANNUAL_PLAN.getCode());
project.setSponsor(userFullInfo.getEmployeeCode());
project.setBuildOrgName(userFullInfo.getEmpPosUnitName());
project.setResponsibleMan(userFullInfo.getRealName());
project.setResponsibleManMobile(userFullInfo.getMobile());
project.setContactName(userFullInfo.getRealName());
project.setContactPhone(userFullInfo.getMobile());
}
project.setId(data.getProjectId());
project.setProjectName(data.getProjectName());
project.setProjectIntroduction(data.getProjectIntroduction());


+ 1
- 0
pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserAuthLoginManage.java 查看文件

@@ -173,6 +173,7 @@ public class UserAuthLoginManage {
userFullInfoDTO.setRealName(userInfo.getRealName());
userFullInfoDTO.setEmployeeCode(employeeCode);
userFullInfoDTO.setUsername(userInfo.getRealName());
userFullInfoDTO.setMobile(userInfo.getMobile());

}



+ 5
- 0
pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/model/UserFullInfoDTO.java 查看文件

@@ -47,6 +47,11 @@ public class UserFullInfoDTO {
private String organizationCode;

/**
* 手机号码
*/
private String mobile;

/**
* 浙政钉组织名称
*/
private String organizationName;


Loading…
取消
儲存