|
|
@@ -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()); |
|
|
|