diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java index fa36c23..559ab06 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java @@ -126,6 +126,9 @@ public class ProjectLibManage { ProjectLibListItemVO item = new ProjectLibListItemVO(); item.setId(w.getId()); item.setProjectName(w.getProjectName()); + item.setProjectCode(w.getProjectCode()); + item.setArea(w.getArea()); + item.setAreaCode(w.getAreaCode()); item.setCreateOn(w.getCreateOn()); item.setDeclaredAmount(w.getDeclareAmount()); item.setStage(w.getStage()); @@ -157,6 +160,9 @@ public class ProjectLibManage { ProjectLibListItemVO item = new ProjectLibListItemVO(); item.setId(w.getId()); item.setProjectName(w.getProjectName()); + item.setProjectCode(w.getProjectCode()); + item.setArea(w.getArea()); + item.setAreaCode(w.getAreaCode()); item.setCreateOn(w.getCreateOn()); item.setDeclaredAmount(w.getDeclareAmount()); item.setStage(w.getStage()); @@ -1125,6 +1131,10 @@ public class ProjectLibManage { projectApplication.setProjectVersion(version); projectApplication.setIsConstruct(isConstruct); + if(StringUtils.isNotBlank(application.getRelatedExistsApplication())){ + projectApplication.setApplicationName(null); + } + boolean result = projectApplicationService.save(projectApplication); // 保存应用关联的核心业务 List coreBusinessList = application.getCoreBusinessList(); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectLibListItemVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectLibListItemVO.java index 375dc13..20bd972 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectLibListItemVO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectLibListItemVO.java @@ -39,6 +39,15 @@ public class ProjectLibListItemVO { @ApiModelProperty("项目ID") private Long id; + @ApiModelProperty("项目编号") + private String projectCode; + + @ApiModelProperty("区域") + private String area; + + @ApiModelProperty("区域Code") + private String areaCode; + @ApiModelProperty("项目名称") private String projectName; @@ -127,9 +136,6 @@ public class ProjectLibListItemVO { @ApiModelProperty("能否被预审申报") private Boolean canPreDeclared = Boolean.FALSE; - @ApiModelProperty("21位项目编号") - private String projectCode; - @ApiModelProperty("是否有上级条线主管部门 0没有 1有") private Integer isHigherSuperOrg; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/staging/utils/ProjectStatusFlowUtil.java b/pmapi/src/main/java/com/ningdatech/pmapi/staging/utils/ProjectStatusFlowUtil.java index 4e9127d..293a4e7 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/staging/utils/ProjectStatusFlowUtil.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/staging/utils/ProjectStatusFlowUtil.java @@ -31,6 +31,7 @@ public class ProjectStatusFlowUtil { * value: lambda表达式,最终会获取发起实例的函数 */ public ProjectStatusFlowUtil(){ + intervalTimeMap.put(0,60); intervalTimeMap.put(1,60 * 2); intervalTimeMap.put(2,60 * 6); intervalTimeMap.put(3,60 * 15); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java index c8997dc..25c3b0f 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java @@ -653,7 +653,10 @@ public class TodoCenterManage { List projectInstList = projectInstService.list(Wrappers.lambdaQuery(ProjectInst.class) .in(ProjectInst::getProjectId, projectIdList) .orderByDesc(ProjectInst::getProjectId)); - Map projectInfoMap = projectInstList.stream().collect(Collectors.toMap(ProjectInst::getInstCode, p -> projectsMap.get(p.getProjectId()))); + Map projectInfoMap = projectInstList.stream() + .filter(p -> Objects.nonNull(p.getInstCode()) && + !TodoCenterConstant.Declared.NULL_INST_CODE.equals(p.getInstCode())) + .collect(Collectors.toMap(ProjectInst::getInstCode, p -> projectsMap.get(p.getProjectId()))); List instCodes = projectInstList.stream().map(ProjectInst::getInstCode).collect(Collectors.toList()); // 查出用户工作流 @@ -793,7 +796,10 @@ public class TodoCenterManage { List projectInstList = projectInstService.list(Wrappers.lambdaQuery(ProjectInst.class) .in(ProjectInst::getProjectId, projectIdList) .orderByDesc(ProjectInst::getProjectId)); - Map projectInfoMap = projectInstList.stream().collect(Collectors.toMap(ProjectInst::getInstCode, p -> projectsMap.get(p.getProjectId()))); + Map projectInfoMap = projectInstList.stream() + .filter(p -> Objects.nonNull(p.getInstCode()) && + !TodoCenterConstant.Declared.NULL_INST_CODE.equals(p.getInstCode())) + .collect(Collectors.toMap(ProjectInst::getInstCode, p -> projectsMap.get(p.getProjectId()))); List instCodes = projectInstList.stream().map(ProjectInst::getInstCode).collect(Collectors.toList()); // 查出用户工作流 @@ -1153,6 +1159,9 @@ public class TodoCenterManage { !InstTypeEnum.DEPT_UNITED_REVIEW.getCode().equals(instType)) { projectApplication.setIsConstruct(Boolean.TRUE); } + if(StringUtils.isNotBlank(application.getRelatedExistsApplication())){ + projectApplication.setApplicationName(null); + } projectApplication.setProjectVersion(project.getVersion()); projectApplicationService.save(projectApplication); } diff --git a/pmapi/src/test/java/com/ningdatech/pmapi/password/PasswordTest.java b/pmapi/src/test/java/com/ningdatech/pmapi/password/PasswordTest.java new file mode 100644 index 0000000..dc34917 --- /dev/null +++ b/pmapi/src/test/java/com/ningdatech/pmapi/password/PasswordTest.java @@ -0,0 +1,26 @@ +package com.ningdatech.pmapi.password; + +import org.junit.Test; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import org.springframework.security.crypto.password.PasswordEncoder; + +/** + * @Classname PasswordTest + * @Description + * @Date 2023/8/2 17:39 + * @Author PoffyZhang + */ +public class PasswordTest { + + @Test + public void password(){ + String mingwen = "ELgaCeHteZA8VJK8"; + + String miwen = "$2a$10$MT82RbInrIkRVL/GRS01Vew8AO6ICngOpbAGbdkWgSnYFhog5n8.q"; + + String encode = new BCryptPasswordEncoder().encode(mingwen); + boolean matches = new BCryptPasswordEncoder().matches(mingwen, encode); + System.out.println(encode); + System.out.println(matches); + } +}