Browse Source

Merge branch 'master' of http://git.ningdatech.com/liushuai/project-management into state-region

 Conflicts:
	pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectApprovalHandle.java
master
PoffyZhang 1 year ago
parent
commit
40db80457c
3 changed files with 10 additions and 1 deletions
  1. +1
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/util/StateMachineUtils.java
  2. +4
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/filemanage/manage/ProjectFileManage.java
  3. +5
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/ProjectStatusChange.java

+ 1
- 0
pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/util/StateMachineUtils.java View File

@@ -91,6 +91,7 @@ public class StateMachineUtils {
projectStatusChange.setAfterStatus(project.getStatus()); projectStatusChange.setAfterStatus(project.getStatus());
projectStatusChange.setEvent(event.name()); projectStatusChange.setEvent(event.name());
projectStatusChange.setCreateOn(LocalDateTime.now()); projectStatusChange.setCreateOn(LocalDateTime.now());
projectStatusChange.setProjectCode(project.getProjectCode());
// 插入项目状态变更表中 // 插入项目状态变更表中
projectStatusChangeService.save(projectStatusChange); projectStatusChangeService.save(projectStatusChange);
log.info("调用状态机后的项目状态为>>>>>>>>>>{}" + project.getStatus()); log.info("调用状态机后的项目状态为>>>>>>>>>>{}" + project.getStatus());


+ 4
- 1
pmapi/src/main/java/com/ningdatech/pmapi/filemanage/manage/ProjectFileManage.java View File

@@ -292,8 +292,11 @@ public class ProjectFileManage {
// 创建ZipOutputStream // 创建ZipOutputStream
ZipOutputStream zos = new ZipOutputStream(response.getOutputStream()); ZipOutputStream zos = new ZipOutputStream(response.getOutputStream());
if (CollUtil.isNotEmpty(fileIdList)) { if (CollUtil.isNotEmpty(fileIdList)) {
// 对文件ID进行去重
HashSet<Long> hashSet = new HashSet<>();
List<Long> fidList = fileIdList.stream().filter(hashSet::add).collect(Collectors.toList());
// 获取文件输入流 // 获取文件输入流
for (Long fileId : fileIdList) {
for (Long fileId : fidList) {
File file = fileService.getById(fileId); File file = fileService.getById(fileId);
// 文件不存在,跳过 // 文件不存在,跳过
if (Objects.isNull(file)) { if (Objects.isNull(file)) {


+ 5
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/ProjectStatusChange.java View File

@@ -48,4 +48,9 @@ public class ProjectStatusChange implements Serializable {


@ApiModelProperty("状态变更发生的时间") @ApiModelProperty("状态变更发生的时间")
private LocalDateTime createOn; private LocalDateTime createOn;

@ApiModelProperty("项目code")
private String projectCode;


} }

Loading…
Cancel
Save