Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
e6793cda
Commit
e6793cda
authored
Jan 16, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.工作流传参数过滤人
parent
a3438975
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
5 deletions
+37
-5
JgChangeRegistrationNameServiceImpl.java
...biz/service/impl/JgChangeRegistrationNameServiceImpl.java
+37
-5
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgChangeRegistrationNameServiceImpl.java
View file @
e6793cda
...
@@ -149,6 +149,8 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
...
@@ -149,6 +149,8 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
dto
.
setProcessDefinitionKey
(
"unitRename"
);
dto
.
setProcessDefinitionKey
(
"unitRename"
);
dto
.
setBusinessKey
(
applyNo
);
dto
.
setBusinessKey
(
applyNo
);
dto
.
setCompleteFirstTask
(
true
);
dto
.
setCompleteFirstTask
(
true
);
// 启动并执行下一步人单位传接收单位的code
dto
.
setNextExecuteUserCompanyCode
(
this
.
getReceiveCompanyCode
(
model
));
list
.
add
(
dto
);
list
.
add
(
dto
);
actWorkflowBatchDTO
.
setProcess
(
list
);
actWorkflowBatchDTO
.
setProcess
(
list
);
processTasks
=
cmWorkflowService
.
startBatch
(
actWorkflowBatchDTO
);
processTasks
=
cmWorkflowService
.
startBatch
(
actWorkflowBatchDTO
);
...
@@ -189,6 +191,17 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
...
@@ -189,6 +191,17 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
this
.
createTaskModel
(
dto
,
taskName
[
0
],
submitType
,
nextUserIds
);
this
.
createTaskModel
(
dto
,
taskName
[
0
],
submitType
,
nextUserIds
);
}
}
private
String
getReceiveCompanyCode
(
JgChangeRegistrationNameDto
model
)
{
String
receiveOrgId
=
model
.
getReceiveOrgCode
();
if
(!
ObjectUtils
.
isEmpty
(
receiveOrgId
))
{
String
[]
receiveOrgIdList
=
receiveOrgId
.
split
(
"_"
);
if
(
receiveOrgIdList
.
length
>
1
)
{
return
receiveOrgIdList
[
0
];
}
}
return
null
;
}
private
void
buildRoleList
(
List
<
ProcessTaskDTO
>
processTasks
,
List
<
String
>
roleListNext
,
List
<
String
>
roleListAll
)
{
private
void
buildRoleList
(
List
<
ProcessTaskDTO
>
processTasks
,
List
<
String
>
roleListNext
,
List
<
String
>
roleListAll
)
{
processTasks
.
forEach
(
p
->
{
processTasks
.
forEach
(
p
->
{
p
.
getNextCandidateGroups
().
values
().
forEach
(
e
->
{
p
.
getNextCandidateGroups
().
values
().
forEach
(
e
->
{
...
@@ -264,6 +277,8 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
...
@@ -264,6 +277,8 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
dto
.
setProcessDefinitionKey
(
"unitRename"
);
dto
.
setProcessDefinitionKey
(
"unitRename"
);
dto
.
setBusinessKey
(
jgChangeRegistrationName
.
getApplyNo
());
dto
.
setBusinessKey
(
jgChangeRegistrationName
.
getApplyNo
());
dto
.
setCompleteFirstTask
(
true
);
dto
.
setCompleteFirstTask
(
true
);
// 启动并执行下一步人单位传接收单位的code
dto
.
setNextExecuteUserCompanyCode
(
jgChangeRegistrationName
.
getReceiveOrgCode
());
list
.
add
(
dto
);
list
.
add
(
dto
);
actWorkflowBatchDTO
.
setProcess
(
list
);
actWorkflowBatchDTO
.
setProcess
(
list
);
processTasks
=
cmWorkflowService
.
startBatch
(
actWorkflowBatchDTO
);
processTasks
=
cmWorkflowService
.
startBatch
(
actWorkflowBatchDTO
);
...
@@ -287,7 +302,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
...
@@ -287,7 +302,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
}
}
}
else
{
}
else
{
// 执行一步
// 执行一步
ProcessTaskDTO
processTaskDTO
=
submit
(
op
,
jgChangeRegistrationName
.
getNextTaskId
()
);
ProcessTaskDTO
processTaskDTO
=
submit
(
op
,
jgChangeRegistrationName
);
String
nextTaskId
=
processTaskDTO
.
getNextTask
().
get
(
0
).
getId
();
String
nextTaskId
=
processTaskDTO
.
getNextTask
().
get
(
0
).
getId
();
String
taskName
=
processTaskDTO
.
getNextTask
().
get
(
0
).
getName
();
String
taskName
=
processTaskDTO
.
getNextTask
().
get
(
0
).
getName
();
this
.
buildRoleList
(
Collections
.
singletonList
(
processTaskDTO
),
roleListNext
,
roleListAll
);
this
.
buildRoleList
(
Collections
.
singletonList
(
processTaskDTO
),
roleListNext
,
roleListAll
);
...
@@ -345,16 +360,17 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
...
@@ -345,16 +360,17 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
}
}
public
ProcessTaskDTO
submit
(
String
op
,
String
taskId
)
{
public
ProcessTaskDTO
submit
(
String
op
erate
,
JgChangeRegistrationName
jgChangeRegistrationName
)
{
//组装信息
//组装信息
TaskResultDTO
dto
=
new
TaskResultDTO
();
TaskResultDTO
dto
=
new
TaskResultDTO
();
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setTaskId
(
taskId
);
dto
.
setTaskId
(
jgChangeRegistrationName
.
getNextTaskId
()
);
dto
.
setComment
(
"提交流程"
);
dto
.
setComment
(
"提交流程"
);
dto
.
setNextExecuteUserCompanyCode
(
this
.
getNextUserOrgCode
(
operate
,
jgChangeRegistrationName
));
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"approvalStatus"
,
op
);
map
.
put
(
"approvalStatus"
,
op
erate
);
dto
.
setVariable
(
map
);
dto
.
setVariable
(
map
);
return
cmWorkflowService
.
complete
(
taskId
,
dto
);
return
cmWorkflowService
.
complete
(
jgChangeRegistrationName
.
getNextTaskId
()
,
dto
);
}
}
private
void
convertField
(
JgChangeRegistrationNameDto
model
)
{
private
void
convertField
(
JgChangeRegistrationNameDto
model
)
{
...
@@ -426,6 +442,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
...
@@ -426,6 +442,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setTaskId
(
taskId
);
dto
.
setTaskId
(
taskId
);
dto
.
setComment
(
comment
);
dto
.
setComment
(
comment
);
dto
.
setNextExecuteUserCompanyCode
(
this
.
getNextUserOrgCode
(
operate
,
jgChangeRegistrationName
));
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"approvalStatus"
,
operate
);
map
.
put
(
"approvalStatus"
,
operate
);
if
(!
ObjectUtils
.
isEmpty
(
jgChangeRegistrationName
.
getInstanceStatus
())
&&
if
(!
ObjectUtils
.
isEmpty
(
jgChangeRegistrationName
.
getInstanceStatus
())
&&
...
@@ -443,6 +460,21 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
...
@@ -443,6 +460,21 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
}
}
}
}
private
String
getNextUserOrgCode
(
String
operate
,
JgChangeRegistrationName
jgChangeRegistrationName
)
{
if
(
"0"
.
equals
(
operate
)){
// 执行通过节点,单位code为接收机构单位信息
return
jgChangeRegistrationName
.
getReceiveOrgCode
();
}
if
(
jgChangeRegistrationName
.
getAuditStatus
().
equals
(
WorkFlowStatusEnum
.
UNIT_RENAME_RECEIVE
.
getPass
())
||
jgChangeRegistrationName
.
getAuditStatus
().
equals
(
WorkFlowStatusEnum
.
UNIT_RENAME_RECEIVE
.
getReject
())
||
jgChangeRegistrationName
.
getAuditStatus
().
equals
(
WorkFlowStatusEnum
.
UNIT_RENAME_RECEIVE
.
getRollBack
())){
// 驳回且当前节点为一键节点时,单位code为发起人单位信息
return
jgChangeRegistrationName
.
getUseUnitCreditCode
();
}
// 2、3级驳回时,单位code为接收单位code
return
jgChangeRegistrationName
.
getReceiveOrgCode
();
}
public
void
updateExecuteIds
(
String
instanceId
,
Long
sequenceNbr
,
String
operate
,
ProcessTaskDTO
processTaskDTO
)
{
public
void
updateExecuteIds
(
String
instanceId
,
Long
sequenceNbr
,
String
operate
,
ProcessTaskDTO
processTaskDTO
)
{
List
<
String
>
roleListNext
=
new
ArrayList
<>();
List
<
String
>
roleListNext
=
new
ArrayList
<>();
List
<
String
>
roleListAll
=
new
ArrayList
<>();
List
<
String
>
roleListAll
=
new
ArrayList
<>();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment