Browse Source

Merge remote-tracking branch 'origin/master'

tags/24080901
WendyYang 1 year ago
parent
commit
546152f97c
4 changed files with 33 additions and 0 deletions
  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
  4. BIN
      pmapi/src/main/resources/template/丽水市2023年数字化项目年度计划编辑表(空).xls

+ 27
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java View File

@@ -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 View File

@@ -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 View File

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

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

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


BIN
pmapi/src/main/resources/template/丽水市2023年数字化项目年度计划编辑表(空).xls View File


Loading…
Cancel
Save