diff --git a/com.actionsoft.apps.coe.method.process.subprocess/lib/com.actionsoft.apps.coe.method.process.subprocess.jar b/com.actionsoft.apps.coe.method.process.subprocess/lib/com.actionsoft.apps.coe.method.process.subprocess.jar
index f17098cc..8c6c9989 100644
Binary files a/com.actionsoft.apps.coe.method.process.subprocess/lib/com.actionsoft.apps.coe.method.process.subprocess.jar and b/com.actionsoft.apps.coe.method.process.subprocess/lib/com.actionsoft.apps.coe.method.process.subprocess.jar differ
diff --git a/com.actionsoft.apps.coe.method.process.subprocess/src/com/actionsoft/apps/coe/method/process/subprocess/SubProcessController.java b/com.actionsoft.apps.coe.method.process.subprocess/src/com/actionsoft/apps/coe/method/process/subprocess/SubProcessController.java
index f15a771b..f4e2c6f2 100644
--- a/com.actionsoft.apps.coe.method.process.subprocess/src/com/actionsoft/apps/coe/method/process/subprocess/SubProcessController.java
+++ b/com.actionsoft.apps.coe.method.process.subprocess/src/com/actionsoft/apps/coe/method/process/subprocess/SubProcessController.java
@@ -182,4 +182,16 @@ public class SubProcessController {
return processWeb.shapeExpandAndCloseIconShow(repositoryId, elements);
}
+ /**
+ * 将当前总图中关于 源文件节点变动的提示信息删除
+ * @param uc
+ * @param repositoryId
+ * @return
+ */
+ @Mapping("com.actionsoft.apps.coe.method.process.subprocess_source_node_diff_msg_clear")
+ public String sourceNodeDiffMsgClear(UserContext uc, String repositoryId){
+ SubProcessWeb processWeb = new SubProcessWeb(uc);
+ return processWeb.sourceNodeDiffMsgClear(repositoryId);
+ }
+
}
diff --git a/com.actionsoft.apps.coe.method.process.subprocess/src/com/actionsoft/apps/coe/method/process/subprocess/web/SubProcessWeb.java b/com.actionsoft.apps.coe.method.process.subprocess/src/com/actionsoft/apps/coe/method/process/subprocess/web/SubProcessWeb.java
index 7ea2ce4f..167133d1 100644
--- a/com.actionsoft.apps.coe.method.process.subprocess/src/com/actionsoft/apps/coe/method/process/subprocess/web/SubProcessWeb.java
+++ b/com.actionsoft.apps.coe.method.process.subprocess/src/com/actionsoft/apps/coe/method/process/subprocess/web/SubProcessWeb.java
@@ -391,7 +391,12 @@ public class SubProcessWeb extends ActionWeb {
return ro.toString();
}
- // 判断一键展开与闭合的快捷操作按钮是否显示
+ /**
+ * 判断一键展开与闭合的快捷操作按钮是否显示
+ * @param repositoryId
+ * @param elements
+ * @return
+ */
public String shapeExpandAndCloseIconShow(String repositoryId, String elements){
boolean showExpandFlag = false;
@@ -426,4 +431,21 @@ public class SubProcessWeb extends ActionWeb {
return ro.toString();
}
+ /**
+ * 将当前总图中关于 源文件节点变动的提示信息删除
+ * @param repositoryId
+ * @return
+ */
+ public String sourceNodeDiffMsgClear(String repositoryId){
+ BaseModel baseModel = CoeDesignerAPIManager.getInstance().getDefinition(repositoryId, 0);
+ String definition = baseModel.getDefinition();
+ JSONObject defineObj = JSONObject.parseObject(definition);
+ if (defineObj.containsKey("sourceNodeDiffMsg")){
+ defineObj.remove("sourceNodeDiffMsg");
+ }
+ baseModel.setDefinition(defineObj.toJSONString());
+ CoeDesignerAPIManager.getInstance().storeDefinition(baseModel);
+ return ResponseObject.newOkResponse().toString();
+ }
+
}
diff --git a/com.actionsoft.apps.coe.method.process.subprocess/web/com.actionsoft.apps.coe.method.process.subprocess/action.xml b/com.actionsoft.apps.coe.method.process.subprocess/web/com.actionsoft.apps.coe.method.process.subprocess/action.xml
index f7526d7f..8a10cc6a 100644
--- a/com.actionsoft.apps.coe.method.process.subprocess/web/com.actionsoft.apps.coe.method.process.subprocess/action.xml
+++ b/com.actionsoft.apps.coe.method.process.subprocess/web/com.actionsoft.apps.coe.method.process.subprocess/action.xml
@@ -46,4 +46,7 @@
+
+
+
\ No newline at end of file
diff --git a/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar b/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar
index 679d9466..43fd6b74 100644
Binary files a/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar and b/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar differ
diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/designer/relation/dao/DesignerShapeRelationDao.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/designer/relation/dao/DesignerShapeRelationDao.java
index acbcbc90..22fccf62 100755
--- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/designer/relation/dao/DesignerShapeRelationDao.java
+++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/designer/relation/dao/DesignerShapeRelationDao.java
@@ -466,6 +466,17 @@ public class DesignerShapeRelationDao extends DaoObject getModelListByRelationFileIdAndAttrId(String relationFileId, String attrId){
+ String sql = "SELECT * FROM " + entityName() + " WHERE RELATIONFILEID = ? AND ATTRID = ?";
+ return DBSql.query(sql, rowMapper(), relationFileId, attrId);
+ }
+
/**
* 根据指定属性及被关联的文件查询源文件
* @param relationFileId
diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java
index 257421fc..e0c2e038 100755
--- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java
+++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java
@@ -6116,6 +6116,63 @@ public class CoeProcessLevelWeb extends ActionWeb {
}
}
}
+ }else if (repositoryModel.getMethodId().equals("process.epc") || repositoryModel.getMethodId().equals("process.flowchart")){
+ // 判断当前模型是否被某一个总图引用
+ DesignerShapeRelationDao shapeRelationDao = new DesignerShapeRelationDao();
+ List subProcessModelList = shapeRelationDao.getModelListByRelationFileIdAndAttrId(uuid, "child_process");
+ if (subProcessModelList.size() > 0){ // 说明当前文件作为子流程节点存在若干端到端总图中
+ // 获取当前文件存储前的信息
+ BaseModel historyDefineModel = CoeDesignerAPIManager.getInstance().getDefinition(uuid, 0);
+ StringBuffer resultMsg = new StringBuffer();
+ if (historyDefineModel != null){
+ String historyDefine = historyDefineModel.getDefinition();
+ JSONObject historyDefineObj = JSONObject.parseObject(historyDefine);
+ // 之前保存的信息
+ JSONObject historyElements = historyDefineObj.getJSONObject("elements");
+ List historyEleKeyList = historyElements.keySet().stream().filter(key -> !"linker".equals(historyElements.getJSONObject(key).getString("name"))).collect(Collectors.toList());
+ // 当前要保存的信息
+ JSONObject currentElements = definition.getJSONObject("elements");
+ List currentEleKeyList = currentElements.keySet().stream().filter(key -> !"linker".equals(currentElements.getJSONObject(key).getString("name"))).collect(Collectors.toList());
+ // 对比之前保存的信息
+ StringBuffer scopeMsg = new StringBuffer();
+ for (String key : currentEleKeyList) {
+ if (!historyEleKeyList.contains(key)){ // 增加节点信息
+ scopeMsg.append("
");
+ scopeMsg.append("新增节点【" + currentElements.getJSONObject(key).getString("text") + "】");
+ }else {
+ historyEleKeyList.remove(key);
+ }
+ }
+ if (historyEleKeyList.size() > 0){
+ for (String key : historyEleKeyList) {
+ scopeMsg.append("
");
+ scopeMsg.append("删除节点【" + historyElements.getJSONObject(key).getString("text") + "】");
+ }
+ }
+ if (UtilString.isNotEmpty(scopeMsg.toString())){
+ resultMsg.append("源文件【"+repositoryModel.getName() + "】").append(scopeMsg);
+ }
+ }
+ if (UtilString.isNotEmpty(resultMsg.toString())){
+ // 将当前文件节点变动的信息 存放到所有引用当前文件的端到端总图中
+ for (DesignerShapeRelationModel subProcessNode : subProcessModelList) {
+ BaseModel subProcessBaseModel = CoeDesignerAPIManager.getInstance().getDefinition(subProcessNode.getFileId(), 0);
+ if (subProcessBaseModel == null) continue;
+ String subProcessDefine = subProcessBaseModel.getDefinition();
+ JSONObject subProcessDefineObj = JSONObject.parseObject(subProcessDefine);
+
+ JSONObject subProcessSourceNodeDiffMsg = new JSONObject();
+ if (subProcessDefineObj.containsKey("sourceNodeDiffMsg")){
+ subProcessSourceNodeDiffMsg = subProcessDefineObj.getJSONObject("sourceNodeDiffMsg");
+ }
+ subProcessSourceNodeDiffMsg.put(subProcessNode.getShapeId(), resultMsg.toString());
+ subProcessDefineObj.put("sourceNodeDiffMsg", subProcessSourceNodeDiffMsg);
+
+ subProcessBaseModel.setDefinition(subProcessDefineObj.toJSONString());
+ CoeDesignerAPIManager.getInstance().storeDefinition(subProcessBaseModel);
+ }
+ }
+ }
}
define = definition.toString();
diff --git a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/designer.method.subprocess.js b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/designer.method.subprocess.js
index 66afc923..0fd0b94b 100644
--- a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/designer.method.subprocess.js
+++ b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/designer.method.subprocess.js
@@ -2,9 +2,6 @@ $(function(){
if (methodId != 'process.subprocess') { // 如果当前打开的模型不是端到端总图 那么整个js也没有执行的必要
return;
}
- // 1. 子流程展开 事件:获取当前子流程所代表的模型文件
- // (function (Model, ruuid, sid) {
- // })(Model, ruuid, sid);
const subProcess = new SubProcess(Model, ruuid, sid);
@@ -28,7 +25,9 @@ class SubProcess {
this.shapeIconRender();
this.handleScopeShapeEvent();
this.linkerBoxPointerEvent();
- this.scopeShapeRenderTitle(this.Model.define.elements)
+ this.scopeShapeRenderTitle(this.Model.define.elements);
+
+ this.sourceNodeDiffMsgHandle();
}
linkerBoxPointerEvent(){
@@ -416,5 +415,50 @@ class SubProcess {
leadNodeArr.push(fromId);
toShape.extendAttr.leadNodeArr = leadNodeArr;
}
+
+ // 子流程节点关联的源文件中的节点发生变动 给出提示
+ sourceNodeDiffMsgHandle(){
+ if (definition.sourceNodeDiffMsg){
+ let multipleMsg = "";
+ let toDeleteMsgKey = [];
+ for (let shapeKey in definition.sourceNodeDiffMsg) {
+ if (Model.define.elements[shapeKey] != undefined){
+ // 提示
+ multipleMsg = multipleMsg.concat('
', definition.sourceNodeDiffMsg[shapeKey]);
+ }
+ toDeleteMsgKey.push(shapeKey);
+ }
+ if (toDeleteMsgKey.length){
+ for (let shapeKey in toDeleteMsgKey) {
+ delete definition.sourceNodeDiffMsg[shapeKey];
+ }
+ awsui.ajax.request({
+ url: './jd',
+ method: 'POST',
+ data: {
+ cmd: 'com.actionsoft.apps.coe.method.process.subprocess_source_node_diff_msg_clear',
+ sid: this.sid,
+ repositoryId: this.repositoryId
+ },
+ ok: function (r){
+
+ },
+ err: function (r) {
+ $.simpleAlert(r.msg);
+ }
+ });
+ }
+ if (multipleMsg){
+ $.notification({
+ title:'源文件节点变动提示',
+ description: multipleMsg,
+ position: "topRight",
+ delay: 0,
+ distance: 100
+ });
+ $('.awsui-public-box-main').css('width', '325px');
+ }
+ }
+ }
}