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
bae1750f
Commit
bae1750f
authored
Jul 06, 2022
by
龙于生
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改审批 转派可以转派多个人
parent
42b96877
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
6 deletions
+28
-6
src/main/java/cn/timer/api/controller/spmk/SpmkController.java
+2
-1
src/main/java/cn/timer/api/dto/spmk/ApprovingDto.java
+5
-0
src/main/java/cn/timer/api/utils/router/RouterUtils.java
+21
-5
No files found.
src/main/java/cn/timer/api/controller/spmk/SpmkController.java
View file @
bae1750f
...
@@ -842,7 +842,8 @@ public class SpmkController {
...
@@ -842,7 +842,8 @@ public class SpmkController {
approvingDto
.
getSts
(),
approvingDto
.
getSts
(),
approvingDto
.
getUser
(),
approvingDto
.
getUser
(),
approvingDto
.
getSignatureImg
(),
approvingDto
.
getSignatureImg
(),
userBean
.
getEmpNum
()
userBean
.
getEmpNum
(),
approvingDto
.
getUserList
()
);
);
// 更新 flowChildren
// 更新 flowChildren
...
...
src/main/java/cn/timer/api/dto/spmk/ApprovingDto.java
View file @
bae1750f
...
@@ -9,6 +9,8 @@ import lombok.Builder;
...
@@ -9,6 +9,8 @@ import lombok.Builder;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.NoArgsConstructor
;
import
java.util.List
;
@Data
@Data
@Builder
@Builder
@NoArgsConstructor
@NoArgsConstructor
...
@@ -40,4 +42,7 @@ public class ApprovingDto {
...
@@ -40,4 +42,7 @@ public class ApprovingDto {
@ApiModelProperty
(
value
=
"签字图片 "
,
example
=
"签字图片"
)
@ApiModelProperty
(
value
=
"签字图片 "
,
example
=
"签字图片"
)
private
String
signatureImg
;
private
String
signatureImg
;
@ApiModelProperty
(
value
=
"被转派人数组 "
,
example
=
"数组"
)
private
List
<
User
>
userList
;
}
}
src/main/java/cn/timer/api/utils/router/RouterUtils.java
View file @
bae1750f
...
@@ -570,7 +570,7 @@ public class RouterUtils {
...
@@ -570,7 +570,7 @@ public class RouterUtils {
* @param opinion 意见
* @param opinion 意见
* @param sts 状态 1执行中 2通过 3拒绝
* @param sts 状态 1执行中 2通过 3拒绝
*/
*/
public
static
void
approving
(
List
<
FlowChildren
>
listFlowChildren
,
Integer
asId
,
Integer
executeRecordId
,
Integer
executorId
,
String
opinion
,
Integer
sts
,
User
redeployUser
,
String
signatureImg
,
Integer
empNum
)
throws
Exception
{
public
static
void
approving
(
List
<
FlowChildren
>
listFlowChildren
,
Integer
asId
,
Integer
executeRecordId
,
Integer
executorId
,
String
opinion
,
Integer
sts
,
User
redeployUser
,
String
signatureImg
,
Integer
empNum
,
List
<
User
>
redeployUserList
)
throws
Exception
{
boolean
hasNextApprover
=
false
;
boolean
hasNextApprover
=
false
;
...
@@ -580,7 +580,7 @@ public class RouterUtils {
...
@@ -580,7 +580,7 @@ public class RouterUtils {
// 新增 执行人
// 新增 执行人
List
<
User
>
listUser
=
CollUtil
.
toList
();
List
<
User
>
listUser
=
CollUtil
.
toList
();
boolean
aobl
=
false
;
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
();
...
@@ -642,14 +642,30 @@ public class RouterUtils {
...
@@ -642,14 +642,30 @@ public class RouterUtils {
//转派 处理
//转派 处理
//在 原审批人 列表中 插入 一个被转派人(审批人)
//在 原审批人 列表中 插入 一个被转派人(审批人)
}
else
if
(
sts
==
ExecutorSts
.
REDEPLOY
.
ordinal
())
{
}
else
if
(
sts
==
ExecutorSts
.
REDEPLOY
.
ordinal
())
{
if
(
redeployUserList
.
size
()
>
0
){
List
<
User
>
users1
=
CollectionUtil
.
sub
(
listUser
,
0
,
i_user
+
1
);
for
(
User
ruser:
redeployUserList
)
{
ruser
.
setExecute
(
UNEXECUTED
);
users1
.
add
(
ruser
);
n_user
=
listUser
.
size
();
}
// List<User> users2 = CollectionUtil.sub(listUser, i_user+1, listUser.size());
// listUser = ListUtils.union(users1, users2);//并集
listR
.
get
(
0
).
setApprovalOrder
(
"1"
);
}
else
{
List
<
User
>
users1
=
CollectionUtil
.
sub
(
listUser
,
0
,
i_user
+
1
);
List
<
User
>
users1
=
CollectionUtil
.
sub
(
listUser
,
0
,
i_user
+
1
);
redeployUser
.
setExecute
(
UNEXECUTED
);
redeployUser
.
setExecute
(
UNEXECUTED
);
users1
.
add
(
redeployUser
);
users1
.
add
(
redeployUser
);
List
<
User
>
users2
=
CollectionUtil
.
sub
(
listUser
,
i_user
+
1
,
listUser
.
size
());
List
<
User
>
users2
=
CollectionUtil
.
sub
(
listUser
,
i_user
+
1
,
listUser
.
size
());
// System.out.println(users1);
// System.out.println(users2);
listUser
=
ListUtils
.
union
(
users1
,
users2
);
listUser
=
ListUtils
.
union
(
users1
,
users2
);
n_user
=
listUser
.
size
();
n_user
=
listUser
.
size
();
}
//
// System.out.println(users1);
// System.out.println(users2);
//
// System.out.println(listUser);
// System.out.println(listUser);
}
}
}
}
...
@@ -674,7 +690,7 @@ public class RouterUtils {
...
@@ -674,7 +690,7 @@ public class RouterUtils {
SpmkApproveSummary
.
builder
().
id
(
asId
).
currentApprover
(
listUser
.
get
(
i_user
).
getName
()).
build
().
updateById
();
SpmkApproveSummary
.
builder
().
id
(
asId
).
currentApprover
(
listUser
.
get
(
i_user
).
getName
()).
build
().
updateById
();
// 处理了 下一个审批人 则跳出循环
// 处理了 下一个审批人 则跳出循环
break
;
//
break;
}
}
}
}
...
...
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