|
|
@@ -1429,6 +1429,106 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|
1429
|
1429
|
return signRecord;
|
|
1430
|
1430
|
}
|
|
1431
|
1431
|
|
|
|
1432
|
+ @Override
|
|
|
1433
|
+ public SealSignRecord getSignUrlBatch(StringIdsReq idsReq) {
|
|
|
1434
|
+ SealSignRecord signRecord = new SealSignRecord();
|
|
|
1435
|
+ try {
|
|
|
1436
|
+ EsignHttpResponse identityInfo = SignAward.identityInfo(idsReq);
|
|
|
1437
|
+
|
|
|
1438
|
+ Gson gson = new Gson();
|
|
|
1439
|
+ if (StrUtil.isNotEmpty(identityInfo.getBody())) {
|
|
|
1440
|
+ JsonObject identityInfoJsonObject = gson.fromJson(identityInfo.getBody(), JsonObject.class);
|
|
|
1441
|
+ if (identityInfoJsonObject != null && !identityInfoJsonObject.get("data").isJsonNull()) {
|
|
|
1442
|
+ JsonObject identityInfoData = identityInfoJsonObject.getAsJsonObject("data");
|
|
|
1443
|
+ if (identityInfoData != null && !identityInfoData.get("psnId").isJsonNull()) {
|
|
|
1444
|
+ idsReq.setPsnId(identityInfoData.get("psnId").getAsString());
|
|
|
1445
|
+ }
|
|
|
1446
|
+ }
|
|
|
1447
|
+ }
|
|
|
1448
|
+ if (StrUtil.isEmpty(idsReq.getPsnId())) {
|
|
|
1449
|
+ throw new ServiceException("该用户未认证");
|
|
|
1450
|
+ }
|
|
|
1451
|
+ Integer batchNumber = idsReq.getBatchNumber();
|
|
|
1452
|
+ Integer caseStatus = CaseApplicationConstants.SIGN_ARBITRATION;
|
|
|
1453
|
+ List<CaseApplication> caseApplications = sealSignRecordMapper.selectsignFlow(batchNumber,caseStatus);
|
|
|
1454
|
+ if (caseApplications != null && caseApplications.size() > 0) {
|
|
|
1455
|
+ List<String> signFlowIds = caseApplications.stream().map(CaseApplication::getSignFlowId).collect(Collectors.toList());
|
|
|
1456
|
+ idsReq.setIds(signFlowIds);
|
|
|
1457
|
+
|
|
|
1458
|
+ EsignHttpResponse batchSignUrl = SignAward.batchSignUrl(idsReq);
|
|
|
1459
|
+ if (StrUtil.isNotEmpty(batchSignUrl.getBody())) {
|
|
|
1460
|
+ JsonObject signUrlJsonObject = gson.fromJson(batchSignUrl.getBody(), JsonObject.class);
|
|
|
1461
|
+ if (signUrlJsonObject != null && !signUrlJsonObject.get("data").isJsonNull()) {
|
|
|
1462
|
+ JsonObject signUrlData = signUrlJsonObject.getAsJsonObject("data");
|
|
|
1463
|
+ if (signUrlData != null && !signUrlData.get("batchSignUrlWithoutLogin").isJsonNull()) {
|
|
|
1464
|
+ // 免登录批量签链接(链接有效期2小时)
|
|
|
1465
|
+ String url = signUrlData.get("batchSignUrlWithoutLogin").getAsString();
|
|
|
1466
|
+ // batchSignUrl 需登录批量签链接(链接有效期2小时),batchSignShortUrl需登录批量签短链接(链接有效期2小时),batchSignShortUrlWithoutLogin免登录批量签短链接(链接有效期2小时)
|
|
|
1467
|
+ signRecord.setSignUrl(url);
|
|
|
1468
|
+ }
|
|
|
1469
|
+ }
|
|
|
1470
|
+ }
|
|
|
1471
|
+
|
|
|
1472
|
+ }else{
|
|
|
1473
|
+ throw new ServiceException("这个批号没有批量签名的案件");
|
|
|
1474
|
+ }
|
|
|
1475
|
+
|
|
|
1476
|
+ } catch (EsignDemoException e) {
|
|
|
1477
|
+ e.printStackTrace();
|
|
|
1478
|
+ }
|
|
|
1479
|
+
|
|
|
1480
|
+ return signRecord;
|
|
|
1481
|
+ }
|
|
|
1482
|
+
|
|
|
1483
|
+ @Override
|
|
|
1484
|
+ public SealSignRecord getSealUrlBatch(StringIdsReq idsReq) {
|
|
|
1485
|
+ SealSignRecord signRecord = new SealSignRecord();
|
|
|
1486
|
+ try {
|
|
|
1487
|
+ EsignHttpResponse identityInfo = SignAward.identityInfo(idsReq);
|
|
|
1488
|
+
|
|
|
1489
|
+ Gson gson = new Gson();
|
|
|
1490
|
+ if (StrUtil.isNotEmpty(identityInfo.getBody())) {
|
|
|
1491
|
+ JsonObject identityInfoJsonObject = gson.fromJson(identityInfo.getBody(), JsonObject.class);
|
|
|
1492
|
+ if(identityInfoJsonObject!=null&&!identityInfoJsonObject.get("data").isJsonNull()) {
|
|
|
1493
|
+ JsonObject identityInfoData = identityInfoJsonObject.getAsJsonObject("data");
|
|
|
1494
|
+ if (identityInfoData != null && !identityInfoData.get("psnId") .isJsonNull()) {
|
|
|
1495
|
+ idsReq.setPsnId(identityInfoData.get("psnId").getAsString());
|
|
|
1496
|
+ }
|
|
|
1497
|
+ }
|
|
|
1498
|
+ }
|
|
|
1499
|
+ if (StrUtil.isEmpty(idsReq.getPsnId())) {
|
|
|
1500
|
+ throw new ServiceException("该用户未认证");
|
|
|
1501
|
+ }
|
|
|
1502
|
+ Integer batchNumber = idsReq.getBatchNumber();
|
|
|
1503
|
+ Integer caseStatus = CaseApplicationConstants.ARBITRATED_SEAL;
|
|
|
1504
|
+ List<CaseApplication> caseApplications = sealSignRecordMapper.selectsignFlow(batchNumber,caseStatus);
|
|
|
1505
|
+ if (caseApplications != null && caseApplications.size() > 0) {
|
|
|
1506
|
+ List<String> signFlowIds = caseApplications.stream().map(CaseApplication::getSignFlowId).collect(Collectors.toList());
|
|
|
1507
|
+ idsReq.setIds(signFlowIds);
|
|
|
1508
|
+
|
|
|
1509
|
+ EsignHttpResponse batchSignUrl = SignAward.batchSignUrl(idsReq);
|
|
|
1510
|
+ if (StrUtil.isNotEmpty(batchSignUrl.getBody())) {
|
|
|
1511
|
+ JsonObject signUrlJsonObject = gson.fromJson(batchSignUrl.getBody(), JsonObject.class);
|
|
|
1512
|
+ if (signUrlJsonObject != null && !signUrlJsonObject.get("data").isJsonNull()) {
|
|
|
1513
|
+ JsonObject signUrlData = signUrlJsonObject.getAsJsonObject("data");
|
|
|
1514
|
+ if (signUrlData != null&& !signUrlData.get("batchSignUrlWithoutLogin").isJsonNull()) {
|
|
|
1515
|
+ // 免登录批量签链接(链接有效期2小时)
|
|
|
1516
|
+ String url = signUrlData.get("batchSignUrlWithoutLogin").getAsString();
|
|
|
1517
|
+ // batchSignUrl 需登录批量签链接(链接有效期2小时),batchSignShortUrl需登录批量签短链接(链接有效期2小时),batchSignShortUrlWithoutLogin免登录批量签短链接(链接有效期2小时)
|
|
|
1518
|
+ signRecord.setSignUrl(url);
|
|
|
1519
|
+ }
|
|
|
1520
|
+ }
|
|
|
1521
|
+ }
|
|
|
1522
|
+
|
|
|
1523
|
+ }else{
|
|
|
1524
|
+ throw new ServiceException("这个批号没有批量用印的案件");
|
|
|
1525
|
+ }
|
|
|
1526
|
+ } catch (EsignDemoException e) {
|
|
|
1527
|
+ e.printStackTrace();
|
|
|
1528
|
+ }
|
|
|
1529
|
+ return signRecord;
|
|
|
1530
|
+ }
|
|
|
1531
|
+
|
|
1432
|
1532
|
/**
|
|
1433
|
1533
|
* 根据仲裁员手机号分页查询等待签署,签署中的裁决书
|
|
1434
|
1534
|
*
|