|
|
|
@@ -19,10 +19,7 @@ import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.*; |
|
|
|
|
|
|
|
/** |
|
|
|
* (ExperimentIns)表服务实现类 |
|
|
|
@@ -262,11 +259,19 @@ public class ExperimentInsServiceImpl implements ExperimentInsService { |
|
|
|
|
|
|
|
// 解析nodes字段,提取节点状态并转换为JSON字符串 |
|
|
|
Map<String, Object> nodes = (Map<String, Object>) status.get("nodes"); |
|
|
|
|
|
|
|
if (nodes == null || nodes.isEmpty()) { |
|
|
|
throw new RuntimeException("工作流的节点数据为空。"); |
|
|
|
} |
|
|
|
String nodeStatusJson = JsonUtils.mapToJson(nodes); |
|
|
|
|
|
|
|
Map<String, Object> modifiedNodes = new LinkedHashMap<>(); |
|
|
|
|
|
|
|
for (Map.Entry<String, Object> nodeEntry : nodes.entrySet()) { |
|
|
|
Map<String,Object> nodeDetails = (Map<String, Object>) nodeEntry.getValue(); |
|
|
|
String templateName = (String) nodeDetails.get("templateName"); |
|
|
|
modifiedNodes.put(templateName, nodeDetails); |
|
|
|
} |
|
|
|
|
|
|
|
String nodeStatusJson = JsonUtils.mapToJson(modifiedNodes); |
|
|
|
experimentIns.setNodesStatus(nodeStatusJson); |
|
|
|
this.experimentInsDao.update(experimentIns); |
|
|
|
|
|
|
|
|