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
43f4480b
Commit
43f4480b
authored
Jan 11, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.修改
parent
ad7f62ab
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
25 deletions
+38
-25
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+15
-10
JgChangeRegistrationNameServiceImpl.java
...biz/service/impl/JgChangeRegistrationNameServiceImpl.java
+23
-15
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/CommonServiceImpl.java
View file @
43f4480b
...
...
@@ -664,17 +664,22 @@ public class CommonServiceImpl implements ICommonService {
TaskV2Model
model
=
result
.
stream
().
sorted
((
r1
,
r2
)
->
r2
.
getSequenceNbr
().
compareTo
(
r1
.
getSequenceNbr
()))
// 按时间降序排序
.
findFirst
()
.
orElse
(
null
);
if
(
model
==
null
)
{
return
null
;
if
(
model
!=
null
)
{
model
.
setFlowStatus
(
Integer
.
valueOf
(
params
.
get
(
"flowStatus"
).
toString
()));
model
.
setFlowStatusLabel
(
params
.
get
(
"flowStatusLabel"
).
toString
());
model
.
setTaskStatus
(
Integer
.
valueOf
(
params
.
get
(
"taskStatus"
).
toString
()));
model
.
setTaskStatusLabel
(
params
.
get
(
"taskStatusLabel"
).
toString
());
model
.
setEndUserId
(
exeUserId
);
model
.
setEndDate
(
new
Date
());
model
.
setRoutePath
(
model
.
getRoutePath
().
replace
(
"roleIds"
,
"role"
).
replace
(
"edit"
,
"look"
));
Systemctl
.
taskV2Client
.
update
(
model
,
model
.
getSequenceNbr
());
}
else
{
model
=
new
TaskV2Model
();
model
.
setFlowStatus
(
Integer
.
valueOf
(
params
.
get
(
"flowStatus"
).
toString
()));
model
.
setFlowStatusLabel
(
params
.
get
(
"flowStatusLabel"
).
toString
());
model
.
setTaskStatus
(
Integer
.
valueOf
(
params
.
get
(
"taskStatus"
).
toString
()));
model
.
setTaskStatusLabel
(
params
.
get
(
"taskStatusLabel"
).
toString
());
}
model
.
setFlowStatus
(
Integer
.
valueOf
(
params
.
get
(
"flowStatus"
).
toString
()));
model
.
setFlowStatusLabel
(
params
.
get
(
"flowStatusLabel"
).
toString
());
model
.
setTaskStatus
(
Integer
.
valueOf
(
params
.
get
(
"taskStatus"
).
toString
()));
model
.
setTaskStatusLabel
(
params
.
get
(
"taskStatusLabel"
).
toString
());
model
.
setEndUserId
(
exeUserId
);
model
.
setEndDate
(
new
Date
());
model
.
setRoutePath
(
model
.
getRoutePath
().
replace
(
"roleIds"
,
"role"
).
replace
(
"edit"
,
"look"
));
Systemctl
.
taskV2Client
.
update
(
model
,
model
.
getSequenceNbr
());
//修改model并返回 用于组装新待办
model
.
setEndUserId
(
null
);
model
.
setTaskStatus
(
null
);
...
...
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 @
43f4480b
...
...
@@ -246,16 +246,17 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
List
<
String
>
roleListNext
=
new
ArrayList
<>();
List
<
String
>
roleListAll
=
new
ArrayList
<>();
JgChangeRegistrationName
jgChangeRegistrationName
=
this
.
getById
(
jgChangeRegistrationNameDto
.
getSequenceNbr
());
BeanUtil
.
copyProperties
(
jgChangeRegistrationNameDto
,
jgChangeRegistrationName
);
if
(
"1"
.
equals
(
submitType
))
{
//发起流程
if
(!
StringUtils
.
hasText
(
jgChangeRegistrationName
Dto
.
getInstanceId
()))
{
if
(!
StringUtils
.
hasText
(
jgChangeRegistrationName
.
getInstanceId
()))
{
try
{
List
<
ProcessTaskDTO
>
processTasks
=
new
ArrayList
<>();
ActWorkflowBatchDTO
actWorkflowBatchDTO
=
new
ActWorkflowBatchDTO
();
List
<
ActWorkflowStartDTO
>
list
=
new
ArrayList
<>();
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
dto
.
setProcessDefinitionKey
(
"unitRename"
);
dto
.
setBusinessKey
(
jgChangeRegistrationName
Dto
.
getApplyNo
());
dto
.
setBusinessKey
(
jgChangeRegistrationName
.
getApplyNo
());
dto
.
setCompleteFirstTask
(
true
);
list
.
add
(
dto
);
actWorkflowBatchDTO
.
setProcess
(
list
);
...
...
@@ -266,14 +267,12 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
this
.
buildRoleList
(
processTasks
,
roleListNext
,
roleListAll
);
List
<
WorkflowResultDto
>
workflowResultDtos
=
commonService
.
buildWorkFlowInfo
(
processTasks
);
String
nextUserIds
=
workflowResultDtos
.
get
(
0
).
getNextExecutorUserIds
();
jgChangeRegistrationName
Dto
.
setInstanceStatus
(
String
.
join
(
","
,
roleListAll
));
jgChangeRegistrationName
Dto
.
setInstanceId
(
instanceId
);
jgChangeRegistrationName
Dto
.
setNextExecutorIds
(
String
.
join
(
","
,
roleListNext
));
jgChangeRegistrationName
Dto
.
setNextTaskId
(
nextTaskId
);
jgChangeRegistrationName
.
setInstanceStatus
(
String
.
join
(
","
,
roleListAll
));
jgChangeRegistrationName
.
setInstanceId
(
instanceId
);
jgChangeRegistrationName
.
setNextExecutorIds
(
String
.
join
(
","
,
roleListNext
));
jgChangeRegistrationName
.
setNextTaskId
(
nextTaskId
);
// 创建待办
JgChangeRegistrationName
bean
=
new
JgChangeRegistrationName
();
BeanUtil
.
copyProperties
(
jgChangeRegistrationNameDto
,
bean
);
createTaskModel
(
bean
,
taskName
,
"1"
,
nextUserIds
);
createTaskModel
(
jgChangeRegistrationName
,
taskName
,
"1"
,
nextUserIds
);
}
catch
(
Exception
e
)
{
log
.
error
(
"提交失败:{}"
,
e
);
throw
new
BadRequest
(
"提交失败"
+
e
.
getMessage
());
...
...
@@ -298,13 +297,9 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
jgChangeRegistrationName
.
setNextTaskId
(
nextTaskId
);
executeOneStep
(
jgChangeRegistrationName
,
taskName
,
nextUserIds
,
op
);
}
BeanUtils
.
copyProperties
(
jgChangeRegistrationNameDto
,
jgChangeRegistrationName
);
this
.
updateById
(
jgChangeRegistrationName
);
}
else
{
JgChangeRegistrationName
bean
=
new
JgChangeRegistrationName
();
BeanUtils
.
copyProperties
(
jgChangeRegistrationNameDto
,
bean
);
this
.
updateById
(
bean
);
this
.
updateById
(
jgChangeRegistrationName
);
}
return
jgChangeRegistrationNameDto
;
}
...
...
@@ -312,15 +307,28 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
private
void
executeOneStep
(
JgChangeRegistrationName
jgChangeRegistrationName
,
String
taskName
,
String
nextUserIds
,
String
operate
)
{
// 先更新之前的待办
TaskV2Model
taskV2Model
=
updateTaskModel
(
jgChangeRegistrationName
,
operate
);
// 再插入新代办、数据待定
TaskModelDto
taskModelDto
=
new
TaskModelDto
();
taskModelDto
.
setTaskDesc
(
""
);
taskModelDto
.
setTaskContent
(
this
.
buildTaskContent
(
jgChangeRegistrationName
));
taskV2Model
.
setTaskName
(
taskName
);
taskModelDto
.
setTaskDesc
(
""
);
taskModelDto
.
setTaskCode
(
jgChangeRegistrationName
.
getApplyNo
());
taskV2Model
.
setExecuteUserIds
(
nextUserIds
);
taskV2Model
.
setRelationId
(
jgChangeRegistrationName
.
getInstanceId
());
taskV2Model
.
setTaskStatus
(
this
.
getTaskStatusByName
(
jgChangeRegistrationName
.
getAuditStatus
()));
taskV2Model
.
setTaskStatusLabel
(
jgChangeRegistrationName
.
getAuditStatus
());
taskV2Model
.
setTaskType
(
BusinessTypeEnum
.
JG_NAME_CHANGE_REGISTRATION
.
getCode
());
taskModelDto
.
setStartUser
(
jgChangeRegistrationName
.
getCreateUserName
());
taskV2Model
.
setTaskTypeLabel
(
BusinessTypeEnum
.
JG_NAME_CHANGE_REGISTRATION
.
getName
());
taskModelDto
.
setStartDate
(
jgChangeRegistrationName
.
getCreateDate
());
taskModelDto
.
setStartUserId
(
jgChangeRegistrationName
.
getCreateUserId
());
taskModelDto
.
setStartUserCompanyName
(
jgChangeRegistrationName
.
getUseUnitName
());
taskModelDto
.
setExecuteUserIds
(
nextUserIds
);
TaskModelDto
modelDto
=
new
TaskModelDto
();
BeanUtil
.
copyProperties
(
taskV2Model
,
modelDto
);
modelDto
.
setNextExecuteUser
(
jgChangeRegistrationName
.
getNextExecutorIds
());
modelDto
.
setModel
(
jgChangeRegistrationName
);
// 再插入新代办、数据待定
commonService
.
buildTaskModel
(
Collections
.
singletonList
(
modelDto
));
}
...
...
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