소스 검색

年度计划库导入修改

tags/24080901
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;


불러오는 중...
취소
저장