|
@@ -199,7 +199,8 @@ public class BillLogicImpl implements BillLogic {
|
199
|
199
|
final List<BillOpinionVO> opinionVOS = Lists.newArrayList();
|
200
|
200
|
String firstNodeId = StringPool.EMPTY;
|
201
|
201
|
|
202
|
|
- final List<ProcessNodeExtendEntity> taskNodes = nodeExtendService.findTaskNodeByProcess(processId);
|
|
202
|
+ final List<ProcessNodeExtendEntity> taskNodes =
|
|
203
|
+ nodeExtendService.findTaskNodeByProcess(processId);
|
203
|
204
|
if (CollectionUtil.isNotEmpty(taskNodes)) {
|
204
|
205
|
for (ProcessNodeExtendEntity taskNode : taskNodes) {
|
205
|
206
|
final String linkType = taskNode.getLinkType();
|
|
@@ -214,14 +215,17 @@ public class BillLogicImpl implements BillLogic {
|
214
|
215
|
}
|
215
|
216
|
}
|
216
|
217
|
// 获取授权信息
|
217
|
|
- final List<FormPermissionVO> permissionVOS =
|
218
|
|
- formBasicConvert.formPermissionPOtoVO(nodeFieldPermission.nodeFieldPermission(processId, firstNodeId));
|
|
218
|
+ final List<FormPermissionVO> permissionVOS = formBasicConvert.formPermissionPOtoVO(
|
|
219
|
+ nodeFieldPermission.nodeFieldPermission(processId, firstNodeId));
|
219
|
220
|
// 获取标题字段
|
220
|
221
|
final ToaProcessEntity byId = processService.getById(processId);
|
221
|
|
- final String code = DateTimeUtil.format(LocalDateTime.now(), "yyyyMMddHHmm") + RandomUtil.randomNumbers(6);
|
|
222
|
+ final String code =
|
|
223
|
+ DateTimeUtil.format(LocalDateTime.now(), "yyyyMMddHHmm") + RandomUtil.randomNumbers(
|
|
224
|
+ 6);
|
222
|
225
|
// 获取标题字段
|
223
|
226
|
|
224
|
|
- final UserInfoDTO userInfoByCode = userCenterlogic.getUserInfoByCode(loginUserHolder.getUserCode());
|
|
227
|
+ final UserInfoDTO userInfoByCode =
|
|
228
|
+ userCenterlogic.getUserInfoByCode(loginUserHolder.getUserCode());
|
225
|
229
|
final String title = billTitleLogic.getTitle(processId, userInfoByCode.getNickname());
|
226
|
230
|
final Map<String, Object> formData = bizFormData(process, userInfoByCode, title);
|
227
|
231
|
// 按钮控制
|
|
@@ -251,8 +255,9 @@ public class BillLogicImpl implements BillLogic {
|
251
|
255
|
if (bill == null) {
|
252
|
256
|
throw new RbException(StringPool.EMPTY, BillCode.BILL_NOT_FOUND);
|
253
|
257
|
}
|
254
|
|
- final BillDataJsonEntity billDataJson =
|
255
|
|
- billDataJsonService.getOne(Wrappers.lambdaQuery(BillDataJsonEntity.class).eq(BillDataJsonEntity::getBillId, billId));
|
|
258
|
+ final BillDataJsonEntity billDataJson = billDataJsonService.getOne(
|
|
259
|
+ Wrappers.lambdaQuery(BillDataJsonEntity.class)
|
|
260
|
+ .eq(BillDataJsonEntity::getBillId, billId));
|
256
|
261
|
if (null == billDataJson) {
|
257
|
262
|
throw new RbException(StringPool.EMPTY, BillCode.BILL_NOT_FOUND);
|
258
|
263
|
}
|
|
@@ -270,17 +275,28 @@ public class BillLogicImpl implements BillLogic {
|
270
|
275
|
detailBuilder.selfTaskNames(getSelfNodeName(billId, loginUserHolder.getUserCode(), page));
|
271
|
276
|
final List<BillOpinionVO> opinionVOS = billOpinions(bill);
|
272
|
277
|
final String formSchema = billDataJson.getFormSchema();
|
273
|
|
- return detailBuilder.form(formSchema).opinions(opinionVOS).title(bill.getTitle()).code(bill.getCode()).mode("edit").build();
|
|
278
|
+ return detailBuilder.form(formSchema)
|
|
279
|
+ .opinions(opinionVOS)
|
|
280
|
+ .title(bill.getTitle())
|
|
281
|
+ .code(bill.getCode())
|
|
282
|
+ .mode("edit")
|
|
283
|
+ .build();
|
274
|
284
|
}
|
275
|
285
|
|
276
|
286
|
private Set<String> getSelfNodeName(long billId, String user, String page) {
|
277
|
287
|
if (page.equals("view")) {
|
278
|
|
- List<BillTaskEntity> billTaskEntities = billTaskService.findApprovedByBillAndUser(billId, user);
|
279
|
|
- final Set<String> nodeNames = billTaskEntities.stream().map(BillTaskEntity::getNodeName).collect(Collectors.toSet());
|
|
288
|
+ List<BillTaskEntity> billTaskEntities =
|
|
289
|
+ billTaskService.findApprovedByBillAndUser(billId, user);
|
|
290
|
+ final Set<String> nodeNames = billTaskEntities.stream()
|
|
291
|
+ .map(BillTaskEntity::getNodeName)
|
|
292
|
+ .collect(Collectors.toSet());
|
280
|
293
|
return nodeNames;
|
281
|
294
|
} else {
|
282
|
|
- List<BillTaskEntity> billTaskEntities = billTaskService.findApprovingByBillAndUser(billId, user);
|
283
|
|
- final Set<String> nodeNames = billTaskEntities.stream().map(BillTaskEntity::getNodeName).collect(Collectors.toSet());
|
|
295
|
+ List<BillTaskEntity> billTaskEntities =
|
|
296
|
+ billTaskService.findApprovingByBillAndUser(billId, user);
|
|
297
|
+ final Set<String> nodeNames = billTaskEntities.stream()
|
|
298
|
+ .map(BillTaskEntity::getNodeName)
|
|
299
|
+ .collect(Collectors.toSet());
|
284
|
300
|
return nodeNames;
|
285
|
301
|
}
|
286
|
302
|
}
|
|
@@ -294,7 +310,9 @@ public class BillLogicImpl implements BillLogic {
|
294
|
310
|
if (bill == null) {
|
295
|
311
|
throw new RbException(StringPool.EMPTY, BillCode.BILL_NOT_FOUND);
|
296
|
312
|
}
|
297
|
|
- final BillDataJsonEntity billDataJson = billDataJsonService.getOne(Wrappers.lambdaQuery(BillDataJsonEntity.class).eq(BillDataJsonEntity::getBillId, billId));
|
|
313
|
+ final BillDataJsonEntity billDataJson = billDataJsonService.getOne(
|
|
314
|
+ Wrappers.lambdaQuery(BillDataJsonEntity.class)
|
|
315
|
+ .eq(BillDataJsonEntity::getBillId, billId));
|
298
|
316
|
if (null == billDataJson) {
|
299
|
317
|
throw new RbException(StringPool.EMPTY, BillCode.BILL_NOT_FOUND);
|
300
|
318
|
}
|
|
@@ -312,7 +330,11 @@ public class BillLogicImpl implements BillLogic {
|
312
|
330
|
detailBuilder.selfTaskNames(getSelfNodeName(billId, loginUserHolder.getUserCode(), page));
|
313
|
331
|
final List<BillOpinionVO> opinionVOS = billOpinions(bill);
|
314
|
332
|
final String formSchema = billDataJson.getFormSchema();
|
315
|
|
- return detailBuilder.form(formSchema).code(bill.getCode()).opinions(opinionVOS).mode("view").build();
|
|
333
|
+ return detailBuilder.form(formSchema)
|
|
334
|
+ .code(bill.getCode())
|
|
335
|
+ .opinions(opinionVOS)
|
|
336
|
+ .mode("view")
|
|
337
|
+ .build();
|
316
|
338
|
}
|
317
|
339
|
|
318
|
340
|
/**
|
|
@@ -331,8 +353,8 @@ public class BillLogicImpl implements BillLogic {
|
331
|
353
|
final String userCode = loginUserHolder.getUserCode();
|
332
|
354
|
// 不是自己发起的,记录读取
|
333
|
355
|
final String sender = bill.getSender();
|
334
|
|
- return sender.equals(userCode)
|
335
|
|
- || billReadRecordService.readBillByUserCode(billId, userCode);
|
|
356
|
+ return sender.equals(userCode) || billReadRecordService.readBillByUserCode(billId,
|
|
357
|
+ userCode);
|
336
|
358
|
}
|
337
|
359
|
|
338
|
360
|
/**
|
|
@@ -347,7 +369,8 @@ public class BillLogicImpl implements BillLogic {
|
347
|
369
|
public BillItemVO saveDrafts(long processId, long billId, String formDataJson) {
|
348
|
370
|
Preconditions.checkNotNull(formDataJson);
|
349
|
371
|
final ProcessDetailPO processDetail = this.processService.findDetailById(processId);
|
350
|
|
- final Map<String, Object> dataMap = JSON.parseObject(formDataJson, FastJsonType.MAP_OBJECT_TR);
|
|
372
|
+ final Map<String, Object> dataMap =
|
|
373
|
+ JSON.parseObject(formDataJson, FastJsonType.MAP_OBJECT_TR);
|
351
|
374
|
final BillDataContext billDataValue;
|
352
|
375
|
billDataValue = this.resolveFormData(billId, processDetail, dataMap);
|
353
|
376
|
final ToaBillEntity bill;
|
|
@@ -384,7 +407,9 @@ public class BillLogicImpl implements BillLogic {
|
384
|
407
|
* @return 数据和总数
|
385
|
408
|
*/
|
386
|
409
|
@Override
|
387
|
|
- public Pair<List<BillItemVO>, Long> findApproved(Integer pageNo, Integer pageSize, ApprovedBillQuery query) {
|
|
410
|
+ public Pair<List<BillItemVO>, Long> findApproved(
|
|
411
|
+ Integer pageNo, Integer pageSize, ApprovedBillQuery query
|
|
412
|
+ ) {
|
388
|
413
|
Page page = new Page<>(pageNo, pageSize);
|
389
|
414
|
final List<BillItemPO> billItemDtos;
|
390
|
415
|
final String userCode = loginUserHolder.getUserCode();
|
|
@@ -402,13 +427,15 @@ public class BillLogicImpl implements BillLogic {
|
402
|
427
|
* @return 数据和总数
|
403
|
428
|
*/
|
404
|
429
|
@Override
|
405
|
|
- public Pair<List<BillItemVO>, Long> findTodo(Integer pageNo, Integer pageSize, TodoBillQuery query) {
|
|
430
|
+ public Pair<List<BillItemVO>, Long> findTodo(
|
|
431
|
+ Integer pageNo, Integer pageSize, TodoBillQuery query
|
|
432
|
+ ) {
|
406
|
433
|
Page page = new Page(pageNo, pageSize);
|
407
|
|
- List<Integer> statusList = Lists.newArrayList(
|
408
|
|
- BillStatus.APPROVAL.getStatus(), BillStatus.REFUSE.getStatus()
|
409
|
|
- );
|
|
434
|
+ List<Integer> statusList =
|
|
435
|
+ Lists.newArrayList(BillStatus.APPROVAL.getStatus(), BillStatus.REFUSE.getStatus());
|
410
|
436
|
final String userCode = loginUserHolder.getUserCode();
|
411
|
|
- final List<BillItemPO> billDatas = this.billService.findTodoByStatus(page, userCode, query, statusList);
|
|
437
|
+ final List<BillItemPO> billDatas =
|
|
438
|
+ this.billService.findTodoByStatus(page, userCode, query, statusList);
|
412
|
439
|
final Page<BillItemVO> billItemVOPage = toItemVOList(page, billDatas, userCode);
|
413
|
440
|
return Pair.of(billItemVOPage.getRecords(), billItemVOPage.getTotal());
|
414
|
441
|
}
|
|
@@ -422,10 +449,13 @@ public class BillLogicImpl implements BillLogic {
|
422
|
449
|
* @return 数据和总数
|
423
|
450
|
*/
|
424
|
451
|
@Override
|
425
|
|
- public Pair<List<BillItemVO>, Long> findMeCreate(Integer pageNo, Integer pageSize, MeCreateBillQuery query) {
|
|
452
|
+ public Pair<List<BillItemVO>, Long> findMeCreate(
|
|
453
|
+ Integer pageNo, Integer pageSize, MeCreateBillQuery query
|
|
454
|
+ ) {
|
426
|
455
|
Page page = new Page(pageNo, pageSize);
|
427
|
456
|
final String userCode = loginUserHolder.getUserCode();
|
428
|
|
- final List<BillItemPO> billDatas = this.billService.findCreateByEmployee(page, userCode, query);
|
|
457
|
+ final List<BillItemPO> billDatas =
|
|
458
|
+ this.billService.findCreateByEmployee(page, userCode, query);
|
429
|
459
|
final Page<BillItemVO> billItemVOPage = toItemVOList(page, billDatas, userCode);
|
430
|
460
|
return Pair.of(billItemVOPage.getRecords(), billItemVOPage.getTotal());
|
431
|
461
|
}
|
|
@@ -439,10 +469,13 @@ public class BillLogicImpl implements BillLogic {
|
439
|
469
|
* @return 数据和总数
|
440
|
470
|
*/
|
441
|
471
|
@Override
|
442
|
|
- public Pair<List<BillItemVO>, Long> findDraft(Integer pageNo, Integer pageSize, DraftBillQuery query) {
|
|
472
|
+ public Pair<List<BillItemVO>, Long> findDraft(
|
|
473
|
+ Integer pageNo, Integer pageSize, DraftBillQuery query
|
|
474
|
+ ) {
|
443
|
475
|
Page page = new Page(pageNo, pageSize);
|
444
|
476
|
final String userCode = loginUserHolder.getUserCode();
|
445
|
|
- final List<BillItemPO> billDatas = this.billService.findDraftsBySender(page, userCode, query);
|
|
477
|
+ final List<BillItemPO> billDatas =
|
|
478
|
+ this.billService.findDraftsBySender(page, userCode, query);
|
446
|
479
|
final Page<BillItemVO> billItemVOPage = toItemVOList(page, billDatas, userCode);
|
447
|
480
|
return Pair.of(billItemVOPage.getRecords(), billItemVOPage.getTotal());
|
448
|
481
|
}
|
|
@@ -456,7 +489,9 @@ public class BillLogicImpl implements BillLogic {
|
456
|
489
|
* @return 数据和总数
|
457
|
490
|
*/
|
458
|
491
|
@Override
|
459
|
|
- public Pair<List<BillItemVO>, Long> findCc(Integer pageNo, Integer pageSize, CcBillQuery query) {
|
|
492
|
+ public Pair<List<BillItemVO>, Long> findCc(
|
|
493
|
+ Integer pageNo, Integer pageSize, CcBillQuery query
|
|
494
|
+ ) {
|
460
|
495
|
Page page = new Page(pageNo, pageSize);
|
461
|
496
|
final String userCode = loginUserHolder.getUserCode();
|
462
|
497
|
final List<BillItemPO> cc = this.billService.findCc(page, userCode, query);
|
|
@@ -474,11 +509,13 @@ public class BillLogicImpl implements BillLogic {
|
474
|
509
|
*/
|
475
|
510
|
@Override
|
476
|
511
|
@Transactional(rollbackFor = Exception.class)
|
477
|
|
- public BillItemVO startFlow(long processId, long billId, String formDataJson,
|
478
|
|
- String nextApprover, String billCode) {
|
|
512
|
+ public BillItemVO startFlow(
|
|
513
|
+ long processId, long billId, String formDataJson, String nextApprover, String billCode
|
|
514
|
+ ) {
|
479
|
515
|
Preconditions.checkNotNull(formDataJson);
|
480
|
516
|
final ProcessDetailPO processDetail = processService.findDetailById(processId);
|
481
|
|
- final Map<String, Object> dataMap = JSON.parseObject(formDataJson, FastJsonType.MAP_OBJECT_TR);
|
|
517
|
+ final Map<String, Object> dataMap =
|
|
518
|
+ JSON.parseObject(formDataJson, FastJsonType.MAP_OBJECT_TR);
|
482
|
519
|
final String userCode = loginUserHolder.getUserCode();
|
483
|
520
|
final UserInfoDTO userInfoDTO = userCenterlogic.getUserInfoByCode(userCode);
|
484
|
521
|
final BillDataContext billDataValue;
|
|
@@ -526,9 +563,9 @@ public class BillLogicImpl implements BillLogic {
|
526
|
563
|
} else {
|
527
|
564
|
bill.setTitle(title);
|
528
|
565
|
}
|
529
|
|
- if (!Strings.isNullOrEmpty(code)) {
|
|
566
|
+ if (!Strings.isNullOrEmpty(code) && Strings.isNullOrEmpty(bill.getCode())) {
|
530
|
567
|
bill.setCode(code);
|
531
|
|
- } else {
|
|
568
|
+ } else if (Strings.isNullOrEmpty(bill.getCode())) {
|
532
|
569
|
// 生成默认流水号
|
533
|
570
|
final String billCodeText = serialNumberLogic.dayPolling("bill_default_sn", 6);
|
534
|
571
|
String codeText = StrUtil.format("{}", billCodeText);
|
|
@@ -546,11 +583,12 @@ public class BillLogicImpl implements BillLogic {
|
546
|
583
|
//找到审批中的节点,然后把排序前移
|
547
|
584
|
final BillTaskEntity byId = billTaskService.getById(sourceTaskId);
|
548
|
585
|
final String taskId = byId.getTaskId();
|
549
|
|
- final List<BillTaskEntity> approvingByBillAndTaskId = billTaskService.findApprovingByBillAndTaskId(billId, taskId);
|
|
586
|
+ final List<BillTaskEntity> approvingByBillAndTaskId =
|
|
587
|
+ billTaskService.findApprovingByBillAndTaskId(billId, taskId);
|
550
|
588
|
for (BillTaskEntity billTaskEntity : approvingByBillAndTaskId) {
|
551
|
589
|
billTaskEntity.setSort(DateTimeUtil.timeMills());
|
552
|
590
|
}
|
553
|
|
-// approvingByBillAndTaskId.add(createTaskByBill);
|
|
591
|
+ // approvingByBillAndTaskId.add(createTaskByBill);
|
554
|
592
|
byId.setId(null);
|
555
|
593
|
byId.setOpinion(null);
|
556
|
594
|
byId.setNodeStatus(BillTaskStatus.APPROVAL.getStatus());
|
|
@@ -571,7 +609,8 @@ public class BillLogicImpl implements BillLogic {
|
571
|
609
|
}
|
572
|
610
|
// 先发起流程
|
573
|
611
|
final Optional<ProcessInstance> processInstanceOpt;
|
574
|
|
- processInstanceOpt = billBpmnLogic.startFlow(billDataValue, processDetail, userInfoDTO, nextApprover);
|
|
612
|
+ processInstanceOpt =
|
|
613
|
+ billBpmnLogic.startFlow(billDataValue, processDetail, userInfoDTO, nextApprover);
|
575
|
614
|
if (processInstanceOpt.isPresent()) {
|
576
|
615
|
final ProcessInstance processInstance = processInstanceOpt.get();
|
577
|
616
|
final boolean state;
|
|
@@ -603,7 +642,7 @@ public class BillLogicImpl implements BillLogic {
|
603
|
642
|
bill.setStatus(BillStatus.APPROVAL.getStatus());
|
604
|
643
|
state = billService.updateById(bill);
|
605
|
644
|
// 取得审批任务信息进行更新
|
606
|
|
-// billTaskService.updateByReFullIn(billId, userInfoDTO.getCode());
|
|
645
|
+ // billTaskService.updateByReFullIn(billId, userInfoDTO.getCode());
|
607
|
646
|
break;
|
608
|
647
|
}
|
609
|
648
|
default:
|
|
@@ -622,7 +661,9 @@ public class BillLogicImpl implements BillLogic {
|
622
|
661
|
}
|
623
|
662
|
}
|
624
|
663
|
|
625
|
|
- private ValidationResultDTO validationBySubmitFlow(ProcessDetailPO processDetail, BillDataContext billDataValue, String userCode) {
|
|
664
|
+ private ValidationResultDTO validationBySubmitFlow(
|
|
665
|
+ ProcessDetailPO processDetail, BillDataContext billDataValue, String userCode
|
|
666
|
+ ) {
|
626
|
667
|
final BillValidationLogic validationService = getValidationService(processDetail.getId());
|
627
|
668
|
return validataionWithResult(billDataValue, userCode, validationService);
|
628
|
669
|
}
|
|
@@ -635,15 +676,18 @@ public class BillLogicImpl implements BillLogic {
|
635
|
676
|
* @return 审批单
|
636
|
677
|
*/
|
637
|
678
|
@Override
|
638
|
|
- public BillItemVO sendProcess(long billId, long processId,
|
639
|
|
- String nextApprover) {
|
|
679
|
+ public BillItemVO sendProcess(
|
|
680
|
+ long billId, long processId, String nextApprover
|
|
681
|
+ ) {
|
640
|
682
|
final ToaBillEntity bill = billService.getById(billId);
|
641
|
683
|
if (bill == null) {
|
642
|
684
|
throw new RbException(BillCode.BILL_NOT_FOUND);
|
643
|
685
|
}
|
644
|
686
|
// 去掉草稿箱的判断,通过具体执行函数来判断
|
645
|
687
|
|
646
|
|
- final BillDataJsonEntity billDataJson = billDataJsonService.getOne(Wrappers.lambdaQuery(BillDataJsonEntity.class).eq(BillDataJsonEntity::getBillId, billId));
|
|
688
|
+ final BillDataJsonEntity billDataJson = billDataJsonService.getOne(
|
|
689
|
+ Wrappers.lambdaQuery(BillDataJsonEntity.class)
|
|
690
|
+ .eq(BillDataJsonEntity::getBillId, billId));
|
647
|
691
|
final String formData = billDataJson.getFormData();
|
648
|
692
|
return this.startFlow(processId, billId, formData, nextApprover, StrUtil.EMPTY);
|
649
|
693
|
}
|
|
@@ -674,7 +718,8 @@ public class BillLogicImpl implements BillLogic {
|
674
|
718
|
eventBus.post(billAgreeEvent);
|
675
|
719
|
case APPROVAL: {
|
676
|
720
|
final Optional<BillTaskEntity> taskOpt;
|
677
|
|
- taskOpt = billBpmnLogic.findTaskBybillAndEmployeeAndTaskId(billId, taskId, userCode);
|
|
721
|
+ taskOpt =
|
|
722
|
+ billBpmnLogic.findTaskBybillAndEmployeeAndTaskId(billId, taskId, userCode);
|
678
|
723
|
if (taskOpt.isPresent()) {
|
679
|
724
|
BillTaskEntity billTask = taskOpt.get();
|
680
|
725
|
billTask.setOpinion(opinion);
|
|
@@ -692,14 +737,21 @@ public class BillLogicImpl implements BillLogic {
|
692
|
737
|
final boolean goFlag = agreeIsGoOn(billTask);
|
693
|
738
|
flowMsgLogic.sendMsg(Lists.newArrayList(billTask));
|
694
|
739
|
if (goFlag) {
|
695
|
|
- this.billTaskService.agreeTask(billTask, userCode, actionParam);
|
696
|
|
- this.billItemLogic.updateByFormDataByBill(billId, actionParam.getFormData());
|
|
740
|
+ this.billTaskService.agreeTask(billTask, userCode,
|
|
741
|
+ actionParam);
|
|
742
|
+ this.billItemLogic.updateByFormDataByBill(billId,
|
|
743
|
+ actionParam.getFormData());
|
697
|
744
|
//删除待审批的信息
|
698
|
|
- this.billTaskService.deleteApproval(billTask.getBillId(), billTask.getTaskId(), BillTaskStatus.APPROVAL.getStatus());
|
699
|
|
- this.billBpmnLogic.complete(bill, taskId, opinion, userCode, nextApprover, actionParam.getFormData(), billTask.getTaskNodeKey(), billTask.getTaskId());
|
|
745
|
+ this.billTaskService.deleteApproval(billTask.getBillId(),
|
|
746
|
+ billTask.getTaskId(),
|
|
747
|
+ BillTaskStatus.APPROVAL.getStatus());
|
|
748
|
+ this.billBpmnLogic.complete(bill, taskId, opinion, userCode,
|
|
749
|
+ nextApprover, actionParam.getFormData(),
|
|
750
|
+ billTask.getTaskNodeKey(), billTask.getTaskId());
|
700
|
751
|
|
701
|
752
|
} else {
|
702
|
|
- this.billTaskService.agreeTask(billTask, userCode, actionParam);
|
|
753
|
+ this.billTaskService.agreeTask(billTask, userCode,
|
|
754
|
+ actionParam);
|
703
|
755
|
}
|
704
|
756
|
break;
|
705
|
757
|
case AGREE:
|
|
@@ -713,12 +765,17 @@ public class BillLogicImpl implements BillLogic {
|
713
|
765
|
switch (billTaskStatus) {
|
714
|
766
|
case APPROVAL:
|
715
|
767
|
//加签处理,需要把当前审批人在当前节点的所有加签任务都审批通过
|
716
|
|
- List<BillTaskEntity> billTaskEntities = billTaskService.findEndorseByUserAndTaskId(billId, taskId, userCode);
|
|
768
|
+ List<BillTaskEntity> billTaskEntities =
|
|
769
|
+ billTaskService.findEndorseByUserAndTaskId(billId,
|
|
770
|
+ taskId, userCode);
|
717
|
771
|
List<BillTaskEntity> updates = Lists.newArrayList();
|
718
|
772
|
List<BillTaskEntity> inserts = Lists.newArrayList();
|
719
|
773
|
for (BillTaskEntity billTaskEntity : billTaskEntities) {
|
720
|
|
- final BillTaskEntity newBillTask = BeanUtil.sourceToTarget(billTask, BillTaskEntity.class);
|
721
|
|
- billTaskEntity.setNodeStatus(BillTaskStatus.AGREE.getStatus());
|
|
774
|
+ final BillTaskEntity newBillTask =
|
|
775
|
+ BeanUtil.sourceToTarget(billTask,
|
|
776
|
+ BillTaskEntity.class);
|
|
777
|
+ billTaskEntity.setNodeStatus(
|
|
778
|
+ BillTaskStatus.AGREE.getStatus());
|
722
|
779
|
billTaskEntity.setDateline(DateTimeUtil.unixTime());
|
723
|
780
|
billTaskEntity.setUpdateTime(LocalDateTime.now());
|
724
|
781
|
billTaskEntity.setOpinion(actionParam.getOpinion());
|
|
@@ -787,15 +844,16 @@ public class BillLogicImpl implements BillLogic {
|
787
|
844
|
final int status = MoreObjects.firstNonNull(bill.getStatus(), 0);
|
788
|
845
|
BillStatus billStatus = BillStatus.valueTo(status);
|
789
|
846
|
switch (billStatus) {
|
790
|
|
-// case REFUSE:
|
791
|
|
-// //当前审批单是拒绝状态才会走这里
|
792
|
|
-// BillRefuseEvent billAgreeEvent = new BillRefuseEvent();
|
793
|
|
-// billAgreeEvent.setBillId(billId);
|
794
|
|
-// billAgreeEvent.setProcessId(bill.getProcessId());
|
795
|
|
-// eventBus.post(billAgreeEvent);
|
|
847
|
+ // case REFUSE:
|
|
848
|
+ // //当前审批单是拒绝状态才会走这里
|
|
849
|
+ // BillRefuseEvent billAgreeEvent = new BillRefuseEvent();
|
|
850
|
+ // billAgreeEvent.setBillId(billId);
|
|
851
|
+ // billAgreeEvent.setProcessId(bill.getProcessId());
|
|
852
|
+ // eventBus.post(billAgreeEvent);
|
796
|
853
|
case APPROVAL: {
|
797
|
854
|
final Optional<BillTaskEntity> taskOpt;
|
798
|
|
- taskOpt = billBpmnLogic.findTaskBybillAndEmployeeAndTaskId(billId, taskId, userCode);
|
|
855
|
+ taskOpt =
|
|
856
|
+ billBpmnLogic.findTaskBybillAndEmployeeAndTaskId(billId, taskId, userCode);
|
799
|
857
|
if (taskOpt.isPresent()) {
|
800
|
858
|
BillTaskEntity task = taskOpt.get();
|
801
|
859
|
final int taskNodeStatus = task.getNodeStatus();
|
|
@@ -805,10 +863,13 @@ public class BillLogicImpl implements BillLogic {
|
805
|
863
|
refuseApproval(taskId, opinion, bill, userCode, task);
|
806
|
864
|
// 更新提交的formdata
|
807
|
865
|
final String formData = actionParam.getFormData();
|
808
|
|
- if (!Strings.isNullOrEmpty(formData) && !org.apache.commons.lang3.StringUtils.equals("{}", formData)) {
|
|
866
|
+ if (!Strings.isNullOrEmpty(
|
|
867
|
+ formData) && !org.apache.commons.lang3.StringUtils.equals("{}",
|
|
868
|
+ formData)) {
|
809
|
869
|
this.billItemLogic.updateByFormDataByBill(billId, formData);
|
810
|
870
|
}
|
811
|
|
- billTaskService.deleteApproval(task.getBillId(), task.getTaskId(), BillTaskStatus.APPROVAL.getStatus());
|
|
871
|
+ billTaskService.deleteApproval(task.getBillId(), task.getTaskId(),
|
|
872
|
+ BillTaskStatus.APPROVAL.getStatus());
|
812
|
873
|
break;
|
813
|
874
|
case AGREE:
|
814
|
875
|
case REFUSE:
|
|
@@ -850,16 +911,18 @@ public class BillLogicImpl implements BillLogic {
|
850
|
911
|
final ToaBillEntity byId = billService.getById(billId);
|
851
|
912
|
billService.upldate(bill);
|
852
|
913
|
if (action.equals(BillAction.refuse.name())) {
|
853
|
|
- callBackLogic.callBack(byId.getProcessId(), billId, BillTaskStatus.REFUSE.getStatus());
|
|
914
|
+ callBackLogic.callBack(byId.getProcessId(), billId,
|
|
915
|
+ BillTaskStatus.REFUSE.getStatus());
|
854
|
916
|
} else {
|
855
|
|
- BillTaskEntity a = new BillTaskEntity();
|
856
|
|
- a.setBillId(byId.getId());
|
857
|
|
- a.setUserCode(byId.getSender());
|
858
|
|
- a.setNodeStatus(BillTaskStatus.COMPLATE.getStatus());
|
859
|
|
- a.setNodeName(byId.getTitle());
|
860
|
|
- a.setOpinion("通过");
|
861
|
|
- flowMsgLogic.sendMsg(Lists.newArrayList(a));
|
862
|
|
- callBackLogic.callBack(byId.getProcessId(), billId, BillStatus.COMPLETE.getStatus());
|
|
917
|
+ BillTaskEntity a = new BillTaskEntity();
|
|
918
|
+ a.setBillId(byId.getId());
|
|
919
|
+ a.setUserCode(byId.getSender());
|
|
920
|
+ a.setNodeStatus(BillTaskStatus.COMPLATE.getStatus());
|
|
921
|
+ a.setNodeName(byId.getTitle());
|
|
922
|
+ a.setOpinion("通过");
|
|
923
|
+ flowMsgLogic.sendMsg(Lists.newArrayList(a));
|
|
924
|
+ callBackLogic.callBack(byId.getProcessId(), billId,
|
|
925
|
+ BillStatus.COMPLETE.getStatus());
|
863
|
926
|
}
|
864
|
927
|
}
|
865
|
928
|
};
|
|
@@ -879,15 +942,20 @@ public class BillLogicImpl implements BillLogic {
|
879
|
942
|
throw new RbException(BillCode.BILL_NOT_FOUND);
|
880
|
943
|
}
|
881
|
944
|
final List<BillApprovalHistoryPO> byBill = billTaskService.findByBill(bill);
|
882
|
|
- final Set<String> userCodes = byBill.stream().map(BillApprovalHistoryPO::getUserCode).collect(Collectors.toSet());
|
883
|
|
- final Set<String> userCodes1 = byBill.stream().map(BillApprovalHistoryPO::getSourceUserCode).collect(Collectors.toSet());
|
884
|
|
- final Set<String> userCodes2 = byBill.stream().map(BillApprovalHistoryPO::getTargetUserCode).collect(Collectors.toSet());
|
|
945
|
+ final Set<String> userCodes =
|
|
946
|
+ byBill.stream().map(BillApprovalHistoryPO::getUserCode).collect(Collectors.toSet());
|
|
947
|
+ final Set<String> userCodes1 = byBill.stream()
|
|
948
|
+ .map(BillApprovalHistoryPO::getSourceUserCode)
|
|
949
|
+ .collect(Collectors.toSet());
|
|
950
|
+ final Set<String> userCodes2 = byBill.stream()
|
|
951
|
+ .map(BillApprovalHistoryPO::getTargetUserCode)
|
|
952
|
+ .collect(Collectors.toSet());
|
885
|
953
|
userCodes.addAll(userCodes1);
|
886
|
954
|
userCodes.addAll(userCodes2);
|
887
|
955
|
final List<UserInfoDTO> userInfoDTOS = userCenterlogic.getUserByCodes(userCodes);
|
888
|
956
|
if (CollectionUtil.isNotEmpty(userInfoDTOS)) {
|
889
|
|
- final Map<String, String> codeNameMap =
|
890
|
|
- userInfoDTOS.stream().collect(Collectors.toMap(UserInfoDTO::getCode, UserInfoDTO::getNickname));
|
|
957
|
+ final Map<String, String> codeNameMap = userInfoDTOS.stream()
|
|
958
|
+ .collect(Collectors.toMap(UserInfoDTO::getCode, UserInfoDTO::getNickname));
|
891
|
959
|
for (BillApprovalHistoryPO billApprovalHistoryPO : byBill) {
|
892
|
960
|
final String userCode = billApprovalHistoryPO.getUserCode();
|
893
|
961
|
final String name = codeNameMap.get(userCode);
|
|
@@ -900,19 +968,21 @@ public class BillLogicImpl implements BillLogic {
|
900
|
968
|
if (!Strings.isNullOrEmpty(targetUserCode)) {
|
901
|
969
|
billApprovalHistoryPO.setTargetUserName(codeNameMap.get(targetUserCode));
|
902
|
970
|
}
|
903
|
|
- if (billApprovalHistoryPO.getTaskType().compareTo(BillTaskType.SKIP.getValue()) == 0) {
|
|
971
|
+ if (billApprovalHistoryPO.getTaskType()
|
|
972
|
+ .compareTo(BillTaskType.SKIP.getValue()) == 0) {
|
904
|
973
|
billApprovalHistoryPO.setUserName(Const.SKIP_OPTION);
|
905
|
974
|
}
|
906
|
975
|
}
|
907
|
976
|
}
|
908
|
|
- final List<BillApprovalHistoryPO> result =
|
909
|
|
- byBill.stream().sorted(Comparator.comparing(BillApprovalHistoryPO::getSort, (x, y) -> {
|
|
977
|
+ final List<BillApprovalHistoryPO> result = byBill.stream()
|
|
978
|
+ .sorted(Comparator.comparing(BillApprovalHistoryPO::getSort, (x, y) -> {
|
910
|
979
|
if (x <= y) {
|
911
|
980
|
return -1;
|
912
|
981
|
} else {
|
913
|
982
|
return 1;
|
914
|
983
|
}
|
915
|
|
- })).collect(Collectors.toList());
|
|
984
|
+ }))
|
|
985
|
+ .collect(Collectors.toList());
|
916
|
986
|
return billBasicConvert.billApprovalHistoryPOToVO(result);
|
917
|
987
|
}
|
918
|
988
|
|
|
@@ -939,7 +1009,9 @@ public class BillLogicImpl implements BillLogic {
|
939
|
1009
|
billBpmnLogic.recall(bill, taskId, opinion, userCode);
|
940
|
1010
|
}
|
941
|
1011
|
|
942
|
|
- private void refuseApproval(String taskId, String opinion, ToaBillEntity bill, String userCode, BillTaskEntity task) {
|
|
1012
|
+ private void refuseApproval(
|
|
1013
|
+ String taskId, String opinion, ToaBillEntity bill, String userCode, BillTaskEntity task
|
|
1014
|
+ ) {
|
943
|
1015
|
final Optional<ProcessNodeExtendEntity> nodeExtendOpt;
|
944
|
1016
|
final Long processId = bill.getProcessId();
|
945
|
1017
|
final String taskNodeKey = task.getTaskNodeKey();
|
|
@@ -962,14 +1034,14 @@ public class BillLogicImpl implements BillLogic {
|
962
|
1034
|
task.setOpinion(opinion);
|
963
|
1035
|
task.setDateline(dateline);
|
964
|
1036
|
task.setAction(BillAction.refuse.name());
|
965
|
|
-// bill.setStatus(BillStatus.REFUSE.getStatus());
|
966
|
|
-// bill.setUpdateTime(LocalDateTime.now());
|
|
1037
|
+ // bill.setStatus(BillStatus.REFUSE.getStatus());
|
|
1038
|
+ // bill.setUpdateTime(LocalDateTime.now());
|
967
|
1039
|
//推送消息
|
968
|
1040
|
List<BillTaskEntity> sends = Lists.newArrayList();
|
969
|
1041
|
sends.add(task);
|
970
|
1042
|
flowMsgLogic.sendMsg(sends);
|
971
|
1043
|
billTaskService.updateById(task);
|
972
|
|
-// billService.updateById(bill);
|
|
1044
|
+ // billService.updateById(bill);
|
973
|
1045
|
billReadRecordService.deleteByBillAndEmployeeId(bill.getId(), userCode);
|
974
|
1046
|
billBpmnLogic.refuse(bill, taskId, opinion, userCode);
|
975
|
1047
|
break;
|
|
@@ -987,7 +1059,8 @@ public class BillLogicImpl implements BillLogic {
|
987
|
1059
|
final String taskId = billTask.getTaskId();
|
988
|
1060
|
final Long billId = billTask.getBillId();
|
989
|
1061
|
final Long approverId = billTask.getNodeApproverId();
|
990
|
|
- final ProcessNodeApproverEntity nodeApprover = nodeApproverService.getByIdExludDel(approverId);
|
|
1062
|
+ final ProcessNodeApproverEntity nodeApprover =
|
|
1063
|
+ nodeApproverService.getByIdExludDel(approverId);
|
991
|
1064
|
if (Objects.isNull(nodeApprover)) {
|
992
|
1065
|
//默认全部审批通过才能往下走
|
993
|
1066
|
final int percentage = 100;
|
|
@@ -995,7 +1068,8 @@ public class BillLogicImpl implements BillLogic {
|
995
|
1068
|
int total = billTaskService.findTotalCount(billId, taskId, billTask.getTaskType());
|
996
|
1069
|
final BigDecimal val1 = BigDecimal.valueOf(countActive + 1);
|
997
|
1070
|
final BigDecimal val2 = BigDecimal.valueOf(total);
|
998
|
|
- final BigDecimal val3 = val1.divide(val2, 4, BigDecimal.ROUND_DOWN).multiply(BigDecimal.valueOf(100));
|
|
1071
|
+ final BigDecimal val3 =
|
|
1072
|
+ val1.divide(val2, 4, BigDecimal.ROUND_DOWN).multiply(BigDecimal.valueOf(100));
|
999
|
1073
|
final BigDecimal val4 = BigDecimal.valueOf(percentage);
|
1000
|
1074
|
return val3.compareTo(val4) >= 0 ? true : false;
|
1001
|
1075
|
}
|
|
@@ -1018,7 +1092,8 @@ public class BillLogicImpl implements BillLogic {
|
1018
|
1092
|
int total = billTaskService.findTotalCount(billId, taskId, billTask.getTaskType());
|
1019
|
1093
|
final BigDecimal val1 = BigDecimal.valueOf(countActive + 1);
|
1020
|
1094
|
final BigDecimal val2 = BigDecimal.valueOf(total);
|
1021
|
|
- final BigDecimal val3 = val1.divide(val2, 4, BigDecimal.ROUND_DOWN).multiply(BigDecimal.valueOf(100));
|
|
1095
|
+ final BigDecimal val3 =
|
|
1096
|
+ val1.divide(val2, 4, BigDecimal.ROUND_DOWN).multiply(BigDecimal.valueOf(100));
|
1022
|
1097
|
final BigDecimal val4 = BigDecimal.valueOf(percentage);
|
1023
|
1098
|
return val3.compareTo(val4) >= 0 ? true : false;
|
1024
|
1099
|
}
|
|
@@ -1032,7 +1107,8 @@ public class BillLogicImpl implements BillLogic {
|
1032
|
1107
|
final Set<String> userCodes =
|
1033
|
1108
|
billDatas.stream().map(BillItemPO::getSender).collect(Collectors.toSet());
|
1034
|
1109
|
final List<UserInfoDTO> userInfoDTOS = userCenterlogic.getUserByCodes(userCodes);
|
1035
|
|
- final Map<String, String> codeNameMap = userInfoDTOS.stream().collect(Collectors.toMap(UserInfoDTO::getCode, a -> a.getNickname()));
|
|
1110
|
+ final Map<String, String> codeNameMap = userInfoDTOS.stream()
|
|
1111
|
+ .collect(Collectors.toMap(UserInfoDTO::getCode, a -> a.getNickname()));
|
1036
|
1112
|
if (CollectionUtil.isNotEmpty(userInfoDTOS)) {
|
1037
|
1113
|
for (BillItemPO billData : billDatas) {
|
1038
|
1114
|
final String sender = billData.getSender();
|
|
@@ -1052,7 +1128,10 @@ public class BillLogicImpl implements BillLogic {
|
1052
|
1128
|
return resultPage;
|
1053
|
1129
|
}
|
1054
|
1130
|
|
1055
|
|
- private ToaBillEntity createBill(ProcessDetailPO processDetail, BillStatus billStatus, BillDataContext billDataValue, UserInfoDTO userInfoDTO) {
|
|
1131
|
+ private ToaBillEntity createBill(
|
|
1132
|
+ ProcessDetailPO processDetail, BillStatus billStatus, BillDataContext billDataValue,
|
|
1133
|
+ UserInfoDTO userInfoDTO
|
|
1134
|
+ ) {
|
1056
|
1135
|
ToaBillEntity bill = new ToaBillEntity();
|
1057
|
1136
|
bill.setId(billDataValue.getId());
|
1058
|
1137
|
bill.setProcessId(processDetail.getId());
|
|
@@ -1082,7 +1161,7 @@ public class BillLogicImpl implements BillLogic {
|
1082
|
1161
|
final String username = userInfoDTO.getNickname();
|
1083
|
1162
|
// 生成默认流水号
|
1084
|
1163
|
final String billCode = serialNumberLogic.dayPolling("bill_default_sn", 6);
|
1085
|
|
-// String codeText = StrUtil.format("{}-{}-{}-{}", processName, username, day, billCode);
|
|
1164
|
+ // String codeText = StrUtil.format("{}-{}-{}-{}", processName, username, day, billCode);
|
1086
|
1165
|
String codeText = StrUtil.format("{}", billCode);
|
1087
|
1166
|
bill.setCode(codeText);
|
1088
|
1167
|
} else {
|
|
@@ -1102,7 +1181,9 @@ public class BillLogicImpl implements BillLogic {
|
1102
|
1181
|
* @return 解析后的表单数据
|
1103
|
1182
|
*/
|
1104
|
1183
|
@Override
|
1105
|
|
- public BillDataContext resolveFormData(long billId, ProcessDetailPO processDetail, Map<String, Object> formDataMap) {
|
|
1184
|
+ public BillDataContext resolveFormData(
|
|
1185
|
+ long billId, ProcessDetailPO processDetail, Map<String, Object> formDataMap
|
|
1186
|
+ ) {
|
1106
|
1187
|
|
1107
|
1188
|
long processId = processDetail.getId();
|
1108
|
1189
|
|
|
@@ -1142,7 +1223,8 @@ public class BillLogicImpl implements BillLogic {
|
1142
|
1223
|
switch (formXtype) {
|
1143
|
1224
|
case triggerselect: {
|
1144
|
1225
|
final Pair<List<BillAssociatedVO>, List<BillBizDataEntity>> selectVal;
|
1145
|
|
- selectVal = billItemLogic.formTriggerselectValue(formDataMap, formFieldVO, newBillId);
|
|
1226
|
+ selectVal = billItemLogic.formTriggerselectValue(formDataMap, formFieldVO,
|
|
1227
|
+ newBillId);
|
1146
|
1228
|
associateds.addAll(selectVal.getKey());
|
1147
|
1229
|
bizDataList.addAll(selectVal.getValue());
|
1148
|
1230
|
break;
|
|
@@ -1183,8 +1265,10 @@ public class BillLogicImpl implements BillLogic {
|
1183
|
1265
|
continue;
|
1184
|
1266
|
}
|
1185
|
1267
|
|
1186
|
|
- final Triple<Boolean, List<BillAssociatedVO>, List<BillBizDataEntity>> detailItemTriple;
|
1187
|
|
- detailItemTriple = billItemLogic.detailFormFileds(newBillId, detailgroupDatas, detailFields);
|
|
1268
|
+ final Triple<Boolean, List<BillAssociatedVO>, List<BillBizDataEntity>>
|
|
1269
|
+ detailItemTriple;
|
|
1270
|
+ detailItemTriple = billItemLogic.detailFormFileds(newBillId, detailgroupDatas,
|
|
1271
|
+ detailFields);
|
1188
|
1272
|
final Boolean attachment = detailItemTriple.getLeft();
|
1189
|
1273
|
if (attachment) {
|
1190
|
1274
|
dataValueBuilder.attachment(true);
|
|
@@ -1222,8 +1306,11 @@ public class BillLogicImpl implements BillLogic {
|
1222
|
1306
|
final long billId = actionParam.getBillId();
|
1223
|
1307
|
final String userCode = actionParam.getUserCode();
|
1224
|
1308
|
|
1225
|
|
- List<BillTaskEntity> billTaskEntities = billTaskService.findApprovingByBillAndTaskId(billId, taskId);
|
1226
|
|
- final Set<String> collect = billTaskEntities.stream().map(BillTaskEntity::getUserCode).collect(Collectors.toSet());
|
|
1309
|
+ List<BillTaskEntity> billTaskEntities =
|
|
1310
|
+ billTaskService.findApprovingByBillAndTaskId(billId, taskId);
|
|
1311
|
+ final Set<String> collect = billTaskEntities.stream()
|
|
1312
|
+ .map(BillTaskEntity::getUserCode)
|
|
1313
|
+ .collect(Collectors.toSet());
|
1227
|
1314
|
if (collect.contains(actionParam.getEndorseApprover())) {
|
1228
|
1315
|
throw new RbException(ENDORSE_CANNOT_IN_NODE);
|
1229
|
1316
|
}
|
|
@@ -1240,7 +1327,8 @@ public class BillLogicImpl implements BillLogic {
|
1240
|
1327
|
case APPROVAL:
|
1241
|
1328
|
// 更新提交的formdata
|
1242
|
1329
|
final String formData = actionParam.getFormData();
|
1243
|
|
- if (!Strings.isNullOrEmpty(formData) && !org.apache.commons.lang3.StringUtils.equals("{}", formData)) {
|
|
1330
|
+ if (!Strings.isNullOrEmpty(
|
|
1331
|
+ formData) && !org.apache.commons.lang3.StringUtils.equals("{}", formData)) {
|
1244
|
1332
|
this.billItemLogic.updateByFormDataByBill(billId, formData);
|
1245
|
1333
|
}
|
1246
|
1334
|
break;
|
|
@@ -1294,7 +1382,8 @@ public class BillLogicImpl implements BillLogic {
|
1294
|
1382
|
case APPROVAL:
|
1295
|
1383
|
// 更新提交的formdata
|
1296
|
1384
|
final String formData = actionParam.getFormData();
|
1297
|
|
- if (!Strings.isNullOrEmpty(formData) && !org.apache.commons.lang3.StringUtils.equals("{}", formData)) {
|
|
1385
|
+ if (!Strings.isNullOrEmpty(
|
|
1386
|
+ formData) && !org.apache.commons.lang3.StringUtils.equals("{}", formData)) {
|
1298
|
1387
|
this.billItemLogic.updateByFormDataByBill(billId, formData);
|
1299
|
1388
|
}
|
1300
|
1389
|
break;
|
|
@@ -1311,33 +1400,38 @@ public class BillLogicImpl implements BillLogic {
|
1311
|
1400
|
task.setOpinion(opinion);
|
1312
|
1401
|
task.setDateline(DateTimeUtil.unixTime());
|
1313
|
1402
|
billTaskService.upldate(task);
|
1314
|
|
- final BillTaskEntity targetTask = billTaskService.getOne(Wrappers.lambdaQuery(BillTaskEntity.class)
|
1315
|
|
- .eq(BillTaskEntity::getId, targetTaskId));
|
|
1403
|
+ final BillTaskEntity targetTask = billTaskService.getOne(
|
|
1404
|
+ Wrappers.lambdaQuery(BillTaskEntity.class).eq(BillTaskEntity::getId, targetTaskId));
|
1316
|
1405
|
if (Objects.isNull(targetTask)) {
|
1317
|
1406
|
throw new RbException(TARGET_TASK_NULL);
|
1318
|
1407
|
}
|
1319
|
1408
|
final String taskNodeKey = targetTask.getTaskNodeKey();
|
1320
|
|
- final ProcessNodeExtendEntity extendEntity = nodeExtendService
|
1321
|
|
- .getOne(Wrappers.lambdaQuery(ProcessNodeExtendEntity.class)
|
|
1409
|
+ final ProcessNodeExtendEntity extendEntity = nodeExtendService.getOne(
|
|
1410
|
+ Wrappers.lambdaQuery(ProcessNodeExtendEntity.class)
|
1322
|
1411
|
.eq(ProcessNodeExtendEntity::getProcessId, byId.getProcessId())
|
1323
|
1412
|
.eq(ProcessNodeExtendEntity::getNodeId, taskNodeKey));
|
1324
|
1413
|
List<BillTaskEntity> sends = Lists.newArrayList();
|
1325
|
1414
|
//退回需要删除当前节点审批中的数据
|
1326
|
1415
|
billTaskService.remove(Wrappers.lambdaQuery(BillTaskEntity.class)
|
1327
|
1416
|
.eq(BillTaskEntity::getBillId, billId)
|
1328
|
|
- .eq(BillTaskEntity::getTaskNodeKey, task.getTaskNodeKey()).ne(BillTaskEntity::getId,task.getId()));
|
|
1417
|
+ .eq(BillTaskEntity::getTaskNodeKey, task.getTaskNodeKey())
|
|
1418
|
+ .ne(BillTaskEntity::getId, task.getId()));
|
1329
|
1419
|
if (!extendEntity.getLinkType().equals(NodeLinkType.create.name())) {
|
1330
|
|
- billBpmnLogic.returnToTargetTask(task, targetTask, userCode, opinion, actionParam.getNextApprover());
|
|
1420
|
+ billBpmnLogic.returnToTargetTask(task, targetTask, userCode, opinion,
|
|
1421
|
+ actionParam.getNextApprover());
|
1331
|
1422
|
} else {
|
1332
|
1423
|
/**
|
1333
|
1424
|
*表示是退回到发起节点需要进行操作需要找到当前审批的最新的创建节点,然后找到任务taskId和用户然后重新创建一个节点任务
|
1334
|
1425
|
*/
|
1335
|
|
- billService.update(Wrappers.lambdaUpdate(ToaBillEntity.class).set(ToaBillEntity::getStatus, BillStatus.REPULSE.getStatus()).eq(ToaBillEntity::getId, billId));
|
|
1426
|
+ billService.update(Wrappers.lambdaUpdate(ToaBillEntity.class)
|
|
1427
|
+ .set(ToaBillEntity::getStatus, BillStatus.REPULSE.getStatus())
|
|
1428
|
+ .eq(ToaBillEntity::getId, billId));
|
1336
|
1429
|
BillTaskEntity createTask = billTaskService.findCreateTaskByBill(billId);
|
1337
|
1430
|
if (Objects.isNull(createTask)) {
|
1338
|
1431
|
throw new RbException(StringPool.EMPTY, ProcessCode.PROCESS_ACTIVITI_ERROR);
|
1339
|
1432
|
}
|
1340
|
|
- final BillTaskEntity newBillTask = BeanUtil.sourceToTarget(createTask, BillTaskEntity.class);
|
|
1433
|
+ final BillTaskEntity newBillTask =
|
|
1434
|
+ BeanUtil.sourceToTarget(createTask, BillTaskEntity.class);
|
1341
|
1435
|
newBillTask.setId(IdWorker.getId());
|
1342
|
1436
|
newBillTask.setSourceTaskId(task.getId());
|
1343
|
1437
|
newBillTask.setSourceUserCode(userCode);
|
|
@@ -1364,9 +1458,14 @@ public class BillLogicImpl implements BillLogic {
|
1364
|
1458
|
* @param turnUser 移交用户
|
1365
|
1459
|
*/
|
1366
|
1460
|
@Override
|
1367
|
|
- public void turnUser(long billId, String taskId, String turnUser, String userCode, String opinion) {
|
1368
|
|
- List<BillTaskEntity> billTaskEntities = billTaskService.findApprovingByBillAndTaskId(billId, taskId);
|
1369
|
|
- Set<String> collect = billTaskEntities.stream().map(BillTaskEntity::getUserCode).collect(Collectors.toSet());
|
|
1461
|
+ public void turnUser(
|
|
1462
|
+ long billId, String taskId, String turnUser, String userCode, String opinion
|
|
1463
|
+ ) {
|
|
1464
|
+ List<BillTaskEntity> billTaskEntities =
|
|
1465
|
+ billTaskService.findApprovingByBillAndTaskId(billId, taskId);
|
|
1466
|
+ Set<String> collect = billTaskEntities.stream()
|
|
1467
|
+ .map(BillTaskEntity::getUserCode)
|
|
1468
|
+ .collect(Collectors.toSet());
|
1370
|
1469
|
// 更新移交
|
1371
|
1470
|
final List<String> split = StrUtil.split(turnUser, ',');
|
1372
|
1471
|
final Set<String> hashSet = new HashSet(split);
|
|
@@ -1387,7 +1486,8 @@ public class BillLogicImpl implements BillLogic {
|
1387
|
1486
|
|
1388
|
1487
|
List<BillTaskEntity> insertLists = Lists.newArrayList();
|
1389
|
1488
|
for (String s : hashSet) {
|
1390
|
|
- final BillTaskEntity turnTask = BeanUtil.sourceToTarget(task, BillTaskEntity.class);
|
|
1489
|
+ final BillTaskEntity turnTask =
|
|
1490
|
+ BeanUtil.sourceToTarget(task, BillTaskEntity.class);
|
1391
|
1491
|
turnTask.setSourceTaskId(task.getId());
|
1392
|
1492
|
turnTask.setSourceUserCode(userCode);
|
1393
|
1493
|
turnTask.setTaskType(BillTaskType.TURN.getValue());
|
|
@@ -1423,9 +1523,11 @@ public class BillLogicImpl implements BillLogic {
|
1423
|
1523
|
@Override
|
1424
|
1524
|
public BillDetailVO<List<FormFieldVO>> createByApp(long processId) {
|
1425
|
1525
|
ProcessDetailDTO process = checkProcess(processId);
|
1426
|
|
- final List<FormFieldVO> fieldVOS = formBasicConvert.FormFieldPOToVO(formFieldService.findVoByProcessId(processId));
|
|
1526
|
+ final List<FormFieldVO> fieldVOS =
|
|
1527
|
+ formBasicConvert.FormFieldPOToVO(formFieldService.findVoByProcessId(processId));
|
1427
|
1528
|
List<BillOpinionVO> opinionVOS = Lists.newArrayList();
|
1428
|
|
- String firstNodeId = nodeExtendService.findTaskNodeIdByProcessAndLinkType(processId, NodeLinkType.create);
|
|
1529
|
+ String firstNodeId = nodeExtendService.findTaskNodeIdByProcessAndLinkType(processId,
|
|
1530
|
+ NodeLinkType.create);
|
1429
|
1531
|
// 获取授权信息
|
1430
|
1532
|
final List<FormPermissionVO> permissionVOS;
|
1431
|
1533
|
permissionVOS = billBpmnLogic.nodeFieldPermission(processId, firstNodeId);
|
|
@@ -1456,8 +1558,11 @@ public class BillLogicImpl implements BillLogic {
|
1456
|
1558
|
* @return 验证结果
|
1457
|
1559
|
*/
|
1458
|
1560
|
@Override
|
1459
|
|
- public ValidationResultDTO validation(long processId, long billId, String formDataJson, String userCode) {
|
1460
|
|
- final Map<String, Object> dataMap = JSON.parseObject(formDataJson, FastJsonType.MAP_OBJECT_TR);
|
|
1561
|
+ public ValidationResultDTO validation(
|
|
1562
|
+ long processId, long billId, String formDataJson, String userCode
|
|
1563
|
+ ) {
|
|
1564
|
+ final Map<String, Object> dataMap =
|
|
1565
|
+ JSON.parseObject(formDataJson, FastJsonType.MAP_OBJECT_TR);
|
1461
|
1566
|
final BillDataContext billDataValue;
|
1462
|
1567
|
final ProcessDetailPO processDetail = this.processService.findDetailById(processId);
|
1463
|
1568
|
billDataValue = this.resolveFormDataByValidation(billId, processDetail, dataMap);
|
|
@@ -1475,19 +1580,24 @@ public class BillLogicImpl implements BillLogic {
|
1475
|
1580
|
*/
|
1476
|
1581
|
@Override
|
1477
|
1582
|
public List<String> getNodeCondition(long processId, long billId, String taskId) {
|
1478
|
|
- final List<BillTaskEntity> list = billTaskService.list(Wrappers.lambdaQuery(BillTaskEntity.class)
|
1479
|
|
- .eq(BillTaskEntity::getBillId, billId).eq(BillTaskEntity::getTaskId, taskId));
|
1480
|
|
- final Set<String> nodeKeys = list.stream().map(BillTaskEntity::getTaskNodeKey).collect(Collectors.toSet());
|
|
1583
|
+ final List<BillTaskEntity> list = billTaskService.list(
|
|
1584
|
+ Wrappers.lambdaQuery(BillTaskEntity.class)
|
|
1585
|
+ .eq(BillTaskEntity::getBillId, billId)
|
|
1586
|
+ .eq(BillTaskEntity::getTaskId, taskId));
|
|
1587
|
+ final Set<String> nodeKeys =
|
|
1588
|
+ list.stream().map(BillTaskEntity::getTaskNodeKey).collect(Collectors.toSet());
|
1481
|
1589
|
if (CollectionUtil.isEmpty(nodeKeys)) {
|
1482
|
1590
|
return Collections.emptyList();
|
1483
|
1591
|
}
|
1484
|
|
- final List<ProcessNodeApproverEntity> list1 = nodeApproverService
|
1485
|
|
- .list(Wrappers.lambdaQuery(ProcessNodeApproverEntity.class)
|
|
1592
|
+ final List<ProcessNodeApproverEntity> list1 = nodeApproverService.list(
|
|
1593
|
+ Wrappers.lambdaQuery(ProcessNodeApproverEntity.class)
|
1486
|
1594
|
.eq(ProcessNodeApproverEntity::getProcessId, processId)
|
1487
|
1595
|
.in(ProcessNodeApproverEntity::getNodeId, nodeKeys));
|
1488
|
|
- final List<String> params =
|
1489
|
|
- list1.stream().filter(a -> !Strings.isNullOrEmpty(a.getExpress()) && a.getExpress().indexOf("implication") != -1)
|
1490
|
|
- .map(ProcessNodeApproverEntity::getExpressParams).collect(Collectors.toList());
|
|
1596
|
+ final List<String> params = list1.stream()
|
|
1597
|
+ .filter(a -> !Strings.isNullOrEmpty(a.getExpress()) && a.getExpress()
|
|
1598
|
+ .indexOf("implication") != -1)
|
|
1599
|
+ .map(ProcessNodeApproverEntity::getExpressParams)
|
|
1600
|
+ .collect(Collectors.toList());
|
1491
|
1601
|
List<String> result = Lists.newArrayList();
|
1492
|
1602
|
for (String param : params) {
|
1493
|
1603
|
final JSONObject jsonObject = JSON.parseObject(param);
|
|
@@ -1511,23 +1621,26 @@ public class BillLogicImpl implements BillLogic {
|
1511
|
1621
|
*/
|
1512
|
1622
|
@Override
|
1513
|
1623
|
public String findTodoSize() {
|
1514
|
|
- List<Integer> statusList = Lists.newArrayList(
|
1515
|
|
- BillStatus.APPROVAL.getStatus(), BillStatus.REFUSE.getStatus()
|
1516
|
|
- );
|
|
1624
|
+ List<Integer> statusList =
|
|
1625
|
+ Lists.newArrayList(BillStatus.APPROVAL.getStatus(), BillStatus.REFUSE.getStatus());
|
1517
|
1626
|
final String userCode = loginUserHolder.getUserCode();
|
1518
|
1627
|
final String todoSize = this.billService.findTodoSizeByStatus(userCode, statusList);
|
1519
|
1628
|
return todoSize;
|
1520
|
1629
|
}
|
1521
|
1630
|
|
1522
|
1631
|
@Override
|
1523
|
|
- public Pair<List<BillItemVO>, Long> findAllByQuery(Integer pageNo, Integer pageSize, DraftBillQuery query) {
|
|
1632
|
+ public Pair<List<BillItemVO>, Long> findAllByQuery(
|
|
1633
|
+ Integer pageNo, Integer pageSize, DraftBillQuery query
|
|
1634
|
+ ) {
|
1524
|
1635
|
Page page = new Page(pageNo, pageSize);
|
1525
|
1636
|
final List<BillItemPO> billDatas = this.billService.findAllByQuery(page, query);
|
1526
|
1637
|
final Page<BillItemVO> billItemVOPage = toItemVOList(page, billDatas, null);
|
1527
|
1638
|
return Pair.of(billItemVOPage.getRecords(), billItemVOPage.getTotal());
|
1528
|
1639
|
}
|
1529
|
1640
|
|
1530
|
|
- private ValidationResultDTO validataionWithResult(BillDataContext billDataValue, String userCode, BillValidationLogic validationService) {
|
|
1641
|
+ private ValidationResultDTO validataionWithResult(
|
|
1642
|
+ BillDataContext billDataValue, String userCode, BillValidationLogic validationService
|
|
1643
|
+ ) {
|
1531
|
1644
|
|
1532
|
1645
|
if (null != validationService) {
|
1533
|
1646
|
return validationService.validation(billDataValue, userCode);
|
|
@@ -1550,9 +1663,7 @@ public class BillLogicImpl implements BillLogic {
|
1550
|
1663
|
|
1551
|
1664
|
@Transactional(readOnly = true, rollbackFor = Exception.class)
|
1552
|
1665
|
public BillDataContext resolveFormDataByValidation(
|
1553
|
|
- long billId,
|
1554
|
|
- ProcessDetailPO processDetail,
|
1555
|
|
- Map<String, Object> formDataMap
|
|
1666
|
+ long billId, ProcessDetailPO processDetail, Map<String, Object> formDataMap
|
1556
|
1667
|
) {
|
1557
|
1668
|
long processId = processDetail.getId();
|
1558
|
1669
|
|
|
@@ -1624,8 +1735,10 @@ public class BillLogicImpl implements BillLogic {
|
1624
|
1735
|
continue;
|
1625
|
1736
|
}
|
1626
|
1737
|
|
1627
|
|
- final Triple<Boolean, List<BillAssociatedVO>, List<BillBizDataEntity>> detailItemTriple;
|
1628
|
|
- detailItemTriple = billItemLogic.detailFormFileds(newBillId, detailgroupDatas, detailFields);
|
|
1738
|
+ final Triple<Boolean, List<BillAssociatedVO>, List<BillBizDataEntity>>
|
|
1739
|
+ detailItemTriple;
|
|
1740
|
+ detailItemTriple = billItemLogic.detailFormFileds(newBillId, detailgroupDatas,
|
|
1741
|
+ detailFields);
|
1629
|
1742
|
final Boolean attachment = detailItemTriple.getLeft();
|
1630
|
1743
|
if (attachment) {
|
1631
|
1744
|
dataValueBuilder.attachment(true);
|
|
@@ -1649,11 +1762,13 @@ public class BillLogicImpl implements BillLogic {
|
1649
|
1762
|
private List<BillOpinionVO> billOpinions(ToaBillEntity bill) {
|
1650
|
1763
|
long processId = MoreObjects.firstNonNull(bill.getProcessId(), 0L);
|
1651
|
1764
|
final List<BillOpinionVO> opinionVOS = Lists.newArrayList();
|
1652
|
|
- final List<ProcessNodeExtendEntity> taskNodes = nodeExtendService.findTaskNodeByProcess(processId);
|
|
1765
|
+ final List<ProcessNodeExtendEntity> taskNodes =
|
|
1766
|
+ nodeExtendService.findTaskNodeByProcess(processId);
|
1653
|
1767
|
if (CollectionUtil.isNotEmpty(taskNodes)) {
|
1654
|
1768
|
for (ProcessNodeExtendEntity taskNode : taskNodes) {
|
1655
|
1769
|
final String linkType = taskNode.getLinkType();
|
1656
|
|
- if (org.apache.commons.lang3.StringUtils.equals(linkType, NodeLinkType.approvl.name())) {
|
|
1770
|
+ if (org.apache.commons.lang3.StringUtils.equals(linkType,
|
|
1771
|
+ NodeLinkType.approvl.name())) {
|
1657
|
1772
|
BillOpinionVO billOpinionVO = new BillOpinionVO();
|
1658
|
1773
|
billOpinionVO.setTitle(taskNode.getNodeName());
|
1659
|
1774
|
opinionVOS.add(billOpinionVO);
|
|
@@ -1663,11 +1778,15 @@ public class BillLogicImpl implements BillLogic {
|
1663
|
1778
|
return opinionVOS;
|
1664
|
1779
|
}
|
1665
|
1780
|
|
1666
|
|
- private <T> BillDetailVO.BillDetailVOBuilder<T> billDetailBuilder(BillDataJsonEntity billDataJson, ToaBillEntity bill) {
|
|
1781
|
+ private <T> BillDetailVO.BillDetailVOBuilder<T> billDetailBuilder(
|
|
1782
|
+ BillDataJsonEntity billDataJson, ToaBillEntity bill
|
|
1783
|
+ ) {
|
1667
|
1784
|
return billDetailBuilder(billDataJson, bill, StringPool.EMPTY);
|
1668
|
1785
|
}
|
1669
|
1786
|
|
1670
|
|
- private <T> BillDetailVO.BillDetailVOBuilder<T> billDetailBuilder(BillDataJsonEntity billDataJson, ToaBillEntity bill, String page) {
|
|
1787
|
+ private <T> BillDetailVO.BillDetailVOBuilder<T> billDetailBuilder(
|
|
1788
|
+ BillDataJsonEntity billDataJson, ToaBillEntity bill, String page
|
|
1789
|
+ ) {
|
1671
|
1790
|
long billId = bill.getId();
|
1672
|
1791
|
long processId = bill.getProcessId();
|
1673
|
1792
|
final String userCode = loginUserHolder.getUserCode();
|
|
@@ -1721,8 +1840,9 @@ public class BillLogicImpl implements BillLogic {
|
1721
|
1840
|
for (FormPermissionVO permission : permissions) {
|
1722
|
1841
|
permission.setEdit(false);
|
1723
|
1842
|
}
|
1724
|
|
- } else if (!Strings.isNullOrEmpty(page)
|
1725
|
|
- && org.apache.commons.lang3.StringUtils.equalsAny(page, "cc", "approved")) {
|
|
1843
|
+ } else if (!Strings.isNullOrEmpty(
|
|
1844
|
+ page) && org.apache.commons.lang3.StringUtils.equalsAny(page, "cc",
|
|
1845
|
+ "approved")) {
|
1726
|
1846
|
// 来自我发起的列表和抄送我的列表,这个时候,所有的按钮权限应该都是不可编辑的
|
1727
|
1847
|
for (FormPermissionVO permission : permissions) {
|
1728
|
1848
|
permission.setEdit(false);
|
|
@@ -1733,7 +1853,8 @@ public class BillLogicImpl implements BillLogic {
|
1733
|
1853
|
}
|
1734
|
1854
|
case REFUSE_FILL_IN:
|
1735
|
1855
|
permissions = billBpmnLogic.findPermissionByProcessStartNode(processId);
|
1736
|
|
- if (CollectionUtil.isNotEmpty(permissions) && billStatus == BillStatus.COMPLETE) {
|
|
1856
|
+ if (CollectionUtil.isNotEmpty(
|
|
1857
|
+ permissions) && billStatus == BillStatus.COMPLETE) {
|
1737
|
1858
|
for (FormPermissionVO permission : permissions) {
|
1738
|
1859
|
permission.setEdit(false);
|
1739
|
1860
|
}
|
|
@@ -1753,7 +1874,8 @@ public class BillLogicImpl implements BillLogic {
|
1753
|
1874
|
}
|
1754
|
1875
|
}
|
1755
|
1876
|
}
|
1756
|
|
- Map<String, Object> formData = JSON.parseObject(billDataJson.getFormData(), FastJsonType.MAP_OBJECT_TR);
|
|
1877
|
+ Map<String, Object> formData =
|
|
1878
|
+ JSON.parseObject(billDataJson.getFormData(), FastJsonType.MAP_OBJECT_TR);
|
1757
|
1879
|
String title = StringPool.EMPTY;
|
1758
|
1880
|
if (!Strings.isNullOrEmpty(bill.getTitle())) {
|
1759
|
1881
|
title = bill.getTitle();
|
|
@@ -1770,7 +1892,9 @@ public class BillLogicImpl implements BillLogic {
|
1770
|
1892
|
* 需要对按钮进行过滤
|
1771
|
1893
|
*/
|
1772
|
1894
|
List<String> newBtns = billBtnLogic.filterByNode(billTask, btns);
|
1773
|
|
- detailBuilder.title(title).formData(formData).processId(processId)
|
|
1895
|
+ detailBuilder.title(title)
|
|
1896
|
+ .formData(formData)
|
|
1897
|
+ .processId(processId)
|
1774
|
1898
|
.billId(billId)
|
1775
|
1899
|
.permission(permissions)
|
1776
|
1900
|
.btns(newBtns);
|
|
@@ -1802,10 +1926,13 @@ public class BillLogicImpl implements BillLogic {
|
1802
|
1926
|
* @param title 审批标题
|
1803
|
1927
|
* @return 封装后的表单字段信息
|
1804
|
1928
|
*/
|
1805
|
|
- private Map<String, Object> bizFormData(ProcessDetailDTO process, UserInfoDTO userInfoDTO, String title) {
|
|
1929
|
+ private Map<String, Object> bizFormData(
|
|
1930
|
+ ProcessDetailDTO process, UserInfoDTO userInfoDTO, String title
|
|
1931
|
+ ) {
|
1806
|
1932
|
final long processId = process.getId();
|
1807
|
1933
|
final long processCodeId = Objects.isNull(process.getCodeId()) ? 0 : process.getCodeId();
|
1808
|
|
- final List<FormFieldEntity> bizFields = this.formFieldService.findBizFiled(processId, FormXtype.biz);
|
|
1934
|
+ final List<FormFieldEntity> bizFields =
|
|
1935
|
+ this.formFieldService.findBizFiled(processId, FormXtype.biz);
|
1809
|
1936
|
if (CollectionUtil.isEmpty(bizFields)) {
|
1810
|
1937
|
return Collections.emptyMap();
|
1811
|
1938
|
}
|
|
@@ -1835,7 +1962,8 @@ public class BillLogicImpl implements BillLogic {
|
1835
|
1962
|
if (!Objects.isNull(userInfoDTO)) {
|
1836
|
1963
|
final List<UserOrgDTO> orgs = userInfoDTO.getOrgs();
|
1837
|
1964
|
if (CollectionUtil.isNotEmpty(orgs)) {
|
1838
|
|
- final List<String> orgNames = orgs.stream().map(UserOrgDTO::getOrgName)
|
|
1965
|
+ final List<String> orgNames = orgs.stream()
|
|
1966
|
+ .map(UserOrgDTO::getOrgName)
|
1839
|
1967
|
.collect(Collectors.toList());
|
1840
|
1968
|
organizationName = StrUtil.join(",", orgNames);
|
1841
|
1969
|
}
|
|
@@ -1857,23 +1985,28 @@ public class BillLogicImpl implements BillLogic {
|
1857
|
1985
|
|
1858
|
1986
|
@Override
|
1859
|
1987
|
public List<ProcessTypeVO> findTodoCateSize() {
|
1860
|
|
- LambdaQueryWrapper<ProcessTypeEntity> wrapper = Wrappers.lambdaQuery(ProcessTypeEntity.class);
|
|
1988
|
+ LambdaQueryWrapper<ProcessTypeEntity> wrapper =
|
|
1989
|
+ Wrappers.lambdaQuery(ProcessTypeEntity.class);
|
1861
|
1990
|
|
1862
|
1991
|
List<ProcessTypeEntity> processTypes = this.processTypeService.list(wrapper);
|
1863
|
1992
|
if (CollectionUtil.isNotEmpty(processTypes)) {
|
1864
|
1993
|
int processTypeSize = processTypes.size();
|
1865
|
1994
|
List<ProcessTypeVO> types = Lists.newArrayListWithCapacity(processTypeSize);
|
1866
|
|
- List<Integer> statusList = Lists.newArrayList(new Integer[]{BillStatus.APPROVAL.getStatus(), BillStatus.REFUSE.getStatus()});
|
|
1995
|
+ List<Integer> statusList = Lists.newArrayList(
|
|
1996
|
+ new Integer[]{BillStatus.APPROVAL.getStatus(), BillStatus.REFUSE.getStatus()});
|
1867
|
1997
|
String userCode = this.loginUserHolder.getUserCode();
|
1868
|
|
- List<ProcessGridPO> todoCateSize = this.billService.findTodoCateSize(userCode, statusList);
|
|
1998
|
+ List<ProcessGridPO> todoCateSize =
|
|
1999
|
+ this.billService.findTodoCateSize(userCode, statusList);
|
1869
|
2000
|
List<ProcessVO> processVOS = this.processBasicConvert.processGridPOToVO(todoCateSize);
|
1870
|
|
- Map<Long, List<ProcessVO>> collect = (Map)processVOS.stream().collect(Collectors.groupingBy(ProcessVO::getTypeId));
|
|
2001
|
+ Map<Long, List<ProcessVO>> collect =
|
|
2002
|
+ (Map) processVOS.stream().collect(Collectors.groupingBy(ProcessVO::getTypeId));
|
1871
|
2003
|
|
1872
|
2004
|
ProcessTypeVO processTypeVO;
|
1873
|
|
- for(Iterator var10 = processTypes.iterator(); var10.hasNext(); types.add(processTypeVO)) {
|
1874
|
|
- ProcessTypeEntity processType = (ProcessTypeEntity)var10.next();
|
|
2005
|
+ for (Iterator var10 = processTypes.iterator(); var10.hasNext(); types.add(
|
|
2006
|
+ processTypeVO)) {
|
|
2007
|
+ ProcessTypeEntity processType = (ProcessTypeEntity) var10.next();
|
1875
|
2008
|
Long id = processType.getId();
|
1876
|
|
- List<ProcessVO> processVOS1 = (List)collect.get(id);
|
|
2009
|
+ List<ProcessVO> processVOS1 = (List) collect.get(id);
|
1877
|
2010
|
processTypeVO = new ProcessTypeVO();
|
1878
|
2011
|
processTypeVO.setName(processType.getName());
|
1879
|
2012
|
processTypeVO.setId(processType.getId());
|