From 5d8c1b6fec3739714c41c0b0c928149487eb34c4 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期一, 18 八月 2025 09:54:52 +0800
Subject: [PATCH] 流程图都增加异标记
---
blade-service/blade-mdm/src/main/resources/processesbpmn/program-cure.bpmn20.xml | 19 ++++++++-
blade-service/blade-mdm/src/main/java/org/springblade/mdm/program/service/NcProgramExportDNCService.java | 4 +
blade-service/blade-mdm/src/main/resources/processesbpmn/dispatch.bpmn20.xml | 19 ++++++++-
blade-service/blade-mdm/src/main/resources/processesbpmn/program-replace.bpmn20.xml | 30 ++++++++++----
4 files changed, 56 insertions(+), 16 deletions(-)
diff --git a/blade-service/blade-mdm/src/main/java/org/springblade/mdm/program/service/NcProgramExportDNCService.java b/blade-service/blade-mdm/src/main/java/org/springblade/mdm/program/service/NcProgramExportDNCService.java
index 7734274..f91092c 100644
--- a/blade-service/blade-mdm/src/main/java/org/springblade/mdm/program/service/NcProgramExportDNCService.java
+++ b/blade-service/blade-mdm/src/main/java/org/springblade/mdm/program/service/NcProgramExportDNCService.java
@@ -110,6 +110,9 @@
zipOut.putNextEntry(zipEntry);
zipOut.closeEntry();
+ NcNode packageNode = ncNodeService.getById(approved.getNcNodeId());
+ Machine machine = machineService.getByCode(packageNode.getMachineCode());//绋嬪簭鍖呰妭鐐癸紝鑾峰彇娉ㄩ噴鐢�
+
List<NcNode> programNodes = ncNodeService.lambdaQuery().eq(NcNode::getIsLastEdition,1).eq(NcNode::getParentId, approved.getNcNodeId()).list();
FlowProgramFile programFile;
@@ -126,7 +129,6 @@
programFile = this.flowProgramFileService.getById(node.getFlowProgramFileId());
if(programFile.isProgram()) {//绋嬪簭鏂囦欢锛屾墠浼氬姞鍏ュ帇缂╁寘
InputStream inputStream = ossTemplate.statFileStream(programFile.getOssName());
- Machine machine = machineService.getByCode(node.getMachineCode());
InputStream addedIns1 = addSendDirAnnotation(inputStream, machine, annotationList);
InputStream addedIns2 = addProgramStatusAnnotation(addedIns1, status, machine, annotationList);
this.addInputStreamToZip(zipOut, addedIns2, filePathInZip);
diff --git a/blade-service/blade-mdm/src/main/resources/processesbpmn/dispatch.bpmn20.xml b/blade-service/blade-mdm/src/main/resources/processesbpmn/dispatch.bpmn20.xml
index 33e143e..3374300 100644
--- a/blade-service/blade-mdm/src/main/resources/processesbpmn/dispatch.bpmn20.xml
+++ b/blade-service/blade-mdm/src/main/resources/processesbpmn/dispatch.bpmn20.xml
@@ -48,12 +48,18 @@
<conditionExpression>${approve=='N'}</conditionExpression>
</sequenceFlow>
<endEvent id="sid-59124fa5-62ee-4ba5-8bd9-cafc65aa5fcf" name="缁勯暱缁撴潫"/>
- <sequenceFlow id="sid-1ef405f8-c119-4225-b41c-fb0aa978e42c" sourceRef="teamLeaderTask" targetRef="sid-59124fa5-62ee-4ba5-8bd9-cafc65aa5fcf">
+ <sequenceFlow id="sid-1ef405f8-c119-4225-b41c-fb0aa978e42c" sourceRef="teamLeaderTask" targetRef="exceptionHandleTask">
<conditionExpression>${approve=='N'}</conditionExpression>
</sequenceFlow>
<sequenceFlow id="sid-b33e5cdc-e56b-4a8f-8956-2a3bb4f7e57a" sourceRef="confirmIsUseableTask" targetRef="teamLeaderTask" name="椹冲洖">
<conditionExpression>${approve=='R'}</conditionExpression>
</sequenceFlow>
+ <scriptTask id="exceptionHandleTask" scriptFormat="groovy">
+ <script><![CDATA[
+ execution.setVariable("exception", "1");
+ ]]></script>
+ </scriptTask>
+ <sequenceFlow id="sid-7f62f3c2-08bf-4007-807d-3403ad831ed5" sourceRef="exceptionHandleTask" targetRef="sid-59124fa5-62ee-4ba5-8bd9-cafc65aa5fcf"/>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_dispatch">
<bpmndi:BPMNPlane bpmnElement="dispatch" id="BPMNPlane_dispatch">
@@ -124,16 +130,23 @@
<omgdi:waypoint x="-51.25" y="-77.5"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="shape-d9e76c38-3a8a-476a-af94-90eb350e46e2" bpmnElement="sid-59124fa5-62ee-4ba5-8bd9-cafc65aa5fcf">
- <omgdc:Bounds x="-320.0" y="-35.0" width="30.0" height="30.0"/>
+ <omgdc:Bounds x="-325.0" y="22.499998" width="30.0" height="30.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="edge-961779c9-53bb-4d28-b5a6-2e16e2ab1c2f" bpmnElement="sid-1ef405f8-c119-4225-b41c-fb0aa978e42c">
<omgdi:waypoint x="-262.5" y="-76.25001"/>
- <omgdi:waypoint x="-297.5" y="-35.0"/>
+ <omgdi:waypoint x="-258.75" y="-40.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="edge-d08bab4f-6549-4732-9791-7be8d3fcbbfe" bpmnElement="sid-b33e5cdc-e56b-4a8f-8956-2a3bb4f7e57a">
<omgdi:waypoint x="-107.5" y="37.500004"/>
<omgdi:waypoint x="-210.0" y="-60.000008"/>
</bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="shape-99e2affe-de2c-43fb-8ab1-b1e26bb1c905" bpmnElement="exceptionHandleTask">
+ <omgdc:Bounds x="-300.0" y="-40.0" width="55.0" height="45.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="edge-94f8ab21-dbbb-4ea4-9519-51002cbcfe4e" bpmnElement="sid-7f62f3c2-08bf-4007-807d-3403ad831ed5">
+ <omgdi:waypoint x="-300.0" y="-17.5"/>
+ <omgdi:waypoint x="-295.0" y="37.5"/>
+ </bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
diff --git a/blade-service/blade-mdm/src/main/resources/processesbpmn/program-cure.bpmn20.xml b/blade-service/blade-mdm/src/main/resources/processesbpmn/program-cure.bpmn20.xml
index df201aa..32b8c4f 100644
--- a/blade-service/blade-mdm/src/main/resources/processesbpmn/program-cure.bpmn20.xml
+++ b/blade-service/blade-mdm/src/main/resources/processesbpmn/program-cure.bpmn20.xml
@@ -20,7 +20,7 @@
<conditionExpression>${approve=='Y'}</conditionExpression>
</sequenceFlow>
<endEvent id="cureProgramingNoEnd" name="鍥哄寲缂栧埗缁撴潫"/>
- <sequenceFlow id="sid-a3a0654d-e9fd-4814-a1bd-384dce8a3b7a" sourceRef="cureProgramTask" targetRef="cureProgramingNoEnd">
+ <sequenceFlow id="sid-a3a0654d-e9fd-4814-a1bd-384dce8a3b7a" sourceRef="cureProgramTask" targetRef="exceptionHandleTask">
<conditionExpression>${approve=='N'}</conditionExpression>
</sequenceFlow>
<sequenceFlow id="sid-c04cc547-0baf-4514-8056-54b1612cdefd" sourceRef="seniorApproveTask" targetRef="cureCheckTask">
@@ -30,6 +30,12 @@
<documentation>璁剧疆鏁版嵁鐨勫浐鍖栨爣蹇楋紝鐢熸垚鍥哄寲绋嬪簭鍒楄〃</documentation>
</serviceTask>
<sequenceFlow id="sid-253f5be1-3275-47d6-a3a1-5d1eaf01ec79" sourceRef="cureOKOperateTask" targetRef="end"/>
+ <scriptTask id="exceptionHandleTask" scriptFormat="groovy">
+ <script><![CDATA[
+ execution.setVariable("exception", "1");
+ ]]></script>
+ </scriptTask>
+ <sequenceFlow id="sid-f8533f07-b17b-4a37-89b2-bfa7e014cd08" sourceRef="exceptionHandleTask" targetRef="cureProgramingNoEnd"/>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_program-cure">
<bpmndi:BPMNPlane bpmnElement="program-cure" id="BPMNPlane_program-cure">
@@ -73,11 +79,11 @@
<omgdi:waypoint x="25.0" y="-68.75"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="shape-b240ebd6-4961-477a-9621-67f9b92bde64" bpmnElement="cureProgramingNoEnd">
- <omgdc:Bounds x="-160.0" y="-5.0" width="30.0" height="30.0"/>
+ <omgdc:Bounds x="-215.0" y="35.0" width="30.0" height="30.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="edge-d760db6d-fd9f-435e-8d42-3613cb75be57" bpmnElement="sid-a3a0654d-e9fd-4814-a1bd-384dce8a3b7a">
<omgdi:waypoint x="-130.0" y="-56.25"/>
- <omgdi:waypoint x="-137.5" y="-5.0"/>
+ <omgdi:waypoint x="-140.0" y="-25.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="edge-5c7dd10c-358c-4088-8af7-4d2ada7247db" bpmnElement="sid-c04cc547-0baf-4514-8056-54b1612cdefd">
<omgdi:waypoint x="41.25" y="-60.0"/>
@@ -90,6 +96,13 @@
<omgdi:waypoint x="175.0" y="-30.0"/>
<omgdi:waypoint x="197.5" y="-52.5"/>
</bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="shape-914147ff-52e6-4152-834c-0bc3c552c53a" bpmnElement="exceptionHandleTask">
+ <omgdc:Bounds x="-177.5" y="-25.0" width="50.0" height="45.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="edge-19b7d7ad-693c-4677-af1d-e0b630e6d7ef" bpmnElement="sid-f8533f07-b17b-4a37-89b2-bfa7e014cd08">
+ <omgdi:waypoint x="-177.5" y="8.75"/>
+ <omgdi:waypoint x="-192.5" y="35.0"/>
+ </bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
diff --git a/blade-service/blade-mdm/src/main/resources/processesbpmn/program-replace.bpmn20.xml b/blade-service/blade-mdm/src/main/resources/processesbpmn/program-replace.bpmn20.xml
index 42a8f68..5ec6729 100644
--- a/blade-service/blade-mdm/src/main/resources/processesbpmn/program-replace.bpmn20.xml
+++ b/blade-service/blade-mdm/src/main/resources/processesbpmn/program-replace.bpmn20.xml
@@ -3,9 +3,9 @@
<process id="program-replace" name="鏇挎崲" isExecutable="true">
<startEvent id="sid-0e059345-0bf2-4c18-af59-ee7aeef674c7"/>
<endEvent id="replaceApproveEnd" name="閫氳繃缁撴潫">
- <extensionElements>
- <flowable:executionListener expression="${replaceFinishListener.handle(execution)}" event="end"/>
- </extensionElements>
+ <extensionElements>
+ <flowable:executionListener expression="${replaceFinishListener.handle(execution)}" event="end"/>
+ </extensionElements>
</endEvent>
<userTask id="repalceCheckTask" name="鏁版帶绋嬪簭鏍″" flowable:assignee="${assignee}"/>
<userTask id="repalceProgrammingTask" name="鏁版帶绋嬪簭缂栧啓" flowable:assignee="${assignee}"/>
@@ -26,11 +26,16 @@
<conditionExpression>${approve=='N'}</conditionExpression>
</sequenceFlow>
<sequenceFlow id="sid-36e913be-1be9-49d3-a8a3-51aadd0e945c" sourceRef="sid-0e059345-0bf2-4c18-af59-ee7aeef674c7" targetRef="repalceCheckTask"/>
- <endEvent id="sid-75a8afef-26b1-4dce-9ad9-4a1d4efff08c" name="閫�鍑虹粨鏉�">
- </endEvent>
- <sequenceFlow id="sid-c86f3a13-5e74-423a-b80d-19ef482eb9e1" sourceRef="repalceProgrammingTask" targetRef="sid-75a8afef-26b1-4dce-9ad9-4a1d4efff08c">
+ <endEvent id="sid-75a8afef-26b1-4dce-9ad9-4a1d4efff08c" name="閫�鍑虹粨鏉�"></endEvent>
+ <sequenceFlow id="sid-c86f3a13-5e74-423a-b80d-19ef482eb9e1" sourceRef="repalceProgrammingTask" targetRef="exceptionHandleTask">
<conditionExpression>${approve=='N'}</conditionExpression>
</sequenceFlow>
+ <scriptTask id="exceptionHandleTask" name="寮傚父璁剧疆浠诲姟" scriptFormat="groovy">
+ <script><![CDATA[
+ execution.setVariable("exception", "1");
+ ]]></script>
+ </scriptTask>
+ <sequenceFlow id="sid-bb78fe61-b286-4147-ae83-9e95f8d39afe" sourceRef="exceptionHandleTask" targetRef="sid-75a8afef-26b1-4dce-9ad9-4a1d4efff08c"/>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_program-replace">
<bpmndi:BPMNPlane bpmnElement="program-replace" id="BPMNPlane_program-replace">
@@ -74,12 +79,19 @@
<omgdi:waypoint x="-137.5" y="-96.25"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="shape-3f281eec-371b-43b4-8b6e-b1985a98b3c6" bpmnElement="sid-75a8afef-26b1-4dce-9ad9-4a1d4efff08c">
- <omgdc:Bounds x="-10.0" y="5.0" width="30.0" height="30.0"/>
+ <omgdc:Bounds x="85.0" y="50.0" width="30.0" height="30.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="edge-57d6332c-3cbf-48e6-ac07-a81e31a72155" bpmnElement="sid-c86f3a13-5e74-423a-b80d-19ef482eb9e1">
<omgdi:waypoint x="-100.0" y="28.75"/>
- <omgdi:waypoint x="-50.0" y="20.0"/>
- <omgdi:waypoint x="-10.0" y="12.5"/>
+ <omgdi:waypoint x="-60.0" y="50.0"/>
+ <omgdi:waypoint x="-35.0" y="56.25"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="shape-54d1b102-8869-4675-93a6-2cb479d0dd4a" bpmnElement="exceptionHandleTask">
+ <omgdc:Bounds x="-35.0" y="22.5" width="55.0" height="45.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="edge-6e56e84b-e2e7-418d-ae90-e4117c63938f" bpmnElement="sid-bb78fe61-b286-4147-ae83-9e95f8d39afe">
+ <omgdi:waypoint x="20.0" y="56.25"/>
+ <omgdi:waypoint x="85.0" y="57.5"/>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
--
Gitblit v1.9.3