fix[project]: 仿真策划导入外部表单时,支持导入拓展字段属性
This commit is contained in:
@@ -10,6 +10,7 @@ import com.sdm.common.entity.resp.system.CIDUserResp;
|
||||
import com.sdm.common.utils.SystemOperate;
|
||||
import com.sdm.project.model.po.ExportExternalForm;
|
||||
import com.sdm.project.model.po.NodeAllBase;
|
||||
import com.sdm.project.model.po.NodeImportAllBase;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
@@ -254,17 +255,17 @@ public class ExportOperate {
|
||||
* @param nodeList
|
||||
* @return
|
||||
*/
|
||||
public static List<NodeAllBase> findAllTaskNodesNonRecursive(List<NodeAllBase> nodeList) {
|
||||
List<NodeAllBase> taskNodes = new ArrayList<>();
|
||||
public static List<NodeImportAllBase> findAllTaskNodesNonRecursive(List<NodeImportAllBase> nodeList) {
|
||||
List<NodeImportAllBase> taskNodes = new ArrayList<>();
|
||||
if (nodeList == null || nodeList.isEmpty()) {
|
||||
return taskNodes;
|
||||
}
|
||||
|
||||
// 使用队列实现广度优先遍历
|
||||
Queue<NodeAllBase> queue = new LinkedList<>(nodeList);
|
||||
Queue<NodeImportAllBase> queue = new LinkedList<>(nodeList);
|
||||
|
||||
while (!queue.isEmpty()) {
|
||||
NodeAllBase currentNode = queue.poll();
|
||||
NodeImportAllBase currentNode = queue.poll();
|
||||
// 判断当前节点是否是 task
|
||||
if (NodeTypeEnum.TASK.getValue().equals(currentNode.getNodeType())) {
|
||||
taskNodes.add(currentNode);
|
||||
@@ -293,11 +294,11 @@ public class ExportOperate {
|
||||
log.info("解析出的项目树为:{}", exportExternalForm);
|
||||
if (ObjectUtils.isNotEmpty(exportExternalForm) && CollectionUtils.isNotEmpty(exportExternalForm.getNodes())) {
|
||||
// 前端导入的文件中的用户信息是工号,需要转成userId
|
||||
List<NodeAllBase> nodeList = exportExternalForm.getNodes();
|
||||
List<NodeImportAllBase> nodeList = exportExternalForm.getNodes();
|
||||
// 过滤出任务
|
||||
List<NodeAllBase> taskList = findAllTaskNodesNonRecursive(nodeList);
|
||||
List<NodeImportAllBase> taskList = findAllTaskNodesNonRecursive(nodeList);
|
||||
if (CollectionUtils.isNotEmpty(taskList)) {
|
||||
for (NodeAllBase task : taskList) {
|
||||
for (NodeImportAllBase task : taskList) {
|
||||
// 仿真负责人
|
||||
List<CIDUserResp> pMemberList = task.getPMemberList();
|
||||
if (CollectionUtils.isNotEmpty(pMemberList)) {
|
||||
|
||||
@@ -6,5 +6,5 @@ import java.util.List;
|
||||
|
||||
@Data
|
||||
public class ExportExternalForm {
|
||||
List<NodeAllBase> nodes;
|
||||
List<NodeImportAllBase> nodes;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,335 @@
|
||||
package com.sdm.project.model.po;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.sdm.common.entity.pojo.BaseEntity;
|
||||
import com.sdm.common.entity.resp.project.TaskNodeExtraPo;
|
||||
import com.sdm.common.entity.resp.system.CIDUserResp;
|
||||
import com.sdm.project.model.vo.SpdmNodeExtraVo;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
@Data
|
||||
public class NodeImportAllBase extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 父节点id,第一级节点的pid为0
|
||||
*/
|
||||
private String pid;
|
||||
|
||||
private String pUuid;
|
||||
|
||||
/**
|
||||
* 当前节点id
|
||||
*/
|
||||
private String uuid;
|
||||
|
||||
/**
|
||||
* 节点名称
|
||||
*/
|
||||
private String nodeName;
|
||||
|
||||
|
||||
/**
|
||||
* 节点编码
|
||||
*/
|
||||
private String nodeCode;
|
||||
|
||||
|
||||
/**
|
||||
* 节点类型
|
||||
*/
|
||||
private String nodeType;
|
||||
|
||||
/**
|
||||
* 项目类型
|
||||
*/
|
||||
private String nodeSubType;
|
||||
|
||||
/**
|
||||
* 父节点id
|
||||
*/
|
||||
private String parentId;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 项目进度状态(未开始、进行中、已完成)
|
||||
*/
|
||||
private Integer progress;
|
||||
|
||||
private String progressStatusValue;
|
||||
|
||||
/**
|
||||
* 项目达成状态(红黄绿灯)
|
||||
*/
|
||||
private Integer achieveStatus;
|
||||
|
||||
private String achieveStatusValue;
|
||||
|
||||
/**
|
||||
* 计划开始(精确到秒)
|
||||
*/
|
||||
private String beginTime;
|
||||
|
||||
/**
|
||||
* 计划结束(精确到秒)项目详情图片
|
||||
*/
|
||||
private String endTime;
|
||||
|
||||
/**
|
||||
* 实际完成时间(精确到秒)
|
||||
*/
|
||||
private String finishTime;
|
||||
|
||||
/**
|
||||
* 项目经理
|
||||
*/
|
||||
private String managers;
|
||||
|
||||
/**
|
||||
* 拓展属性集合
|
||||
*/
|
||||
private List<ProjectNodeExtraPo> extraList;
|
||||
|
||||
/**
|
||||
* 项目详情图片
|
||||
*/
|
||||
private String detailImgUrl;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String description;
|
||||
|
||||
|
||||
/**
|
||||
* 任务名称
|
||||
*/
|
||||
private String taskName;
|
||||
|
||||
|
||||
/**
|
||||
* 任务编码
|
||||
*/
|
||||
private String taskCode;
|
||||
|
||||
/**
|
||||
* 项目进度状态(未开始、进行中、已完成)
|
||||
*/
|
||||
private String exeStatus;
|
||||
|
||||
private String exeStatusValue;
|
||||
|
||||
/**
|
||||
* 仿真负责人
|
||||
*/
|
||||
private String sManager;
|
||||
|
||||
private String nodeId;
|
||||
|
||||
|
||||
/**
|
||||
* 标准工时
|
||||
*/
|
||||
private Integer days;
|
||||
|
||||
/**
|
||||
* 实际工时
|
||||
*/
|
||||
private Integer realDays;
|
||||
|
||||
/**
|
||||
* 难度系数
|
||||
*/
|
||||
private Float difficult;
|
||||
|
||||
/**
|
||||
* 执行规范
|
||||
*/
|
||||
// private String detailImgUrl;
|
||||
|
||||
/**
|
||||
* 审批状态
|
||||
*/
|
||||
private String approvalStatus;
|
||||
|
||||
/**
|
||||
* 确认状态
|
||||
*/
|
||||
private String confirmStatus;
|
||||
|
||||
/**
|
||||
* 指标名称
|
||||
*/
|
||||
private String performanceName;
|
||||
|
||||
/**
|
||||
* 达标方式
|
||||
*/
|
||||
private String method;
|
||||
|
||||
/**
|
||||
* 目标值
|
||||
*/
|
||||
private String targetValue;
|
||||
|
||||
/**
|
||||
* 最大值
|
||||
*/
|
||||
private String highValue;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
private String unit;
|
||||
|
||||
public List<NodeImportAllBase> children = new ArrayList<>(); //适配前端组件
|
||||
|
||||
public int nodeOrder;
|
||||
|
||||
public String nodeVersion;
|
||||
|
||||
public Long tenantId;
|
||||
|
||||
public String members;
|
||||
|
||||
@JsonProperty(value = "tag1")
|
||||
private String tag1;
|
||||
@JsonProperty(value = "tag2")
|
||||
private String tag2;
|
||||
@JsonProperty(value = "tag3")
|
||||
private String tag3;
|
||||
@JsonProperty(value = "tag4")
|
||||
private String tag4;
|
||||
@JsonProperty(value = "tag5")
|
||||
private String tag5;
|
||||
@JsonProperty(value = "tag6")
|
||||
private String tag6;
|
||||
@JsonProperty(value = "tag7")
|
||||
private String tag7;
|
||||
@JsonProperty(value = "tag8")
|
||||
private String tag8;
|
||||
@JsonProperty(value = "tag9")
|
||||
private String tag9;
|
||||
@JsonProperty(value = "tag10")
|
||||
private String tag10;
|
||||
|
||||
/**
|
||||
* 仿真负责人
|
||||
*/
|
||||
@JsonProperty(value = "pMemberList")
|
||||
private List<CIDUserResp> pMemberList;
|
||||
|
||||
/**
|
||||
* 仿真关注人
|
||||
*/
|
||||
@JsonProperty(value = "payAttentionMemberList")
|
||||
private List<CIDUserResp> payAttentionMemberList;
|
||||
|
||||
/**
|
||||
* 仿真执行人
|
||||
*/
|
||||
@JsonProperty(value = "eMemberList")
|
||||
private List<CIDUserResp> eMemberList;
|
||||
|
||||
/**
|
||||
* 3D负责人
|
||||
*/
|
||||
@JsonProperty(value = "tMemberList")
|
||||
private List<CIDUserResp> tMemberList;
|
||||
|
||||
/**
|
||||
* 报表模板
|
||||
*/
|
||||
private String reportTemplate;
|
||||
|
||||
/**
|
||||
* 报表模板名称
|
||||
*/
|
||||
private String reportTemplateNames;
|
||||
|
||||
private List<TaskNodeExtraPo> extras;
|
||||
|
||||
|
||||
public String projectNodeName;
|
||||
|
||||
|
||||
private String pMembers;
|
||||
|
||||
|
||||
private String eMembers;
|
||||
|
||||
/**
|
||||
* 仿真关注人
|
||||
*/
|
||||
private String attionMembers;
|
||||
|
||||
/**
|
||||
* 3D负责人
|
||||
*/
|
||||
private String tMembers;
|
||||
|
||||
|
||||
|
||||
private String folderId;
|
||||
|
||||
private String standard;
|
||||
private String standardName;
|
||||
private String analyseTarget;
|
||||
private String confidence;
|
||||
private String analyseSoftware;
|
||||
private String department;
|
||||
private String section;
|
||||
private String sectionName;
|
||||
private String group;
|
||||
private String groupName;
|
||||
@JsonProperty("bCapacity")
|
||||
private String bCapacity;
|
||||
private String flowTemplate;
|
||||
private String flowTemplateNames;
|
||||
private String englishName;
|
||||
|
||||
|
||||
|
||||
private Long imageFileId;
|
||||
/**
|
||||
* 军令状时间
|
||||
*/
|
||||
private String commitmentDeadline;
|
||||
|
||||
private String discipline;
|
||||
|
||||
private Integer expStatus;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 项目来源
|
||||
*/
|
||||
private String projectSource;
|
||||
/**
|
||||
* 同步EP项目id
|
||||
*/
|
||||
private String projectId;
|
||||
|
||||
private long finishTaskNum = 0;
|
||||
|
||||
private long totalTaskNum = 0;
|
||||
|
||||
|
||||
/**
|
||||
* 所属项目名称
|
||||
*/
|
||||
private String projectName;
|
||||
|
||||
/**
|
||||
* 所属项目编码
|
||||
*/
|
||||
private String projectCode;
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user