ludc
2025-01-15 d42f321ca241ab7f8bb3cdc71f11fe5ec4ebc48d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
package com.vci.web.dao;
 
import com.vci.corba.omd.data.LinkObject;
import com.vci.corba.wf.WFServicePrx;
import com.vci.corba.wf.data.TasksAssignedInfo;
import com.vci.dto.ProcessTemplateVO;
import com.vci.model.WFProcessClassifyDO;
import com.vci.model.WFProcessTemplateDO;
import com.vci.pagemodel.*;
import com.vci.starter.web.exception.VciBaseException;
import com.vci.starter.web.pagemodel.DataGrid;
import com.vci.starter.web.pagemodel.PageHelper;
 
import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.Map;
 
public interface WebProcessDaoI {
 
     /**
      * 获取流程分类下的流程模板
      * @param type 流程分类的名称
      * @param filterTemplate 过滤模板
      * @param showAll 是否查询全部版本(包含停用)
      * @return
      * @throws VciBaseException
      */
      List<ProcessTemplateVO> getTemplatesByType(String type, String filterTemplate, boolean showAll) throws VciBaseException;
 
     /**
      * 获取流程模板下的任务节点,以及任务节点上配置的责任人
      * @param processOid 流程模板
      * @return
      * @throws VciBaseException
      */
      List<ProcessNodeVO> getAllProcessNode(String processOid)  throws VciBaseException;
     
     /**
      * 获取流程中的第一个节点的名称
      * @param deployId 部署主键
      * @return
      * @throws VciBaseException
      */
      String getFirstNodeName(String deployId) throws VciBaseException;
     /**
      * 获取流程模板对应的流程引擎里的部署主键
      * @param processOid 流程模板主键
      * @return 
      * @throws VciBaseException
      */
      String getJbpmDeploymentId(String processOid) throws VciBaseException;
     
     /**
      * 获取流程模板对应的引擎里的部署主键
      * @param executionId
      * @return
      * @throws VciBaseException
      */
      String getJbpmDeploymentIdByExecutionId(String executionId)
                throws VciBaseException;
      
      /**
       * 获取流程模板的xml的内容
       * @param jbpmDeploymentId 流程的部署主键
       * @return xml的二进制内容
       */
      byte[] getProcessXmlContent(String jbpmDeploymentId) throws VciBaseException;
 
     /**
      * 获取流程模板中所有的节点名称
      * @param processOid 流程模板主键
      * @return
      * @throws VciBaseException
      */
      String[] getAllProcessNodeName(String processOid) throws VciBaseException;
 
     /**
      * 根据流程引擎中的部署主键来获取所有的任务节点
      * @param deploymentId
      * @return
      * @throws VciBaseException
      */
      String[] getAllProcessNodeNameByDeploy(String deploymentId)
            throws VciBaseException;
 
     /**
      * 获取模板中节点设置的负责人
      * @param deploymentId 引擎中的部署主键
      * @param taskName 任务节点名称
      * @return
      * @throws VciBaseException
      */
     ProcessNodeVO getNodePresideUsersByDeploy(String deploymentId, String taskName)
            throws VciBaseException;
 
    /**
     * 获取模板中的节点设置的负责人
     * @param processOid 流程主键
     * @param taskName 任务节点
     * @return
     * @throws VciBaseException
     */
     ProcessNodeVO getNodePresideUsers(String processOid, String taskName)
            throws VciBaseException;
    /**
     * 获取任务的处理人
     * @param executionid 执行主键
     * @param taskName 任务名称
     * @return
     * @throws VciBaseException
     */
     List<ProcessUserVO> getNodePresideUsersByTask(String executionid, String taskName) throws VciBaseException;
 
    /**
     * 获取某个用户的待办实现
     * @param conditionMap 查询条件
     * @param ph
     * @param userId 用户名-不能为空
     * @return 
     * @throws VciBaseException
     */
     DataGrid getUndoTask(
             Map<String, String> conditionMap, PageHelper ph, String userId) throws VciBaseException;
 
