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
742b0fdb
Commit
742b0fdb
authored
Dec 22, 2023
by
lisong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
27879502
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
11 deletions
+20
-11
JgMaintenanceContractServiceImpl.java
...jg/biz/service/impl/JgMaintenanceContractServiceImpl.java
+20
-11
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/JgMaintenanceContractServiceImpl.java
View file @
742b0fdb
...
...
@@ -27,6 +27,7 @@ import com.yeejoin.amos.boot.module.jg.flc.api.fegin.WorkFlowFeignService;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.service.ICreateCodeService
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.workflow.Workflow
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
import
com.yeejoin.amos.feign.workflow.model.AjaxResult
;
...
...
@@ -315,7 +316,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
@Transactional
public
void
revocation
(
String
instanceId
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
String
task
Nam
e
=
""
;
String
task
Cod
e
=
""
;
JgMaintenanceContract
jgMaintenanceContract
=
new
JgMaintenanceContract
();
LambdaQueryWrapper
<
JgMaintenanceContract
>
lambda
=
new
QueryWrapper
<
JgMaintenanceContract
>().
lambda
();
lambda
.
eq
(
JgMaintenanceContract:
:
getInstanceId
,
instanceId
);
...
...
@@ -324,9 +325,13 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
workFlowFeginService
.
rollBack
(
instanceId
);
JSONObject
taskNoAuth
=
workFlowFeginService
.
getTaskNoAuth
(
instanceId
);
JSONObject
nextTask
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
taskNoAuth
.
get
(
"data"
)));
task
Nam
e
=
nextTask
.
getString
(
"name"
);
task
Cod
e
=
nextTask
.
getString
(
"name"
);
if
(!
ObjectUtils
.
isEmpty
(
taskNoAuth
.
get
(
"data"
)))
{
String
nextTaskId
=
nextTask
.
getString
(
"id"
);
FeignClientResult
<
JSONObject
>
nodeInfo
=
workFlowFeginService
.
getNodeInfo
(
nextTaskId
);
JSONObject
result
=
nodeInfo
.
getResult
();
Map
<
String
,
Object
>
taskInfo
=
(
Map
<
String
,
Object
>)
result
.
get
(
"taskInfo"
);
taskCode
=
String
.
valueOf
(
taskInfo
.
get
(
"taskDefinitionKey"
));
AjaxResult
taskGroupName
=
Workflow
.
taskClient
.
getTaskGroupName
(
nextTaskId
);
JSONArray
data
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
taskGroupName
.
get
(
"data"
)));
for
(
Object
datum
:
data
)
{
...
...
@@ -338,9 +343,9 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
if
(!
ObjectUtils
.
isEmpty
(
task
Nam
e
))
{
if
(!
ObjectUtils
.
isEmpty
(
task
Cod
e
))
{
jgMaintenanceContract
.
setStatus
(
MaintenceStatusEnum
.
getMessage
(
taskNam
e
).
getRollBack
());
jgMaintenanceContract
.
setStatus
(
WorkFlowStatusEnum
.
getMessage
(
taskCod
e
).
getRollBack
());
}
String
join
=
String
.
join
(
","
,
roleList
);
jgMaintenanceContract
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
...
...
@@ -381,7 +386,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
// 新增编辑
if
(
"add"
.
equals
(
String
.
valueOf
(
map
.
get
(
"pageType"
))))
{
contract
.
setStatus
(
SUBMIT_DATA
.
equals
(
submit
)
?
MaintenceStatusEnum
.
SUBMIT
.
getPass
()
:
MaintenceStatusEnum
.
RECEIVE
.
getPass
());
contract
.
setStatus
(
SUBMIT_DATA
.
equals
(
submit
)
?
WorkFlowStatusEnum
.
MAIN_SUBMIT
.
getPass
()
:
WorkFlowStatusEnum
.
MAIN_
RECEIVE
.
getPass
());
this
.
save
(
contract
);
}
else
{
this
.
getBaseMapper
().
updateById
(
contract
);
...
...
@@ -422,16 +427,20 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
public
void
updateExecuteIds
(
String
instanceId
,
Long
sequenceNbr
,
String
operate
){
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
String
role
=
""
;
String
task
Nam
e
=
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
();
String
task
Cod
e
=
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
();
ArrayList
<
String
>
roleList
=
new
ArrayList
<>();
JgMaintenanceContract
jgMaintenanceContract
=
this
.
getBaseMapper
().
selectById
(
sequenceNbr
);
try
{
// 查询下节点任务
JSONObject
taskNoAuth
=
workFlowFeginService
.
getTaskNoAuth
(
instanceId
);
if
(!
ObjectUtils
.
isEmpty
(
taskNoAuth
.
get
(
"data"
)))
{
JSONObject
nextTask
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
taskNoAuth
.
get
(
"data"
)));
String
nextTaskId
=
nextTask
.
getString
(
"id"
);
taskName
=
nextTask
.
getString
(
"name"
);
FeignClientResult
<
JSONObject
>
nodeInfo
=
workFlowFeginService
.
getNodeInfo
(
nextTaskId
);
JSONObject
result
=
nodeInfo
.
getResult
();
Map
<
String
,
Object
>
taskInfo
=
(
Map
<
String
,
Object
>)
result
.
get
(
"taskInfo"
);
taskCode
=
String
.
valueOf
(
taskInfo
.
get
(
"taskDefinitionKey"
));
AjaxResult
taskGroupName
=
Workflow
.
taskClient
.
getTaskGroupName
(
nextTaskId
);
JSONArray
data
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
taskGroupName
.
get
(
"data"
)));
for
(
Object
datum
:
data
)
{
...
...
@@ -443,7 +452,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
if
(!
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
().
equals
(
task
Nam
e
)){
if
(!
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
().
equals
(
task
Cod
e
)){
role
=
String
.
join
(
","
,
roleList
);
jgMaintenanceContract
.
setNextExecuteIds
(
role
);
jgMaintenanceContract
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
...
...
@@ -455,15 +464,15 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
}
if
(
"0"
.
equals
(
operate
)){
// 通过操作
jgMaintenanceContract
.
setStatus
(
MaintenceStatusEnum
.
getMessage
(
taskNam
e
).
getPass
());
jgMaintenanceContract
.
setStatus
(
WorkFlowStatusEnum
.
getMessage
(
taskCod
e
).
getPass
());
}
else
{
// 驳回操作
jgMaintenanceContract
.
setStatus
(
MaintenceStatusEnum
.
getMessage
(
taskNam
e
).
getReject
());
jgMaintenanceContract
.
setStatus
(
WorkFlowStatusEnum
.
getMessage
(
taskCod
e
).
getReject
());
jgMaintenanceContract
.
setPromoter
(
null
);
}
}
else
{
jgMaintenanceContract
.
setStatus
(
task
Nam
e
);
jgMaintenanceContract
.
setStatus
(
task
Cod
e
);
}
this
.
getBaseMapper
().
updateById
(
jgMaintenanceContract
);
...
...
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