| | |
| | | import com.zt.common.service.BaseService; |
| | | import com.zt.common.utils.JsonUtils2; |
| | | import com.zt.common.utils.UUIDUtil; |
| | | import com.zt.life.modules.mainPart.basicInfo.dao.ParamDataDao; |
| | | import com.zt.life.modules.mainPart.basicInfo.dao.XhProductModelDao; |
| | | import com.zt.life.modules.mainPart.basicInfo.model.ParamData; |
| | | import com.zt.life.modules.mainPart.basicInfo.model.ProductImg; |
| | | import com.zt.life.modules.mainPart.basicInfo.model.XhProductModel; |
| | | import com.zt.life.modules.mainPart.taskReliability.dao.*; |
| | | import com.zt.life.modules.mainPart.taskReliability.dto.ModelLinePair; |
| | | import com.zt.life.modules.mainPart.taskReliability.model.*; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.dom4j.DocumentHelper; |
| | | import org.dom4j.Document; |
| | | import org.dom4j.Element; |
| | | import org.dom4j.io.OutputFormat; |
| | | import org.dom4j.io.XMLWriter; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.zt.common.db.query.QueryFilter; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.io.StringWriter; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | private AlgorithmDao algorithmDao; |
| | | @Autowired |
| | | private ModelNodeAlgorithmDao modelNodeAlgorithmDao; |
| | | @Autowired |
| | | private XhProductModelDao xhProductModelDao; |
| | | @Autowired |
| | | private ParamDataDao paramDataDao; |
| | | |
| | | /** |
| | | * 分页查询 |
| | |
| | | boolean result = true; |
| | | if (modelRbd==null) return result; |
| | | Long modelId = modelRbd.getId(); |
| | | result = analyzeRbd(modelId, modelRbd.getContent(), true); |
| | | result = analyzeRbd(modelRbd, true); |
| | | return result; |
| | | } |
| | | |
| | | private boolean analyzeRbd(Long modelId, String content, boolean saveFlag) { |
| | | private boolean analyzeRbd(ModelRbd modelRbd, boolean saveFlag) { |
| | | boolean result = true; |
| | | String rbdsonStr = content; |
| | | String rbdsonStr = modelRbd.getContent(); |
| | | |
| | | JSONArray rbdJsonArray = new JSONObject(rbdsonStr).getJSONArray("cells"); |
| | | if (rbdJsonArray == null) return result; |
| | |
| | | List<ModelNode> modelNodeList = new ArrayList<>(); |
| | | List<ModelLine> modelLineList = new ArrayList<>(); |
| | | List<Algorithm> algorithmList = new ArrayList<>(); |
| | | List<ProductImg> productImgList = new ArrayList<>(); // 暂不使用(而使用数据库中的可靠性参数) |
| | | |
| | | // 1. 解析出节点与边 |
| | | getNodeAndLineFromRbd(modelId, rbdJsonArray, modelNodeList, modelLineList); |
| | | getNodeAndLineFromRbd(modelRbd.getId(), rbdJsonArray, modelNodeList, modelLineList, productImgList); |
| | | // 2. 计算所有节点的入口线数及出口线数 |
| | | calcInOutLineNumAllNode(modelNodeList, modelLineList); |
| | | // 3. 复制产品节点(node)到list |
| | | List<ModelNode> modelNodeAndVnodeList = modelNodeList.stream().filter(item -> |
| | | "node".equals(item.getNodeType())).collect(Collectors.toList()); |
| | | // 4. 不断将基本模型(串联、并联、旁联、表决、桥联)替换为虚节点而简化图形,直至无法简化为止。 |
| | | result = getAlgorithmFromRbd(modelId, modelNodeList, modelLineList, algorithmList, modelNodeAndVnodeList); |
| | | result = getAlgorithmFromRbd(modelRbd, modelNodeList, modelLineList, algorithmList, modelNodeAndVnodeList); |
| | | |
| | | // 5. 保存模型 |
| | | if (saveFlag) saveModel(modelId, modelNodeList, modelLineList, algorithmList, modelNodeAndVnodeList); |
| | | // 5. 转换为算法库接口XML |
| | | if (result) { |
| | | result = createIfXmlFromRbd(modelRbd, algorithmList, modelNodeAndVnodeList); |
| | | } |
| | | |
| | | // 6. 保存模型 |
| | | if (saveFlag) saveModel(modelRbd, modelNodeList, modelLineList, algorithmList, modelNodeAndVnodeList); |
| | | |
| | | return result; |
| | | } |
| | | |
| | | private boolean getAlgorithmFromRbd(Long modelId, |
| | | List<ModelNode> modelNodeList, |
| | | List<ModelLine> modelLineList, |
| | | List<Algorithm> algorithmList, |
| | | List<ModelNode> modelNodeAndVnodeList) { |
| | | private boolean createIfXmlFromRbd(ModelRbd modelRbd, |
| | | List<Algorithm> algorithmList, |
| | | List<ModelNode> modelNodeAndVnodeList) { |
| | | boolean result = true; |
| | | |
| | | try { |
| | | Document document = DocumentHelper.createDocument(); |
| | | // 添加root节点 |
| | | Element root = document.addElement("DES"); |
| | | root.addAttribute("Name", "A System"); |
| | | // 添加terminal节点到root1 |
| | | Element terminal = root.addElement("Node"); |
| | | terminal.addAttribute("Name", "Terminal"); |
| | | terminal.addAttribute("Type", "NODE"); |
| | | |
| | | // 将模型转换为DOM,添加到root |
| | | Algorithm endAlgo = algorithmList.stream().filter(item -> |
| | | "end".equals(item.getAlgorithmType())).collect(Collectors.toList()).get(0); |
| | | ModelNode computerNode = modelNodeAndVnodeList.stream().filter(item -> |
| | | endAlgo.getComputerList().equals(item.getId().toString())).collect(Collectors.toList()).get(0); |
| | | node2DOM(algorithmList, modelNodeAndVnodeList, computerNode, root); |
| | | |
| | | // 添加start节点到root |
| | | Element start = root.addElement("Node"); |
| | | start.addAttribute("Name", "Start"); |
| | | start.addAttribute("Type", "NODE"); |
| | | // 添加link(路径)到root |
| | | Element link = root.addElement("Link"); |
| | | Element block = link.addElement("Block"); |
| | | block.addAttribute("Name", "Terminal"); |
| | | block = link.addElement("Block"); |
| | | block.addAttribute("Name", computerNode.getId().toString()); |
| | | block = link.addElement("Block"); |
| | | block.addAttribute("Name", "Start"); |
| | | |
| | | // document.setXMLEncoding("UTF-8"); |
| | | // String xmlString = document.asXML(); |
| | | // 输出格式化xml |
| | | XMLWriter xmlWriter = null; |
| | | try { |
| | | OutputFormat format = OutputFormat.createPrettyPrint(); |
| | | format.setEncoding("UTF-8"); |
| | | StringWriter writer = new StringWriter(); |
| | | xmlWriter = new XMLWriter(writer, format); |
| | | xmlWriter.write(document); |
| | | modelRbd.setIfXml(writer.toString()); |
| | | } finally { |
| | | if (xmlWriter!=null) xmlWriter.close(); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | result = false; |
| | | } |
| | | |
| | | return result; |
| | | } |
| | | |
| | | // 递归函数 |
| | | private void node2DOM(List<Algorithm> algorithmList, |
| | | List<ModelNode> modelNodeAndVnodeList, |
| | | ModelNode node, |
| | | Element parent) { |
| | | if ("node".equals(node.getNodeType())) { |
| | | Long dataId = node.getDataId(); |
| | | XhProductModel xhProductModel = xhProductModelDao.getById(dataId); |
| | | if (xhProductModel == null) return; |
| | | if ("1".equals(xhProductModel.getProductType())) { |
| | | // 设备 |
| | | ParamData paramData = paramDataDao.getParamData(dataId, "expect"); |
| | | if (paramData == null) return; |
| | | Element element = parent.addElement("Node"); |
| | | element.addAttribute("Name", dataId.toString()); |
| | | element.addAttribute("Type", "NODE"); |
| | | Element failureTag = element.addElement("Failure"); |
| | | failureTag.addAttribute("Dist", "EXP"); // TODO:需设为具体的分布 |
| | | Element argsTag = failureTag.addElement("Args"); |
| | | Double value = new Double(paramData.getTaskMtbcfRegulate()); |
| | | value = 1.0/value; |
| | | argsTag.addAttribute("value", value.toString()); |
| | | if (1==paramData.getRepairable()) { |
| | | Element repairTag = element.addElement("Repair"); |
| | | repairTag.addAttribute("Dist", "EXP"); // TODO:需设为具体的分布 |
| | | argsTag = repairTag.addElement("Args"); |
| | | value = new Double(paramData.getRepairMttcr()); |
| | | value = 1.0/value; |
| | | argsTag.addAttribute("value", value.toString()); |
| | | Element repairTimeLimitTag = element.addElement("RepairTimeLimit"); |
| | | repairTimeLimitTag.setText(paramData.getRepairMttcr()); |
| | | } |
| | | } else if ("10".equals(xhProductModel.getProductType())) { |
| | | // 虚单位 |
| | | ModelRbd rbdXDY = modelRbdDao.getDiagramOfXDY(dataId); |
| | | if (rbdXDY == null) return; |
| | | List<Algorithm> algorithmListXDY = algorithmDao.getListByModelId(rbdXDY.getId()); |
| | | List<ModelNode> modelNodeAndVnodeListXDY =modelNodeAlgorithmDao.getListByModelId(rbdXDY.getId()); |
| | | Algorithm endAlgo = algorithmListXDY.stream().filter(item -> |
| | | "end".equals(item.getAlgorithmType())).collect(Collectors.toList()).get(0); |
| | | ModelNode computerNode = modelNodeAndVnodeListXDY.stream().filter(item -> |
| | | endAlgo.getComputerList().equals(item.getId().toString())).collect(Collectors.toList()).get(0); |
| | | node2DOM(algorithmListXDY, modelNodeAndVnodeListXDY, computerNode, parent); |
| | | } |
| | | } else { |
| | | // vnode(运算节点) |
| | | Algorithm algo = algorithmList.stream().filter(item -> |
| | | node.getId().equals(item.getId())).collect(Collectors.toList()).get(0); |
| | | Element element = parent.addElement("Logic"); |
| | | element.addAttribute("Name", algo.getId().toString()); |
| | | if ("series".equals(algo.getAlgorithmType())) { |
| | | element.addAttribute("Type", "SERIES"); |
| | | } else if ("parallel".equals(algo.getAlgorithmType())) { |
| | | element.addAttribute("Type", "PARALLEL"); |
| | | } else if ("vote".equals(algo.getAlgorithmType())) { |
| | | element.addAttribute("Type", "VOTE"); |
| | | element.addAttribute("VoteValue", algo.getVoteNum().toString()); |
| | | } else if ("switch".equals(algo.getAlgorithmType())) { |
| | | element.addAttribute("Type", "STANDBY"); |
| | | } else if ("bridge".equals(algo.getAlgorithmType())) { |
| | | element.addAttribute("Type", "BRIDGE"); |
| | | } |
| | | String[] computerNodeListStr = algo.getComputerList().split(","); |
| | | for (String nodeStr : computerNodeListStr) { |
| | | ModelNode nd = modelNodeAndVnodeList.stream().filter(item -> |
| | | nodeStr.equals(item.getId().toString())).collect(Collectors.toList()).get(0); |
| | | node2DOM(algorithmList, modelNodeAndVnodeList, nd, element); |
| | | } |
| | | } |
| | | } |
| | | |
| | | private boolean getAlgorithmFromRbd(ModelRbd modelRbd, |
| | | List<ModelNode> modelNodeList, |
| | | List<ModelLine> modelLineList, |
| | | List<Algorithm> algorithmList, |
| | | List<ModelNode> modelNodeAndVnodeList) { |
| | | // 根据以下的构图规则来进行算法分解: |
| | | // 1、节点的定义 |
| | | // 1-1) 运算节点:共2个:旁联、表决,且运算节点需放在被运算节点的右侧。 |
| | |
| | | boolean hasSimplified = false; // 至少简化了一处图形 |
| | | do { |
| | | hasSimplified = false; |
| | | hasSimplified = simplifySeries(modelId, modelNodeList, modelLineList, algorithmList, modelNodeAndVnodeList, hasSimplified); |
| | | hasSimplified = simplifyParallel(modelId, modelNodeList, modelLineList, algorithmList, modelNodeAndVnodeList, hasSimplified); |
| | | hasSimplified = simplifyOperator("switch", modelId, modelNodeList, modelLineList, algorithmList, modelNodeAndVnodeList, hasSimplified); |
| | | hasSimplified = simplifyOperator("vote", modelId, modelNodeList, modelLineList, algorithmList, modelNodeAndVnodeList, hasSimplified); |
| | | hasSimplified = simplifyBridge(modelId, modelNodeList, modelLineList, algorithmList, modelNodeAndVnodeList, hasSimplified); |
| | | isEnd = simplifyEnd(modelId, modelNodeList, modelLineList, algorithmList, modelNodeAndVnodeList); |
| | | hasSimplified = simplifySeries(modelRbd.getId(), modelNodeList, modelLineList, algorithmList, modelNodeAndVnodeList, hasSimplified); |
| | | hasSimplified = simplifyParallel(modelRbd.getId(), modelNodeList, modelLineList, algorithmList, modelNodeAndVnodeList, hasSimplified); |
| | | hasSimplified = simplifyOperator("switch", modelRbd.getId(), modelNodeList, modelLineList, algorithmList, modelNodeAndVnodeList, hasSimplified); |
| | | hasSimplified = simplifyOperator("vote", modelRbd.getId(), modelNodeList, modelLineList, algorithmList, modelNodeAndVnodeList, hasSimplified); |
| | | hasSimplified = simplifyBridge(modelRbd.getId(), modelNodeList, modelLineList, algorithmList, modelNodeAndVnodeList, hasSimplified); |
| | | isEnd = simplifyEnd(modelRbd.getId(), modelNodeList, modelLineList, algorithmList, modelNodeAndVnodeList); |
| | | } while (!isEnd && hasSimplified); |
| | | |
| | | return isEnd; |
| | |
| | | ModelNode endNode = getBranchNodesOneParallel(pathOneGroup, branchNodeList); |
| | | if ("connect".equals(startNode.getNodeType()) && pathOneGroup.size()==lines.size()) { |
| | | // 替换成虚节点 |
| | | modelNodeAndVnodeList.add(startNode); |
| | | replaceToVnode("parallel", modelId, modelNodeList, modelLineList, |
| | | algorithmList, modelNodeAndVnodeList, startNode, endNode, branchNodeList); |
| | | } else { |
| | |
| | | |
| | | if ("connect".equals(startNode.getNodeType()) && startNode.getInLineNum()==2) { |
| | | // 替换成虚节点 |
| | | modelNodeAndVnodeList.add(startNode); |
| | | replaceToVnode("bridge", modelId, modelNodeList, modelLineList, |
| | | algorithmList, modelNodeAndVnodeList, startNode, endNode, branchNodeList); |
| | | } else { |
| | |
| | | } |
| | | } |
| | | if (thisNodeSuccess) { |
| | | modelNodeAndVnodeList.add(opNode); |
| | | replaceToVnode(opNode.getNodeType(), modelId, modelNodeList, modelLineList, |
| | | algorithmList, modelNodeAndVnodeList, opNode, endNode, branchNodeList); |
| | | hasSimplified = true; |
| | |
| | | algorithm.setAlgorithmType(type); |
| | | algorithm.setComputerList(computerList.get(0)); |
| | | algorithm.setObjectList(computerList.get(1)); |
| | | if ("vote".equals(type)) algorithm.setVoteNum(startNode.getVoteNum()); |
| | | algorithm.setStep(algorithmList.size()==0 ? 0 : algorithmList.get(algorithmList.size()-1).getStep()+1); |
| | | algorithmList.add(algorithm); |
| | | |
| | |
| | | private void getNodeAndLineFromRbd(Long modelId, |
| | | JSONArray rbdJsonArray, |
| | | List<ModelNode> modelNodeList, |
| | | List<ModelLine> modelLineList) { |
| | | List<ModelLine> modelLineList, |
| | | List<ProductImg> productImgList) { |
| | | for (int i = 0; i < rbdJsonArray.size(); i++) { |
| | | JSONObject jsonObject = rbdJsonArray.getJSONObject(i); |
| | | String shape = jsonObject.get("shape").toString(); |
| | |
| | | modelNode.setNodeType(JsonUtils2.getJsonValueByPath(jsonObject, "data/nodeType".split("/")).toString()); |
| | | modelNode.setPositionX(Double.valueOf(JsonUtils2.getJsonValueByPath(jsonObject, "position/x".split("/")).toString())); |
| | | modelNode.setPositionY(Double.valueOf(JsonUtils2.getJsonValueByPath(jsonObject, "position/y".split("/")).toString())); |
| | | Object voteNum = JsonUtils2.getJsonValueByPath(jsonObject, "data/voteNum".split("/")); |
| | | if (voteNum!=null && StringUtils.isNotBlank(voteNum.toString())) { |
| | | modelNode.setVoteNum(Integer.valueOf(voteNum.toString())); |
| | | } |
| | | if ("node".equals(modelNode.getNodeType())) { |
| | | modelNode.setDataId(Long.valueOf(JsonUtils2.getJsonValueByPath(jsonObject, "data/dataId".split("/")).toString())); |
| | | ProductImg productImg = new ProductImg(); |
| | | String dataId = JsonUtils2.getJsonValueByPath(jsonObject, "data/dataId".split("/")).toString(); |
| | | modelNode.setDataId(Long.valueOf(dataId)); |
| | | modelNode.setNodeTypeExt(JsonUtils2.getJsonValueByPath(jsonObject, "data/nodeTypeExt".split("/")).toString()); |
| | | Object name = JsonUtils2.getJsonValueByPath(jsonObject, "attrs/text/text".split("/")); |
| | | modelNode.setName(name==null ? "" : name.toString()); |
| | | |
| | | productImg.setDataId(dataId); |
| | | String productType = JsonUtils2.getJsonValueByPath(jsonObject, "data/productType".split("/")).toString(); |
| | | productImg.setProductType(productType); |
| | | if ("product_sb".equals(productType)) { |
| | | Object obj = JsonUtils2.getJsonValueByPath(jsonObject, "data/reliabDistribType".split("/")); |
| | | if (obj != null && StringUtils.isNotBlank(obj.toString())) { |
| | | productImg.setReliabDistribType(Integer.valueOf(obj.toString())); |
| | | } |
| | | productImg.setTaskMtbcf(JsonUtils2.getJsonValueByPath(jsonObject, "data/taskMtbcf".split("/")).toString()); |
| | | productImg.setTaskMtbcfOther(JsonUtils2.getJsonValueByPath(jsonObject, "data/taskMtbcfOther".split("/")).toString()); |
| | | obj = JsonUtils2.getJsonValueByPath(jsonObject, "data/isRepair".split("/")); |
| | | if (obj != null && StringUtils.isNotBlank(obj.toString())) { |
| | | productImg.setIsRepair(Integer.valueOf(obj.toString())); |
| | | } |
| | | if (1 == productImg.getIsRepair()) { |
| | | obj = JsonUtils2.getJsonValueByPath(jsonObject, "data/repairDistribType".split("/")); |
| | | if (obj != null && StringUtils.isNotBlank(obj.toString())) { |
| | | productImg.setRepairDistribType(Integer.valueOf(obj.toString())); |
| | | } |
| | | productImg.setRepairMttcr(JsonUtils2.getJsonValueByPath(jsonObject, "data/repairMttcr".split("/")).toString()); |
| | | productImg.setRepairMttcrOther(JsonUtils2.getJsonValueByPath(jsonObject, "data/repairMttcrOther".split("/")).toString()); |
| | | } |
| | | } |
| | | productImgList.add(productImg); |
| | | } |
| | | modelNodeList.add(modelNode); |
| | | } |
| | |
| | | } |
| | | */ |
| | | |
| | | private void saveModel(ModelRbd modelRbd, |
| | | List<ModelNode> modelNodeList, |
| | | List<ModelLine> modelLineList, |
| | | List<Algorithm> algoList, |
| | | List<ModelNode> modelNodeAndVnodeList) { |
| | | // 删除既有数据 |
| | | modelNodeDao.deleteByModelId(modelRbd.getId()); |
| | | modelLineDao.deleteByModelId(modelRbd.getId()); |
| | | algorithmDao.deleteByModelId(modelRbd.getId()); |
| | | modelNodeAlgorithmDao.deleteByModelId(modelRbd.getId()); |
| | | |
| | | // 插入数据 |
| | | for (ModelNode modelNode : modelNodeList) { |
| | | modelNodeDao.insert(modelNode); |
| | | } |
| | | for (ModelLine modelLine : modelLineList) { |
| | | modelLineDao.insert(modelLine); |
| | | } |
| | | for (Algorithm algorithm : algoList) { |
| | | algorithmDao.insert(algorithm); |
| | | } |
| | | for (ModelNode modelNode : modelNodeAndVnodeList) { |
| | | modelNodeAlgorithmDao.insert(ModelNodeAlgorithm.from(modelNode)); |
| | | } |
| | | |
| | | // 更新RBD数据 |
| | | modelRbdDao.updateById(modelRbd); |
| | | } |
| | | |
| | | /* ============解析模型的第1版,已不使用============ |
| | | private void analyzeRbdAndSave(Long modelId, String content, boolean saveFlag) { |
| | | String diagramJsonStr = content; |
| | | // String diagramJsonStr = "{\"cells\":[{\"shape\":\"edge\",\"attrs\":{\"line\":{\"stroke\":\"#5F95FF\"}},\"id\":\"26d1a5a6-0be8-4890-86a0-a33d429e6673\",\"labels\":[{\"attrs\":{\"body\":{\"stroke\":\"#5F95FF\"},\"text\":{\"text\":\"\"}},\"position\":{\"distance\":0.5,\"angle\":180,\"options\":{\"keepGradient\":true,\"ensureLegibility\":true}}}],\"zIndex\":0,\"source\":{\"cell\":\"f91765b1-af48-4396-84ba-eb16e3476aa5\",\"port\":\"839cb2d9-59ca-4a39-a63c-26bf60cc6989\"},\"target\":{\"cell\":\"31585e99-58c7-4a98-8824-8000743b364d\",\"port\":\"01eb49d9-4b1c-466f-8263-935542436c7e\"}},{\"shape\":\"edge\",\"attrs\":{\"line\":{\"stroke\":\"#5F95FF\"}},\"id\":\"f2286e46-84c7-4702-8670-d7cda22c34e5\",\"labels\":[{\"attrs\":{\"body\":{\"stroke\":\"#5F95FF\"},\"text\":{\"text\":\"\"}},\"position\":{\"distance\":0.5,\"angle\":180,\"options\":{\"keepGradient\":true,\"ensureLegibility\":true}}}],\"zIndex\":0,\"source\":{\"cell\":\"f91765b1-af48-4396-84ba-eb16e3476aa5\",\"port\":\"839cb2d9-59ca-4a39-a63c-26bf60cc6989\"},\"target\":{\"cell\":\"5123ad82-18bb-46fe-9d93-138b24b54a15\",\"port\":\"01eb49d9-4b1c-466f-8263-935542436c7e\"}},{\"shape\":\"edge\",\"attrs\":{\"line\":{\"stroke\":\"#5F95FF\"}},\"id\":\"2ab8b7f8-7fe2-490f-89c5-4250d4a62a78\",\"labels\":[{\"attrs\":{\"body\":{\"stroke\":\"#5F95FF\"},\"text\":{\"text\":\"\"}},\"position\":{\"distance\":0.5,\"angle\":180,\"options\":{\"keepGradient\":true,\"ensureLegibility\":true}}}],\"zIndex\":0,\"source\":{\"cell\":\"31585e99-58c7-4a98-8824-8000743b364d\",\"port\":\"a977d555-b8c8-4578-9a8b-3097c405c1a8\"},\"target\":{\"cell\":\"6df9adc8-cb83-405c-8482-633db0f3644f\",\"port\":\"f93ccd2f-dedd-47b1-9ad0-9be20c5db8a4\"}},{\"shape\":\"edge\",\"attrs\":{\"line\":{\"stroke\":\"#5F95FF\"}},\"id\":\"700c05a5-f151-4b28-8135-705ccf013522\",\"labels\":[{\"attrs\":{\"body\":{\"stroke\":\"#5F95FF\"},\"text\":{\"text\":\"\"}},\"position\":{\"distance\":0.5,\"angle\":180,\"options\":{\"keepGradient\":true,\"ensureLegibility\":true}}}],\"zIndex\":0,\"source\":{\"cell\":\"5123ad82-18bb-46fe-9d93-138b24b54a15\",\"port\":\"a977d555-b8c8-4578-9a8b-3097c405c1a8\"},\"target\":{\"cell\":\"6df9adc8-cb83-405c-8482-633db0f3644f\",\"port\":\"f93ccd2f-dedd-47b1-9ad0-9be20c5db8a4\"}},{\"shape\":\"edge\",\"attrs\":{\"line\":{\"stroke\":\"#5F95FF\"}},\"id\":\"feef2a57-3c72-4d69-92a6-c828c736b61a\",\"labels\":[{\"attrs\":{\"body\":{\"stroke\":\"#5F95FF\"},\"text\":{\"text\":\"\"}},\"position\":{\"distance\":0.5,\"angle\":180,\"options\":{\"keepGradient\":true,\"ensureLegibility\":true}}}],\"zIndex\":0,\"source\":{\"cell\":\"6df9adc8-cb83-405c-8482-633db0f3644f\",\"port\":\"80d3bd61-1ed3-493a-b4e8-d4576e6fbfda\"},\"target\":{\"cell\":\"da634b2e-5ffc-4e1b-a636-f86ace9eb082\",\"port\":\"01eb49d9-4b1c-466f-8263-935542436c7e\"}},{\"shape\":\"edge\",\"attrs\":{\"line\":{\"stroke\":\"#5F95FF\"}},\"id\":\"49e36d6f-6a94-4edc-9894-6dd825091706\",\"labels\":[{\"attrs\":{\"body\":{\"stroke\":\"#5F95FF\"},\"text\":{\"text\":\"\"}},\"position\":{\"distance\":0.5,\"angle\":180,\"options\":{\"keepGradient\":true,\"ensureLegibility\":true}}}],\"zIndex\":0,\"source\":{\"cell\":\"f91765b1-af48-4396-84ba-eb16e3476aa5\",\"port\":\"839cb2d9-59ca-4a39-a63c-26bf60cc6989\"},\"target\":{\"cell\":\"2b6df966-4e19-4055-bb13-c4c083b18e58\",\"port\":\"01eb49d9-4b1c-466f-8263-935542436c7e\"}},{\"shape\":\"edge\",\"attrs\":{\"line\":{\"stroke\":\"#5F95FF\"}},\"id\":\"ed8c1bfa-c0a6-4e9b-8697-862aef109bcf\",\"labels\":[{\"attrs\":{\"body\":{\"stroke\":\"#5F95FF\"},\"text\":{\"text\":\"\"}},\"position\":{\"distance\":0.5,\"angle\":180,\"options\":{\"keepGradient\":true,\"ensureLegibility\":true}}}],\"zIndex\":0,\"source\":{\"cell\":\"f91765b1-af48-4396-84ba-eb16e3476aa5\",\"port\":\"839cb2d9-59ca-4a39-a63c-26bf60cc6989\"},\"target\":{\"cell\":\"323f5abe-05ed-419d-9d81-d25c7d3b19f3\",\"port\":\"01eb49d9-4b1c-466f-8263-935542436c7e\"}},{\"shape\":\"edge\",\"attrs\":{\"line\":{\"stroke\":\"#5F95FF\"}},\"id\":\"70c6b5fb-1b48-4a2f-bacd-be0284134818\",\"labels\":[{\"attrs\":{\"body\":{\"stroke\":\"#5F95FF\"},\"text\":{\"text\":\"\"}},\"position\":{\"distance\":0.5,\"angle\":180,\"options\":{\"keepGradient\":true,\"ensureLegibility\":true}}}],\"zIndex\":0,\"source\":{\"cell\":\"2b6df966-4e19-4055-bb13-c4c083b18e58\",\"port\":\"a977d555-b8c8-4578-9a8b-3097c405c1a8\"},\"target\":{\"cell\":\"1f378f5e-066d-49bb-a6cc-de24a8882d65\",\"port\":\"01eb49d9-4b1c-466f-8263-935542436c7e\"}},{\"shape\":\"edge\",\"attrs\":{\"line\":{\"stroke\":\"#5F95FF\"}},\"id\":\"6a134969-623b-428e-9b0c-436bae2d6608\",\"labels\":[{\"attrs\":{\"body\":{\"stroke\":\"#5F95FF\"},\"text\":{\"text\":\"\"}},\"position\":{\"distance\":0.5,\"angle\":180,\"options\":{\"keepGradient\":true,\"ensureLegibility\":true}}}],\"zIndex\":0,\"source\":{\"cell\":\"323f5abe-05ed-419d-9d81-d25c7d3b19f3\",\"port\":\"a977d555-b8c8-4578-9a8b-3097c405c1a8\"},\"target\":{\"cell\":\"1f378f5e-066d-49bb-a6cc-de24a8882d65\",\"port\":\"01eb49d9-4b1c-466f-8263-935542436c7e\"}},{\"shape\":\"edge\",\"attrs\":{\"line\":{\"stroke\":\"#5F95FF\"}},\"id\":\"51de5faf-1766-4dd1-abd0-eec2e867a322\",\"labels\":[{\"attrs\":{\"body\":{\"stroke\":\"#5F95FF\"},\"text\":{\"text\":\"\"}},\"position\":{\"distance\":0.5,\"angle\":180,\"options\":{\"keepGradient\":true,\"ensureLegibility\":true}}}],\"zIndex\":0,\"source\":{\"cell\":\"1f378f5e-066d-49bb-a6cc-de24a8882d65\",\"port\":\"a977d555-b8c8-4578-9a8b-3097c405c1a8\"},\"target\":{\"cell\":\"0bb2ba89-a92d-4b32-b3cd-45df2300fa34\",\"port\":\"61eaafd2-095b-41d6-8e34-862fb470b7a6\"}},{\"shape\":\"edge\",\"attrs\":{\"line\":{\"stroke\":\"#A2B1C3\"}},\"id\":\"161f78dc-1f44-4e43-9ced-e39d345aac78\",\"labels\":[{\"attrs\":{\"body\":{\"stroke\":\"#5F95FF\"},\"text\":{\"text\":\"\"}},\"position\":{\"distance\":0.5,\"angle\":180,\"options\":{\"keepGradient\":true,\"ensureLegibility\":true}}}],\"zIndex\":0,\"source\":{\"cell\":\"da634b2e-5ffc-4e1b-a636-f86ace9eb082\",\"port\":\"a977d555-b8c8-4578-9a8b-3097c405c1a8\"},\"target\":{\"cell\":\"0bb2ba89-a92d-4b32-b3cd-45df2300fa34\",\"port\":\"61eaafd2-095b-41d6-8e34-862fb470b7a6\"}},{\"position\":{\"x\":-350,\"y\":-280},\"size\":{\"width\":60,\"height\":60},\"attrs\":{\"text\":{\"refY\":\"100%\",\"textVerticalAnchor\":\"top\",\"text\":\"logo\",\"style\":{\"color\":\"#080808\"},\"refY2\":4},\"image\":{\"xlink:href\":\"dist/img/logo.36cbc06d.png\"},\"body\":{\"stroke\":\"#5F95FF\"},\"line\":{\"stroke\":\"orange\"}},\"visible\":true,\"shape\":\"image\",\"id\":\"31585e99-58c7-4a98-8824-8000743b364d\",\"data\":{\"dataId\":\"123456\",\"nodeType\":\"node\",\"nodeTypeExt\":\"aaa\"},\"ports\":{\"groups\":{\"top\":{\"position\":\"top\",\"attrs\":{\"circle\":{\"r\":4,\"magnet\":true,\"stroke\":\"#5F95FF\",\"strokeWidth\":1,\"fill\":\"#fff\",\"style\":{\"visibility\":\"hidden\"}}}},\"right\":{\"position\":\"right\",\"attrs\":{\"circle\":{\"r\":4,\"magnet\":true,\"stroke\":\"#5F95FF\",\"strokeWidth\":1,\"fill\":\"#fff\",\"style\":{\"visibility\":\"hidden\"}}}},\"bottom\":{\"position\":\"bottom\",\"attrs\":{\"circle\":{\"r\":4,\"magnet\":true,\"stroke\":\"#5F95FF\",\"strokeWidth\":1,\"fill\":\"#fff\",\"style\":{\"visibility\":\"hidden\"}}}},\"left\":{\"position\":\"left\",\"attrs\":{\"circle\":{\"r\":4,\"magnet\":true,\"stroke\":\"#5F95FF\",\"strokeWidth\":1,\"fill\":\"#fff\",\"style\":{\"visibility\":\"hidden\"}}}}},\"items\":[{\"group\":\"top\",\"id\":\"bc0336ec-7912-4720-aea7-e5869de77692\"},{\"group\":\"right\",\"id\":\"a977d555-b8c8-4578-9a8b-3097c405c1a8\"},{\"group\":\"bottom\",\"id\":\"fef0f533-9581-4831-ba65-427f097a3d17\"},{\"group\":\"left\",\"id\":\"01eb49d9-4b1c-466f-8263-935542436c7e\"}]},\"zIndex\":1,\"labels\":[{\"attrs\":{\"body\":{\"stroke\":\"orange\"}}}]},{\"position\":{\"x\":-350,\"y\":-180},\"size\":{\"width\":60,\"height\":60},\"attrs\":{\"text\":{\"refY\":\"100%\",\"textVerticalAnchor\":\"top\",\"text\":\"logo\",\"style\":{\"color\":\"#080808\"},\"refY2\":4},\"image\":{\"xlink:href\":\"dist/img/logo.36cbc06d.png\"},\"body\":{\"stroke\":\"#5F95FF\"},\"line\":{\"stroke\":\"orange\"}},\"visible\":true,\"shape\":\"image\",\"id\":\"5123ad82-18bb-46fe-9d93-138b24b54a15\",\"data\":{\"dataId\":\"123456\",\"nodeType\":\"node\",\"nodeTypeExt\":\"aaa\"},\"ports\":{\"groups\":{\"top\":{\"position\":\"top\",\"attrs\":{\"circle\":{\"r\":4,\"magnet\":true,\"stroke\":\"#5F95FF\",\"strokeWidth\":1,\"fill\":\"#fff\",\"style\":{\"visibility\":\"hidden\"}}}},\"right\":{\"position\":\"right\",\"attrs\":{\"circle\":{\"r\":4,\"magnet\":true,\"stroke\":\"#5F95FF\",\"strokeWidth\":1,\"fill\":\"#fff\",\"style\":{\"visibility\":\"hidden\"}}}},\"bottom\":{\"position\":\"bottom\",\"attrs\":{\"circle\":{\"r\":4,\"magnet\":true,\"stroke\":\"#5F95FF\",\"strokeWidth\":1,\"fill\":\"#fff\",\"style\":{\"visibility\":\"hidden\"}}}},\"left\":{\"position\":\"left\",\"attrs\":{\"circle\":{\"r\":4,\"magnet\":true,\"stroke\":\"#5F95FF\",\"strokeWidth\":1,\"fill\":\"#fff\",\"style\":{\"visibility\":\"hidden\"}}}}},\"items\":[{\"group\":\"top\",\"id\":\"bc0336ec-7912-4720-aea7-e5869de77692\"},{\"group\":\"right\",\"id\":\"a977d555-b8c8-4578-9a8b-3097c405c1a8\"},{\"group\":\"bottom\",\"id\":\"fef0f533-9581-4831-ba65-427f097a3d17\"},{\"group\":\"left\",\"id\":\"01eb49d9-4b1c-466f-8263-935542436c7e\"}]},\"zIndex\":2,\"labels\":[{\"attrs\":{\"body\":{\"stroke\":\"orange\"}}}]},{\"position\":{\"x\":-620,\"y\":-200},\"size\":{\"width\":60,\"height\":60},\"attrs\":{\"text\":{\"refY\":\"100%\",\"textVerticalAnchor\":\"top\",\"text\":\"start\",\"style\":{\"color\":\"#080808\"},\"refY2\":4},\"image\":{\"xlink:href\":\"dist/img/start.88f586e1.png\"},\"body\":{\"stroke\":\"#5F95FF\"},\"line\":{\"stroke\":\"orange\"}},\"visible\":true,\"shape\":\"image\",\"id\":\"f91765b1-af48-4396-84ba-eb16e3476aa5\",\"data\":{\"dataId\":\"\",\"nodeType\":\"start\",\"nodeTypeExt\":\"\"},\"ports\":{\"groups\":{\"top\":{\"position\":\"top\",\"attrs\":{\"circle\":{\"r\":4,\"magnet\":true,\"stroke\":\"#5F95FF\",\"strokeWidth\":1,\"fill\":\"#fff\",\"style\":{\"visibility\":\"hidden\"}}}},\"right\":{\"position\":\"right\",\"attrs\":{\"circle\":{\"r\":4,\"magnet\":true,\"stroke\":\"#5F95FF\",\"strokeWidth\":1,\"fill\":\"#fff\",\"style\":{\"visibility\":\"hidden\"}}}},\"bottom\":{\"position\":\"bottom\",\"attrs\":{\"circle\":{\"r\":4,\"magnet\":true,\"stroke\":\"#5F95FF\",\"strokeWidth\":1,\"fill\":\"#fff\",\"style\":{\"visibility\":\"hidden\"}}}},\"left\":{\"position\":\"left\",\"attrs\":{\"circle\":{\"r\":4,\"magnet\":true,\"stroke\":\"#5F95FF\",\"strokeWidth\":1,\"fill\":\"#fff\",\"style\":{\"visibility\":\"hidden\"}}}}},\"items\":[{\"group\":\"top\",\"id\":\"2ad6a8d5-d86d-49e6-908a-d317b61997c1\"},{\"group\":\"right\",\"id\":\"839cb2d9-59ca-4a39-a63c-26bf60cc6989\"},{\"group\":\"bottom\",\"id\":\"7048578f-94d9-4f75-b653-eb5f43ff55db\"},{\"group\":\"left\",\"id\":\"e7bb1134-4b4c-401d-89ea-e77ae24cbd03\"}]},\"zIndex\":3,\"labels\":[{\"attrs\":{\"body\":{\"stroke\":\"orange\"}}}]},{\"position\":{\"x\":-153,\"y\":-240},\"size\":{\"width\":60,\"height\":60},\"attrs\":{\"text\":{\"refY\":\"100%\",\"textVerticalAnchor\":\"top\",\"text\":\"switchRight\",\"style\":{\"color\":\"#080808\"},\"refY2\":4},\"image\":{\"xlink:href\":\"dist/img/switchRight.74768797.png\"},\"body\":{\"stroke\":\"#5F95FF\"}},\"visible\":true,\"shape\":\"image\",\"id\":\"6df9adc8-cb83-405c-8482-633db0f3644f\",\"data\":{\"dataId\":\"\",\"nodeType\":\"switchRight\",\"nodeTypeExt\":\"\"},\"ports\":{\"groups\":{\"top\":{\"position\":\"top\",\"attrs\":{\"circle\":{\"r\":4,\"magnet\":true,\"stroke\":\"#5F95FF\",\"strokeWidth\":1,\"fill\":\"#fff\",\"style\":{\"visibility\":\"hidden\"}}}},\"right\":{\"position\":\"right\",\"attrs\":{\"circle\":{\"r\":4,\"magnet\":true,\"stroke\":\"#5F95FF\",\"strokeWidth\":1,\"fill\":\"#fff\",\"style\":{\"visibility\":\"hidden\"}}}},\"bottom\":{\"position\":\"bottom\",\"attrs\":{\"circle\":{\"r\":4,\"magnet\":true,\"stroke\":\"#5F95FF\",\"strokeWidth\":1,\"fill\":\"#fff\",\"style\":{\"visibility\":\"hidden\"}}}},\"left\":{\"position\":\"left\",\"attrs\":{\"circle\":{\"r\":4,\"magnet\":true,\"stroke\":\"#5F95FF\",\"strokeWidth\":1,\"fill\":\"#fff\",\"style\":{\"visibility\":\"hidden\"}}}}},\"items\":[{\"group\":\"top\",\"id\":\"adceedb7-f842-4d1e-be3a-8b3cb0a7e3ce\"},{\"group\":\"right\",\"id\":\"80d3bd61-1ed3-493a-b4e8-d4576e6fbfda\"},{\"group\":\"bottom\",\"id\":\"8fa84779-80b2-4c91-8366-7dd4fa0d93ff\"},{\"group\":\"left\",\"id\":\"f93ccd2f-dedd-47b1-9ad0-9be20c5db8a4\"}]},\"zIndex\":4},{\"position\":{\"x\":-21,\"y\":-240},\"size\":{\"width\":60,\"height\":60},\"attrs\":{\"text\":{\"refY\":\"100%\",\"textVerticalAnchor\":\"top\",\"text\":\"logo\",\"style\":{\"color\":\"#080808\"},\"refY2\":4},\"image\":{\"xlink:href\":\"dist/img/logo.36cbc06d.png\"},\"body\":{\"stroke\":\"#5F95FF\"},\"line\":{\"stroke\":\"orange\"}},\"visible\":true,\"shape\":\"image\",\"id\":\"da634b2e-5ffc-4e1b-a636-f86ace9eb082\",\"data\":{\"dataId\":\"123456\",\"nodeType\":\"node\",\"nodeTypeExt\":\"aaa\"},\"ports\":{\"groups\":{\"top\":{\"position\":\"top\",\"attrs\":{\"circle\":{\"r\":4,\"magnet\":true,\"stroke\":\"#5F95FF\",\"strokeWidth\":1,\"fill\":\"#fff\",\"style\":{\"visibility\":\"hidden\"}}}},\"right\":{\"position\":\"right\",\"attrs\":{\"circle\":{\"r\":4,\"magnet\":true,\"stroke\":\"#5F95FF\",\"strokeWidth\":1,\"fill\":\"#fff\",\"style\":{\"visibility\":\"hidden\"}}}},\"bottom\":{\"position\":\"bottom\",\"attrs\":{\"circle\":{\"r\":4,\"magnet\":true,\"stroke\":\"#5F95FF\",\"strokeWidth\":1,\"fill\":\"#fff\",\"style\":{\"visibility\":\"hidden\"}}}},\"left\":{\"position\":\"left\",\"attrs\":{\"circle\":{\"r\":4,\"magnet\":true,\"stroke\":\"#5F95FF\",\"strokeWidth\":1,\"fill\":\"#fff\",\"style\":{\"visibility\":\"hidden\"}}}}},\"items\":[{\"group\":\"top\",\"id\":\"bc0336ec-7912-4720-aea7-e5869de77692\"},{\"group\":\"right\",\"id\":\"a977d555-b8c8-4578-9a8b-3097c405c1a8\"},{\"group\":\"bottom\",\"id\":\"fef0f533-9581-4831-ba65-427f097a3d17\"},{\"group\":\"left\",\"id\":\"01eb49d9-4b1c-466f-8263-935542436c7e\"}]},\"zIndex\":5,\"labels\":[{\"attrs\":{\"body\":{\"stroke\":\"orange\"}}}]},{\"position\":{\"x\":170,\"y\":-100},\"size\":{\"width\":60,\"height\":60},\"attrs\":{\"text\":{\"refY\":\"100%\",\"textVerticalAnchor\":\"top\",\"text\":\"end\",\"style\":{\"color\":\"#080808\"},\"refY2\":4},\"image\":{\"xlink:href\":\"dist/img/end.814a7041.png\"},\"body\":{\"stroke\":\"#5F95FF\"}},\"visible\":true,\"shape\":\"image\",\"id\":\"0bb2ba89-a92d-4b32-b3cd-45df2300fa34\",\"data\":{\"dataId\":\"\",\"nodeType\":\"end\",\"nodeTypeExt\":\"\"},\"ports\":{\"groups\":{\"top\":{\"position\":\"top\",\"attrs\":{\"circle\":{\"r\":4,\"magnet\":true,\"stroke\":\"#5F95FF\",\"strokeWidth\":1,\"fill\":\"#fff\",\"style\":{\"visibility\":\"hidden\"}}}},\"right\":{\"position\":\"right\",\"attrs\":{\"circle\":{\"r\":4,\"magnet\":true,\"stroke\":\"#5F95FF\",\"strokeWidth\":1,\"fill\":\"#fff\",\"style\":{\"visibility\":\"hidden\"}}}},\"bottom\":{\"position\":\"bottom\",\"attrs\":{\"circle\":{\"r\":4,\"magnet\":true,\"stroke\":\"#5F95FF\",\"strokeWidth\":1,\"fill\":\"#fff\",\"style\":{\"visibility\":\"hidden\"}}}},\"left\":{\"position\":\"left\",\"attrs\":{\"circle\":{\"r\":4,\"magnet\":true,\"stroke\":\"#5F95FF\",\"strokeWidth\":1,\"fill\":\"#fff\",\"style\":{\"visibility\":\"hidden\"}}}}},\"items\":[{\"group\":\"top\",\"id\":\"223c9b3a-6baa-4bb8-99ba-c3300db9a942\"},{\"group\":\"right\",\"id\":\"2806bc8a-4e11-4657-9af9-089907985671\"},{\"group\":\"bottom\",\"id\":\"c56eed35-95fa-4e3c-adba-9847ef705e1c\"},{\"group\":\"left\",\"id\":\"61eaafd2-095b-41d6-8e34-862fb470b7a6\"}]},\"zIndex\":6},{\"position\":{\"x\":-350,\"y\":-54},\"size\":{\"width\":60,\"height\":60},\"attrs\":{\"text\":{\"refY\":\"100%\",\"textVerticalAnchor\":\"top\",\"text\":\"logo\",\"style\":{\"color\":\"#080808\"},\"refY2\":4},\"image\":{\"xlink:href\":\"dist/img/logo.36cbc06d.png\"},\"body\":{\"stroke\":\"#5F95FF\"}},\"visible\":true,\"shape\":\"image\",\"id\":\"2b6df966-4e19-4055-bb13-c4c083b18e58\",\"data\":{\"dataId\":\"123456\",\"nodeType\":\"node\",\"nodeTypeExt\":\"aaa\"},\"ports\":{\"groups\":{\"top\":{\"position\":\"top\",\"attrs\":{\"circle\":{\"r\":4,\"magnet\":true,\"stroke\":\"#5F95FF\",\"strokeWidth\":1,\"fill\":\"#fff\",\"style\":{\"visibility\":\"hidden\"}}}},\"right\":{\"position\":\"right\",\"attrs\":{\"circle\":{\"r\":4,\"magnet\":true,\"stroke\":\"#5F95FF\",\"strokeWidth\":1,\"fill\":\"#fff\",\"style\":{\"visibility\":\"hidden\"}}}},\"bottom\":{\"position\":\"bottom\",\"attrs\":{\"circle\":{\"r\":4,\"magnet\":true,\"stroke\":\"#5F95FF\",\"strokeWidth\":1,\"fill\":\"#fff\",\"style\":{\"visibility\":\"hidden\"}}}},\"left\":{\"position\":\"left\",\"attrs\":{\"circle\":{\"r\":4,\"magnet\":true,\"stroke\":\"#5F95FF\",\"strokeWidth\":1,\"fill\":\"#fff\",\"style\":{\"visibility\":\"hidden\"}}}}},\"items\":[{\"group\":\"top\",\"id\":\"bc0336ec-7912-4720-aea7-e5869de77692\"},{\"group\":\"right\",\"id\":\"a977d555-b8c8-4578-9a8b-3097c405c1a8\"},{\"group\":\"bottom\",\"id\":\"fef0f533-9581-4831-ba65-427f097a3d17\"},{\"group\":\"left\",\"id\":\"01eb49d9-4b1c-466f-8263-935542436c7e\"}]},\"zIndex\":7},{\"position\":{\"x\":-330,\"y\":40},\"size\":{\"width\":60,\"height\":60},\"attrs\":{\"text\":{\"refY\":\"100%\",\"textVerticalAnchor\":\"top\",\"text\":\"logo\",\"style\":{\"color\":\"#080808\"},\"refY2\":4},\"image\":{\"xlink:href\":\"dist/img/logo.36cbc06d.png\"},\"body\":{\"stroke\":\"#5F95FF\"}},\"visible\":true,\"shape\":\"image\",\"id\":\"323f5abe-05ed-419d-9d81-d25c7d3b19f3\",\"data\":{\"dataId\":\"123456\",\"nodeType\":\"node\",\"nodeTypeExt\":\"aaa\"},\"ports\":{\"groups\":{\"top\":{\"position\":\"top\",\"attrs\":{\"circle\":{\"r\":4,\"magnet\":true,\"stroke\":\"#5F95FF\",\"strokeWidth\":1,\"fill\":\"#fff\",\"style\":{\"visibility\":\"hidden\"}}}},\"right\":{\"position\":\"right\",\"attrs\":{\"circle\":{\"r\":4,\"magnet\":true,\"stroke\":\"#5F95FF\",\"strokeWidth\":1,\"fill\":\"#fff\",\"style\":{\"visibility\":\"hidden\"}}}},\"bottom\":{\"position\":\"bottom\",\"attrs\":{\"circle\":{\"r\":4,\"magnet\":true,\"stroke\":\"#5F95FF\",\"strokeWidth\":1,\"fill\":\"#fff\",\"style\":{\"visibility\":\"hidden\"}}}},\"left\":{\"position\":\"left\",\"attrs\":{\"circle\":{\"r\":4,\"magnet\":true,\"stroke\":\"#5F95FF\",\"strokeWidth\":1,\"fill\":\"#fff\",\"style\":{\"visibility\":\"hidden\"}}}}},\"items\":[{\"group\":\"top\",\"id\":\"bc0336ec-7912-4720-aea7-e5869de77692\"},{\"group\":\"right\",\"id\":\"a977d555-b8c8-4578-9a8b-3097c405c1a8\"},{\"group\":\"bottom\",\"id\":\"fef0f533-9581-4831-ba65-427f097a3d17\"},{\"group\":\"left\",\"id\":\"01eb49d9-4b1c-466f-8263-935542436c7e\"}]},\"zIndex\":8},{\"position\":{\"x\":-153,\"y\":-20},\"size\":{\"width\":60,\"height\":60},\"attrs\":{\"text\":{\"refY\":\"100%\",\"textVerticalAnchor\":\"top\",\"text\":\"logo\",\"style\":{\"color\":\"#080808\"},\"refY2\":4},\"image\":{\"xlink:href\":\"dist/img/logo.36cbc06d.png\"},\"body\":{\"stroke\":\"#5F95FF\"},\"line\":{\"stroke\":\"orange\"}},\"visible\":true,\"shape\":\"image\",\"id\":\"1f378f5e-066d-49bb-a6cc-de24a8882d65\",\"data\":{\"dataId\":\"123456\",\"nodeType\":\"node\",\"nodeTypeExt\":\"aaa\"},\"ports\":{\"groups\":{\"top\":{\"position\":\"top\",\"attrs\":{\"circle\":{\"r\":4,\"magnet\":true,\"stroke\":\"#5F95FF\",\"strokeWidth\":1,\"fill\":\"#fff\",\"style\":{\"visibility\":\"hidden\"}}}},\"right\":{\"position\":\"right\",\"attrs\":{\"circle\":{\"r\":4,\"magnet\":true,\"stroke\":\"#5F95FF\",\"strokeWidth\":1,\"fill\":\"#fff\",\"style\":{\"visibility\":\"hidden\"}}}},\"bottom\":{\"position\":\"bottom\",\"attrs\":{\"circle\":{\"r\":4,\"magnet\":true,\"stroke\":\"#5F95FF\",\"strokeWidth\":1,\"fill\":\"#fff\",\"style\":{\"visibility\":\"hidden\"}}}},\"left\":{\"position\":\"left\",\"attrs\":{\"circle\":{\"r\":4,\"magnet\":true,\"stroke\":\"#5F95FF\",\"strokeWidth\":1,\"fill\":\"#fff\",\"style\":{\"visibility\":\"hidden\"}}}}},\"items\":[{\"group\":\"top\",\"id\":\"bc0336ec-7912-4720-aea7-e5869de77692\"},{\"group\":\"right\",\"id\":\"a977d555-b8c8-4578-9a8b-3097c405c1a8\"},{\"group\":\"bottom\",\"id\":\"fef0f533-9581-4831-ba65-427f097a3d17\"},{\"group\":\"left\",\"id\":\"01eb49d9-4b1c-466f-8263-935542436c7e\"}]},\"zIndex\":9,\"labels\":[{\"attrs\":{\"body\":{\"stroke\":\"orange\"}}}]}]}"; |
| | |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | private void saveModel(Long modelId, |
| | | List<ModelNode> modelNodeList, |
| | | List<ModelLine> modelLineList, |
| | | List<Algorithm> algoList, |
| | | List<ModelNode> modelNodeAndVnodeList) { |
| | | // 删除既有数据 |
| | | modelNodeDao.deleteByModelId(modelId); |
| | | modelLineDao.deleteByModelId(modelId); |
| | | algorithmDao.deleteByModelId(modelId); |
| | | modelNodeAlgorithmDao.deleteByModelId(modelId); |
| | | |
| | | // 插入数据 |
| | | for (ModelNode modelNode : modelNodeList) { |
| | | modelNodeDao.insert(modelNode); |
| | | } |
| | | for (ModelLine modelLine : modelLineList) { |
| | | modelLineDao.insert(modelLine); |
| | | } |
| | | for (Algorithm algorithm : algoList) { |
| | | algorithmDao.insert(algorithm); |
| | | } |
| | | for (ModelNode modelNode : modelNodeAndVnodeList) { |
| | | modelNodeAlgorithmDao.insert(ModelNodeAlgorithm.from(modelNode)); |
| | | } |
| | | } |
| | | ============解析模型的第1版,已不使用============ */ |
| | | |
| | | } |