Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
test
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
邬友楠
test
Commits
97ef469a
Commit
97ef469a
authored
Jan 14, 2020
by
雍欢
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
limitHandler 校验
parent
c5ac7691
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
12 deletions
+19
-12
FlowBroker.java
...ou-uasp/src/main/java/com/huigou/uasp/bpm/FlowBroker.java
+14
-8
ApprovalRuleApplicationImpl.java
...uration/application/impl/ApprovalRuleApplicationImpl.java
+4
-3
ApprovalHandlerDetailConfig.jsp
...m/configtool/approvalRule/ApprovalHandlerDetailConfig.jsp
+1
-1
No files found.
huigou-uasp/src/main/java/com/huigou/uasp/bpm/FlowBroker.java
View file @
97ef469a
...
@@ -302,7 +302,8 @@ public class FlowBroker extends BaseApplication implements TaskListener, Executi
...
@@ -302,7 +302,8 @@ public class FlowBroker extends BaseApplication implements TaskListener, Executi
return
ActivityKind
.
APPROVE
.
equalsIgnoreCase
(
procUnitId
);
return
ActivityKind
.
APPROVE
.
equalsIgnoreCase
(
procUnitId
);
}
}
/**currentGroupChiefApprovePassed
/**
* currentGroupChiefApprovePassed
* 流程通知事件处理
* 流程通知事件处理
* <ul>
* <ul>
* <li>流程实例启动事件:调用<code>onStart</code>保存业务数据和历史流程实例扩展数据。</li>
* <li>流程实例启动事件:调用<code>onStart</code>保存业务数据和历史流程实例扩展数据。</li>
...
@@ -1162,18 +1163,23 @@ public class FlowBroker extends BaseApplication implements TaskListener, Executi
...
@@ -1162,18 +1163,23 @@ public class FlowBroker extends BaseApplication implements TaskListener, Executi
* @since 1.1.3
* @since 1.1.3
*/
*/
private
boolean
isLimitHandler
(
String
procUnitId
,
Integer
groupId
,
Integer
limitHandler
)
{
private
boolean
isLimitHandler
(
String
procUnitId
,
Integer
groupId
,
Integer
limitHandler
)
{
int
procUnitHandlerCount
=
procUnitHandlerApplication
.
queryProcUnitHandlerIds
(
getBizId
(),
procUnitId
,
groupId
).
size
();
if
(
limitHandler
==
null
||
limitHandler
<
1
)
{
if
(
procUnitHandlerCount
<
2
)
{
return
false
;
return
false
;
}
}
int
procUnitHandlerCount
=
(
int
)
procUnitHandlerApplication
.
queryProcUnitHandlers
(
getBizId
(),
procUnitId
,
groupId
)
.
stream
()
.
filter
(
handler
->
CooperationModelKind
.
isChief
(
handler
.
getCooperationModelId
()))
.
count
();
// 已完成的环节处理人(主审)
// 已完成的环节处理人(主审)
List
<
ProcUnitHandler
>
completedChiefProcUnitHandlers
=
procUnitHandlerApplication
.
queryCompletedProcUnitHandlers
(
getBizId
(),
procUnitId
,
groupId
)
int
completedChiefHandlerCount
=
(
int
)
procUnitHandlerApplication
.
queryCompletedProcUnitHandlers
(
getBizId
(),
procUnitId
,
groupId
)
.
stream
()
.
stream
()
.
filter
(
handler
->
CooperationModelKind
.
isChief
(
handler
.
getCooperationModelId
()))
.
filter
(
handler
->
CooperationModelKind
.
isChief
(
handler
.
getCooperationModelId
()))
.
collect
(
Collectors
.
toList
());
.
count
();
return
limitHandler
!=
null
int
totalChiefHandlers
=
procUnitHandlerCount
+
completedChiefHandlerCount
;
&&
limitHandler
>
0
if
(
totalChiefHandlers
<
2
)
{
&&
Objects
.
equals
(
limitHandler
,
completedChiefProcUnitHandlers
.
size
());
return
false
;
}
return
Objects
.
equals
(
limitHandler
,
completedChiefHandlerCount
);
}
}
/**
/**
...
...
huigou-uasp/src/main/java/com/huigou/uasp/bpm/configuration/application/impl/ApprovalRuleApplicationImpl.java
View file @
97ef469a
...
@@ -481,7 +481,7 @@ public class ApprovalRuleApplicationImpl extends BaseApplication implements Appr
...
@@ -481,7 +481,7 @@ public class ApprovalRuleApplicationImpl extends BaseApplication implements Appr
ApprovalRuleHandlerGroup
approvalRuleHandlerGroup
=
approvalRule
.
findApprovalRuleHandlerGroup
(
sourceApprovalRuleHandler
.
getGroupId
());
ApprovalRuleHandlerGroup
approvalRuleHandlerGroup
=
approvalRule
.
findApprovalRuleHandlerGroup
(
sourceApprovalRuleHandler
.
getGroupId
());
sourceApprovalRuleHandler
.
fromEntity
(
approvalRuleHandler
);
sourceApprovalRuleHandler
.
fromEntity
(
approvalRuleHandler
);
if
(
taskExecuteMode
==
null
&&
limitHandler
==
null
)
{
if
(
taskExecuteMode
==
null
&&
limitHandler
==
null
)
{
if
(
approvalRuleHandlerGroup
!=
null
)
{
if
(
approvalRuleHandlerGroup
!=
null
)
{
approvalRule
.
getApprovalRuleHandlerGroups
().
remove
(
approvalRuleHandlerGroup
);
approvalRule
.
getApprovalRuleHandlerGroups
().
remove
(
approvalRuleHandlerGroup
);
}
}
...
@@ -500,11 +500,12 @@ public class ApprovalRuleApplicationImpl extends BaseApplication implements Appr
...
@@ -500,11 +500,12 @@ public class ApprovalRuleApplicationImpl extends BaseApplication implements Appr
approvalRuleHandlerGroup
.
setTaskExecuteMode
(
taskExecuteMode
);
approvalRuleHandlerGroup
.
setTaskExecuteMode
(
taskExecuteMode
);
}
}
if
(
limitHandler
==
null
)
{
if
(
limitHandler
==
null
)
{
if
(
approvalRuleHandlerGroup
!=
null
)
{
if
(
approvalRuleHandlerGroup
!=
null
)
{
approvalRuleHandlerGroup
.
setLimitHandler
(
null
);
approvalRuleHandlerGroup
.
setLimitHandler
(
null
);
}
}
}
else
{
}
else
{
Assert
.
isTrue
(
limitHandler
>
0
,
"最少审批人必须大于0"
);
if
(
approvalRuleHandlerGroup
==
null
)
{
if
(
approvalRuleHandlerGroup
==
null
)
{
approvalRuleHandlerGroup
=
new
ApprovalRuleHandlerGroup
();
approvalRuleHandlerGroup
=
new
ApprovalRuleHandlerGroup
();
approvalRule
.
getApprovalRuleHandlerGroups
().
add
(
approvalRuleHandlerGroup
);
approvalRule
.
getApprovalRuleHandlerGroups
().
add
(
approvalRuleHandlerGroup
);
...
...
huigou-xt/src/main/webapp/system/configtool/approvalRule/ApprovalHandlerDetailConfig.jsp
View file @
97ef469a
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
label=
"任务执行模式"
emptyOption=
"true"
fieldCol=
"4"
/>
label=
"任务执行模式"
emptyOption=
"true"
fieldCol=
"4"
/>
</div>
</div>
<div
class=
"hg-form-row"
>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"limitHandler"
label=
"最少审批人数"
spinner=
"true"
mask=
"nnn"
fieldCol=
"4"
/>
<x:inputC
name=
"limitHandler"
label=
"最少审批人数"
spinner=
"true"
mask=
"nnn"
dataOptions=
"min:1"
fieldCol=
"4"
/>
<x:inputC
name=
"groupId"
spinner=
"true"
mask=
"nnn"
<x:inputC
name=
"groupId"
spinner=
"true"
mask=
"nnn"
dataOptions=
"min:1"
required=
"true"
label=
"审批分组"
fieldCol=
"4"
/>
dataOptions=
"min:1"
required=
"true"
label=
"审批分组"
fieldCol=
"4"
/>
</div>
</div>
...
...
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