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
ce5e4aab
Commit
ce5e4aab
authored
Dec 18, 2023
by
yangyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(检验业务开通):保存并提交判断是否开启过工作流,如果开启过则不重新开启
parent
21539aa5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
12 deletions
+34
-12
JyjcInspectionApplicationController.java
...c/biz/controller/JyjcInspectionApplicationController.java
+2
-2
JyjcInspectionApplicationServiceImpl.java
...iz/service/impl/JyjcInspectionApplicationServiceImpl.java
+14
-6
JyjcOpeningApplicationServiceImpl.java
...c/biz/service/impl/JyjcOpeningApplicationServiceImpl.java
+14
-4
WorkflowHelper.java
...mos/boot/module/jyjc/biz/service/impl/WorkflowHelper.java
+4
-0
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/JyjcInspectionApplicationController.java
View file @
ce5e4aab
...
...
@@ -232,8 +232,8 @@ public class JyjcInspectionApplicationController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"撤回"
,
notes
=
"撤回"
)
@GetMapping
(
value
=
"/flow/rollback"
)
public
void
doRollbackFlow
(
@RequestParam
(
"
instanceId"
)
String
instanceId
)
{
jyjcInspectionApplicationServiceImpl
.
doRollback
(
instanceId
);
public
void
doRollbackFlow
(
@RequestParam
(
"
sequenceNbr"
)
String
sequenceNbr
)
{
jyjcInspectionApplicationServiceImpl
.
doRollback
(
sequenceNbr
);
}
/**
* 查询指定设备种类的设备列表
...
...
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/JyjcInspectionApplicationServiceImpl.java
View file @
ce5e4aab
...
...
@@ -241,7 +241,8 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
Long
sequenceNbr
=
(
Long
)
params
.
get
(
"sequenceNbr"
);
JyjcInspectionApplicationModel
inspectionApplicationModel
=
this
.
queryBySeq
(
sequenceNbr
);
List
<
JyjcInspectionApplicationEquipModel
>
applicationEquipModels
=
applicationEquipService
.
listApplicationEquipByApplicationSeq
(
sequenceNbr
);
if
(
ValidationUtil
.
isEmpty
(
applicationEquipModels
))
{
if
(
inspectionApplicationModel
==
null
||
ValidationUtil
.
isEmpty
(
applicationEquipModels
))
{
log
.
warn
(
"JyjcInspectionApplicationModel Not Found!"
);
return
;
}
List
<
JyjcInspectionResult
>
resultModels
=
new
ArrayList
(
applicationEquipModels
.
size
());
...
...
@@ -253,6 +254,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
resultModel
.
setApplicationUnitCode
(
inspectionApplicationModel
.
getApplicationUnitCode
());
resultModel
.
setResultStatus
(
"未出"
);
resultModel
.
setApplicationDate
(
inspectionApplicationModel
.
getApplicationDate
());
resultModel
.
setResultType
(
inspectionApplicationModel
.
getResultType
());
// 解析设备
resultModel
.
setBizType
(
inspectionApplicationModel
.
getBizType
());
resultModel
.
setResultNo
(
codes
.
get
(
i
));
...
...
@@ -314,17 +316,23 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
/**
* 撤回流程办理单
*/
public
void
doRollback
(
String
instanceId
)
{
public
void
doRollback
(
String
sequenceNbr
)
{
JSONObject
jsonObject
;
JyjcInspectionApplicationModel
inspectionApplicationModel
=
this
.
queryBySeq
(
Long
.
valueOf
(
sequenceNbr
));
if
(
inspectionApplicationModel
==
null
)
{
log
.
warn
(
"JyjcInspectionApplicationModel Not Found!sequenceNbr => "
+
sequenceNbr
);
return
;
}
try
{
// 撤回流程
FeignClientResult
feignClientResult
=
new
FeignClientResult
(
);
if
(
ObjectUtils
.
isEmpty
(
feignClientResul
t
))
{
jsonObject
=
workflowHelper
.
rollBack
(
inspectionApplicationModel
.
getProcessInstanceId
()
);
if
(
ObjectUtils
.
isEmpty
(
jsonObjec
t
))
{
}
updateModelByInstanceId
(
ins
tanceId
,
MapBuilder
.<
String
,
Object
>
create
().
put
(
"status"
,
FlowStatusEnum
.
REJECTED
.
getCode
()
+
""
).
build
());
updateModelByInstanceId
(
ins
pectionApplicationModel
.
getProcessInstanceId
()
,
MapBuilder
.<
String
,
Object
>
create
().
put
(
"status"
,
FlowStatusEnum
.
REJECTED
.
getCode
()
+
""
).
build
());
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
log
.
error
(
"撤回工作流错误, => {}"
,
ins
tanceId
,
e
);
log
.
error
(
"撤回工作流错误, => {}"
,
ins
pectionApplicationModel
.
getProcessInstanceId
()
,
e
);
}
}
...
...
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 @
ce5e4aab
...
...
@@ -99,10 +99,21 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
@Transactional
(
rollbackFor
=
{
Exception
.
class
,
BaseException
.
class
})
public
JyjcOpeningApplicationModel
saveOrUpdateModel
(
JyjcOpeningApplicationModel
model
,
Boolean
enableStartFlow
)
{
boolean
isUpdate
=
false
;
String
instanceId
=
null
;
try
{
if
(
model
.
getSequenceNbr
()
!=
null
)
{
JyjcOpeningApplication
entity
=
this
.
lambdaQuery
().
eq
(
JyjcOpeningApplication:
:
getSequenceNbr
,
model
.
getSequenceNbr
()).
getEntity
();
if
(
entity
!=
null
)
{
instanceId
=
entity
.
getWorkflowProstanceId
();
isUpdate
=
true
;
}
}
if
(
enableStartFlow
)
{
// 开启工作流 startProcess
String
instanceId
=
startFlow
(
"1"
);
if
(
StringUtils
.
isBlank
(
instanceId
))
{
// 未开启过工作流则进行开启 startProcess
instanceId
=
startFlow
(
"1"
);
}
JSONObject
dataObject
=
getTask
(
instanceId
);
JSONArray
executorArray
=
dataObject
.
getJSONObject
(
"nodeInfo"
).
getJSONArray
(
"executor"
);
if
(!
ValidationUtil
.
isEmpty
(
executorArray
))
{
...
...
@@ -113,7 +124,6 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
model
.
setStatusName
(
FlowStatusEnum
.
SUBMITTED
.
getName
());
model
.
setApplyTime
(
new
Date
());
model
.
setWorkflowActiveKey
(
dataObject
.
getString
(
"taskDefinitionKey"
));
// model.setStatus(!ValidationUtil.isEmpty(dataObject) && !ValidationUtil.isEmpty(dataObject.get("status")) ? String.valueOf(dataObject.get("status")) : "");
model
.
setWorkflowProstanceId
(
instanceId
);
// 默认自动执行第一步
execueFlow
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"op"
,
"0"
).
put
(
"instanceId"
,
instanceId
).
put
(
"comments"
,
""
).
build
());
...
...
@@ -121,7 +131,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
model
.
setStatus
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()
+
""
);
model
.
setStatusName
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getName
());
}
if
(
model
.
getSequenceNbr
()
==
null
)
{
if
(
!
isUpdate
)
{
CompanyBo
companyBo
=
commonserviceImpl
.
getReginParamsOfCurrentUser
().
getCompany
();
model
.
setUnitCode
(
companyBo
.
getCompanyCode
());
model
.
setUnitCodeName
(
companyBo
.
getCompanyName
());
...
...
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/WorkflowHelper.java
View file @
ce5e4aab
...
...
@@ -63,4 +63,8 @@ public class WorkflowHelper {
}
return
null
;
}
public
JSONObject
rollBack
(
String
workflowProstanceId
)
{
return
workflowFeignClient
.
rollBack
(
workflowProstanceId
);
}
}
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