|
|
@@ -243,12 +243,12 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
243
|
243
|
List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
|
|
244
|
244
|
Map<String, Long> deptMap =new HashMap<>();
|
|
245
|
245
|
if (caseAffiliates != null && caseAffiliates.size() > 0) {
|
|
246
|
|
- // 查询所有的组织机构,组装成map
|
|
247
|
|
- List<SysDept> deptList = sysDeptMapper.selectDeptList(new SysDept());
|
|
248
|
|
- if (CollectionUtil.isEmpty(deptList)) {
|
|
249
|
|
- deptList = new ArrayList<>();
|
|
250
|
|
- }
|
|
251
|
|
- deptMap = deptList.stream().collect(Collectors.toMap(SysDept::getDeptName, SysDept::getDeptId,(oldV,newV)->newV));
|
|
|
246
|
+ // 查询所有的组织机构,组装成map
|
|
|
247
|
+ List<SysDept> deptList = sysDeptMapper.selectDeptList(new SysDept());
|
|
|
248
|
+ if (CollectionUtil.isEmpty(deptList)) {
|
|
|
249
|
+ deptList = new ArrayList<>();
|
|
|
250
|
+ }
|
|
|
251
|
+ deptMap = deptList.stream().collect(Collectors.toMap(SysDept::getDeptName, SysDept::getDeptId,(oldV,newV)->newV));
|
|
252
|
252
|
|
|
253
|
253
|
for (CaseAffiliate caseAffiliate : caseAffiliates) {
|
|
254
|
254
|
caseAffiliate.setCaseAppliId(caseApplication.getId());
|
|
|
@@ -307,7 +307,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
307
|
307
|
String currentDay = DateUtils.dateTime();
|
|
308
|
308
|
String caseNum = "zc"+ currentDay;
|
|
309
|
309
|
//查询出当天的案件编号的最大值
|
|
310
|
|
- Integer maxCaseNum = caseApplicationMapper.selectCaseNumLike(caseNum,caseNum.length());
|
|
|
310
|
+ Integer maxCaseNum = caseApplicationMapper.selectCaseNumLike(caseNum,caseNum.length());
|
|
311
|
311
|
if(null == maxCaseNum){
|
|
312
|
312
|
caseNum = caseNum + "001";
|
|
313
|
313
|
}else {
|
|
|
@@ -373,7 +373,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
373
|
373
|
|
|
374
|
374
|
}
|
|
375
|
375
|
|
|
376
|
|
- caseAffiliateMapper.updataCaseAffiliate(caseAffiliate);
|
|
|
376
|
+ caseAffiliateMapper.updataCaseAffiliate(caseAffiliate);
|
|
377
|
377
|
}
|
|
378
|
378
|
|
|
379
|
379
|
}
|
|
|
@@ -428,7 +428,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
428
|
428
|
SmsUtils.sendSms(request);
|
|
429
|
429
|
}
|
|
430
|
430
|
} else if (null != agentUser.getDeptId() && !String.valueOf(agentUser.getDeptId()).equals(caseAffiliate.getApplicationOrganId())) {
|
|
431
|
|
- return "申请机构与申请代理人不匹配";
|
|
|
431
|
+ return "申请机构与申请代理人不匹配";
|
|
432
|
432
|
} else if (null != agentUser.getDeptId() && String.valueOf(agentUser.getDeptId()).equals(caseAffiliate.getApplicationOrganId())){
|
|
433
|
433
|
// 同步用户表和案件关联人表的手机号和名称
|
|
434
|
434
|
caseAffiliate.setContactTelphoneAgent(agentUser.getPhonenumber());
|
|
|
@@ -602,48 +602,48 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
602
|
602
|
|
|
603
|
603
|
//对不重复的立案对象集合的立案对象重新组装对应的案件关联人信息
|
|
604
|
604
|
// if(caseApplicationListinsertDiffer!=null&&caseApplicationListinsertDiffer.size()>0){
|
|
605
|
|
- List<CaseApplication> caseApplicationNewList = null;
|
|
606
|
|
- for (int i = 0; i < caseApplicationListinsert.size(); i++){
|
|
607
|
|
- caseApplicationNewList = new ArrayList<>();
|
|
608
|
|
- CaseApplication caseApplicationinsertDiffer = caseApplicationListinsert.get(i);
|
|
609
|
|
- // 设置自动编码
|
|
610
|
|
- caseApplicationinsertDiffer.setCaseNum(generateCaseNum());
|
|
611
|
|
- List<CaseAffiliate> caseAffiliatesnew = new ArrayList<>();
|
|
612
|
|
- CaseApplication caseApplicationNew = new CaseApplication();
|
|
613
|
|
- copyCaseApplication(caseApplicationinsertDiffer,caseApplicationNew);
|
|
614
|
|
- if(caseApplicationListinsert!=null&&caseApplicationListinsert.size()>0){
|
|
615
|
|
- for (int j = 0; j < caseApplicationListinsert.size(); j++){
|
|
616
|
|
- CaseApplication caseApplicationinsert = caseApplicationListinsert.get(j);
|
|
617
|
|
-
|
|
618
|
|
- if(StringUtils.isNotEmpty(caseApplicationinsert.getCaseNum())&&
|
|
619
|
|
- caseApplicationinsert.getCaseNum().equals(caseApplicationinsertDiffer.getCaseNum())){
|
|
620
|
|
-
|
|
621
|
|
- caseAffiliatesnew.addAll(caseApplicationinsert.getCaseAffiliates());
|
|
622
|
|
- }
|
|
|
605
|
+ List<CaseApplication> caseApplicationNewList = null;
|
|
|
606
|
+ for (int i = 0; i < caseApplicationListinsert.size(); i++){
|
|
|
607
|
+ caseApplicationNewList = new ArrayList<>();
|
|
|
608
|
+ CaseApplication caseApplicationinsertDiffer = caseApplicationListinsert.get(i);
|
|
|
609
|
+ // 设置自动编码
|
|
|
610
|
+ caseApplicationinsertDiffer.setCaseNum(generateCaseNum());
|
|
|
611
|
+ List<CaseAffiliate> caseAffiliatesnew = new ArrayList<>();
|
|
|
612
|
+ CaseApplication caseApplicationNew = new CaseApplication();
|
|
|
613
|
+ copyCaseApplication(caseApplicationinsertDiffer,caseApplicationNew);
|
|
|
614
|
+ if(caseApplicationListinsert!=null&&caseApplicationListinsert.size()>0){
|
|
|
615
|
+ for (int j = 0; j < caseApplicationListinsert.size(); j++){
|
|
|
616
|
+ CaseApplication caseApplicationinsert = caseApplicationListinsert.get(j);
|
|
|
617
|
+
|
|
|
618
|
+ if(StringUtils.isNotEmpty(caseApplicationinsert.getCaseNum())&&
|
|
|
619
|
+ caseApplicationinsert.getCaseNum().equals(caseApplicationinsertDiffer.getCaseNum())){
|
|
|
620
|
+
|
|
|
621
|
+ caseAffiliatesnew.addAll(caseApplicationinsert.getCaseAffiliates());
|
|
623
|
622
|
}
|
|
624
|
|
- caseApplicationNew.setCaseAffiliates(caseAffiliatesnew);
|
|
625
|
|
- caseApplicationNewList.add(caseApplicationNew);
|
|
626
|
623
|
}
|
|
|
624
|
+ caseApplicationNew.setCaseAffiliates(caseAffiliatesnew);
|
|
|
625
|
+ caseApplicationNewList.add(caseApplicationNew);
|
|
|
626
|
+ }
|
|
627
|
627
|
|
|
628
|
|
- for (int k = 0; k < caseApplicationNewList.size(); k++){
|
|
629
|
|
- CaseApplication caseApplicationItera = caseApplicationNewList.get(k);
|
|
630
|
|
- // 新增立案信息
|
|
631
|
|
- caseApplicationItera.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
|
|
632
|
|
- caseApplicationItera.setCreateBy(getUsername());
|
|
633
|
|
- int rows = caseApplicationMapper.insertCaseApplication(caseApplicationItera);
|
|
634
|
|
- List<CaseAffiliate> caseAffiliates = caseApplicationItera.getCaseAffiliates();
|
|
635
|
|
- if(caseAffiliates!=null&&caseAffiliates.size()>0){
|
|
636
|
|
- for (CaseAffiliate caseAffiliate : caseAffiliates){
|
|
637
|
|
- caseAffiliate.setCaseAppliId(caseApplicationItera.getId());
|
|
|
628
|
+ for (int k = 0; k < caseApplicationNewList.size(); k++){
|
|
|
629
|
+ CaseApplication caseApplicationItera = caseApplicationNewList.get(k);
|
|
|
630
|
+ // 新增立案信息
|
|
|
631
|
+ caseApplicationItera.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
|
|
|
632
|
+ caseApplicationItera.setCreateBy(getUsername());
|
|
|
633
|
+ int rows = caseApplicationMapper.insertCaseApplication(caseApplicationItera);
|
|
|
634
|
+ List<CaseAffiliate> caseAffiliates = caseApplicationItera.getCaseAffiliates();
|
|
|
635
|
+ if(caseAffiliates!=null&&caseAffiliates.size()>0){
|
|
|
636
|
+ for (CaseAffiliate caseAffiliate : caseAffiliates){
|
|
|
637
|
+ caseAffiliate.setCaseAppliId(caseApplicationItera.getId());
|
|
638
|
638
|
|
|
639
|
|
- }
|
|
640
|
|
- caseAffiliateMapper.batchCaseAffiliate(caseAffiliates);
|
|
641
|
639
|
}
|
|
642
|
|
-
|
|
643
|
|
- successNum++;
|
|
644
|
|
- successMsg.append("<br/>" + successNum + "、立案编号 " + caseApplicationItera.getCaseNum() + " 导入成功");
|
|
|
640
|
+ caseAffiliateMapper.batchCaseAffiliate(caseAffiliates);
|
|
645
|
641
|
}
|
|
646
|
642
|
|
|
|
643
|
+ successNum++;
|
|
|
644
|
+ successMsg.append("<br/>" + successNum + "、立案编号 " + caseApplicationItera.getCaseNum() + " 导入成功");
|
|
|
645
|
+ }
|
|
|
646
|
+
|
|
647
|
647
|
// }
|
|
648
|
648
|
|
|
649
|
649
|
}
|
|
|
@@ -653,7 +653,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
653
|
653
|
}else {
|
|
654
|
654
|
throw new ServiceException("导入立案申请数据不能为空!");
|
|
655
|
655
|
}
|
|
656
|
|
- return successMsg.append(failureMsg.toString()).toString();
|
|
|
656
|
+ return successMsg.append(failureMsg.toString()).toString();
|
|
657
|
657
|
|
|
658
|
658
|
}
|
|
659
|
659
|
|
|
|
@@ -1019,7 +1019,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
1019
|
1019
|
JSONObject coordinateObj = coordinatesArray.getJSONObject(0);
|
|
1020
|
1020
|
double positionX = coordinateObj.getDoubleValue("positionX");
|
|
1021
|
1021
|
double positionY = coordinateObj.getDoubleValue("positionY");
|
|
1022
|
|
- sealSignRecord.setPositionXpsn(positionX);
|
|
|
1022
|
+ sealSignRecord.setPositionXpsn(positionX+90);
|
|
1023
|
1023
|
sealSignRecord.setPositionYpsn(positionY);
|
|
1024
|
1024
|
}
|
|
1025
|
1025
|
}else {
|
|
|
@@ -1034,8 +1034,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
1034
|
1034
|
JSONObject coordinateObj = coordinatesArray.getJSONObject(0);
|
|
1035
|
1035
|
double positionX = coordinateObj.getDoubleValue("positionX");
|
|
1036
|
1036
|
double positionY = coordinateObj.getDoubleValue("positionY");
|
|
1037
|
|
- sealSignRecord.setPositionXorg(positionX);
|
|
1038
|
|
- sealSignRecord.setPositionYorg(positionY);
|
|
|
1037
|
+ sealSignRecord.setPositionXorg(positionX-10);
|
|
|
1038
|
+ sealSignRecord.setPositionYorg(positionY+10);
|
|
1039
|
1039
|
}
|
|
1040
|
1040
|
}
|
|
1041
|
1041
|
}
|
|
|
@@ -1423,19 +1423,19 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
1423
|
1423
|
for(int i = 0;i < idStrList.length;i ++ ){
|
|
1424
|
1424
|
idList.add(Long.parseLong(idStrList[i]));
|
|
1425
|
1425
|
}
|
|
1426
|
|
- // 查询仲裁员电话号
|
|
1427
|
|
- List<SysUser> userList= sysUserMapper.selectUserListByIds(idList);
|
|
1428
|
|
- if(CollectionUtil.isNotEmpty(userList)) {
|
|
1429
|
|
- for (SysUser user : userList) {
|
|
1430
|
|
- //给仲裁员发送短信通知
|
|
1431
|
|
- request.setPhone(user.getPhonenumber());
|
|
1432
|
|
- // 1947342 普通短信 开庭日期通知 尊敬的{1}用户,您的{2}仲裁案件,开庭日期已确定为{3},请知晓,如非本人操作,请忽略本短信。
|
|
1433
|
|
- String name = user.getNickName();
|
|
1434
|
|
- request.setTemplateParamSet(new String[]{name, caseNum, hearDatestr});
|
|
1435
|
|
- SmsUtils.sendSms(request);
|
|
1436
|
|
-
|
|
1437
|
|
- }
|
|
1438
|
|
- }
|
|
|
1426
|
+ // 查询仲裁员电话号
|
|
|
1427
|
+ List<SysUser> userList= sysUserMapper.selectUserListByIds(idList);
|
|
|
1428
|
+ if(CollectionUtil.isNotEmpty(userList)) {
|
|
|
1429
|
+ for (SysUser user : userList) {
|
|
|
1430
|
+ //给仲裁员发送短信通知
|
|
|
1431
|
+ request.setPhone(user.getPhonenumber());
|
|
|
1432
|
+ // 1947342 普通短信 开庭日期通知 尊敬的{1}用户,您的{2}仲裁案件,开庭日期已确定为{3},请知晓,如非本人操作,请忽略本短信。
|
|
|
1433
|
+ String name = user.getNickName();
|
|
|
1434
|
+ request.setTemplateParamSet(new String[]{name, caseNum, hearDatestr});
|
|
|
1435
|
+ SmsUtils.sendSms(request);
|
|
|
1436
|
+
|
|
|
1437
|
+ }
|
|
|
1438
|
+ }
|
|
1439
|
1439
|
|
|
1440
|
1440
|
}
|
|
1441
|
1441
|
|
|
|
@@ -1448,7 +1448,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
1448
|
1448
|
CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(j);
|
|
1449
|
1449
|
int identityType = caseAffiliateselect.getIdentityType();
|
|
1450
|
1450
|
if(identityType==1){
|
|
1451
|
|
- caseAffiliateselect.setName(caseAffiliateselect.getApplicationOrganName());
|
|
|
1451
|
+ caseAffiliateselect.setName(caseAffiliateselect.getApplicationOrganName());
|
|
1452
|
1452
|
|
|
1453
|
1453
|
}
|
|
1454
|
1454
|
//给申请人、被申请人发送短信通知
|
|
|
@@ -1501,7 +1501,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
1501
|
1501
|
|
|
1502
|
1502
|
|
|
1503
|
1503
|
private void assignmentCaseAffiliates(CaseApplication caseApplication, List<CaseAffiliate> caseAffiliatesnew, Map<String, Long> deptMap) {
|
|
1504
|
|
- // 申请人信息
|
|
|
1504
|
+ // 申请人信息
|
|
1505
|
1505
|
CaseAffiliate caseAffiliate = new CaseAffiliate();
|
|
1506
|
1506
|
|
|
1507
|
1507
|
// BeanUtils.copyBeanProp(caseApplication,caseAffiliate);
|
|
|
@@ -1516,7 +1516,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
1516
|
1516
|
if(StrUtil.isNotEmpty(s)){
|
|
1517
|
1517
|
StringBuilder errorMsg = caseApplication.getErrorMsg();
|
|
1518
|
1518
|
if(StrUtil.isEmpty(errorMsg)){
|
|
1519
|
|
- errorMsg=new StringBuilder();
|
|
|
1519
|
+ errorMsg=new StringBuilder();
|
|
1520
|
1520
|
}
|
|
1521
|
1521
|
errorMsg.append(s);
|
|
1522
|
1522
|
caseApplication.setErrorMsg(errorMsg);
|
|
|
@@ -1563,27 +1563,27 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
1563
|
1563
|
|
|
1564
|
1564
|
|
|
1565
|
1565
|
|
|
1566
|
|
- // 将组织机构id设为申请人名称
|
|
1567
|
|
- if(deptMap.containsKey(caseApplication.getName())){
|
|
1568
|
|
- caseAffiliate.setApplicationOrganId(String.valueOf(deptMap.get(caseApplication.getName())));
|
|
1569
|
|
- caseAffiliate.setApplicationOrganName(caseApplication.getName());
|
|
1570
|
|
- }else {
|
|
1571
|
|
- // 如果不存在则新增
|
|
1572
|
|
- SysDept dept = new SysDept();
|
|
1573
|
|
- dept.setParentId(0L);
|
|
1574
|
|
- dept.setDeptName(caseApplication.getName());
|
|
1575
|
|
- dept.setAncestors("0");
|
|
1576
|
|
- dept.setOrderNum(1);
|
|
1577
|
|
- dept.setStatus("0");
|
|
1578
|
|
- dept.setDelFlag("0");
|
|
1579
|
|
- dept.setCreateBy(getUsername());
|
|
1580
|
|
- dept.setUpdateBy(getUsername());
|
|
1581
|
|
- sysDeptMapper.insertDept(dept);
|
|
1582
|
|
- deptMap.put(dept.getDeptName(),dept.getDeptId());
|
|
1583
|
|
- caseAffiliate.setApplicationOrganId(String.valueOf(dept.getDeptId()));
|
|
1584
|
|
- caseAffiliate.setApplicationOrganName(caseApplication.getName());
|
|
|
1566
|
+ // 将组织机构id设为申请人名称
|
|
|
1567
|
+ if(deptMap.containsKey(caseApplication.getName())){
|
|
|
1568
|
+ caseAffiliate.setApplicationOrganId(String.valueOf(deptMap.get(caseApplication.getName())));
|
|
|
1569
|
+ caseAffiliate.setApplicationOrganName(caseApplication.getName());
|
|
|
1570
|
+ }else {
|
|
|
1571
|
+ // 如果不存在则新增
|
|
|
1572
|
+ SysDept dept = new SysDept();
|
|
|
1573
|
+ dept.setParentId(0L);
|
|
|
1574
|
+ dept.setDeptName(caseApplication.getName());
|
|
|
1575
|
+ dept.setAncestors("0");
|
|
|
1576
|
+ dept.setOrderNum(1);
|
|
|
1577
|
+ dept.setStatus("0");
|
|
|
1578
|
+ dept.setDelFlag("0");
|
|
|
1579
|
+ dept.setCreateBy(getUsername());
|
|
|
1580
|
+ dept.setUpdateBy(getUsername());
|
|
|
1581
|
+ sysDeptMapper.insertDept(dept);
|
|
|
1582
|
+ deptMap.put(dept.getDeptName(),dept.getDeptId());
|
|
|
1583
|
+ caseAffiliate.setApplicationOrganId(String.valueOf(dept.getDeptId()));
|
|
|
1584
|
+ caseAffiliate.setApplicationOrganName(caseApplication.getName());
|
|
1585
|
1585
|
|
|
1586
|
|
- }
|
|
|
1586
|
+ }
|
|
1587
|
1587
|
|
|
1588
|
1588
|
}
|
|
1589
|
1589
|
|