|
|
@@ -74,14 +74,24 @@ public class BillBtnLogicImpl implements BillBtnLogic {
|
|
74
|
74
|
private Set<Long> DISABLED_RECALL_PROCESS_IDS;
|
|
75
|
75
|
|
|
76
|
76
|
|
|
|
77
|
+ @Value("${activiti.transfer.disable:}")
|
|
|
78
|
+ private String disableTransfer;
|
|
|
79
|
+
|
|
|
80
|
+ private Set<Long> DISABLED_Transfer_PROCESS_IDS;
|
|
|
81
|
+
|
|
77
|
82
|
@PostConstruct
|
|
78
|
83
|
public void initDisabledProcessIds() {
|
|
79
|
84
|
if(!StringUtils.isBlank(disableCancel)){
|
|
80
|
|
- DISABLED_RECALL_PROCESS_IDS = Arrays.stream(disableCancel.split(","))
|
|
81
|
|
- .map(Long::valueOf).collect(Collectors.toSet());
|
|
|
85
|
+ DISABLED_RECALL_PROCESS_IDS = Arrays.stream(disableCancel.split(",")).map(Long::valueOf).collect(Collectors.toSet());
|
|
82
|
86
|
}else {
|
|
83
|
87
|
DISABLED_RECALL_PROCESS_IDS = new HashSet<>();
|
|
84
|
88
|
}
|
|
|
89
|
+
|
|
|
90
|
+ if(!StringUtils.isBlank(disableTransfer)){
|
|
|
91
|
+ DISABLED_Transfer_PROCESS_IDS = Arrays.stream(disableTransfer.split(",")).map(Long::valueOf).collect(Collectors.toSet());
|
|
|
92
|
+ }else {
|
|
|
93
|
+ DISABLED_Transfer_PROCESS_IDS = new HashSet<>();
|
|
|
94
|
+ }
|
|
85
|
95
|
}
|
|
86
|
96
|
|
|
87
|
97
|
/**
|
|
|
@@ -100,6 +110,15 @@ public class BillBtnLogicImpl implements BillBtnLogic {
|
|
100
|
110
|
}
|
|
101
|
111
|
|
|
102
|
112
|
/**
|
|
|
113
|
+ * 检查指定流程是否允许显示转办按钮
|
|
|
114
|
+ * @param processId 流程ID
|
|
|
115
|
+ * @return true-允许显示转办按钮,false-不允许
|
|
|
116
|
+ */
|
|
|
117
|
+ private boolean isTransferButtonEnabled(long processId) {
|
|
|
118
|
+ return !DISABLED_Transfer_PROCESS_IDS.contains(processId);
|
|
|
119
|
+ }
|
|
|
120
|
+
|
|
|
121
|
+ /**
|
|
103
|
122
|
* 根据业务流程 获取 在创建 业务审批单的时候的按钮权限
|
|
104
|
123
|
*
|
|
105
|
124
|
* @param process 业务流程
|
|
|
@@ -185,8 +204,10 @@ public class BillBtnLogicImpl implements BillBtnLogic {
|
|
185
|
204
|
NodeLinkType nodeLinkType = NodeLinkType.valueOf(linkType);
|
|
186
|
205
|
switch (nodeLinkType) {
|
|
187
|
206
|
case approvl:
|
|
188
|
|
- btns = Lists.newArrayList(
|
|
189
|
|
- BillBtnConst.BTN_AGREE, BillBtnConst.BTN_TRANSFER, BillBtnConst.BTN_TRANSFER_NEW, BillBtnConst.BTN_BACK);
|
|
|
207
|
+ btns = Lists.newArrayList(BillBtnConst.BTN_AGREE, BillBtnConst.BTN_TRANSFER, BillBtnConst.BTN_BACK);
|
|
|
208
|
+ if(isTransferButtonEnabled(processId)){
|
|
|
209
|
+ btns.add(0,BillBtnConst.BTN_TRANSFER_NEW);
|
|
|
210
|
+ }
|
|
190
|
211
|
boolean isRefuseNode = nextNodeHasRefuse(processId, nodeExtend);
|
|
191
|
212
|
if (isRefuseNode) {
|
|
192
|
213
|
btns.add(1, BillBtnConst.BTN_REFUSE);
|