|
|
@@ -1,13 +1,21 @@
|
|
1
|
1
|
package com.ruoyi.wisdomarbitrate.service.impl;
|
|
2
|
2
|
|
|
3
|
3
|
|
|
|
4
|
+import cn.hutool.core.collection.CollectionUtil;
|
|
|
5
|
+import cn.hutool.core.util.StrUtil;
|
|
|
6
|
+
|
|
|
7
|
+import com.ruoyi.common.annotation.DataScope;
|
|
4
|
8
|
import com.ruoyi.common.constant.CaseApplicationConstants;
|
|
|
9
|
+import com.ruoyi.common.core.domain.entity.SysDept;
|
|
5
|
10
|
import com.ruoyi.common.exception.ServiceException;
|
|
|
11
|
+import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
|
|
6
|
12
|
import com.ruoyi.common.utils.DateUtils;
|
|
7
|
13
|
import com.ruoyi.common.utils.SmsUtils;
|
|
8
|
14
|
import com.ruoyi.common.utils.StringUtils;
|
|
9
|
15
|
import com.ruoyi.common.utils.bean.BeanUtils;
|
|
|
16
|
+import com.ruoyi.system.mapper.SysDeptMapper;
|
|
10
|
17
|
import com.ruoyi.wisdomarbitrate.domain.*;
|
|
|
18
|
+import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
|
|
11
|
19
|
import com.ruoyi.wisdomarbitrate.mapper.*;
|
|
12
|
20
|
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
|
|
13
|
21
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@@ -18,6 +26,8 @@ import java.text.SimpleDateFormat;
|
|
18
|
26
|
import java.util.*;
|
|
19
|
27
|
import java.util.stream.Collectors;
|
|
20
|
28
|
|
|
|
29
|
+import static com.ruoyi.common.utils.SecurityUtils.getUsername;
|
|
|
30
|
+
|
|
21
|
31
|
|
|
22
|
32
|
@Service
|
|
23
|
33
|
public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
|
@@ -34,6 +44,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
34
|
44
|
|
|
35
|
45
|
@Autowired
|
|
36
|
46
|
private CaseAttachMapper caseAttachMapper;
|
|
|
47
|
+ @Autowired
|
|
|
48
|
+ private SysDeptMapper sysDeptMapper;
|
|
37
|
49
|
|
|
38
|
50
|
|
|
39
|
51
|
|
|
|
@@ -52,7 +64,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
52
|
64
|
//根据仲裁费用计费规则计算应缴费用
|
|
53
|
65
|
//暂时设置计费比率为0.01
|
|
54
|
66
|
BigDecimal feeRate = new BigDecimal(0.01);
|
|
55
|
|
- BigDecimal feePayable = caseApplication.getCaseSubjectAmount().multiply(feeRate).setScale(2,BigDecimal.ROUND_HALF_UP);
|
|
|
67
|
+ BigDecimal feePayable = caseApplication.getCaseSubjectAmount().multiply(feeRate).setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
56
|
68
|
caseApplication.setFeePayable(feePayable);
|
|
57
|
69
|
// 获取自动编码
|
|
58
|
70
|
String caseNum = generateCaseNum();
|
|
|
@@ -60,22 +72,52 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
60
|
72
|
|
|
61
|
73
|
int rows = caseApplicationMapper.insertCaseApplication(caseApplication);
|
|
62
|
74
|
List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
|
|
63
|
|
- if(caseAffiliates!=null&&caseAffiliates.size()>0){
|
|
64
|
|
- for (CaseAffiliate caseAffiliate : caseAffiliates){
|
|
|
75
|
+ Map<String, Long> deptMap =new HashMap<>();
|
|
|
76
|
+ if (caseAffiliates != null && caseAffiliates.size() > 0) {
|
|
|
77
|
+ // 查询所有的组织机构,组装成map
|
|
|
78
|
+ List<SysDept> deptList = sysDeptMapper.selectDeptList(new SysDept());
|
|
|
79
|
+ if (CollectionUtil.isEmpty(deptList)) {
|
|
|
80
|
+ deptList = new ArrayList<>();
|
|
|
81
|
+ }
|
|
|
82
|
+ deptMap = deptList.stream().collect(Collectors.toMap(SysDept::getDeptName, SysDept::getDeptId,(oldV,newV)->newV));
|
|
|
83
|
+
|
|
|
84
|
+ for (CaseAffiliate caseAffiliate : caseAffiliates) {
|
|
65
|
85
|
caseAffiliate.setCaseAppliId(caseApplication.getId());
|
|
|
86
|
+ if(caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseAffiliate.getName())) {
|
|
|
87
|
+ // 将组织机构id设为申请人名称
|
|
|
88
|
+ if (deptMap.containsKey(caseApplication.getName())) {
|
|
|
89
|
+ caseAffiliate.setName(String.valueOf(deptMap.get(caseAffiliate.getName())));
|
|
|
90
|
+ } else {
|
|
|
91
|
+ // 如果不存在则新增
|
|
|
92
|
+ SysDept dept = new SysDept();
|
|
|
93
|
+ dept.setParentId(0L);
|
|
|
94
|
+ dept.setDeptName(caseAffiliate.getName());
|
|
|
95
|
+ dept.setAncestors("0");
|
|
|
96
|
+ dept.setOrderNum(1);
|
|
|
97
|
+ dept.setStatus("0");
|
|
|
98
|
+ dept.setDelFlag("0");
|
|
|
99
|
+ dept.setCreateBy(getUsername());
|
|
|
100
|
+ dept.setUpdateBy(getUsername());
|
|
|
101
|
+ sysDeptMapper.insertDept(dept);
|
|
|
102
|
+ deptMap.put(dept.getDeptName(), dept.getDeptId());
|
|
|
103
|
+ caseAffiliate.setName(String.valueOf(dept.getDeptId()));
|
|
|
104
|
+
|
|
|
105
|
+ }
|
|
|
106
|
+ }
|
|
66
|
107
|
}
|
|
|
108
|
+
|
|
67
|
109
|
caseAffiliateMapper.batchCaseAffiliate(caseAffiliates);
|
|
68
|
110
|
}
|
|
69
|
111
|
|
|
70
|
112
|
List<CaseAttach> caseAttachList = caseApplication.getCaseAttachList();
|
|
71
|
|
- if(caseAttachList!=null&&caseAttachList.size()>0){
|
|
72
|
|
- for (CaseAttach caseAttach : caseAttachList){
|
|
|
113
|
+ if (caseAttachList != null && caseAttachList.size() > 0) {
|
|
|
114
|
+ for (CaseAttach caseAttach : caseAttachList) {
|
|
73
|
115
|
caseAttach.setCaseAppliId(caseApplication.getId());
|
|
74
|
116
|
caseAttachMapper.updateCaseAttach(caseAttach);
|
|
75
|
117
|
}
|
|
76
|
|
-
|
|
77
|
118
|
}
|
|
78
|
|
-
|
|
|
119
|
+ // 新增日志
|
|
|
120
|
+ CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CASE_APPLICATION,"");
|
|
79
|
121
|
return rows;
|
|
80
|
122
|
}
|
|
81
|
123
|
|
|
|
@@ -116,10 +158,38 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
116
|
158
|
int rows = caseApplicationMapper.updataCaseApplication(caseApplication);
|
|
117
|
159
|
List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
|
|
118
|
160
|
if(caseAffiliates!=null&&caseAffiliates.size()>0){
|
|
|
161
|
+ // 查询所有的组织机构,组装成map
|
|
|
162
|
+ List<SysDept> deptList = sysDeptMapper.selectDeptList(new SysDept());
|
|
|
163
|
+ if (CollectionUtil.isEmpty(deptList)) {
|
|
|
164
|
+ deptList = new ArrayList<>();
|
|
|
165
|
+ }
|
|
|
166
|
+ Map<String, Long> deptMap = deptList.stream().collect(Collectors.toMap(SysDept::getDeptName, SysDept::getDeptId,(oldV,newV)->newV));
|
|
119
|
167
|
for (CaseAffiliate caseAffiliate : caseAffiliates){
|
|
120
|
168
|
caseAffiliate.setCaseAppliId(caseApplication.getId());
|
|
|
169
|
+ if(caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseAffiliate.getName())) {
|
|
|
170
|
+ // 将组织机构id设为申请人名称
|
|
|
171
|
+ if (deptMap.containsKey(caseApplication.getName())) {
|
|
|
172
|
+ caseAffiliate.setName(String.valueOf(deptMap.get(caseAffiliate.getName())));
|
|
|
173
|
+ } else {
|
|
|
174
|
+ // 如果不存在则新增
|
|
|
175
|
+ SysDept dept = new SysDept();
|
|
|
176
|
+ dept.setParentId(0L);
|
|
|
177
|
+ dept.setDeptName(caseAffiliate.getName());
|
|
|
178
|
+ dept.setAncestors("0");
|
|
|
179
|
+ dept.setOrderNum(1);
|
|
|
180
|
+ dept.setStatus("0");
|
|
|
181
|
+ dept.setDelFlag("0");
|
|
|
182
|
+ dept.setCreateBy(getUsername());
|
|
|
183
|
+ dept.setUpdateBy(getUsername());
|
|
|
184
|
+ sysDeptMapper.insertDept(dept);
|
|
|
185
|
+ deptMap.put(dept.getDeptName(), dept.getDeptId());
|
|
|
186
|
+ caseAffiliate.setName(String.valueOf(dept.getDeptId()));
|
|
|
187
|
+
|
|
|
188
|
+ }
|
|
|
189
|
+ }
|
|
121
|
190
|
caseAffiliateMapper.updataCaseAffiliate(caseAffiliate);
|
|
122
|
191
|
}
|
|
|
192
|
+
|
|
123
|
193
|
}
|
|
124
|
194
|
List<CaseAttach> caseAttachList = caseApplication.getCaseAttachList();
|
|
125
|
195
|
if(caseAttachList!=null&&caseAttachList.size()>0){
|
|
|
@@ -139,6 +209,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
139
|
209
|
//提交立案申请
|
|
140
|
210
|
caseApplication.setCaseStatus(CaseApplicationConstants.CASE_CHECK);
|
|
141
|
211
|
int rows = caseApplicationMapper.submitCaseApplication(caseApplication);
|
|
|
212
|
+ // 新增日志
|
|
|
213
|
+ CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CASE_CHECK,"");
|
|
142
|
214
|
return rows;
|
|
143
|
215
|
}
|
|
144
|
216
|
|
|
|
@@ -186,12 +258,23 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
186
|
258
|
|
|
187
|
259
|
List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
|
|
188
|
260
|
if(caseAffiliatListeselect!=null){
|
|
|
261
|
+ // 查询组织机构
|
|
|
262
|
+ List<SysDept> sysDepts = sysDeptMapper.selectDeptList(new SysDept());
|
|
|
263
|
+ Map<String,String> deptMap=new HashMap<>();
|
|
|
264
|
+ if(CollectionUtil.isNotEmpty(sysDepts)){
|
|
|
265
|
+ for (SysDept sysDept : sysDepts) {
|
|
|
266
|
+ deptMap.put(String.valueOf(sysDept.getDeptId()),sysDept.getDeptName());
|
|
|
267
|
+ }
|
|
|
268
|
+ }
|
|
189
|
269
|
StringBuffer applicantName = new StringBuffer();
|
|
190
|
270
|
StringBuffer respondentName = new StringBuffer();
|
|
191
|
271
|
for (int i = 0; i < caseAffiliatListeselect.size(); i++){
|
|
192
|
272
|
CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(i);
|
|
193
|
273
|
int identityType = caseAffiliateselect.getIdentityType();
|
|
194
|
274
|
if(identityType==1){
|
|
|
275
|
+ if(StrUtil.isNotEmpty(caseAffiliateselect.getName())&&deptMap.containsKey(caseAffiliateselect.getName())){
|
|
|
276
|
+ caseAffiliateselect.setName(deptMap.get(caseAffiliateselect.getName()));
|
|
|
277
|
+ }
|
|
195
|
278
|
applicantName.append(caseAffiliateselect.getName()).append(",");;
|
|
196
|
279
|
}else if(identityType==2){
|
|
197
|
280
|
respondentName.append(caseAffiliateselect.getName()).append(",");;
|
|
|
@@ -213,6 +296,12 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
213
|
296
|
int successNum = 0;
|
|
214
|
297
|
int failureNum = 0;
|
|
215
|
298
|
if(caseApplicationList!=null&&caseApplicationList.size()>0){
|
|
|
299
|
+ // 1,查询所有的组织机构,组装成map
|
|
|
300
|
+ List<SysDept> deptList = sysDeptMapper.selectDeptList(new SysDept());
|
|
|
301
|
+ Map<String, Long> deptMap =new HashMap<>();
|
|
|
302
|
+ if(CollectionUtil.isNotEmpty(deptList)) {
|
|
|
303
|
+ deptMap = deptList.stream().collect(Collectors.toMap(SysDept::getDeptName, SysDept::getDeptId,(oldV,newV)->newV));
|
|
|
304
|
+ }
|
|
216
|
305
|
List<CaseApplication> caseApplicationListinsert = new ArrayList<>();
|
|
217
|
306
|
for (int i = 0; i < caseApplicationList.size(); i++){
|
|
218
|
307
|
CaseApplication caseApplication = caseApplicationList.get(i);
|
|
|
@@ -224,7 +313,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
224
|
313
|
|
|
225
|
314
|
//赋值CaseApplication的案件关联人信息
|
|
226
|
315
|
List<CaseAffiliate> caseAffiliatesnew = new ArrayList<>();
|
|
227
|
|
- assignmentCaseAffiliates(caseApplication,caseAffiliatesnew);
|
|
|
316
|
+ // 组装案件关联人信息
|
|
|
317
|
+ assignmentCaseAffiliates(caseApplication,caseAffiliatesnew,deptMap);
|
|
228
|
318
|
|
|
229
|
319
|
// int caseApplicationCount = selectCaseApplicationCount(caseApplication);
|
|
230
|
320
|
// if(caseApplicationCount>0){
|
|
|
@@ -344,7 +434,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
344
|
434
|
rows = caseApplicationMapper.submitCaseApplication(caseApplication);
|
|
345
|
435
|
}
|
|
346
|
436
|
}
|
|
347
|
|
-
|
|
|
437
|
+ // 新增日志
|
|
|
438
|
+ CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL,"");
|
|
348
|
439
|
return rows;
|
|
349
|
440
|
}
|
|
350
|
441
|
|
|
|
@@ -355,6 +446,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
355
|
446
|
int rows = caseApplicationMapper.submitCaseApplication(caseApplication);
|
|
356
|
447
|
ArbitrateRecord arbitrateRecord = caseApplication.getArbitrateRecord();
|
|
357
|
448
|
arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord);
|
|
|
449
|
+ // 新增日志
|
|
|
450
|
+ CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CHECK_ARBITRATION,"");
|
|
358
|
451
|
return rows;
|
|
359
|
452
|
|
|
360
|
453
|
}
|
|
|
@@ -368,9 +461,15 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
368
|
461
|
Integer agreeOrNotCheck = caseApplication.getAgreeOrNotCheck();
|
|
369
|
462
|
if(agreeOrNotCheck.intValue()==1){//同意审核
|
|
370
|
463
|
caseApplication.setCaseStatus(CaseApplicationConstants.SIGN_ARBITRATION);
|
|
|
464
|
+ // 新增日志
|
|
|
465
|
+ CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.SIGN_ARBITRATION,"");
|
|
|
466
|
+
|
|
371
|
467
|
rows = caseApplicationMapper.submitCaseApplication(caseApplication);
|
|
372
|
468
|
}else if(agreeOrNotCheck.intValue()==2){//拒绝审核
|
|
373
|
469
|
caseApplication.setCaseStatus(CaseApplicationConstants.VERPRIF_ARBITRATION);
|
|
|
470
|
+ // 新增日志
|
|
|
471
|
+ CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.VERPRIF_ARBITRATION,"");
|
|
|
472
|
+
|
|
374
|
473
|
rows = caseApplicationMapper.submitCaseApplication(caseApplication);
|
|
375
|
474
|
}
|
|
376
|
475
|
|
|
|
@@ -400,11 +499,22 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
400
|
499
|
caseAffiliate.setCaseAppliId(caseApplication.getId());
|
|
401
|
500
|
List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
|
|
402
|
501
|
if(caseAffiliatListeselect!=null){
|
|
|
502
|
+ // 查询组织机构
|
|
|
503
|
+ List<SysDept> sysDepts = sysDeptMapper.selectDeptList(new SysDept());
|
|
|
504
|
+ Map<String,String> deptMap=new HashMap<>();
|
|
|
505
|
+ if(CollectionUtil.isNotEmpty(sysDepts)){
|
|
|
506
|
+ for (SysDept sysDept : sysDepts) {
|
|
|
507
|
+ deptMap.put(String.valueOf(sysDept.getDeptId()),sysDept.getDeptName());
|
|
|
508
|
+ }
|
|
|
509
|
+ }
|
|
403
|
510
|
StringBuffer applicantName = new StringBuffer();
|
|
404
|
511
|
for (int i = 0; i < caseAffiliatListeselect.size(); i++){
|
|
405
|
512
|
CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(i);
|
|
406
|
513
|
int identityType = caseAffiliateselect.getIdentityType();
|
|
407
|
514
|
if(identityType==1){
|
|
|
515
|
+ if(StrUtil.isNotEmpty(caseAffiliateselect.getName())&&deptMap.containsKey(caseAffiliateselect.getName())){
|
|
|
516
|
+ caseAffiliateselect.setName(deptMap.get(caseAffiliateselect.getName()));
|
|
|
517
|
+ }
|
|
408
|
518
|
applicantName.append(caseAffiliateselect.getName()).append(",");;
|
|
409
|
519
|
}
|
|
410
|
520
|
}
|
|
|
@@ -415,6 +525,32 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
415
|
525
|
return caseApplicationselect;
|
|
416
|
526
|
}
|
|
417
|
527
|
|
|
|
528
|
+ /**
|
|
|
529
|
+ * 给被申请人发送房间号短信
|
|
|
530
|
+ * @param messageVO
|
|
|
531
|
+ * @return
|
|
|
532
|
+ */
|
|
|
533
|
+ @Override
|
|
|
534
|
+ public String sendRoomNoMessage(SendRoomNoMessageVO messageVO) {
|
|
|
535
|
+ CaseAffiliate caseAffiliate = caseAffiliateMapper.selectCaseAffiliateByIdentityType(messageVO.getId(), 2);
|
|
|
536
|
+ if(null==caseAffiliate){
|
|
|
537
|
+ return "被申请人不存在";
|
|
|
538
|
+ }
|
|
|
539
|
+ CaseApplication caseApplication = new CaseApplication();
|
|
|
540
|
+ caseApplication.setId(messageVO.getId());
|
|
|
541
|
+ CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
|
|
|
542
|
+
|
|
|
543
|
+ //发送短信通知
|
|
|
544
|
+ SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
|
|
545
|
+ request.setTemplateId("1948332");
|
|
|
546
|
+ // 1948332 普通短信 开庭审理房间号通知 尊敬的{1}用户,您的{2}仲裁案件,开庭审理房间号为{3},请知晓,如非本人操作,请忽略本短信。
|
|
|
547
|
+ request.setPhone(caseAffiliate.getContactTelphone());
|
|
|
548
|
+ request.setTemplateParamSet(new String[]{caseAffiliate.getName(), caseApplicationselect.getCaseNum(), messageVO.getRoomNo()});
|
|
|
549
|
+ SmsUtils.sendSms(request);
|
|
|
550
|
+
|
|
|
551
|
+ return "短信发送成功";
|
|
|
552
|
+ }
|
|
|
553
|
+
|
|
418
|
554
|
@Override
|
|
419
|
555
|
@Transactional
|
|
420
|
556
|
public int pendTralSure(CaseApplication caseApplication) {
|
|
|
@@ -459,9 +595,23 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
459
|
595
|
caseAffiliate.setCaseAppliId(caseApplication.getId());
|
|
460
|
596
|
List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
|
|
461
|
597
|
if(caseAffiliatListeselect!=null) {
|
|
|
598
|
+ // 查询组织机构
|
|
|
599
|
+ List<SysDept> sysDepts = sysDeptMapper.selectDeptList(new SysDept());
|
|
|
600
|
+ Map<String,String> deptMap=new HashMap<>();
|
|
|
601
|
+ if(CollectionUtil.isNotEmpty(sysDepts)){
|
|
|
602
|
+ for (SysDept sysDept : sysDepts) {
|
|
|
603
|
+ deptMap.put(String.valueOf(sysDept.getDeptId()),sysDept.getDeptName());
|
|
|
604
|
+ }
|
|
|
605
|
+ }
|
|
462
|
606
|
for (int j = 0; j < caseAffiliatListeselect.size(); j++) {
|
|
463
|
607
|
CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(j);
|
|
464
|
608
|
int identityType = caseAffiliateselect.getIdentityType();
|
|
|
609
|
+ if(identityType==1){
|
|
|
610
|
+ if(StrUtil.isNotEmpty(caseAffiliateselect.getName())&&deptMap.containsKey(caseAffiliateselect.getName())){
|
|
|
611
|
+ caseAffiliateselect.setName(deptMap.get(caseAffiliateselect.getName()));
|
|
|
612
|
+ }
|
|
|
613
|
+ caseAffiliateselect.setName(caseAffiliateselect.getName());;
|
|
|
614
|
+ }
|
|
465
|
615
|
//给申请人、被申请人发送短信通知
|
|
466
|
616
|
request.setPhone(caseAffiliateselect.getContactTelphone());
|
|
467
|
617
|
// 1947342 普通短信 开庭日期通知 尊敬的{1}用户,您的{2}仲裁案件,开庭日期已确定为{3},请知晓,如非本人操作,请忽略本短信。
|
|
|
@@ -470,6 +620,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
470
|
620
|
SmsUtils.sendSms(request);
|
|
471
|
621
|
}
|
|
472
|
622
|
}
|
|
|
623
|
+ // 新增日志
|
|
|
624
|
+ CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CHECK_ARBITRATION_METHOD,"");
|
|
473
|
625
|
|
|
474
|
626
|
return rows;
|
|
475
|
627
|
|
|
|
@@ -509,12 +661,17 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
509
|
661
|
|
|
510
|
662
|
|
|
511
|
663
|
|
|
512
|
|
- private void assignmentCaseAffiliates(CaseApplication caseApplication, List<CaseAffiliate> caseAffiliatesnew) {
|
|
|
664
|
+ private void assignmentCaseAffiliates(CaseApplication caseApplication, List<CaseAffiliate> caseAffiliatesnew, Map<String, Long> deptMap) {
|
|
|
665
|
+ // 申请人信息
|
|
513
|
666
|
CaseAffiliate caseAffiliate = new CaseAffiliate();
|
|
514
|
667
|
|
|
515
|
668
|
// BeanUtils.copyBeanProp(caseApplication,caseAffiliate);
|
|
516
|
669
|
BeanUtils.copyBeanProp(caseAffiliate,caseApplication);
|
|
517
|
670
|
caseAffiliate.setIdentityType(1);
|
|
|
671
|
+ // 申请人(机构),需要判断部门中是否存在,不存在则新增,当身份类型为1的时候,查询时需要根据名称查询组织机构
|
|
|
672
|
+ if(StrUtil.isNotEmpty(caseApplication.getName())){
|
|
|
673
|
+ setApplicantOrganization(caseAffiliate, caseApplication, deptMap);
|
|
|
674
|
+ }
|
|
518
|
675
|
caseAffiliatesnew.add(caseAffiliate);
|
|
519
|
676
|
|
|
520
|
677
|
// 组装被申请人信息
|
|
|
@@ -522,6 +679,38 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
522
|
679
|
caseApplication.setCaseAffiliates(caseAffiliatesnew);
|
|
523
|
680
|
}
|
|
524
|
681
|
|
|
|
682
|
+ /**
|
|
|
683
|
+ * 设置申请人的组织机构
|
|
|
684
|
+ * @param caseAffiliate
|
|
|
685
|
+ * @param caseApplication
|
|
|
686
|
+ */
|
|
|
687
|
+ @DataScope(deptAlias = "d")
|
|
|
688
|
+ private void setApplicantOrganization(CaseAffiliate caseAffiliate, CaseApplication caseApplication, Map<String, Long> deptMap ) {
|
|
|
689
|
+
|
|
|
690
|
+
|
|
|
691
|
+
|
|
|
692
|
+ // 将组织机构id设为申请人名称
|
|
|
693
|
+ if(deptMap.containsKey(caseApplication.getName())){
|
|
|
694
|
+ caseAffiliate.setName(String.valueOf(deptMap.get(caseApplication.getName())));
|
|
|
695
|
+ }else {
|
|
|
696
|
+ // 如果不存在则新增
|
|
|
697
|
+ SysDept dept = new SysDept();
|
|
|
698
|
+ dept.setParentId(0L);
|
|
|
699
|
+ dept.setDeptName(caseApplication.getName());
|
|
|
700
|
+ dept.setAncestors("0");
|
|
|
701
|
+ dept.setOrderNum(1);
|
|
|
702
|
+ dept.setStatus("0");
|
|
|
703
|
+ dept.setDelFlag("0");
|
|
|
704
|
+ dept.setCreateBy(getUsername());
|
|
|
705
|
+ dept.setUpdateBy(getUsername());
|
|
|
706
|
+ sysDeptMapper.insertDept(dept);
|
|
|
707
|
+ deptMap.put(dept.getDeptName(),dept.getDeptId());
|
|
|
708
|
+ caseAffiliate.setName(String.valueOf(dept.getDeptId()));
|
|
|
709
|
+
|
|
|
710
|
+ }
|
|
|
711
|
+
|
|
|
712
|
+ }
|
|
|
713
|
+
|
|
525
|
714
|
/**
|
|
526
|
715
|
* 组装被申请人信息
|
|
527
|
716
|
* @param caseApplication
|