Browse Source

modify:

1. 增加流程实例编码;
tags/24080901
WendyYang 3 months ago
parent
commit
42e1d09975
2 changed files with 9 additions and 2 deletions
  1. +6
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/utils/ProjectDetailDiffUtil.java
  2. +3
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/dto/ProjectChangeListDTO.java

+ 6
- 2
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/utils/ProjectDetailDiffUtil.java View File

@@ -7,6 +7,7 @@ import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.util.ObjUtil;
import lombok.Builder;
import lombok.Data;
import org.apache.commons.collections4.MapUtils;

import java.util.*;

@@ -47,8 +48,11 @@ public final class ProjectDetailDiffUtil {
* @return 对比结果
**/
public static List<FieldDiff> diff(Object oldObj, Object newObj, boolean diffSame, String... ignores) {
Map<String, Object> oldObjMap = BeanUtil.beanToMap(oldObj);
Map<String, Object> newObjMap = BeanUtil.beanToMap(newObj);
if (oldObj == null && newObj == null) {
return Collections.emptyList();
}
Map<String, Object> oldObjMap = oldObj == null ? Collections.emptyMap() : BeanUtil.beanToMap(oldObj);
Map<String, Object> newObjMap = newObj == null ? Collections.emptyMap() : BeanUtil.beanToMap(newObj);
if (ArrayUtil.isNotEmpty(ignores)) {
for (String ignore : ignores) {
newObjMap.remove(ignore);


+ 3
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/dto/ProjectChangeListDTO.java View File

@@ -17,6 +17,9 @@ import java.time.LocalDateTime;
@Data
public class ProjectChangeListDTO {

@ApiModelProperty("流程实例ID")
private String instCode;

@ApiModelProperty("项目ID")
private Long projectId;



Loading…
Cancel
Save