    /**
     * 使用流程实例获取所有的待办信息
     * @param processInstanceId 流程的实例主键
     * @param mill 时间
     * @return 待办的任务
     */
    DataGrid getUndoTaskByInstanceId(String processInstanceId,long mill);
 
    /**
     * 获取某个用户已经处理的任务
     * @param conditionMap 查询条件
     * @param ph
     * @param userId 用户名-不能为空
     * @return
     * @throws VciBaseException
     */
     DataGrid getDoneProcess(Map<String, String> conditionMap, PageHelper ph, String userId)  throws VciBaseException;
 
    /**
     * 获取已经完成的流程
     * @param conditionMap
     * @param ph
     * @param userId 用户名,为空表示所有人
     * @return
     * @throws VciBaseException
     */
     DataGrid getCompletedProcess(Map<String, String> conditionMap, PageHelper ph, String userId) throws VciBaseException;
    
    /**
     * 获取终止的流程
     * @param conditionMap
     * @param ph
     * @param userId
     * @return
     * @throws VciBaseException
     */
     DataGrid getObsoledtedProcess(Map<String, String> conditionMap, PageHelper ph, String userId) throws VciBaseException;
    
    /**
     * 获取挂起的流程
     * @param conditionMap
     * @param ph
     * @param userId
     * @return
     * @throws VciBaseException
     */
     DataGrid getSuspendedProcess(Map<String, String> conditionMap, PageHelper ph, String userId) throws VciBaseException;
    
    /**
     * 获取正在执行的流程
     * @param conditionMap
     * @param ph
     * @param userId
     * @return
     * @throws VciBaseException
     */
     DataGrid getExecutingProcess(Map<String, String> conditionMap, PageHelper ph, String userId) throws VciBaseException;
    
    /**
     * 获取某个用户发起的所有流程信息
     * @param conditionMap 
     * @param ph
     * @param userId 用户名,不能为空
     * @return
     * @throws VciBaseException
     */
     DataGrid getCreateProcess(Map<String, String> conditionMap, PageHelper ph, String userId) throws VciBaseException;
 
    /**
     * 根据待办任务的主键来获取待办任务对象
     * @param oid
     * @return
     * @throws VciBaseException
     */
     List<ProcessTaskVO> getTaskByOid(String oid) throws VciBaseException;
 
    /**
     * 还有任务的主键获取任务CBO对象
     * @param oid 主键
     * @return CBO对象
     * @throws VciBaseException 查询出错会抛出异常
     */
    List<Map> getTaskCBOByOid(String oid) throws VciBaseException;
 
    /**
     * 根据流程的主键来获取流程的对象
     * @param oid
     * @return
     * @throws VciBaseException
     */
     ProcessInstanceVO getProcessByOid(String oid) throws VciBaseException;
 
    /**
     * 获取流程中的变量,平台只支持字符串.....
     * @param executionId
     * @param key
     * @return
     * @throws VciBaseException
     */
     String getVariablesInProcess(String executionId, String key)
            throws VciBaseException;
 
    /**
     * 获取任务中关联的所有数据
     * @param taskOid 任务的主键
     * @param processOid 流程的主键
     * @param referColumns 引用的列
     * @return
     * @throws VciBaseException
     */
     DataGrid getDataByTask(String taskOid, String processOid, String referColumns) throws VciBaseException;
 
    /**
     * 获取任务关联的链接类型
     * @param taskOid 任务主键
     * @param executionId 流程执行主键
     * @return
     * @throws VciBaseException
     */
    List<LinkObject> getDataCloInTask(String taskOid, String executionId) throws VciBaseException;
 
    /**
     * 获取流程中包含的所有数据
     * @param executionId 流程执行ID
     * @param referColumns 参照的列
     * @return
     * @throws VciBaseException
     */
     DataGrid getDataByProcess(String executionId, String referColumns) throws VciBaseException;
 
    /**
     * 获取流程历史
     * @param executionId
     * @return
     * @throws VciBaseException 
     */
     List<ProcessHistoryVO> getHistory(String executionId) throws VciBaseException;
 
