File tree Expand file tree Collapse file tree 9 files changed +102
-6
lines changed
example-app/example-app-cmd-meta/src/main/java/com/codingapi/example/app/cmd/meta
example-interface/src/main/java/com/codingapi/example/api/meta Expand file tree Collapse file tree 9 files changed +102
-6
lines changed Original file line number Diff line number Diff line change 66 "@ant-design/icons" : " ^5.4.0" ,
77 "@ant-design/pro-components" : " ^2.8.7" ,
88 "@babel/standalone" : " ^7.25.6" ,
9- "@codingapi/flow-pc" : " ^0.0.41 " ,
10- "@codingapi/form-pc" : " ^0.0.41 " ,
11- "@codingapi/ui-framework" : " ^0.0.41 " ,
9+ "@codingapi/flow-pc" : " ^0.0.42 " ,
10+ "@codingapi/form-pc" : " ^0.0.42 " ,
11+ "@codingapi/ui-framework" : " ^0.0.42 " ,
1212 "@dnd-kit/core" : " ^6.2.0" ,
1313 "@dnd-kit/sortable" : " ^9.0.0" ,
1414 "@handsontable/react-wrapper" : " ^15.0.0" ,
Original file line number Diff line number Diff line change @@ -87,6 +87,14 @@ export async function urge(body:any) {
8787 return httpClient . post ( '/api/cmd/flowRecord/urge' , body ) ;
8888}
8989
90+ export async function back ( body :any ) {
91+ return httpClient . post ( '/api/cmd/flowRecord/back' , body ) ;
92+ }
93+
94+ export async function voided ( body :any ) {
95+ return httpClient . post ( '/api/cmd/flowRecord/voided' , body ) ;
96+ }
97+
9098
9199// 待办中心控制
92100
Original file line number Diff line number Diff line change @@ -60,6 +60,22 @@ class DefaultFlowApiImpl implements FlowApi{
6060 return flowApi . detail ( null , workCode ) ;
6161 }
6262
63+ backFlow ( body : any ) : Promise < any > {
64+ return flowApi . back ( body ) ;
65+ }
66+
67+ voidedFlow ( body : any ) : Promise < any > {
68+ return flowApi . voided ( body ) ;
69+ }
70+
71+ getFlowStep ( recordId ?: number , workCode ?: string ) : Promise < any > {
72+ const body = {
73+ recordId,
74+ workCode
75+ }
76+ return flowApi . getFlowStep ( body ) ;
77+ }
78+
6379}
6480
6581FlowApiContent . getInstance ( ) . registerFlowApi ( new DefaultFlowApiImpl ( ) ) ;
Original file line number Diff line number Diff line change @@ -213,6 +213,29 @@ public String getUserName() {
213213 }
214214
215215
216+ @ Setter
217+ @ Getter
218+ public static class BackFlow {
219+
220+ private String processId ;
221+ private String backNodeCode ;
222+
223+ public String getUserName () {
224+ return TokenContext .current ().getUsername ();
225+ }
226+ }
227+
228+ @ Setter
229+ @ Getter
230+ public static class VoidedFlow {
231+
232+ private String processId ;
233+
234+ public String getUserName () {
235+ return TokenContext .current ().getUsername ();
236+ }
237+ }
238+
216239 @ Setter
217240 @ Getter
218241 public static class PostponedFlow {
Original file line number Diff line number Diff line change @@ -93,4 +93,14 @@ public void remove(FlowCmd.RemoveFlow request) {
9393 IFlowOperator current = flowUserRepository .getUserByUsername (request .getUserName ());
9494 flowService .remove (request .getRecordId (), current );
9595 }
96+
97+ public void back (FlowCmd .BackFlow request ) {
98+ IFlowOperator current = flowUserRepository .getUserByUsername (request .getUserName ());
99+ flowService .back (request .getProcessId (),request .getBackNodeCode (), current );
100+ }
101+
102+ public void voided (FlowCmd .VoidedFlow request ) {
103+ IFlowOperator current = flowUserRepository .getUserByUsername (request .getUserName ());
104+ flowService .voided (request .getProcessId (), current );
105+ }
96106}
Original file line number Diff line number Diff line change @@ -84,4 +84,17 @@ public Response remove(@RequestBody FlowCmd.RemoveFlow request) {
8484 return Response .buildSuccess ();
8585 }
8686
87+
88+ @ PostMapping ("/back" )
89+ public Response back (@ RequestBody FlowCmd .BackFlow request ) {
90+ flowRecordRouter .back (request );
91+ return Response .buildSuccess ();
92+ }
93+
94+
95+ @ PostMapping ("/voided" )
96+ public Response voided (@ RequestBody FlowCmd .VoidedFlow request ) {
97+ flowRecordRouter .voided (request );
98+ return Response .buildSuccess ();
99+ }
87100}
Original file line number Diff line number Diff line change 44 "private" : true ,
55 "dependencies" : {
66 "@babel/standalone" : " ^7.25.6" ,
7- "@codingapi/flow-mobile" : " ^0.0.41 " ,
8- "@codingapi/form-mobile" : " ^0.0.41 " ,
9- "@codingapi/ui-framework" : " ^0.0.41 " ,
7+ "@codingapi/flow-mobile" : " ^0.0.42 " ,
8+ "@codingapi/form-mobile" : " ^0.0.42 " ,
9+ "@codingapi/ui-framework" : " ^0.0.42 " ,
1010 "@logicflow/core" : " ^2.0.10" ,
1111 "@logicflow/extension" : " ^2.0.14" ,
1212 "@reduxjs/toolkit" : " ^2.2.7" ,
Original file line number Diff line number Diff line change @@ -94,6 +94,16 @@ export async function urge(body:any) {
9494}
9595
9696
97+ export async function back ( body :any ) {
98+ return httpClient . post ( '/api/cmd/flowRecord/back' , body ) ;
99+ }
100+
101+ export async function voided ( body :any ) {
102+ return httpClient . post ( '/api/cmd/flowRecord/voided' , body ) ;
103+ }
104+
105+
106+
97107// 待办中心控制
98108
99109export async function findAllByOperatorId ( lastId ?: string ,
Original file line number Diff line number Diff line change @@ -61,6 +61,22 @@ class DefaultFlowApiImpl implements FlowApi{
6161 return flowApi . detail ( null , workCode ) ;
6262 }
6363
64+ backFlow ( body : any ) : Promise < any > {
65+ return flowApi . back ( body ) ;
66+ }
67+
68+ voidedFlow ( body : any ) : Promise < any > {
69+ return flowApi . voided ( body ) ;
70+ }
71+
72+ getFlowStep ( recordId ?: number , workCode ?: string ) : Promise < any > {
73+ const body = {
74+ recordId,
75+ workCode
76+ }
77+ return flowApi . getFlowStep ( body ) ;
78+ }
79+
6480}
6581
6682FlowApiContent . getInstance ( ) . registerFlowApi ( new DefaultFlowApiImpl ( ) ) ;
You can’t perform that action at this time.
0 commit comments