update - 测试抄送人相关的配置

This commit is contained in:
wangli 2024-03-22 16:28:41 +08:00
parent d7fbc05023
commit 03679ef523
2 changed files with 294 additions and 5 deletions

View File

@ -3,7 +3,6 @@ package cn.axzo.workflow.core.common.utils;
import cn.axzo.workflow.common.enums.ApprovalMethodEnum;
import cn.axzo.workflow.common.model.request.bpmn.BpmnButtonConf;
import cn.axzo.workflow.common.model.request.bpmn.BpmnButtonMetaInfo;
import cn.axzo.workflow.common.model.request.bpmn.BpmnCarbonCopyConf;
import cn.axzo.workflow.common.model.request.bpmn.BpmnFieldConf;
import cn.axzo.workflow.common.model.request.bpmn.BpmnJsonModel;
import cn.axzo.workflow.common.model.request.bpmn.BpmnJsonNode;
@ -59,7 +58,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.UUID;
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_BUTTON;
@ -564,7 +562,7 @@ public final class BpmnJsonConverterUtil {
// String fileName = "/Users/wangli/work/company/yizhi/workflow-engine/workflow-engine-server/src/main" +
// "/resources/权限点模型.json";
String fileName = "/Users/wangli/work/company/yizhi/workflow-engine/workflow-engine-server/src/main" +
"/resources/temp2.json";
"/resources/temp3.json";
byte[] bytes = Files.readAllBytes(Paths.get(fileName));
String content = new String(bytes, StandardCharsets.UTF_8);
@ -576,8 +574,9 @@ public final class BpmnJsonConverterUtil {
convertToJson(bpmnModel);
ServiceTask serviceTask = (ServiceTask) bpmnModel.getFlowElement("node_197955885847");
Optional<List<BpmnCarbonCopyConf>> carbonCopyConfigs = BpmnMetaParserHelper.getCarbonCopyConfigs(serviceTask);
// ServiceTask serviceTask = (ServiceTask) bpmnModel.getFlowElement("node_946990365785");
// Optional<List<BpmnCarbonCopyConf>> carbonCopyConfigs = BpmnMetaParserHelper.getCarbonCopyConfigs
// (serviceTask);
transformBytes(bpmnModel);
generateImage(bpmnModel);

View File

@ -0,0 +1,290 @@
{
"jsonModel": {
"node": {
"id": "NODE_STARTER",
"parentId": null,
"type": "NODE_STARTER",
"name": "发起人",
"desc": "任何人",
"props": {
"assignedUser": [],
"formPerms": []
},
"children": {
"id": "node_946990365785",
"parentId": "NODE_STARTER",
"property": {
"carbonCopyConf": [
{
"carbonCopyObjectType": "ent_position",
"specifyValue": "[{\"name\":\"企业通用/测试岗位\",\"value\":\"oms-cs\"},{\"name\":\"企业通用/企业通用\",\"value\":\"ps\"}]"
},
{
"carbonCopyObjectType": "approver_relation",
"specifyValue": "[{\"name\":\"审批人\",\"value\":\"approver\"}]"
}
]
},
"type": "NODE_CARBON_COPY",
"name": "抄送节点",
"children": {}
}
},
"noticeConf": {
"notice": {
"noticeMessageId": "",
"viewJson": ""
},
"pending": {
"pendingMessageId": "490e0c3a6cdc481b89f2563bf0bbdf09",
"viewJson": "{\"templateName\":\"工作流发薪申请\",\"templateCode\":\"490e0c3a6cdc481b89f2563bf0bbdf09\",\"category\":\"APPROVAL_PENDING_MESSAGE\",\"title\":\"发薪申请\",\"content\":\"您有新的发薪申请需要处理\",\"groupNodeNamePaths\":[],\"status\":\"ENABLE\"}"
},
"sms": {
"smsId": "",
"viewJson": ""
},
"carbonCopy": {
"carbonCopyMessageId": "d3cc9c3672c542718a60e515792acb59",
"viewJson": "{\"templateName\":\"控价单审批\",\"templateCode\":\"d3cc9c3672c542718a60e515792acb59\",\"category\":\"APPROVAL_PENDING_MESSAGE\",\"title\":\"控价单审批\",\"content\":\"您有新控价单需要审批,请及时处理,点击查看详情。\",\"groupNodeNamePaths\":[\"CMS待办中心/施工管理/完善任务\",\"SaaS待App/施工管理/完善任务\"],\"status\":\"ENABLE\"}"
}
},
"buttonConf": {
"initiator": [
{
"order": 1,
"btnKey": "BPMN_APPROVE",
"btnName": "同意",
"checked": false,
"disabled": true
},
{
"order": 2,
"btnKey": "BPMN_REJECT",
"btnName": "驳回",
"checked": false,
"disabled": true
},
{
"order": 3,
"btnKey": "BPMN_REVOCATION",
"btnName": "撤回",
"checked": true,
"disabled": false
},
{
"order": 4,
"btnKey": "BPMN_TRANSFER",
"btnName": "转交",
"checked": false,
"disabled": true
},
{
"order": 5,
"btnKey": "BPMN_COUNTERSIGN",
"btnName": "加签",
"checked": false,
"disabled": true
},
{
"order": 6,
"btnKey": "BPMN_COMMENT",
"btnName": "评论",
"checked": true,
"disabled": false
},
{
"order": 7,
"btnKey": "BPMN_ROLLBACK",
"btnName": "回退",
"checked": false,
"disabled": true
},
{
"order": 8,
"btnKey": "BPMN_COPY",
"btnName": "抄送",
"checked": false,
"disabled": true
}
],
"current": [
{
"order": 1,
"btnKey": "BPMN_APPROVE",
"btnName": "同意",
"checked": true,
"disabled": false
},
{
"order": 2,
"btnKey": "BPMN_REJECT",
"btnName": "驳回",
"checked": true,
"disabled": false
},
{
"order": 3,
"btnKey": "BPMN_REVOCATION",
"btnName": "撤回",
"checked": false,
"disabled": true
},
{
"order": 4,
"btnKey": "BPMN_TRANSFER",
"btnName": "转交",
"checked": true,
"disabled": false
},
{
"order": 5,
"btnKey": "BPMN_COUNTERSIGN",
"btnName": "加签",
"checked": true,
"disabled": false
},
{
"order": 6,
"btnKey": "BPMN_COMMENT",
"btnName": "评论",
"checked": true,
"disabled": false
},
{
"order": 7,
"btnKey": "BPMN_ROLLBACK",
"btnName": "回退",
"checked": true,
"disabled": false
},
{
"order": 8,
"btnKey": "BPMN_COPY",
"btnName": "抄送",
"checked": true,
"disabled": false
}
],
"history": [
{
"order": 1,
"btnKey": "BPMN_APPROVE",
"btnName": "同意",
"checked": false,
"disabled": true
},
{
"order": 2,
"btnKey": "BPMN_REJECT",
"btnName": "驳回",
"checked": false,
"disabled": true
},
{
"order": 3,
"btnKey": "BPMN_REVOCATION",
"btnName": "撤回",
"checked": false,
"disabled": true
},
{
"order": 4,
"btnKey": "BPMN_TRANSFER",
"btnName": "转交",
"checked": false,
"disabled": true
},
{
"order": 5,
"btnKey": "BPMN_COUNTERSIGN",
"btnName": "加签",
"checked": false,
"disabled": true
},
{
"order": 6,
"btnKey": "BPMN_COMMENT",
"btnName": "评论",
"checked": true,
"disabled": false
},
{
"order": 7,
"btnKey": "BPMN_ROLLBACK",
"btnName": "回退",
"checked": false,
"disabled": true
},
{
"order": 8,
"btnKey": "BPMN_COPY",
"btnName": "抄送",
"checked": false,
"disabled": true
}
],
"carbonCopy": [
{
"order": 1,
"btnKey": "BPMN_APPROVE",
"btnName": "同意",
"checked": false,
"disabled": true
},
{
"order": 2,
"btnKey": "BPMN_REJECT",
"btnName": "驳回",
"checked": false,
"disabled": true
},
{
"order": 3,
"btnKey": "BPMN_REVOCATION",
"btnName": "撤回",
"checked": false,
"disabled": true
},
{
"order": 4,
"btnKey": "BPMN_TRANSFER",
"btnName": "转交",
"checked": false,
"disabled": true
},
{
"order": 5,
"btnKey": "BPMN_COUNTERSIGN",
"btnName": "加签",
"checked": false,
"disabled": true
},
{
"order": 6,
"btnKey": "BPMN_COMMENT",
"btnName": "评论",
"checked": true,
"disabled": false
},
{
"order": 7,
"btnKey": "BPMN_ROLLBACK",
"btnName": "回退",
"checked": false,
"disabled": true
},
{
"order": 8,
"btnKey": "BPMN_COPY",
"btnName": "抄送",
"checked": false,
"disabled": true
}
]
},
"fieldConf": []
},
"name": "抄送测试",
"category": "7",
"remark": ""
}