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
990e0672
Commit
990e0672
authored
Dec 14, 2023
by
yangyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jyjc):merge新增、更新接口
parent
51a8d7f6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
28 deletions
+10
-28
JyjcOpeningApplicationController.java
...jyjc/biz/controller/JyjcOpeningApplicationController.java
+4
-4
JyjcOpeningApplicationServiceImpl.java
...c/biz/service/impl/JyjcOpeningApplicationServiceImpl.java
+6
-24
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 @
990e0672
...
...
@@ -48,7 +48,7 @@ public class JyjcOpeningApplicationController extends BaseController {
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增"
,
notes
=
"新增"
)
public
ResponseModel
<
JyjcOpeningApplicationModel
>
save
(
@RequestBody
JyjcOpeningApplicationModel
model
)
{
model
=
jyjcOpeningApplicationServiceImpl
.
saveModel
(
model
,
false
);
model
=
jyjcOpeningApplicationServiceImpl
.
save
OrUpdate
Model
(
model
,
false
);
return
ResponseHelper
.
buildResponse
(
model
);
}
...
...
@@ -63,7 +63,7 @@ public class JyjcOpeningApplicationController extends BaseController {
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"更新"
,
notes
=
"更新"
)
public
ResponseModel
<
JyjcOpeningApplicationModel
>
updateBySequenceNbrJyjcOpeningApplication
(
@RequestBody
JyjcOpeningApplicationModel
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
jyjcOpeningApplicationServiceImpl
.
u
pdateModel
(
model
,
false
));
return
ResponseHelper
.
buildResponse
(
jyjcOpeningApplicationServiceImpl
.
saveOrU
pdateModel
(
model
,
false
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
...
@@ -71,7 +71,7 @@ public class JyjcOpeningApplicationController extends BaseController {
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"保存并提交"
,
notes
=
"保存并提交"
)
public
ResponseModel
<
JyjcOpeningApplicationModel
>
updateBySequenceNbrAndStartFlow
(
@RequestBody
JyjcOpeningApplicationModel
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
jyjcOpeningApplicationServiceImpl
.
u
pdateModel
(
model
,
true
));
return
ResponseHelper
.
buildResponse
(
jyjcOpeningApplicationServiceImpl
.
saveOrU
pdateModel
(
model
,
true
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
...
@@ -79,7 +79,7 @@ public class JyjcOpeningApplicationController extends BaseController {
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"重新提交开通申请"
,
notes
=
"重新提交开通申请"
)
public
ResponseModel
<
JyjcOpeningApplicationModel
>
resubmitJyjcOpeningApplication
(
@RequestBody
JyjcOpeningApplicationModel
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
jyjcOpeningApplicationServiceImpl
.
u
pdateModel
(
model
,
true
));
return
ResponseHelper
.
buildResponse
(
jyjcOpeningApplicationServiceImpl
.
saveOrU
pdateModel
(
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 @
990e0672
...
...
@@ -98,10 +98,10 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
private
WorkflowFeignClient
workflowFeignClient
;
@Transactional
(
rollbackFor
=
{
Exception
.
class
,
BaseException
.
class
})
public
JyjcOpeningApplicationModel
saveModel
(
JyjcOpeningApplicationModel
model
,
Boolean
restartFlow
)
{
// 开启工作流 startProcess
public
JyjcOpeningApplicationModel
saveOrUpdateModel
(
JyjcOpeningApplicationModel
model
,
Boolean
enableStartFlow
)
{
try
{
if
(
restartFlow
)
{
if
(
enableStartFlow
)
{
// 开启工作流 startProcess
String
instanceId
=
startFlow
();
JSONObject
dataObject
=
getTask
(
instanceId
);
JSONArray
executorArray
=
dataObject
.
getJSONObject
(
"nodeInfo"
).
getJSONArray
(
"executor"
);
...
...
@@ -112,34 +112,16 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
model
.
setStatus
(!
ValidationUtil
.
isEmpty
(
dataObject
)
&&
!
ValidationUtil
.
isEmpty
(
dataObject
.
get
(
"status"
))
?
String
.
valueOf
(
dataObject
.
get
(
"status"
))
:
""
);
model
.
setWorkflowProstanceId
(
instanceId
);
}
if
(
model
.
getSequenceNbr
()
==
null
)
{
CompanyBo
companyBo
=
commonserviceImpl
.
getReginParamsOfCurrentUser
().
getCompany
();
model
.
setUnitCode
(
companyBo
.
getCompanyCode
());
model
.
setUnitCode
(
"91611103MAC4Q1EG7B"
);
model
.
setUnitCodeName
(
companyBo
.
getCompanyName
());
model
.
setApplicationSeq
(
buildApplicationSeq
());
return
this
.
createWithModel
(
model
);
}
catch
(
Exception
e
)
{
log
.
error
(
"saveModel: model={} error"
,
model
,
e
);
throw
new
BaseException
(
e
.
getMessage
());
}
}
@Transactional
(
rollbackFor
=
{
Exception
.
class
,
BaseException
.
class
})
public
JyjcOpeningApplicationModel
updateModel
(
JyjcOpeningApplicationModel
model
,
Boolean
restartFlow
)
{
if
(
model
.
getSequenceNbr
()
==
null
)
{
throw
new
BadRequest
(
"sequenceNbr不能为空!"
);
}
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
);
}
}
}
else
{
return
this
.
updateWithModel
(
model
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"saveModel: model={} error"
,
model
,
e
);
throw
new
BaseException
(
e
.
getMessage
());
...
...
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