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
50fd5d6f
Commit
50fd5d6f
authored
Dec 30, 2021
by
龙于生
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改并序审批bug
parent
a9dd1b57
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 @
50fd5d6f
...
@@ -580,11 +580,12 @@ public class RouterUtils {
...
@@ -580,11 +580,12 @@ public class RouterUtils {
// 新增 执行人
// 新增 执行人
List
<
User
>
listUser
=
CollUtil
.
toList
();
List
<
User
>
listUser
=
CollUtil
.
toList
();
boolean
aobl
=
false
;
List
<
Relation
>
listR
=
listFlowChildren
.
get
(
i
).
getRelation
();
List
<
Relation
>
listR
=
listFlowChildren
.
get
(
i
).
getRelation
();
if
(
CollectionUtil
.
isNotEmpty
(
listR
))
{
if
(
CollectionUtil
.
isNotEmpty
(
listR
))
{
listUser
=
listR
.
get
(
0
).
getUsers
();
listUser
=
listR
.
get
(
0
).
getUsers
();
if
(
"1"
.
equals
(
listR
.
get
(
0
).
getApprovalOrder
())){
if
(
"1"
.
equals
(
listR
.
get
(
0
).
getApprovalOrder
())){
aobl
=
true
;
for
(
User
user:
listR
.
get
(
0
).
getUsers
()
for
(
User
user:
listR
.
get
(
0
).
getUsers
()
)
{
)
{
if
(
"1"
.
equals
(
user
.
getExecute
())){
if
(
"1"
.
equals
(
user
.
getExecute
())){
...
@@ -592,12 +593,6 @@ public class RouterUtils {
...
@@ -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 {
...
@@ -668,7 +663,8 @@ public class RouterUtils {
.
insert
();
.
insert
();
hasNextApprover
=
true
;
hasNextApprover
=
true
;
listUser
.
get
(
i_user
).
setExecute
(
EXECUTING
);
listUser
.
get
(
i_user
).
setExecute
(
EXECUTING
);
// 当前审批人
// 当前审批人
SpmkApproveSummary
.
builder
().
id
(
asId
).
currentApprover
(
listUser
.
get
(
i_user
).
getName
()).
build
().
updateById
();
SpmkApproveSummary
.
builder
().
id
(
asId
).
currentApprover
(
listUser
.
get
(
i_user
).
getName
()).
build
().
updateById
();
...
@@ -722,35 +718,71 @@ public class RouterUtils {
...
@@ -722,35 +718,71 @@ public class RouterUtils {
listFlowChildren
.
get
(
i
).
setExecute
(
EXECUTED
);
listFlowChildren
.
get
(
i
).
setExecute
(
EXECUTED
);
break
;
break
;
case
AUDIT:
case
AUDIT:
SpmkApproveExecuteRecord
aer2
=
SpmkApproveExecuteRecord
if
(
aobl
){
.
builder
()
String
currentApprover
=
""
;
.
approveSummaryId
(
asId
)
for
(
int
i_user2
=
0
,
n_user2
=
listUser
.
size
();
i_user2
<
n_user2
;
i_user2
++)
{
.
name
(
ParticipatorType
.
APPROVER
.
getName
())
.
type
(
ParticipatorType
.
APPROVER
.
ordinal
())
SpmkApproveExecuteRecord
aer2
=
SpmkApproveExecuteRecord
.
sts
(
ExecuteRecordSts
.
IN_EXECUTION
.
ordinal
())
.
builder
()
.
build
();
.
approveSummaryId
(
asId
)
// 新增 审批执行记录
.
name
(
ParticipatorType
.
APPROVER
.
getName
())
aer2
.
insert
();
.
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
++)
{
currentApprover
=
currentApprover
!=
""
?
currentApprover
+
","
+
listUser
.
get
(
i_user2
).
getName
():
listUser
.
get
(
i_user2
).
getName
();
SpmkExecutor
executor
=
SpmkExecutor
.
builder
()
// 当前审批人
.
approveExecuteRecordId
(
aer2
.
getId
())
SpmkApproveSummary
.
builder
().
id
(
asId
).
currentApprover
(
currentApprover
).
build
().
updateById
();
.
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
())
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
();
.
build
();
executor
.
insert
();
// 新增 审批执行记录
aer2
.
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
()
SpmkApproveSummary
.
builder
().
id
(
asId
).
currentApprover
(
listUser
.
get
(
i_user2
).
getName
()).
build
().
updateById
();
.
approveExecuteRecordId
(
aer2
.
getId
())
// 处理了 下一个审批人 则跳出循环
.
empNum
(
Integer
.
parseInt
(
listUser
.
get
(
i_user2
).
getId
()))
break
;
.
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
;
break
;
case
COPY:
case
COPY:
SpmkApproveExecuteRecord
aer3
=
SpmkApproveExecuteRecord
SpmkApproveExecuteRecord
aer3
=
SpmkApproveExecuteRecord
...
...
src/main/resources/mapping/spmk/SpmkApproveExecuteRecordMapper.xml
View file @
50fd5d6f
...
@@ -55,7 +55,8 @@
...
@@ -55,7 +55,8 @@
b.opinion SpmkExecutor_opinion,
b.opinion SpmkExecutor_opinion,
b.sts SpmkExecutor_sts,
b.sts SpmkExecutor_sts,
b.create_time SpmkExecutor_create_time,
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>
<sql
id=
"Base_Column_List_Alias"
>
<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