|
|
@@ -369,81 +369,274 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
369
|
369
|
|
|
370
|
370
|
}
|
|
371
|
371
|
|
|
372
|
|
-
|
|
373
|
|
- @Override
|
|
374
|
|
- public ToDoCount selectToDoCount() {
|
|
375
|
|
-
|
|
|
372
|
+ /**
|
|
|
373
|
+ * 分页查询
|
|
|
374
|
+ * 数据权限:1.每个人不同的角色,而每个角色可以操作不同的案件状态
|
|
|
375
|
+ * 2.申请人,被申请人:可以看到自己相关的案件(案件有被申请人相关的信息)
|
|
|
376
|
+ * 3.仲裁员:案件选定了某个仲裁员后,该仲裁员就可以查看该案件
|
|
|
377
|
+ * 4.超级管理员,法律顾问秘书,仲裁委(部门长):可以查看所有案件
|
|
|
378
|
+ *
|
|
|
379
|
+ * @param caseApplication
|
|
|
380
|
+ * @return
|
|
|
381
|
+ */
|
|
|
382
|
+ public List<CaseApplication> page(CaseApplication caseApplication) {
|
|
|
383
|
+ List<CaseApplication> caseApplications= new ArrayList<>();
|
|
|
384
|
+ // todo 案件列表查询Bug修复,需要看见已办案件
|
|
376
|
385
|
// 获取登录用户
|
|
377
|
386
|
LoginUser loginUser = getLoginUser();
|
|
378
|
387
|
SysUser user = loginUser.getUser();
|
|
379
|
388
|
Long userId = user.getUserId();
|
|
380
|
|
-
|
|
381
|
|
- // 查询登录人信息
|
|
|
389
|
+ // 查询登录人,根据邮箱查询
|
|
382
|
390
|
SysUser sysUser = sysUserMapper.selectUserById(userId);
|
|
|
391
|
+ if(sysUser==null){
|
|
|
392
|
+ throw new ServiceException("未获取到登录用户信息");
|
|
|
393
|
+ }
|
|
|
394
|
+
|
|
|
395
|
+
|
|
383
|
396
|
List<SysRole> roles = sysUser.getRoles();
|
|
384
|
397
|
// 没有角色不能查看案件列表
|
|
385
|
398
|
if (CollectionUtil.isEmpty(roles)) {
|
|
386
|
399
|
throw new ServiceException("该用户没有角色权限");
|
|
387
|
400
|
}
|
|
388
|
|
- CaseApplication caseApplication = new CaseApplication();
|
|
389
|
401
|
List<Integer> caseStatusList = new ArrayList<>();
|
|
|
402
|
+ List<String> roleNames = roles.stream().map(SysRole::getRoleName).collect(Collectors.toList());
|
|
|
403
|
+ startPage();
|
|
390
|
404
|
for (SysRole role : roles) {
|
|
391
|
|
- if (StrUtil.isEmpty(role.getRoleName())) {
|
|
|
405
|
+ if(StrUtil.isEmpty(role.getRoleName())){
|
|
392
|
406
|
continue;
|
|
393
|
407
|
}
|
|
394
|
|
- // 超级管理员和仲裁委(部门长)案件,可查看所有案件 √
|
|
395
|
|
- if (role.getRoleName().equals("超级管理员")
|
|
396
|
|
- ) {
|
|
397
|
|
- return caseApplicationMapper.selectAdminCaseToDoCount();
|
|
|
408
|
+ // 查看所有权限
|
|
|
409
|
+ if("超级管理员".equals(role.getRoleName())){
|
|
|
410
|
+ caseApplications = caseApplicationMapper.list(caseApplication,caseStatusList,null);
|
|
|
411
|
+ setArbitorMethod(caseApplications);
|
|
|
412
|
+ return caseApplications;
|
|
|
413
|
+ }
|
|
|
414
|
+ caseApplication.setLoginUserName(sysUser.getUserName());
|
|
|
415
|
+ caseApplication.setLoginUserPhone(sysUser.getPhonenumber());
|
|
|
416
|
+ if("申请人".equals(role.getRoleName())){
|
|
|
417
|
+ // 申请人在生成裁决书之前都可以修改案件
|
|
|
418
|
+ Integer[] array = {0,-1,1,2,3,4,5,6,7,8,9,10,31};
|
|
|
419
|
+ caseStatusList.addAll(Arrays.asList(array));
|
|
|
420
|
+ }
|
|
|
421
|
+ if("被申请人".equals(role.getRoleName())) {
|
|
|
422
|
+ // 案件质证,开庭审理,书面审理
|
|
|
423
|
+ caseStatusList.add(4);
|
|
|
424
|
+ caseStatusList.add(8);
|
|
|
425
|
+ caseStatusList.add(9);
|
|
|
426
|
+ }
|
|
|
427
|
+ if("仲裁员".equals(role.getRoleName())){
|
|
|
428
|
+ Integer[] array = {7,8,9,13,18};
|
|
|
429
|
+ caseStatusList.addAll(Arrays.asList(array));
|
|
|
430
|
+ caseApplication.setArbitratorId(String.valueOf(sysUser.getUserId()));
|
|
398
|
431
|
}
|
|
399
|
432
|
if ("仲裁委".equals(role.getRoleName())
|
|
400
|
433
|
|| "部门长".equals(role.getRoleName())) {
|
|
401
|
|
- caseApplication.setIsOtherRole(1);
|
|
|
434
|
+ // 组庭确定,部门长审核裁决书
|
|
402
|
435
|
caseStatusList.add(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
|
|
403
|
436
|
caseStatusList.add(CaseApplicationConstants.CHECK_ARBITRATION);
|
|
404
|
|
- // caseStatusList.add(CaseApplicationConstants.ARBITRATED_SEAL);
|
|
405
|
|
- caseApplication.setDeptHeadStatus(caseStatusList);
|
|
406
|
|
- }
|
|
407
|
|
- if ("仲裁员".equals(role.getRoleName())) {
|
|
408
|
|
- caseApplication.setIsOtherRole(1);
|
|
409
|
|
- caseApplication.setUserId(String.valueOf(userId));
|
|
410
|
437
|
}
|
|
411
|
438
|
if ("财务".equals(role.getRoleName())) {
|
|
412
|
|
- caseApplication.setIsOtherRole(1);
|
|
413
|
|
- caseApplication.setFinanceStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
|
|
|
439
|
+ caseStatusList.add(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
|
|
414
|
440
|
}
|
|
415
|
|
- if ("法律顾问".equals(role.getRoleName())) {
|
|
416
|
|
- // 查询角色有关的用户部门
|
|
417
|
|
- // List<Long> deptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
|
|
418
|
|
- List<Long> deptIds = new ArrayList<>();
|
|
419
|
|
- deptIds.add(sysUser.getDeptId());
|
|
420
|
|
- caseApplication.setDeptIds(deptIds);
|
|
421
|
|
- }
|
|
422
|
|
- if ("申请人".equals(role.getRoleName())) {
|
|
423
|
|
- caseApplication.setIsOtherRole(1);
|
|
424
|
|
- // 查询角色有关的用户部门
|
|
425
|
|
- caseApplication.setApplicationOrganId(String.valueOf(sysUser.getDeptId()));
|
|
|
441
|
+ if ("法律顾问".equals(role.getRoleName()) || "秘书".equals(role.getRoleName()) ) {
|
|
|
442
|
+ Integer[] array = {1,5,8,9,11,14,15,16,31};
|
|
|
443
|
+ caseStatusList.addAll(Arrays.asList(array));
|
|
426
|
444
|
}
|
|
427
|
|
- if ("被申请人".equals(role.getRoleName())) {
|
|
428
|
|
- caseApplication.setIsOtherRole(1);
|
|
429
|
|
- //
|
|
430
|
|
- caseApplication.setIdCard(String.valueOf(sysUser.getIdCard()));
|
|
431
|
|
- }
|
|
432
|
|
- if ("代理人".equals(role.getRoleName())) {
|
|
433
|
|
- caseApplication.setIsOtherRole(1);
|
|
434
|
|
- // 查询角色有关的用户部门
|
|
435
|
|
- // List<Long> agentDeptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
|
|
436
|
|
- List<Long> agentDeptIds = new ArrayList<>();
|
|
437
|
|
- agentDeptIds.add(sysUser.getDeptId());
|
|
438
|
|
- caseApplication.setAgentDeptIds(agentDeptIds);
|
|
|
445
|
+ }
|
|
|
446
|
+ caseApplications = caseApplicationMapper.list(caseApplication,caseStatusList, roleNames);
|
|
|
447
|
+ setArbitorMethod(caseApplications);
|
|
|
448
|
+ return caseApplications;
|
|
|
449
|
+
|
|
|
450
|
+ }
|
|
|
451
|
+
|
|
|
452
|
+ /**
|
|
|
453
|
+ * 设置仲裁方式
|
|
|
454
|
+ * @param caseApplications
|
|
|
455
|
+ */
|
|
|
456
|
+ private void setArbitorMethod(List<CaseApplication> caseApplications) {
|
|
|
457
|
+
|
|
|
458
|
+ if(CollectionUtil.isEmpty(caseApplications)){
|
|
|
459
|
+ return;
|
|
|
460
|
+ }
|
|
|
461
|
+ for(CaseApplication caseApplicationsel : caseApplications){
|
|
|
462
|
+ Integer caseStatus = caseApplicationsel.getCaseStatus();
|
|
|
463
|
+ if(caseStatus.intValue() == CaseApplicationConstants.CHECK_ARBITRATION_METHOD){
|
|
|
464
|
+ Integer applicantIsWrittenHear = caseApplicationsel.getApplicantIsWrittenHear();
|
|
|
465
|
+ Integer respondentIsWrittenHear = caseApplicationsel.getRespondentIsWrittenHear();
|
|
|
466
|
+ if(applicantIsWrittenHear!=null&&respondentIsWrittenHear!=null){
|
|
|
467
|
+ if(applicantIsWrittenHear.intValue()==respondentIsWrittenHear.intValue()){
|
|
|
468
|
+ caseApplicationsel.setArbitraMethodIssame(1);
|
|
|
469
|
+ if(applicantIsWrittenHear.intValue()==1&&respondentIsWrittenHear.intValue()==1){
|
|
|
470
|
+ caseApplicationsel.setArbitratMethod(2);
|
|
|
471
|
+ }else {
|
|
|
472
|
+ caseApplicationsel.setArbitratMethod(1);
|
|
|
473
|
+ }
|
|
|
474
|
+ }else {
|
|
|
475
|
+ caseApplicationsel.setArbitraMethodIssame(2);
|
|
|
476
|
+ String applicantarbitratMethod = "";
|
|
|
477
|
+ String respondentbitratMethod = "";
|
|
|
478
|
+ if(applicantIsWrittenHear.intValue()==1){
|
|
|
479
|
+ applicantarbitratMethod = "书面审理";
|
|
|
480
|
+ }else {
|
|
|
481
|
+ applicantarbitratMethod = "开庭审理";
|
|
|
482
|
+ }
|
|
|
483
|
+ if(respondentIsWrittenHear.intValue()==1){
|
|
|
484
|
+ respondentbitratMethod = "书面审理";
|
|
|
485
|
+ }else {
|
|
|
486
|
+ respondentbitratMethod = "开庭审理";
|
|
|
487
|
+ }
|
|
|
488
|
+ String arbitratMethodIllustrate = "当前案件开庭方式:申请人选择开庭方式为"+applicantarbitratMethod+
|
|
|
489
|
+ "被申请人选择开庭方式为"+respondentbitratMethod+",请确定开庭方式。";
|
|
|
490
|
+ caseApplicationsel.setArbitratMethodIllustrate(arbitratMethodIllustrate);
|
|
|
491
|
+ }
|
|
|
492
|
+ }
|
|
|
493
|
+
|
|
|
494
|
+ }
|
|
439
|
495
|
}
|
|
|
496
|
+ }
|
|
|
497
|
+
|
|
|
498
|
+ @Override
|
|
|
499
|
+ public ToDoCount selectToDoCount() {
|
|
|
500
|
+
|
|
|
501
|
+// // 获取登录用户
|
|
|
502
|
+// LoginUser loginUser = getLoginUser();
|
|
|
503
|
+// SysUser user = loginUser.getUser();
|
|
|
504
|
+// Long userId = user.getUserId();
|
|
|
505
|
+//
|
|
|
506
|
+// // 查询登录人信息
|
|
|
507
|
+// SysUser sysUser = sysUserMapper.selectUserById(userId);
|
|
|
508
|
+// List<SysRole> roles = sysUser.getRoles();
|
|
|
509
|
+// // 没有角色不能查看案件列表
|
|
|
510
|
+// if (CollectionUtil.isEmpty(roles)) {
|
|
|
511
|
+// throw new ServiceException("该用户没有角色权限");
|
|
|
512
|
+// }
|
|
|
513
|
+// CaseApplication caseApplication = new CaseApplication();
|
|
|
514
|
+// List<Integer> caseStatusList = new ArrayList<>();
|
|
|
515
|
+// for (SysRole role : roles) {
|
|
|
516
|
+// if (StrUtil.isEmpty(role.getRoleName())) {
|
|
|
517
|
+// continue;
|
|
|
518
|
+// }
|
|
|
519
|
+// // 超级管理员和仲裁委(部门长)案件,可查看所有案件 √
|
|
|
520
|
+// if (role.getRoleName().equals("超级管理员")
|
|
|
521
|
+// ) {
|
|
|
522
|
+// return caseApplicationMapper.selectAdminCaseToDoCount();
|
|
|
523
|
+// }
|
|
|
524
|
+// if ("仲裁委".equals(role.getRoleName())
|
|
|
525
|
+// || "部门长".equals(role.getRoleName())) {
|
|
|
526
|
+// caseApplication.setIsOtherRole(1);
|
|
|
527
|
+// caseStatusList.add(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
|
|
|
528
|
+// caseStatusList.add(CaseApplicationConstants.CHECK_ARBITRATION);
|
|
|
529
|
+// // caseStatusList.add(CaseApplicationConstants.ARBITRATED_SEAL);
|
|
|
530
|
+// caseApplication.setDeptHeadStatus(caseStatusList);
|
|
|
531
|
+// }
|
|
|
532
|
+// if ("仲裁员".equals(role.getRoleName())) {
|
|
|
533
|
+// caseApplication.setIsOtherRole(1);
|
|
|
534
|
+// caseApplication.setUserId(String.valueOf(userId));
|
|
|
535
|
+// }
|
|
|
536
|
+// if ("财务".equals(role.getRoleName())) {
|
|
|
537
|
+// caseApplication.setIsOtherRole(1);
|
|
|
538
|
+// caseApplication.setFinanceStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
|
|
|
539
|
+// }
|
|
|
540
|
+// if ("法律顾问".equals(role.getRoleName())) {
|
|
|
541
|
+// // 查询角色有关的用户部门
|
|
|
542
|
+// // List<Long> deptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
|
|
|
543
|
+// List<Long> deptIds = new ArrayList<>();
|
|
|
544
|
+// deptIds.add(sysUser.getDeptId());
|
|
|
545
|
+// caseApplication.setDeptIds(deptIds);
|
|
|
546
|
+// }
|
|
|
547
|
+// if ("申请人".equals(role.getRoleName())) {
|
|
|
548
|
+// caseApplication.setIsOtherRole(1);
|
|
|
549
|
+// // 查询角色有关的用户部门
|
|
|
550
|
+// caseApplication.setApplicationOrganId(String.valueOf(sysUser.getDeptId()));
|
|
|
551
|
+// }
|
|
|
552
|
+// if ("被申请人".equals(role.getRoleName())) {
|
|
|
553
|
+// caseApplication.setIsOtherRole(1);
|
|
|
554
|
+// //
|
|
|
555
|
+// caseApplication.setIdCard(String.valueOf(sysUser.getIdCard()));
|
|
|
556
|
+// }
|
|
|
557
|
+// if ("代理人".equals(role.getRoleName())) {
|
|
|
558
|
+// caseApplication.setIsOtherRole(1);
|
|
|
559
|
+// // 查询角色有关的用户部门
|
|
|
560
|
+// // List<Long> agentDeptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
|
|
|
561
|
+// List<Long> agentDeptIds = new ArrayList<>();
|
|
|
562
|
+// agentDeptIds.add(sysUser.getDeptId());
|
|
|
563
|
+// caseApplication.setAgentDeptIds(agentDeptIds);
|
|
|
564
|
+// }
|
|
|
565
|
+// }
|
|
|
566
|
+//
|
|
|
567
|
+//
|
|
|
568
|
+// // 根据条件查询申请人,被申请人,仲裁员,法律顾问案件
|
|
|
569
|
+// ToDoCount toDoCount = caseApplicationMapper.selectTodoCountByRole(caseApplication);
|
|
|
570
|
+// if (toDoCount == null) {
|
|
|
571
|
+// return new ToDoCount();
|
|
|
572
|
+// }
|
|
|
573
|
+ LoginUser loginUser = getLoginUser();
|
|
|
574
|
+ SysUser user = loginUser.getUser();
|
|
|
575
|
+ Long userId = user.getUserId();
|
|
|
576
|
+ // 查询登录人,根据邮箱查询
|
|
|
577
|
+ SysUser sysUser = sysUserMapper.selectUserById(userId);
|
|
|
578
|
+ if(sysUser==null){
|
|
|
579
|
+ throw new ServiceException("未获取到登录用户信息");
|
|
440
|
580
|
}
|
|
441
|
581
|
|
|
442
|
582
|
|
|
443
|
|
- // 根据条件查询申请人,被申请人,仲裁员,法律顾问案件
|
|
444
|
|
- ToDoCount toDoCount = caseApplicationMapper.selectTodoCountByRole(caseApplication);
|
|
445
|
|
- if (toDoCount == null) {
|
|
446
|
|
- return new ToDoCount();
|
|
|
583
|
+ List<SysRole> roles = sysUser.getRoles();
|
|
|
584
|
+ // 没有角色不能查看案件列表
|
|
|
585
|
+ if (CollectionUtil.isEmpty(roles)) {
|
|
|
586
|
+ throw new ServiceException("该用户没有角色权限");
|
|
|
587
|
+ }
|
|
|
588
|
+ List<Integer> caseStatusList = new ArrayList<>();
|
|
|
589
|
+ List<String> roleNames = roles.stream().map(SysRole::getRoleName).collect(Collectors.toList());
|
|
|
590
|
+ ToDoCount toDoCount=null;
|
|
|
591
|
+ CaseApplication caseApplication = new CaseApplication();
|
|
|
592
|
+ for (SysRole role : roles) {
|
|
|
593
|
+ if(StrUtil.isEmpty(role.getRoleName())){
|
|
|
594
|
+ continue;
|
|
|
595
|
+ }
|
|
|
596
|
+ // 查看所有权限
|
|
|
597
|
+ if("超级管理员".equals(role.getRoleName())){
|
|
|
598
|
+ toDoCount = caseApplicationMapper.selectTodoCountByRole(caseApplication,caseStatusList,null);
|
|
|
599
|
+ if(toDoCount==null){
|
|
|
600
|
+ toDoCount=new ToDoCount();
|
|
|
601
|
+ }
|
|
|
602
|
+ return toDoCount;
|
|
|
603
|
+ }
|
|
|
604
|
+ caseApplication.setLoginUserName(sysUser.getUserName());
|
|
|
605
|
+ caseApplication.setLoginUserPhone(sysUser.getPhonenumber());
|
|
|
606
|
+
|
|
|
607
|
+ if("申请人".equals(role.getRoleName())){
|
|
|
608
|
+ // 申请人在生成裁决书之前都可以修改案件
|
|
|
609
|
+ Integer[] array = {0,-1,1,2,3,4,5,6,7,8,9,10,31};
|
|
|
610
|
+ caseStatusList.addAll(Arrays.asList(array));
|
|
|
611
|
+ }
|
|
|
612
|
+ if("被申请人".equals(role.getRoleName())) {
|
|
|
613
|
+ // 案件质证,开庭审理,书面审理
|
|
|
614
|
+ caseStatusList.add(4);
|
|
|
615
|
+ caseStatusList.add(8);
|
|
|
616
|
+ caseStatusList.add(9);
|
|
|
617
|
+ }
|
|
|
618
|
+ if("仲裁员".equals(role.getRoleName())){
|
|
|
619
|
+ Integer[] array = {7,8,9,13,18};
|
|
|
620
|
+ caseStatusList.addAll(Arrays.asList(array));
|
|
|
621
|
+ caseApplication.setArbitratorId(String.valueOf(sysUser.getUserId()));
|
|
|
622
|
+ }
|
|
|
623
|
+ if ("仲裁委".equals(role.getRoleName())
|
|
|
624
|
+ || "部门长".equals(role.getRoleName())) {
|
|
|
625
|
+ // 组庭确定,部门长审核裁决书
|
|
|
626
|
+ caseStatusList.add(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
|
|
|
627
|
+ caseStatusList.add(CaseApplicationConstants.CHECK_ARBITRATION);
|
|
|
628
|
+ }
|
|
|
629
|
+ if ("财务".equals(role.getRoleName())) {
|
|
|
630
|
+ caseStatusList.add(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
|
|
|
631
|
+ }
|
|
|
632
|
+ if ("法律顾问".equals(role.getRoleName()) || "秘书".equals(role.getRoleName()) ) {
|
|
|
633
|
+ Integer[] array = {1,5,8,9,11,14,15,16,31};
|
|
|
634
|
+ caseStatusList.addAll(Arrays.asList(array));
|
|
|
635
|
+ }
|
|
|
636
|
+ }
|
|
|
637
|
+ toDoCount = caseApplicationMapper.selectTodoCountByRole(caseApplication,caseStatusList,roleNames);
|
|
|
638
|
+ if(toDoCount==null){
|
|
|
639
|
+ toDoCount=new ToDoCount();
|
|
447
|
640
|
}
|
|
448
|
641
|
return toDoCount;
|
|
449
|
642
|
}
|
|
|
@@ -456,6 +649,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
456
|
649
|
caseLogRecord.setCaseAppliId(id);
|
|
457
|
650
|
List<CaseLogRecord> records = caseLogRecordMapper.selectCaseLogRecordList(caseLogRecord);
|
|
458
|
651
|
CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
|
|
|
652
|
+ // 当前案件节点
|
|
459
|
653
|
Integer caseStatus = caseApplicationselect.getCaseStatus();
|
|
460
|
654
|
if (caseStatus.intValue() != 0) {
|
|
461
|
655
|
CaseLogRecord caseLogRecordin = getInCasenode(caseStatus);
|
|
|
@@ -733,7 +927,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
733
|
927
|
CaseLogRecord caseLogRecord9 = new CaseLogRecord();
|
|
734
|
928
|
caseLogRecord8.setCaseNode(9);
|
|
735
|
929
|
caseLogRecord8.setCaseNodeName("开庭审理");
|
|
736
|
|
- caseLogRecord8.setContent("仲裁员将进行开庭审理");
|
|
|
930
|
+ caseLogRecord8.setContent("仲裁员,申请人,被申请人,法律顾问将进行开庭审理");
|
|
737
|
931
|
CaseLogRecord caseLogRecord11 = new CaseLogRecord();
|
|
738
|
932
|
caseLogRecord9.setCaseNode(11);
|
|
739
|
933
|
caseLogRecord9.setCaseNodeName("书面审理");
|
|
|
@@ -758,7 +952,6 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
758
|
952
|
caseLogRecord15.setCaseNode(16);
|
|
759
|
953
|
caseLogRecord15.setCaseNodeName("裁决书送达");
|
|
760
|
954
|
caseLogRecord15.setContent("法律顾问将进行裁决书送达");
|
|
761
|
|
- CaseLogRecord caseLogRecord17 = new CaseLogRecord();
|
|
762
|
955
|
caseLogRecord16.setCaseNode(17);
|
|
763
|
956
|
caseLogRecord16.setCaseNodeName("案件归档");
|
|
764
|
957
|
caseLogRecord16.setContent("法律顾问将进行案件归档");
|
|
|
@@ -1021,8 +1214,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
1021
|
1214
|
caseLogRecord.setContent("法律顾问正在进行案件归档");
|
|
1022
|
1215
|
break;
|
|
1023
|
1216
|
default:
|
|
1024
|
|
- caseLogRecord.setCaseNodeName("无案件状态");
|
|
1025
|
|
- caseLogRecord.setContent("无操作内容");
|
|
|
1217
|
+ caseLogRecord.setCaseNodeName("");
|
|
|
1218
|
+ caseLogRecord.setContent("");
|
|
1026
|
1219
|
|
|
1027
|
1220
|
}
|
|
1028
|
1221
|
return caseLogRecord;
|
|
|
@@ -1416,11 +1609,12 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
1416
|
1609
|
maxVersion = 1;
|
|
1417
|
1610
|
}
|
|
1418
|
1611
|
caseApplication.setVersion(maxVersion + 1);
|
|
|
1612
|
+ LoginUser loginUser = getLoginUser();
|
|
1419
|
1613
|
// 异步新增案件日志
|
|
1420
|
1614
|
ThreadPoolUtil.execute(() -> {
|
|
1421
|
1615
|
try {
|
|
1422
|
1616
|
//新增案件日志记录
|
|
1423
|
|
- insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_EDIT, "修改案件信息");
|
|
|
1617
|
+ insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_EDIT, "修改案件信息",loginUser);
|
|
1424
|
1618
|
caseApplication.setCaseAppliId(caseApplication.getId());
|
|
1425
|
1619
|
caseApplication.setCaseLogId(IdWorkerUtil.getId());
|
|
1426
|
1620
|
int insertRow = caseApplicationLogMapper.insert(caseApplication);
|
|
|
@@ -1723,6 +1917,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
1723
|
1917
|
caseApplicationselect.setArbitrateRecord(arbitrateRecordselect);
|
|
1724
|
1918
|
if(arbitrateRecordselect!=null){
|
|
1725
|
1919
|
caseApplicationselect.setPayRejectReason(arbitrateRecordselect.getPayRejectReason());
|
|
|
1920
|
+ // 仲裁员审核驳回原因
|
|
|
1921
|
+ caseApplicationselect.setArbitrateReject(arbitrateRecordselect.getArbitrateReject());
|
|
1726
|
1922
|
}
|
|
1727
|
1923
|
|
|
1728
|
1924
|
}
|
|
|
@@ -1877,43 +2073,30 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
1877
|
2073
|
@Override
|
|
1878
|
2074
|
@Transactional
|
|
1879
|
2075
|
public AjaxResult pendTralCheck(CaseApplication caseApplication) {
|
|
1880
|
|
- // todo 需要传仲裁员id
|
|
1881
|
2076
|
Integer isAgreePendTral = caseApplication.getIsAgreePendTral();
|
|
1882
|
2077
|
caseApplication.setCaseStatus(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
|
|
1883
|
2078
|
int rows = 0;
|
|
1884
|
|
- //同意组庭
|
|
1885
|
|
- if (isAgreePendTral != null && isAgreePendTral == 1) {
|
|
|
2079
|
+
|
|
1886
|
2080
|
CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
|
|
1887
|
2081
|
if(caseApplicationselect==null){
|
|
1888
|
2082
|
throw new ServiceException("案件不存在");
|
|
1889
|
2083
|
}
|
|
1890
|
|
- String arbitratorId = caseApplicationselect.getArbitratorId();
|
|
1891
|
|
- String arbitratorName = caseApplicationselect.getArbitratorName();
|
|
1892
|
|
- List<Arbitrator> arbitrators = caseApplication.getArbitrators();
|
|
1893
|
|
- if(arbitrators != null && arbitrators.size() > 0 && StringUtils.isEmpty(arbitratorId) && StringUtils.isEmpty(arbitratorName)){
|
|
1894
|
|
- List<Long> ids = arbitrators.stream().map(Arbitrator::getId).collect(Collectors.toList());
|
|
1895
|
|
- List<String> arbitratorNames = arbitrators.stream().map(Arbitrator::getArbitratorName).collect(Collectors.toList());
|
|
1896
|
|
- String idstr = ids.stream().map(Object::toString).collect(Collectors.joining(","));
|
|
1897
|
|
- String arbitratorNamestr = arbitratorNames.stream().map(Object::toString).collect(Collectors.joining(","));
|
|
1898
|
|
- caseApplication.setArbitratorId(idstr);
|
|
1899
|
|
- caseApplication.setArbitratorName(arbitratorNamestr);
|
|
1900
|
|
- caseApplication.setLockStatus(1);
|
|
1901
|
|
- rows = caseApplicationMapper.submitCaseApplication(caseApplication);
|
|
1902
|
|
- }
|
|
1903
|
|
- } else {
|
|
1904
|
|
- List<Arbitrator> arbitrators = caseApplication.getArbitrators();
|
|
1905
|
|
- // 仲裁员信息
|
|
1906
|
|
- if (arbitrators != null && arbitrators.size() > 0) {
|
|
1907
|
|
- List<Long> ids = arbitrators.stream().map(Arbitrator::getId).collect(Collectors.toList());
|
|
1908
|
|
- List<String> arbitratorNames = arbitrators.stream().map(Arbitrator::getArbitratorName).collect(Collectors.toList());
|
|
1909
|
|
- String idstr = ids.stream().map(Object::toString).collect(Collectors.joining(","));
|
|
1910
|
|
- String arbitratorNamestr = arbitratorNames.stream().map(Object::toString).collect(Collectors.joining(","));
|
|
1911
|
|
- caseApplication.setArbitratorId(idstr);
|
|
1912
|
|
- caseApplication.setArbitratorName(arbitratorNamestr);
|
|
1913
|
|
- caseApplication.setLockStatus(1);
|
|
1914
|
|
- rows = caseApplicationMapper.submitCaseApplication(caseApplication);
|
|
1915
|
|
- }
|
|
1916
|
|
- }
|
|
|
2084
|
+ caseApplication.setLockStatus(1);
|
|
|
2085
|
+ rows = caseApplicationMapper.submitCaseApplication(caseApplication);
|
|
|
2086
|
+
|
|
|
2087
|
+ // List<Arbitrator> arbitrators = caseApplication.getArbitrators();
|
|
|
2088
|
+
|
|
|
2089
|
+// if( StringUtils.isEmpty(arbitratorId) && StringUtils.isEmpty(arbitratorName)){
|
|
|
2090
|
+// List<Long> ids = arbitrators.stream().map(Arbitrator::getId).collect(Collectors.toList());
|
|
|
2091
|
+// List<String> arbitratorNames = arbitrators.stream().map(Arbitrator::getArbitratorName).collect(Collectors.toList());
|
|
|
2092
|
+// String idstr = ids.stream().map(Object::toString).collect(Collectors.joining(","));
|
|
|
2093
|
+// String arbitratorNamestr = arbitratorNames.stream().map(Object::toString).collect(Collectors.joining(","));
|
|
|
2094
|
+// caseApplication.setArbitratorId(idstr);
|
|
|
2095
|
+// caseApplication.setArbitratorName(arbitratorNamestr);
|
|
|
2096
|
+// caseApplication.setLockStatus(1);
|
|
|
2097
|
+// rows = caseApplicationMapper.submitCaseApplication(caseApplication);
|
|
|
2098
|
+// }
|
|
|
2099
|
+
|
|
1917
|
2100
|
// 新增日志
|
|
1918
|
2101
|
insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL, "");
|
|
1919
|
2102
|
return success();
|