Browse Source

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	bpm-core/src/main/java/com/srm/bpm/logic/service/impl/BillLogicImpl.java
JieZ 2 years ago
parent
commit
dfd84cc398

+ 4 - 3
bpm-core/src/main/java/com/srm/bpm/facade/rest/ProcessTreeRestController.java

@@ -32,14 +32,15 @@ public class ProcessTreeRestController {
32 32
 
33 33
     @GetMapping("/organization")
34 34
     public R organization(String q) {
35
-        final List<ZTreeDTO> organization = userCenterlogic.organization("",Strings.isNullOrEmpty(q) ? "" : q);
35
+        final List<ZTreeDTO> organization = userCenterlogic.organization("",Strings.isNullOrEmpty(q) ? "" : q, null);
36 36
         return R.ok(organization);
37 37
     }
38 38
 
39 39
     @GetMapping("/organization/user")
40 40
     public R organizationUser(String q,
41
-                              @RequestParam(value = "onlyChoiceUser", required = false) boolean onlyChoiceUser) {
42
-        return R.ok(userCenterlogic.organizationUser("",q, onlyChoiceUser));
41
+                              @RequestParam(value = "onlyChoiceUser", required = false) boolean onlyChoiceUser,
42
+                              @RequestParam(value = "state", required = false) String state) {
43
+        return R.ok(userCenterlogic.organizationUser("",q, onlyChoiceUser, state));
43 44
     }
44 45
 
45 46
 

+ 5 - 0
bpm-core/src/main/java/com/srm/bpm/infra/entity/ProcessNodeExtendEntity.java

@@ -51,6 +51,11 @@ public class ProcessNodeExtendEntity extends BaseEntity {
51 51
      * 自动同意规则(1:处理人就是提交人;2:处理人和上一步处理人相同;3处理人审批过;多个已逗号分隔
52 52
      */
53 53
     private String autoAgree;
54
+    
55
+    /**
56
+     * 推送配置(0:邮件;1:站内信;2:流程中心;多个以逗号分隔)
57
+     */
58
+    private String push;
54 59
 
55 60
     /**
56 61
      * 节点显示的按钮

+ 3 - 1
bpm-core/src/main/java/com/srm/bpm/logic/constant/BillTaskStatus.java

@@ -76,7 +76,9 @@ public enum BillTaskStatus {
76 76
     /**
77 77
      * 已移交
78 78
      */
79
-    TURN(15);
79
+    TURN(15),
80
+    
81
+    COMPLATE(16);
80 82
 
81 83
 
82 84
     private final int status;

+ 10 - 2
bpm-core/src/main/java/com/srm/bpm/logic/dto/FlowMsgDTO.java

@@ -32,6 +32,10 @@ public class FlowMsgDTO {
32 32
      */
33 33
     private String content;
34 34
     /**
35
+     * 推送配置(0:邮件;1:站内信;2:流程中心;多个以逗号分隔)
36
+     */
37
+    private String push;
38
+    /**
35 39
      * 节点名称
36 40
      */
37 41
     private String nodeName;
@@ -43,15 +47,19 @@ public class FlowMsgDTO {
43 47
      * 时间
44 48
      */
45 49
     private LocalDateTime time;
46
-
47
-    public static FlowMsgDTO build(String userCode, String createUser, String content, String title, String nodeName, String opinion) {
50
+    
51
+    private Long billId;
52
+    
53
+    public static FlowMsgDTO build(String userCode, String createUser, String content, String title, String push, String nodeName, String opinion, Long billId) {
48 54
         FlowMsgDTO flowMsgDTO = new FlowMsgDTO();
49 55
         flowMsgDTO.setCreateUser(createUser);
50 56
         flowMsgDTO.setUserCode(userCode);
51 57
         flowMsgDTO.setContent(content);
52 58
         flowMsgDTO.setBillTitle(title);
59
+        flowMsgDTO.setPush(push);
53 60
         flowMsgDTO.setNodeName(nodeName);
54 61
         flowMsgDTO.setOpinion(opinion);
62
+        flowMsgDTO.setBillId(billId);
55 63
         flowMsgDTO.setTime(LocalDateTime.now());
56 64
         return flowMsgDTO;
57 65
     }

+ 2 - 2
bpm-core/src/main/java/com/srm/bpm/logic/service/UserCenterlogic.java

@@ -21,9 +21,9 @@ import cn.hutool.core.lang.Pair;
21 21
  * @since JDK 1.8
22 22
  */
23 23
 public interface UserCenterlogic {
24
-    List<ZTreeDTO> organization(String pid, String s);
24
+    List<ZTreeDTO> organization(String pid, String s, String state);
25 25
 
26
-    List<ZTreeDTO> organizationUser(String pid, String q, boolean onlyChoiceUser);
26
+    List<ZTreeDTO> organizationUser(String pid, String q, boolean onlyChoiceUser, String state);
27 27
 
28 28
     List<ZTreeDTO> positionUser(String pid);
29 29
 

+ 145 - 270
bpm-core/src/main/java/com/srm/bpm/logic/service/impl/BillLogicImpl.java

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

+ 203 - 178
bpm-core/src/main/java/com/srm/bpm/logic/service/impl/FlowMsgLogicImpl.java

@@ -1,12 +1,20 @@
1 1
 
2
-
3 2
 package com.srm.bpm.logic.service.impl;
4 3
 
4
+import java.util.List;
5
+import java.util.Optional;
6
+import java.util.Set;
7
+
8
+import org.jetbrains.annotations.NotNull;
9
+import org.springframework.stereotype.Service;
10
+
11
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
5 12
 import com.google.common.collect.Lists;
6 13
 import com.google.common.collect.Sets;
7
-
8 14
 import com.srm.bpm.infra.entity.BillTaskEntity;
15
+import com.srm.bpm.infra.entity.ProcessNodeExtendEntity;
9 16
 import com.srm.bpm.infra.entity.ToaBillEntity;
17
+import com.srm.bpm.infra.service.ProcessNodeExtendService;
10 18
 import com.srm.bpm.infra.service.ToaBillService;
11 19
 import com.srm.bpm.logic.constant.BillTaskStatus;
12 20
 import com.srm.bpm.logic.constant.BillTaskType;
@@ -15,13 +23,6 @@ import com.srm.bpm.logic.dto.FlowMsgDTO;
15 23
 import com.srm.bpm.logic.service.FlowMsgLogic;
16 24
 import com.srm.bpm.logic.service.PushMsgLogic;
17 25
 
18
-import org.jetbrains.annotations.NotNull;
19
-import org.springframework.stereotype.Service;
20
-
21
-import java.util.List;
22
-import java.util.Optional;
23
-import java.util.Set;
24
-
25 26
 import cn.hutool.core.collection.CollectionUtil;
26 27
 import lombok.RequiredArgsConstructor;
27 28
 import lombok.extern.slf4j.Slf4j;
@@ -37,173 +38,197 @@ import lombok.extern.slf4j.Slf4j;
37 38
 @Service
38 39
 @Slf4j
39 40
 public class FlowMsgLogicImpl implements FlowMsgLogic {
40
-    private final ToaBillService billService;
41
-    private final PushMsgLogic pushMsgLogic;
42
-
43
-    @Override
44
-    public void sendMsg(List<BillTaskEntity> billTaskEntities) {
45
-        if (CollectionUtil.isNotEmpty(billTaskEntities)) {
46
-            final BillTaskEntity billTaskEntity = billTaskEntities.get(0);
47
-            final Long billId = billTaskEntity.getBillId();
48
-            final Optional<ToaBillEntity> billOpt = billService.unique(billId);
49
-            if (billOpt.isPresent()) {
50
-                final ToaBillEntity toaBillEntity = billOpt.get();
51
-                final String title = toaBillEntity.getTitle();
52
-                final String createUserCode = toaBillEntity.getSender();
53
-                final List<FlowMsgDTO> allMsg = Lists.newArrayList();
54
-                for (BillTaskEntity taskEntity : billTaskEntities) {
55
-                    final Integer taskType = taskEntity.getTaskType();
56
-                    final BillTaskType billTaskType = BillTaskType.forValue(taskType);
57
-                    List<FlowMsgDTO> flowMsgDTOS = Lists.newArrayList();
58
-                    switch (billTaskType) {
59
-                        case DEFAULT:
60
-                            flowMsgDTOS = defaultNodeType(taskEntity, createUserCode, title);
61
-                            break;
62
-                        case SKIP:
63
-                            flowMsgDTOS = skipNodeType(taskEntity, createUserCode, title);
64
-                            break;
65
-                        case ENDORSE:
66
-                            flowMsgDTOS = endorseNodeType(taskEntity, createUserCode, title);
67
-                            break;
68
-                        case TRANSFER:
69
-                            flowMsgDTOS = transferNodeType(taskEntity, createUserCode, title);
70
-                            break;
71
-                        case TURN:
72
-                            flowMsgDTOS = turnNodeType(taskEntity, createUserCode, title);
73
-                            break;
74
-                    }
75
-                    allMsg.addAll(flowMsgDTOS);
76
-                }
77
-                log.debug("推送的消息是:{}", allMsg);
78
-//                TODO 注释消息
79
-//                pushMsgLogic.push(allMsg);
80
-            }
81
-        }
82
-    }
83
-
84
-    @Override
85
-    public void sendMsg(List<BillTaskEntity> billTaskEntities, boolean syncFlag) {
86
-        this.sendMsg(billTaskEntities);
87
-    }
88
-
89
-    private List<FlowMsgDTO> turnNodeType(BillTaskEntity taskEntity, String createUser, String title) {
90
-        final Integer nodeStatus = taskEntity.getNodeStatus();
91
-        final BillTaskStatus billTaskStatus = BillTaskStatus.valueTo(nodeStatus);
92
-        Set<String> receivers = Sets.newConcurrentHashSet();
93
-        final String approver = taskEntity.getUserCode();
94
-        final String content = "移交" + getContent(createUser, billTaskStatus, receivers, approver);
95
-        List<FlowMsgDTO> msgDTOS = Lists.newArrayListWithExpectedSize(receivers.size());
96
-        receivers.forEach(a -> {
97
-            FlowMsgDTO flowMsgDTO = FlowMsgDTO.build(a, createUser, content, title, taskEntity.getNodeName(), taskEntity.getOpinion());
98
-            msgDTOS.add(flowMsgDTO);
99
-        });
100
-        return msgDTOS;
101
-    }
102
-
103
-    private List<FlowMsgDTO> transferNodeType(BillTaskEntity taskEntity, String createUser, String title) {
104
-        final Integer nodeStatus = taskEntity.getNodeStatus();
105
-        final BillTaskStatus billTaskStatus = BillTaskStatus.valueTo(nodeStatus);
106
-        Set<String> receivers = Sets.newConcurrentHashSet();
107
-        final String approver = taskEntity.getUserCode();
108
-        final String content = "转办" + getContent(createUser, billTaskStatus, receivers, approver);
109
-        List<FlowMsgDTO> msgDTOS = Lists.newArrayListWithExpectedSize(receivers.size());
110
-        receivers.forEach(a -> {
111
-            FlowMsgDTO flowMsgDTO = FlowMsgDTO.build(a, createUser, content, title, taskEntity.getNodeName(), taskEntity.getOpinion());
112
-            msgDTOS.add(flowMsgDTO);
113
-        });
114
-        return msgDTOS;
115
-    }
116
-
117
-    private List<FlowMsgDTO> endorseNodeType(BillTaskEntity taskEntity, String createUser, String title) {
118
-        final Integer nodeStatus = taskEntity.getNodeStatus();
119
-        final BillTaskStatus billTaskStatus = BillTaskStatus.valueTo(nodeStatus);
120
-        Set<String> receivers = Sets.newConcurrentHashSet();
121
-        final String approver = taskEntity.getUserCode();
122
-        final String content = "加签" + getContent(createUser, billTaskStatus, receivers, approver);
123
-        List<FlowMsgDTO> msgDTOS = Lists.newArrayListWithExpectedSize(receivers.size());
124
-        receivers.forEach(a -> {
125
-            FlowMsgDTO flowMsgDTO = FlowMsgDTO.build(a, createUser, content, title, taskEntity.getNodeName(), taskEntity.getOpinion());
126
-            msgDTOS.add(flowMsgDTO);
127
-        });
128
-        return msgDTOS;
129
-    }
130
-
131
-    private List<FlowMsgDTO> skipNodeType(BillTaskEntity taskEntity, String createUser, String title) {
132
-        final Integer nodeStatus = taskEntity.getNodeStatus();
133
-        final BillTaskStatus billTaskStatus = BillTaskStatus.valueTo(nodeStatus);
134
-        Set<String> receivers = Sets.newConcurrentHashSet();
135
-        final String approver = taskEntity.getUserCode();
136
-        final String content = getContent(createUser, billTaskStatus, receivers, approver);
137
-        List<FlowMsgDTO> msgDTOS = Lists.newArrayListWithExpectedSize(receivers.size());
138
-        receivers.forEach(a -> {
139
-            if (!a.equals(StringPool.ZERO)) {
140
-                FlowMsgDTO flowMsgDTO = FlowMsgDTO.build(a, createUser, content, title, taskEntity.getNodeName(), taskEntity.getOpinion());
141
-                msgDTOS.add(flowMsgDTO);
142
-            }
143
-        });
144
-        return msgDTOS;
145
-    }
146
-
147
-    private List<FlowMsgDTO> defaultNodeType(BillTaskEntity taskEntity, String createUser, String title) {
148
-        final Integer nodeStatus = taskEntity.getNodeStatus();
149
-        final BillTaskStatus billTaskStatus = BillTaskStatus.valueTo(nodeStatus);
150
-        Set<String> receivers = Sets.newConcurrentHashSet();
151
-        final String approver = taskEntity.getUserCode();
152
-        final String content = getContent(createUser, billTaskStatus, receivers, approver);
153
-        List<FlowMsgDTO> msgDTOS = Lists.newArrayListWithExpectedSize(receivers.size());
154
-        receivers.forEach(a -> {
155
-            FlowMsgDTO flowMsgDTO = FlowMsgDTO.build(a, createUser, content, title, taskEntity.getNodeName(), taskEntity.getOpinion());
156
-            msgDTOS.add(flowMsgDTO);
157
-        });
158
-        return msgDTOS;
159
-    }
160
-
161
-    @NotNull
162
-    private String getContent(String createUser, BillTaskStatus billTaskStatus, Set<String> receivers, String approver) {
163
-        final String content;
164
-        switch (billTaskStatus) {
165
-            case APPROVAL:
166
-                content = "审批中";
167
-                receivers.add(approver);
168
-                break;
169
-            case SKIP:
170
-                content = "自动跳过";
171
-                break;
172
-            case ENDORSE:
173
-                content = "加签";
174
-                receivers.add(approver);
175
-                break;
176
-            case AGREE:
177
-                content = "已同意";
178
-                receivers.add(approver);
179
-                receivers.add(createUser);
180
-                break;
181
-            case REFUSE:
182
-                content = "已拒绝";
183
-                receivers.add(approver);
184
-                receivers.add(createUser);
185
-                break;
186
-            case REPULSE:
187
-                content = "已退回";
188
-                receivers.add(approver);
189
-                receivers.add(createUser);
190
-                break;
191
-            case TRANSFER:
192
-                content = "已转办";
193
-                receivers.add(approver);
194
-                break;
195
-            case TURN:
196
-                content = "已移交";
197
-                receivers.add(approver);
198
-                break;
199
-            case REFUSE_FILL_IN:
200
-                content = "重新填写";
201
-                receivers.add(createUser);
202
-                break;
203
-            default:
204
-                content = "";
205
-                break;
206
-        }
207
-        return content;
208
-    }
41
+	private final ToaBillService billService;
42
+	private final PushMsgLogic pushMsgLogic;
43
+	private final ProcessNodeExtendService nodeExtendService;
44
+
45
+	@Override
46
+	public void sendMsg(List<BillTaskEntity> billTaskEntities) {
47
+		if (CollectionUtil.isNotEmpty(billTaskEntities)) {
48
+			final BillTaskEntity billTaskEntity = billTaskEntities.get(0);
49
+			final Long billId = billTaskEntity.getBillId();
50
+
51
+			if (billTaskEntity.getNodeStatus() == BillTaskStatus.COMPLATE.getStatus()) {
52
+				List<FlowMsgDTO> flowMsgDTOS = Lists.newArrayList();
53
+				FlowMsgDTO flowMsgDTO = new FlowMsgDTO();
54
+				flowMsgDTO.setBillTitle(billTaskEntity.getNodeName());
55
+				flowMsgDTO.setBillId(billTaskEntity.getBillId());
56
+				flowMsgDTO.setContent(billTaskEntity.getOpinion());
57
+				flowMsgDTO.setPush("0,1,2");
58
+				flowMsgDTO.setUserCode(billTaskEntity.getUserCode());
59
+				flowMsgDTOS.add(flowMsgDTO);
60
+				pushMsgLogic.push(flowMsgDTOS);
61
+			} else {
62
+				final String taskNodeKey = billTaskEntity.getTaskNodeKey();
63
+				QueryWrapper<ProcessNodeExtendEntity> wrapper = new QueryWrapper<ProcessNodeExtendEntity>();
64
+				wrapper.eq("node_id", taskNodeKey);
65
+				ProcessNodeExtendEntity processNodeExtendEntity = nodeExtendService.getOne(wrapper);
66
+				String push = processNodeExtendEntity.getPush();
67
+				final Optional<ToaBillEntity> billOpt = billService.unique(billId);
68
+				if (billOpt.isPresent()) {
69
+					final ToaBillEntity toaBillEntity = billOpt.get();
70
+					final String title = toaBillEntity.getTitle();
71
+					final String createUserCode = toaBillEntity.getSender();
72
+					final List<FlowMsgDTO> allMsg = Lists.newArrayList();
73
+					for (BillTaskEntity taskEntity : billTaskEntities) {
74
+						final Integer taskType = taskEntity.getTaskType();
75
+						final BillTaskType billTaskType = BillTaskType.forValue(taskType);
76
+						List<FlowMsgDTO> flowMsgDTOS = Lists.newArrayList();
77
+						switch (billTaskType) {
78
+						case DEFAULT:
79
+							flowMsgDTOS = defaultNodeType(taskEntity, createUserCode, title, push);
80
+							break;
81
+						case SKIP:
82
+							flowMsgDTOS = skipNodeType(taskEntity, createUserCode, title, push);
83
+							break;
84
+						case ENDORSE:
85
+							flowMsgDTOS = endorseNodeType(taskEntity, createUserCode, title, push);
86
+							break;
87
+						case TRANSFER:
88
+							flowMsgDTOS = transferNodeType(taskEntity, createUserCode, title, push);
89
+							break;
90
+						case TURN:
91
+							flowMsgDTOS = turnNodeType(taskEntity, createUserCode, title, push);
92
+							break;
93
+						}
94
+						allMsg.addAll(flowMsgDTOS);
95
+					}
96
+					log.debug("推送的消息是:{}", allMsg);
97
+					pushMsgLogic.push(allMsg);
98
+				}
99
+			}
100
+		}
101
+	}
102
+
103
+	@Override
104
+	public void sendMsg(List<BillTaskEntity> billTaskEntities, boolean syncFlag) {
105
+		this.sendMsg(billTaskEntities);
106
+	}
107
+
108
+	private List<FlowMsgDTO> turnNodeType(BillTaskEntity taskEntity, String createUser, String title, String push) {
109
+		final Integer nodeStatus = taskEntity.getNodeStatus();
110
+		final BillTaskStatus billTaskStatus = BillTaskStatus.valueTo(nodeStatus);
111
+		Set<String> receivers = Sets.newConcurrentHashSet();
112
+		final String approver = taskEntity.getUserCode();
113
+		final String content = "移交" + getContent(createUser, billTaskStatus, receivers, approver);
114
+		List<FlowMsgDTO> msgDTOS = Lists.newArrayListWithExpectedSize(receivers.size());
115
+		receivers.forEach(a -> {
116
+			FlowMsgDTO flowMsgDTO = FlowMsgDTO.build(a, createUser, content, push, title, taskEntity.getNodeName(),
117
+					taskEntity.getOpinion(), taskEntity.getBillId());
118
+			msgDTOS.add(flowMsgDTO);
119
+		});
120
+		return msgDTOS;
121
+	}
122
+
123
+	private List<FlowMsgDTO> transferNodeType(BillTaskEntity taskEntity, String createUser, String title, String push) {
124
+		final Integer nodeStatus = taskEntity.getNodeStatus();
125
+		final BillTaskStatus billTaskStatus = BillTaskStatus.valueTo(nodeStatus);
126
+		Set<String> receivers = Sets.newConcurrentHashSet();
127
+		final String approver = taskEntity.getUserCode();
128
+		final String content = "转办" + getContent(createUser, billTaskStatus, receivers, approver);
129
+		List<FlowMsgDTO> msgDTOS = Lists.newArrayListWithExpectedSize(receivers.size());
130
+		receivers.forEach(a -> {
131
+			FlowMsgDTO flowMsgDTO = FlowMsgDTO.build(a, createUser, content, title, push, taskEntity.getNodeName(),
132
+					taskEntity.getOpinion(), taskEntity.getBillId());
133
+			msgDTOS.add(flowMsgDTO);
134
+		});
135
+		return msgDTOS;
136
+	}
137
+
138
+	private List<FlowMsgDTO> endorseNodeType(BillTaskEntity taskEntity, String createUser, String title, String push) {
139
+		final Integer nodeStatus = taskEntity.getNodeStatus();
140
+		final BillTaskStatus billTaskStatus = BillTaskStatus.valueTo(nodeStatus);
141
+		Set<String> receivers = Sets.newConcurrentHashSet();
142
+		final String approver = taskEntity.getUserCode();
143
+		final String content = "加签" + getContent(createUser, billTaskStatus, receivers, approver);
144
+		List<FlowMsgDTO> msgDTOS = Lists.newArrayListWithExpectedSize(receivers.size());
145
+		receivers.forEach(a -> {
146
+			FlowMsgDTO flowMsgDTO = FlowMsgDTO.build(a, createUser, content, title, push, taskEntity.getNodeName(),
147
+					taskEntity.getOpinion(), taskEntity.getBillId());
148
+			msgDTOS.add(flowMsgDTO);
149
+		});
150
+		return msgDTOS;
151
+	}
152
+
153
+	private List<FlowMsgDTO> skipNodeType(BillTaskEntity taskEntity, String createUser, String title, String push) {
154
+		final Integer nodeStatus = taskEntity.getNodeStatus();
155
+		final BillTaskStatus billTaskStatus = BillTaskStatus.valueTo(nodeStatus);
156
+		Set<String> receivers = Sets.newConcurrentHashSet();
157
+		final String approver = taskEntity.getUserCode();
158
+		final String content = getContent(createUser, billTaskStatus, receivers, approver);
159
+		List<FlowMsgDTO> msgDTOS = Lists.newArrayListWithExpectedSize(receivers.size());
160
+		receivers.forEach(a -> {
161
+			if (!a.equals(StringPool.ZERO)) {
162
+				FlowMsgDTO flowMsgDTO = FlowMsgDTO.build(a, createUser, content, title, push, taskEntity.getNodeName(),
163
+						taskEntity.getOpinion(), taskEntity.getBillId());
164
+				msgDTOS.add(flowMsgDTO);
165
+			}
166
+		});
167
+		return msgDTOS;
168
+	}
169
+
170
+	private List<FlowMsgDTO> defaultNodeType(BillTaskEntity taskEntity, String createUser, String title, String push) {
171
+		final Integer nodeStatus = taskEntity.getNodeStatus();
172
+		final BillTaskStatus billTaskStatus = BillTaskStatus.valueTo(nodeStatus);
173
+		Set<String> receivers = Sets.newConcurrentHashSet();
174
+		final String approver = taskEntity.getUserCode();
175
+		final String content = getContent(createUser, billTaskStatus, receivers, approver);
176
+		List<FlowMsgDTO> msgDTOS = Lists.newArrayListWithExpectedSize(receivers.size());
177
+		receivers.forEach(a -> {
178
+			FlowMsgDTO flowMsgDTO = FlowMsgDTO.build(a, createUser, content, title, push, taskEntity.getNodeName(),
179
+					taskEntity.getOpinion(), taskEntity.getBillId());
180
+			msgDTOS.add(flowMsgDTO);
181
+		});
182
+		return msgDTOS;
183
+	}
184
+
185
+	@NotNull
186
+	private String getContent(String createUser, BillTaskStatus billTaskStatus, Set<String> receivers,
187
+			String approver) {
188
+		final String content;
189
+		switch (billTaskStatus) {
190
+		case APPROVAL:
191
+			content = "审批中";
192
+			receivers.add(approver);
193
+			break;
194
+		case SKIP:
195
+			content = "自动跳过";
196
+			break;
197
+		case ENDORSE:
198
+			content = "加签";
199
+			receivers.add(approver);
200
+			break;
201
+		case AGREE:
202
+			content = "已同意";
203
+			receivers.add(approver);
204
+			//receivers.add(createUser);
205
+			break;
206
+		case REFUSE:
207
+			content = "已拒绝";
208
+			//receivers.add(approver);
209
+			receivers.add(createUser);
210
+			break;
211
+		case REPULSE:
212
+			content = "已退回";
213
+			receivers.add(approver);
214
+			receivers.add(createUser);
215
+			break;
216
+		case TRANSFER:
217
+			content = "已转办";
218
+			receivers.add(approver);
219
+			break;
220
+		case TURN:
221
+			content = "已移交";
222
+			receivers.add(approver);
223
+			break;
224
+		case REFUSE_FILL_IN:
225
+			content = "重新填写";
226
+			receivers.add(createUser);
227
+			break;
228
+		default:
229
+			content = "";
230
+			break;
231
+		}
232
+		return content;
233
+	}
209 234
 }

+ 1 - 0
bpm-core/src/main/java/com/srm/bpm/logic/service/impl/ProcessDesingerLogicImpl.java

@@ -207,6 +207,7 @@ public class ProcessDesingerLogicImpl implements ProcessDesingerLogic {
207 207
             nodeExtend.setId(nodeExtendId);
208 208
             nodeExtend.setNodeId(nodeId);
209 209
             nodeExtend.setBtns(nodeSetting.getBtns());
210
+            nodeExtend.setPush(nodeSetting.getPush());
210 211
             nodeExtend.setNodeType(nodeSetting.getNtype());
211 212
             nodeExtend.setNodeName(nodeSetting.getTitle());
212 213
             nodeExtend.setAutoAgree(nodeSetting.getAutoAgree());

+ 11 - 5
bpm-core/src/main/java/com/srm/bpm/logic/service/impl/PushMsgLogicImpl.java

@@ -12,10 +12,13 @@
12 12
 
13 13
 package com.srm.bpm.logic.service.impl;
14 14
 
15
+import java.util.Collections;
15 16
 import java.util.List;
17
+import java.util.stream.Collectors;
16 18
 
17 19
 import org.springframework.http.ResponseEntity;
18 20
 import org.springframework.stereotype.Service;
21
+import org.springframework.util.CollectionUtils;
19 22
 
20 23
 import com.alibaba.fastjson.JSON;
21 24
 import com.alibaba.fastjson.JSONObject;
@@ -37,11 +40,14 @@ public class PushMsgLogicImpl implements PushMsgLogic {
37 40
 
38 41
 	@Override
39 42
 	public void push(List<FlowMsgDTO> allMsg) {
40
-		JSONObject data = new JSONObject();
41
-		data.put("msg", JSON.toJSON(allMsg));
42
-		log.info("回调返回的数据:{}", allMsg);
43
-		final ResponseEntity<R> post = restTemplateUtil.post(bpmConfig.getPushmsgUrl(), data, "1");
44
-		log.info("回调返回的数据:{}", post);
43
+		allMsg = allMsg.stream().filter(e->(e.getPush() != null && !e.getPush().equals(""))).collect(Collectors.toList());
44
+		if(!CollectionUtils.isEmpty(allMsg)) {
45
+			JSONObject data = new JSONObject();
46
+			data.put("msg", JSON.toJSON(allMsg));
47
+			log.info("回调返回的数据:{}", allMsg);
48
+			final ResponseEntity<R> post = restTemplateUtil.post(bpmConfig.getPushmsgUrl(), data, "1");
49
+			log.info("回调返回的数据:{}", post);
50
+		}
45 51
 	}
46 52
 }
47 53
 

+ 1 - 0
bpm-core/src/main/java/com/srm/bpm/logic/vo/ProcessNodeVO.java

@@ -43,6 +43,7 @@ public class ProcessNodeVO implements Serializable {
43 43
     private String title;
44 44
     private BigDecimal autoNextHours;
45 45
     private String autoAgree;
46
+    private String push;
46 47
     private String btns;
47 48
     private Integer countersignFlag;
48 49
     private Integer batchApproval;

+ 69 - 1
bpm-core/src/main/resources/static/designer/app/design/flow-node-setting/panel/task.js

@@ -41,7 +41,8 @@ define(function (require, exports, module) {
41 41
                 "autoAgreeTitle",
42 42
                 "noApprovalOperationTitle",
43 43
                 "autoNextHoursTitle",
44
-                "selectApprovalTitle"];
44
+                "selectApprovalTitle",
45
+                "pushTitle"];
45 46
             var linkType = this.getNodeSettingByName('linkType');
46 47
             if (Foundation.isEmpty(linkType)) {
47 48
                 linkType = 'create';
@@ -297,6 +298,12 @@ define(function (require, exports, module) {
297 298
                         }]
298 299
                     ]
299 300
                 },
301
+                {
302
+                    xtype: 'title',
303
+                    title: "推送配置",
304
+                    id: "pushTitle",
305
+                },
306
+                this.__getpushConfig(),
300 307
                 "-",
301 308
                 {
302 309
                     xtype: 'title',
@@ -447,6 +454,67 @@ define(function (require, exports, module) {
447 454
                 ]
448 455
             }
449 456
         },
457
+         //推送配置
458
+        __getpushConfig: function () {
459
+            var self = this;
460
+            var tmpValue = self.getNodeSettingByName('push') + "";
461
+            var email = false;	// 邮件
462
+            var msg = false;	// 站内信
463
+            var app = false;	// 小程序
464
+            if (!Foundation.isEmpty(tmpValue)) {
465
+                var options = tmpValue.split(",");
466
+                email = options.indexOf("0") != -1
467
+                msg = options.indexOf("1") != -1
468
+                app = options.indexOf("2") != -1
469
+            }
470
+
471
+            function stateChange(selected, r) {
472
+                var tmpValue = self.getNodeSettingByName('push');
473
+                if (Foundation.isEmpty(tmpValue) || tmpValue == "undefined") {
474
+                    if (selected) {
475
+                        self.setNodeSetting('push', r);
476
+                    }
477
+                } else {
478
+                    var options = tmpValue.split(",");
479
+                    if (selected) {
480
+                        options.push(r);
481
+                    } else {
482
+                        Foundation.Array.remove(options, r);
483
+                    }
484
+                    self.setNodeSetting('push', options.join(","));
485
+                }
486
+            }
487
+
488
+            return {
489
+                xtype: "tablecontainer",
490
+                rowSize: ["auto","auto","auto"],
491
+                colSize: ["auto"],
492
+                items: [
493
+                    [{
494
+                        xtype: 'checkbox',
495
+                        text: '推送邮件',
496
+                        value: email,
497
+                        onStateChange: (selected) => {
498
+                            stateChange(selected, "0");
499
+                        }
500
+                    }], [{
501
+                        xtype: 'checkbox',
502
+                        text: '推送站内信',
503
+                        value: msg,
504
+                        onStateChange: (selected) => {
505
+                            stateChange(selected, "1");
506
+                        }
507
+                    }], [{
508
+                        xtype: 'checkbox',
509
+                        text: '推送流程中心',
510
+                        value: app,
511
+                        onStateChange: (selected) => {
512
+                            stateChange(selected, "2");
513
+                        }
514
+                    }]
515
+                ]
516
+            }
517
+        },
450 518
         // 弹出节点抄送人配置
451 519
         __getProcessCcBoxConfig: function () {
452 520
             var self = this;

+ 1 - 1
bpm-core/src/main/resources/static/designer/app/modules/employee-dialog.js

@@ -57,7 +57,7 @@ define(function (require, exports, module) {
57 57
         }
58 58
 
59 59
         employeeChoiceTree = $treeDom.initZtree({
60
-            service: g.ctx + 'process/tree/rest/organization/user?onlyChoiceUser=1'
60
+            service: g.ctx + 'process/tree/rest/organization/user?onlyChoiceUser=1&state=Y'
61 61
         }, org_tree_setting);
62 62
     };
63 63
     /**

+ 2 - 2
bpm-server/src/main/java/com/srm/bpmserver/infra/dao/UserCenterDao.java

@@ -26,9 +26,9 @@ import java.util.Set;
26 26
  * @since JDK 1.8
27 27
  */
28 28
 public interface UserCenterDao {
29
-    List<OrganizationPO> selectOrg(@Param("pid") String pid, @Param("q") String q);
29
+    List<OrganizationPO> selectOrg(@Param("pid") String pid, @Param("q") String q, @Param("state") String state);
30 30
 
31
-    List<UserOrgPO> selectUsers(@Param("pid") String pid);
31
+    List<UserOrgPO> selectUsers(@Param("pid") String pid, @Param("state") String state);
32 32
 
33 33
     List<PositionPO> selectAllPosition(@Param("pid") String pid, @Param("q") String s);
34 34
 

+ 5 - 5
bpm-server/src/main/java/com/srm/bpmserver/logic/impl/UserCenterLogicImpl.java

@@ -50,7 +50,7 @@ public class UserCenterLogicImpl implements UserCenterlogic {
50 50
     private final TreeConvert treeConvert;
51 51
 
52 52
     @Override
53
-    public List<ZTreeDTO> organization(String pid, String q) {
53
+    public List<ZTreeDTO> organization(String pid, String q, String state) {
54 54
         //查询部门信息
55 55
         List<ZTreeDTO> zTreeDTOS = Lists.newArrayList();
56 56
         if (Strings.isNullOrEmpty(pid)) {
@@ -62,7 +62,7 @@ public class UserCenterLogicImpl implements UserCenterlogic {
62 62
             topLevel.setOpen(true);
63 63
             zTreeDTOS.add(topLevel);
64 64
         }
65
-        final List<OrganizationPO> organizationPOS = userCenterDao.selectOrg(pid, q);
65
+        final List<OrganizationPO> organizationPOS = userCenterDao.selectOrg(pid, q, state);
66 66
         for (OrganizationPO organizationPO : organizationPOS) {
67 67
             final ZTreeDTO zTreeDTO = treeConvert.organizationPOToDTO(organizationPO);
68 68
             zTreeDTO.setData(organizationPO);
@@ -72,13 +72,13 @@ public class UserCenterLogicImpl implements UserCenterlogic {
72 72
     }
73 73
 
74 74
     @Override
75
-    public List<ZTreeDTO> organizationUser(String pid, String q, boolean onlyChoiceUser) {
76
-        List<ZTreeDTO> zTreeDTOS = this.organization(pid, q);
75
+    public List<ZTreeDTO> organizationUser(String pid, String q, boolean onlyChoiceUser, String state) {
76
+        List<ZTreeDTO> zTreeDTOS = this.organization(pid, q, state);
77 77
         for (ZTreeDTO zTreeDTO : zTreeDTOS) {
78 78
             zTreeDTO.setNocheck(onlyChoiceUser);
79 79
         }
80 80
 
81
-        List<UserOrgPO> userOrgPOS = userCenterDao.selectUsers(pid);
81
+        List<UserOrgPO> userOrgPOS = userCenterDao.selectUsers(pid, state);
82 82
         for (UserOrgPO userOrgPO : userOrgPOS) {
83 83
             final ZTreeDTO zTreeDTO = new ZTreeDTO();
84 84
             zTreeDTO.setId(userOrgPO.getId());

+ 1 - 1
bpm-server/src/main/resources/application-dev.yml

@@ -4,7 +4,7 @@ bpm:
4 4
   target-url: http://127.0.0.1:8778
5 5
   type: 1
6 6
   callback-url: http://127.0.0.1:8778/bill/rest/callback
7
-  pushmsg-url: http://127.0.0.1:8778/bill/rest/pushmsg
7
+  pushmsg-url: http://127.0.0.1:8778/task/pushmsg
8 8
 spring:
9 9
   jackson:
10 10
     time-zone: GMT+8

+ 1 - 1
bpm-server/src/main/resources/application-prod.yml

@@ -4,7 +4,7 @@ bpm:
4 4
   target-url: http://127.0.0.1:9888
5 5
   type: 1
6 6
   callback-url: http://127.0.0.1:9888/bill/rest/callback
7
-  pushmsg-url: http://127.0.0.1:9888/bill/rest/pushmsg
7
+  pushmsg-url: http://127.0.0.1:9888/task/pushmsg
8 8
 spring:
9 9
   jackson:
10 10
     time-zone: GMT+8

+ 1 - 1
bpm-server/src/main/resources/application-test.yml

@@ -4,7 +4,7 @@ bpm:
4 4
   target-url: http://172.16.0.71:8778
5 5
   type: 1
6 6
   callback-url: http://127.0.0.1:8778/bill/rest/callback
7
-  pushmsg-url: http://127.0.0.1:8778/bill/rest/pushmsg
7
+  pushmsg-url: http://127.0.0.1:8778/task/pushmsg
8 8
 spring:
9 9
   jackson:
10 10
     time-zone: GMT+8

+ 6 - 0
bpm-server/src/main/resources/mapper/bpmserver/infra/UserCenterDao.xml

@@ -14,6 +14,9 @@
14 14
             <if test="pid!=null and pid!=''">
15 15
                 AND org_parent_id=#{pid}
16 16
             </if>
17
+            <if test="state!=null and state!=''">
18
+                AND state=#{state}
19
+            </if>
17 20
         </where>
18 21
     </select>
19 22
     <select id="selectUsers" resultType="com.srm.bpmserver.infra.po.UserOrgPO">
@@ -25,6 +28,9 @@
25 28
         <if test="pid!=null and pid!=''">
26 29
             AND so.org_id =#{pid}
27 30
         </if>
31
+        <if test="state!=null and state != ''">
32
+            AND ep.deletestatus = 0
33
+        </if>
28 34
         ORDER BY ep.create_date DESC
29 35
     </select>
30 36
     <select id="selectAllPosition" resultType="com.srm.bpmserver.infra.po.PositionPO">