    /**
     * 获取流程图的二进制数据
     * @param executionId 流程执行主键
     * @param taskName 任务名称
     * @return
     */
     byte[] getProcessPicture(String executionId, String taskName)  throws VciBaseException;
 
    /**
     * 获取流程模板上的流程图的二进制数据
     * @param deployId
     * @return
     * @throws VciBaseException
     */
     byte[] getProcessTemplatePicture(String deployId)  throws VciBaseException;
 
    /**
     * 获取任务的路由
     * @param taskoid jbpm中的任务主键
     * @return
     * @throws VciBaseException
     */
     String[] getAllOutComes(String taskoid) throws VciBaseException;
 
    /**
     * 获取下一步的任务
     * @param executionid 流程执行主键
     * @param taskName 当前任务的名称
     * @param outCome 路由名称
     * @return 因为有分支的情况,所以下一步任务会有多个
     */
     String getNextTaskName(String executionid, String taskName, String outCome) throws VciBaseException;
 
/**
     * 获取平台的流程服务
     * @return
     */
    WFServicePrx getWFService() throws VciBaseException;
 
    /**
     * 任务与数据关联的链接类型
     * @return
     */
     String getTaskDataLink();
 
    /**
     * 任务的业务类型
     * @return
     */
     String getWorkitemBtmType();
 
    /**
     * 根据部署主键,获取流程模板对象
     * @param deployId 部署主键
     * @return
     * @throws VciBaseException
     */
     ProcessTemplateVO getTemplateByDeployId(String deployId) throws VciBaseException;
 
    String getWorkIntanceBtmType();
 
    /**
     * 添加流程代理--可以设置现在生效还是后续生效
     * @param userId 代理人的用户名
     * @param startDate 开始日期
     * @param endDate 结束日期
     * @param isNowEnable 是否立即生效 ----这个参数先都设置为true
     * @throws VciBaseException
     */
     void beginProxy(String userId, Date startDate, Date endDate, boolean isNowEnable) throws VciBaseException;
 
    /**
     * 停止流程代理
     * @throws VciBaseException
     */
     void endProxy() throws VciBaseException;
 
    /**
     * 获取流程代理信息
     * @return
     * @throws VciBaseException
     */
    TasksAssignedInfo getProxy() throws VciBaseException;
 
    /**
     * 结束流程
     * @param executionId
     * @throws VciBaseException
     */
    void endProcess(String executionId) throws VciBaseException;
 
    /**
     * 根据业务类型查询正在执行的流程
     * @param bussinessOid 业务类型数据
     * @param btmName 业务类型名称
     * @return
     * @throws VciBaseException
     */
    List<ProcessInstanceVO> listExecutingProcessByBussinessOid(String bussinessOid, String btmName) throws VciBaseException;
 
    /**
     * 批量终止流程,
     * @param executionIds 流程的执行主键
     * @param note 终止原因
     * @throws VciBaseException
     */
    void batchEndProcess(Collection<String> executionIds, String note) throws VciBaseException;
 
    /**
     * 流程分类的数据对象转换为显示对象
     * @param doCollection 数据对象的集合
     * @return 显示对象
     */
    List<ProcessClassifyVO>  processClassifyDO2VOs(Collection<WFProcessClassifyDO> doCollection);
 
    /**
     * 流程分类的数据对象转换为显示对象
     * @param classifyDO 数据对象
     * @return 显示对象
     */
    ProcessClassifyVO processClassifyDO2VO(WFProcessClassifyDO classifyDO);
    /**
     * 流程模板的数据对象转换为显示对象
     * @param doCollection 数据对象集合
     * @return 显示对象
     */
    List<ProcessTemplateVO> processTemplateDO2VOs(Collection<WFProcessTemplateDO> doCollection);
 
    /**
     * 流程模板的数据对象转换为显示对象
     * @param templateDO 数据对象
     * @return 显示对象
     */
    ProcessTemplateVO processTemplateDO2VO(WFProcessTemplateDO templateDO);
 
    /**
     * 使用用户名查询待办任务的个数
     * @param username 用户名
     * @return 个数
     */
    int countUndoTaskByUsername(String username);
}