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
c6f92c78
Commit
c6f92c78
authored
Dec 14, 2023
by
李秀明
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register
parents
f0f5f181
74eef11a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
14 deletions
+31
-14
JyjcOpeningApplicationController.java
...jyjc/biz/controller/JyjcOpeningApplicationController.java
+9
-1
JyjcOpeningApplicationServiceImpl.java
...c/biz/service/impl/JyjcOpeningApplicationServiceImpl.java
+22
-13
No files found.
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/controller/JyjcOpeningApplicationController.java
View file @
c6f92c78
...
@@ -55,7 +55,7 @@ public class JyjcOpeningApplicationController extends BaseController {
...
@@ -55,7 +55,7 @@ public class JyjcOpeningApplicationController extends BaseController {
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新"
,
notes
=
"根据sequenceNbr更新"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新"
,
notes
=
"根据sequenceNbr更新"
)
public
ResponseModel
<
JyjcOpeningApplicationModel
>
updateBySequenceNbrJyjcOpeningApplication
(
@RequestBody
JyjcOpeningApplicationModel
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
public
ResponseModel
<
JyjcOpeningApplicationModel
>
updateBySequenceNbrJyjcOpeningApplication
(
@RequestBody
JyjcOpeningApplicationModel
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
jyjcOpeningApplicationServiceImpl
.
update
WithModel
(
model
));
return
ResponseHelper
.
buildResponse
(
jyjcOpeningApplicationServiceImpl
.
update
Model
(
model
,
false
));
}
}
/**
/**
...
@@ -141,4 +141,12 @@ public class JyjcOpeningApplicationController extends BaseController {
...
@@ -141,4 +141,12 @@ public class JyjcOpeningApplicationController extends BaseController {
jyjcOpeningApplicationServiceImpl
.
stopFlow
(
instanceId
);
jyjcOpeningApplicationServiceImpl
.
stopFlow
(
instanceId
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/restartFlow/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"重新提交开通申请"
,
notes
=
"重新提交开通申请"
)
public
ResponseModel
<
JyjcOpeningApplicationModel
>
resubmitJyjcOpeningApplication
(
@RequestBody
JyjcOpeningApplicationModel
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
jyjcOpeningApplicationServiceImpl
.
updateModel
(
model
,
true
));
}
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/JyjcOpeningApplicationServiceImpl.java
View file @
c6f92c78
...
@@ -122,11 +122,25 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -122,11 +122,25 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
}
}
@Transactional
(
rollbackFor
=
{
Exception
.
class
,
CommonException
.
class
})
@Transactional
(
rollbackFor
=
{
Exception
.
class
,
CommonException
.
class
})
public
JyjcOpeningApplicationModel
updateModel
(
JyjcOpeningApplicationModel
model
)
{
public
JyjcOpeningApplicationModel
updateModel
(
JyjcOpeningApplicationModel
model
,
Boolean
restartFlow
)
{
if
(
model
.
getSequenceNbr
()
==
null
)
{
if
(
model
.
getSequenceNbr
()
==
null
)
{
throw
new
BadRequest
(
"sequenceNbr不能为空!"
);
throw
new
BadRequest
(
"sequenceNbr不能为空!"
);
}
}
return
this
.
updateModel
(
model
);
try
{
if
(
restartFlow
)
{
String
instanceId
=
startFlow
();
JSONObject
dataObject
=
getTask
(
instanceId
);
JSONArray
executorArray
=
dataObject
.
getJSONObject
(
"nodeInfo"
).
getJSONArray
(
"executor"
);
if
(!
ValidationUtil
.
isEmpty
(
executorArray
))
{
String
roleGroups
=
executorArray
.
stream
().
map
(
json
->
Optional
.
ofNullable
(((
LinkedHashMap
)
json
).
get
(
"groupId"
)).
orElse
(
""
).
toString
()).
collect
(
Collectors
.
joining
(
","
));
model
.
setWorkflowRole
(
roleGroups
);
}
}
return
this
.
updateWithModel
(
model
);
}
catch
(
Exception
e
)
{
log
.
error
(
"saveModel: model={} error"
,
model
,
e
);
throw
new
BaseException
(
e
.
getMessage
());
}
}
}
public
void
updateModelByInstanceId
(
String
instanceId
)
{
public
void
updateModelByInstanceId
(
String
instanceId
)
{
...
@@ -153,17 +167,12 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -153,17 +167,12 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
}
}
private
JSONObject
getTask
(
String
instanceId
)
{
private
JSONObject
getTask
(
String
instanceId
)
{
try
{
AjaxResult
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
instanceId
);
AjaxResult
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
instanceId
);
JSONObject
dataObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
ajaxResult
.
get
(
"data"
)));
JSONObject
dataObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
ajaxResult
.
get
(
"data"
)));
String
taskId
=
dataObject
.
getString
(
"id"
);
// 工作流ID
String
taskId
=
dataObject
.
getString
(
"id"
);
// 工作流ID
FeignClientResult
<
JSONObject
>
nodeInfo
=
workflowFeignClient
.
getNodeInfotoken
(
RequestContext
.
getAppKey
(),
RequestContext
.
getProduct
(),
RequestContext
.
getToken
(),
taskId
);
FeignClientResult
<
JSONObject
>
nodeInfo
=
workflowFeignClient
.
getNodeInfotoken
(
RequestContext
.
getAppKey
(),
RequestContext
.
getProduct
(),
RequestContext
.
getToken
(),
taskId
);
dataObject
.
put
(
"nodeInfo"
,
nodeInfo
.
getResult
());
dataObject
.
put
(
"nodeInfo"
,
nodeInfo
.
getResult
());
return
dataObject
;
return
dataObject
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
null
;
}
}
/**
/**
...
...
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