Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
faa79547
Commit
faa79547
authored
Dec 30, 2021
by
龙于生
Committed by
284718418@qq.com
Mar 30, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改并序审批bug
parent
8c8bf906
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
35 deletions
+68
-35
src/main/java/cn/timer/api/utils/router/RouterUtils.java
+66
-34
src/main/resources/mapping/spmk/SpmkApproveExecuteRecordMapper.xml
+2
-1
No files found.
src/main/java/cn/timer/api/utils/router/RouterUtils.java
View file @
faa79547
...
...
@@ -580,11 +580,12 @@ public class RouterUtils {
// 新增 执行人
List
<
User
>
listUser
=
CollUtil
.
toList
();
boolean
aobl
=
false
;
List
<
Relation
>
listR
=
listFlowChildren
.
get
(
i
).
getRelation
();
if
(
CollectionUtil
.
isNotEmpty
(
listR
))
{
listUser
=
listR
.
get
(
0
).
getUsers
();
if
(
"1"
.
equals
(
listR
.
get
(
0
).
getApprovalOrder
())){
aobl
=
true
;
for
(
User
user:
listR
.
get
(
0
).
getUsers
()
)
{
if
(
"1"
.
equals
(
user
.
getExecute
())){
...
...
@@ -592,12 +593,6 @@ public class RouterUtils {
}
}
/*for (int j = 0; j < listR.get(0).getUsers().size(); j++) {
String execute = listR.get(0).getUsers().get(j).getExecute();
if("1".equals(execute)){
es++;
}
}*/
}
}
...
...
@@ -668,7 +663,8 @@ public class RouterUtils {
.
insert
();
hasNextApprover
=
true
;
listUser
.
get
(
i_user
).
setExecute
(
EXECUTING
);
// 当前审批人
SpmkApproveSummary
.
builder
().
id
(
asId
).
currentApprover
(
listUser
.
get
(
i_user
).
getName
()).
build
().
updateById
();
...
...
@@ -722,35 +718,71 @@ public class RouterUtils {
listFlowChildren
.
get
(
i
).
setExecute
(
EXECUTED
);
break
;
case
AUDIT:
SpmkApproveExecuteRecord
aer2
=
SpmkApproveExecuteRecord
.
builder
()
.
approveSummaryId
(
asId
)
.
name
(
ParticipatorType
.
APPROVER
.
getName
())
.
type
(
ParticipatorType
.
APPROVER
.
ordinal
())
.
sts
(
ExecuteRecordSts
.
IN_EXECUTION
.
ordinal
())
.
build
();
// 新增 审批执行记录
aer2
.
insert
();
if
(
aobl
){
String
currentApprover
=
""
;
for
(
int
i_user2
=
0
,
n_user2
=
listUser
.
size
();
i_user2
<
n_user2
;
i_user2
++)
{
SpmkApproveExecuteRecord
aer2
=
SpmkApproveExecuteRecord
.
builder
()
.
approveSummaryId
(
asId
)
.
name
(
ParticipatorType
.
APPROVER
.
getName
())
.
type
(
ParticipatorType
.
APPROVER
.
ordinal
())
.
sts
(
ExecuteRecordSts
.
IN_EXECUTION
.
ordinal
())
.
build
();
// 新增 审批执行记录
aer2
.
insert
();
SpmkExecutor
executor
=
SpmkExecutor
.
builder
()
.
approveExecuteRecordId
(
aer2
.
getId
())
.
empNum
(
Integer
.
parseInt
(
listUser
.
get
(
i_user2
).
getId
()))
.
executorName
(
listUser
.
get
(
i_user2
).
getName
())
.
operatorHeaderUrl
(
listUser
.
get
(
i_user2
).
getHeadUrl
())
.
sts
(
ExecutorSts
.
IN_EXECUTION
.
ordinal
())
.
build
();
executor
.
insert
();
listUser
.
get
(
i_user2
).
setExecute
(
EXECUTING
);
hasNextApprover
=
true
;
for
(
int
i_user2
=
0
,
n_user2
=
listUser
.
size
();
i_user2
<
n_user2
;
i_user2
++)
{
SpmkExecutor
executor
=
SpmkExecutor
.
builder
()
.
approveExecuteRecordId
(
aer2
.
getId
())
.
empNum
(
Integer
.
parseInt
(
listUser
.
get
(
i_user2
).
getId
()))
.
executorName
(
listUser
.
get
(
i_user2
).
getName
())
.
operatorHeaderUrl
(
listUser
.
get
(
i_user2
).
getHeadUrl
())
.
sts
(
ExecutorSts
.
IN_EXECUTION
.
ordinal
())
currentApprover
=
currentApprover
!=
""
?
currentApprover
+
","
+
listUser
.
get
(
i_user2
).
getName
():
listUser
.
get
(
i_user2
).
getName
();
// 当前审批人
SpmkApproveSummary
.
builder
().
id
(
asId
).
currentApprover
(
currentApprover
).
build
().
updateById
();
}
listFlowChildren
.
get
(
i
).
setExecute
(
EXECUTING
);
}
else
{
SpmkApproveExecuteRecord
aer2
=
SpmkApproveExecuteRecord
.
builder
()
.
approveSummaryId
(
asId
)
.
name
(
ParticipatorType
.
APPROVER
.
getName
())
.
type
(
ParticipatorType
.
APPROVER
.
ordinal
())
.
sts
(
ExecuteRecordSts
.
IN_EXECUTION
.
ordinal
())
.
build
();
executor
.
insert
();
listUser
.
get
(
i_user2
).
setExecute
(
EXECUTING
);
hasNextApprover
=
true
;
// 当前审批人
SpmkApproveSummary
.
builder
().
id
(
asId
).
currentApprover
(
listUser
.
get
(
i_user2
).
getName
()).
build
().
updateById
();
// 处理了 下一个审批人 则跳出循环
break
;
// 新增 审批执行记录
aer2
.
insert
();
for
(
int
i_user2
=
0
,
n_user2
=
listUser
.
size
();
i_user2
<
n_user2
;
i_user2
++)
{
SpmkExecutor
executor
=
SpmkExecutor
.
builder
()
.
approveExecuteRecordId
(
aer2
.
getId
())
.
empNum
(
Integer
.
parseInt
(
listUser
.
get
(
i_user2
).
getId
()))
.
executorName
(
listUser
.
get
(
i_user2
).
getName
())
.
operatorHeaderUrl
(
listUser
.
get
(
i_user2
).
getHeadUrl
())
.
sts
(
ExecutorSts
.
IN_EXECUTION
.
ordinal
())
.
build
();
executor
.
insert
();
listUser
.
get
(
i_user2
).
setExecute
(
EXECUTING
);
hasNextApprover
=
true
;
// 当前审批人
SpmkApproveSummary
.
builder
().
id
(
asId
).
currentApprover
(
listUser
.
get
(
i_user2
).
getName
()).
build
().
updateById
();
// 处理了 下一个审批人 则跳出循环
break
;
}
listFlowChildren
.
get
(
i
).
setExecute
(
EXECUTING
);
}
listFlowChildren
.
get
(
i
).
setExecute
(
EXECUTING
);
break
;
case
COPY:
SpmkApproveExecuteRecord
aer3
=
SpmkApproveExecuteRecord
...
...
src/main/resources/mapping/spmk/SpmkApproveExecuteRecordMapper.xml
View file @
faa79547
...
...
@@ -55,7 +55,8 @@
b.opinion SpmkExecutor_opinion,
b.sts SpmkExecutor_sts,
b.create_time SpmkExecutor_create_time,
b.update_time SpmkExecutor_update_time
b.update_time SpmkExecutor_update_time,
b.signature_img SpmkExecutor_signature_img
</sql>
<sql
id=
"Base_Column_List_Alias"
>
...
...
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