流程模型的节点没有属性的时候也同步到流程模型清单视图里
This commit is contained in:
parent
fc8e0747ca
commit
0a682ee169
@ -817,12 +817,25 @@ public class PublisherController {
|
||||
return publishWeb.getProcessManifest(publishFileId , fileName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得发布指导dw数据id
|
||||
*
|
||||
* @param me me
|
||||
* @param areaType 区域类型
|
||||
* @return {@link String}
|
||||
*/
|
||||
@Mapping("com.actionsoft.apps.coe.pal.publisher_guide")
|
||||
public String getPublishGuideDwDataId(UserContext me, String areaType) {
|
||||
ProcessPublishWeb publishWeb = new ProcessPublishWeb(me);
|
||||
return publishWeb.getPublishGuideDwDataId(areaType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得发布指导台账各个显示区域的配置状态
|
||||
*
|
||||
* @param me me
|
||||
* @return {@link String}
|
||||
*/
|
||||
@Mapping("com.actionsoft.apps.coe.pal.publisher_guide_status")
|
||||
public String getPublishGuideStatus(UserContext me) {
|
||||
ProcessPublishWeb publishWeb = new ProcessPublishWeb(me);
|
||||
|
||||
@ -4383,12 +4383,10 @@ public class ProcessPublishWeb extends ActionWeb {
|
||||
ArrayList<BO> bos = new ArrayList<>();
|
||||
ResponseObject ro = ResponseObject.newOkResponse();
|
||||
elements.forEach((k, v) -> {
|
||||
if (((JSONObject) v).containsKey("attributesJsonArray")) {
|
||||
setShapeAttr(bos, publishFileId, (JSONObject) v, fileName);
|
||||
}
|
||||
});
|
||||
if (bos.size() == 0) {
|
||||
return ResponseObject.newErrResponse("模型的数据属性不存在").toString();
|
||||
return ResponseObject.newErrResponse("模型不存在活动节点").toString();
|
||||
}
|
||||
ProcessInstance processInst = SDK.getProcessAPI().createBOProcessInstance("obj_f188537a313e4c6a9bb44eb65f2a0ecd", _uc.getUID(), "流程清单");
|
||||
BO oldBo = (BO) ((BOQueryAPI) SDK.getBOAPI().query("BO_ACT_PAL_PROCESS_MANIFEST").addQuery("MODELID = ", publishFileId)).detail();
|
||||
@ -4410,23 +4408,23 @@ public class ProcessPublishWeb extends ActionWeb {
|
||||
* @param fileName 文件名称
|
||||
*/
|
||||
private void setShapeAttr(ArrayList<BO> bos, String publishFileId, JSONObject shape, String fileName) {
|
||||
//只需要活动节点
|
||||
if (shape.containsKey("category") && !shape.getString("title").equals("开始/结束")) {
|
||||
BO bo = new BO();
|
||||
bo.set("MODELNAME", fileName);
|
||||
bo.set("MODELID", publishFileId);
|
||||
if (shape.containsKey("category")) {
|
||||
bo.set("MODELTYPE", shape.getString("category"));
|
||||
}
|
||||
if (shape.containsKey("title")) {
|
||||
bo.set("SHAPETYPE", shape.getString("title"));
|
||||
}
|
||||
if (shape.containsKey("text")) {
|
||||
bo.set("SHAPENAME", shape.getString("text"));
|
||||
}
|
||||
JSONArray attributesJsonArray = shape.getJSONArray("attributesJsonArray");
|
||||
if (shape.containsKey("dataAttributes")) {
|
||||
JSONArray dataAttributes = shape.getJSONArray("dataAttributes");
|
||||
if (dataAttributes.size() > 0) {
|
||||
JSONObject attributesJson = dataAttributes.getJSONObject(dataAttributes.size() - 1);
|
||||
if (attributesJson.containsKey("attributesJsonArray")) {
|
||||
//形状的属性
|
||||
JSONArray attributesJsonArray = attributesJson.getJSONArray("attributesJsonArray");
|
||||
attributesJsonArray.stream()
|
||||
.filter(a -> {
|
||||
return a != null && !"null".equals(a.toString()) && ((JSONObject) a).size() > 0;
|
||||
})
|
||||
.filter(a -> a != null && !"null".equals(a.toString()) && ((JSONObject) a).size() > 0)
|
||||
.forEach(a -> {
|
||||
JSONObject shapeAttr = (JSONObject) a;
|
||||
if (shapeAttr.get("key").equals("activity_number")) {
|
||||
@ -4442,11 +4440,16 @@ public class ProcessPublishWeb extends ActionWeb {
|
||||
bo.set("EXTDESC", shapeAttr.getString("value"));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
bos.add(bo);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 重新生成手册
|
||||
*
|
||||
* @param plId
|
||||
* @return
|
||||
*/
|
||||
@ -4486,7 +4489,6 @@ public class ProcessPublishWeb extends ActionWeb {
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -4519,7 +4521,6 @@ public class ProcessPublishWeb extends ActionWeb {
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -4531,6 +4532,7 @@ public class ProcessPublishWeb extends ActionWeb {
|
||||
|
||||
/**
|
||||
* 发布变更版本流程-根据下拉选择获取最新架构数据赋值到发布表单中
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String updateFramework(String uuid, String processInstId) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user