瀏覽代碼

实现用印确认

qitz 2 年之前
父節點
當前提交
0e352e87ac

+ 11
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/mscase/MsSignSealController.java 查看文件

5
 import com.ruoyi.common.core.domain.AjaxResult;
5
 import com.ruoyi.common.core.domain.AjaxResult;
6
 import com.ruoyi.common.exception.EsignDemoException;
6
 import com.ruoyi.common.exception.EsignDemoException;
7
 import com.ruoyi.wisdomarbitrate.domain.dto.mscase.MsSignSealDTO;
7
 import com.ruoyi.wisdomarbitrate.domain.dto.mscase.MsSignSealDTO;
8
+import com.ruoyi.wisdomarbitrate.domain.dto.mscase.SealSignRecord;
8
 import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseApplicationVO;
9
 import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseApplicationVO;
9
 import com.ruoyi.wisdomarbitrate.service.mscase.MsSignSealService;
10
 import com.ruoyi.wisdomarbitrate.service.mscase.MsSignSealService;
10
 import org.springframework.beans.factory.annotation.Autowired;
11
 import org.springframework.beans.factory.annotation.Autowired;
12
+import org.springframework.validation.annotation.Validated;
11
 import org.springframework.web.bind.annotation.PostMapping;
13
 import org.springframework.web.bind.annotation.PostMapping;
12
 import org.springframework.web.bind.annotation.RequestBody;
14
 import org.springframework.web.bind.annotation.RequestBody;
13
 import org.springframework.web.bind.annotation.RequestMapping;
15
 import org.springframework.web.bind.annotation.RequestMapping;
42
         return msSignSealService.sealApply(dto);
44
         return msSignSealService.sealApply(dto);
43
     }
45
     }
44
 
46
 
47
+    /**
48
+     * 查询用印链接
49
+     */
50
+    @PostMapping("/selectSealUrl")
51
+    public AjaxResult selectSealUrl(@Validated @RequestBody MsSignSealDTO dto) throws EsignDemoException {
52
+        SealSignRecord sealUrlRecordselect = msSignSealService.selectSealUrl(dto);
53
+        return success(sealUrlRecordselect);
54
+    }
55
+
45
 
56
 
46
 
57
 
47
 
58
 

+ 4
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/dept/MsSealSignRecordMapper.java 查看文件

1
 package com.ruoyi.wisdomarbitrate.mapper.dept;
1
 package com.ruoyi.wisdomarbitrate.mapper.dept;
2
 
2
 
3
+import com.ruoyi.wisdomarbitrate.domain.dto.mscase.SealSignRecord;
3
 import com.ruoyi.wisdomarbitrate.domain.entity.dept.MsSealSignRecord;
4
 import com.ruoyi.wisdomarbitrate.domain.entity.dept.MsSealSignRecord;
4
 import tk.mybatis.mapper.common.Mapper;
5
 import tk.mybatis.mapper.common.Mapper;
5
 
6
 
7
+import java.util.List;
8
+
6
 public interface MsSealSignRecordMapper extends Mapper<MsSealSignRecord> {
9
 public interface MsSealSignRecordMapper extends Mapper<MsSealSignRecord> {
10
+
7
 }
11
 }

+ 4
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/MsSignSealService.java 查看文件

3
 import com.ruoyi.common.core.domain.AjaxResult;
3
 import com.ruoyi.common.core.domain.AjaxResult;
4
 import com.ruoyi.common.exception.EsignDemoException;
4
 import com.ruoyi.common.exception.EsignDemoException;
5
 import com.ruoyi.wisdomarbitrate.domain.dto.mscase.MsSignSealDTO;
5
 import com.ruoyi.wisdomarbitrate.domain.dto.mscase.MsSignSealDTO;
6
+import com.ruoyi.wisdomarbitrate.domain.dto.mscase.SealSignRecord;
6
 import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseApplicationVO;
7
 import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseApplicationVO;
7
 
8
 
8
 public interface MsSignSealService {
9
 public interface MsSignSealService {
11
     AjaxResult sureMediationSeal(MsCaseApplicationVO caseApplication) throws EsignDemoException, InterruptedException;
12
     AjaxResult sureMediationSeal(MsCaseApplicationVO caseApplication) throws EsignDemoException, InterruptedException;
12
 
13
 
13
     AjaxResult sealApply(MsSignSealDTO dto);
14
     AjaxResult sealApply(MsSignSealDTO dto);
15
+
16
+
17
+    SealSignRecord selectSealUrl(MsSignSealDTO dto) throws EsignDemoException;
14
 }
18
 }

+ 31
- 3
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsSignSealServiceImpl.java 查看文件

25
 import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAffiliate;
25
 import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAffiliate;
26
 import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseApplication;
26
 import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseApplication;
27
 import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach;
27
 import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach;
28
+import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCasePaymentRecord;
28
 import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseApplicationVO;
29
 import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseApplicationVO;
29
 import com.ruoyi.wisdomarbitrate.mapper.dept.DeptIdentifyMapper;
30
 import com.ruoyi.wisdomarbitrate.mapper.dept.DeptIdentifyMapper;
30
 import com.ruoyi.wisdomarbitrate.mapper.dept.MsSealSignRecordMapper;
31
 import com.ruoyi.wisdomarbitrate.mapper.dept.MsSealSignRecordMapper;
39
 import org.springframework.beans.factory.annotation.Autowired;
40
 import org.springframework.beans.factory.annotation.Autowired;
40
 import org.springframework.stereotype.Service;
41
 import org.springframework.stereotype.Service;
41
 import org.springframework.transaction.annotation.Transactional;
42
 import org.springframework.transaction.annotation.Transactional;
43
+import tk.mybatis.mapper.entity.Example;
42
 
44
 
43
 import javax.annotation.Resource;
45
 import javax.annotation.Resource;
44
 import java.util.ArrayList;
46
 import java.util.ArrayList;
82
             for (MsCaseAttach caseAttach : caseAttachList) {
84
             for (MsCaseAttach caseAttach : caseAttachList) {
83
                 if (caseAttach.getAnnexType() == 3) {
85
                 if (caseAttach.getAnnexType() == 3) {
84
                     String annexPath = caseAttach.getAnnexPath();
86
                     String annexPath = caseAttach.getAnnexPath();
85
-                    String path = "/home/ruoyi" + annexPath;
86
-
87
+//                    String path = "/home/ruoyi" + annexPath;
88
+                    String path = "D:\\home\\ruoyi\\uploadPath\\upload\\2023\\12\\调解书测试.docx";
87
                     //获取文件上传地址
89
                     //获取文件上传地址
88
                     EsignHttpResponse response = SaaSAPIFileUtils.getUploadUrl(path);
90
                     EsignHttpResponse response = SaaSAPIFileUtils.getUploadUrl(path);
89
                     String body = response.getBody();
91
                     String body = response.getBody();
274
                                                 SmsUtils.SendSmsRequest request1 = new SmsUtils.SendSmsRequest();
276
                                                 SmsUtils.SendSmsRequest request1 = new SmsUtils.SendSmsRequest();
275
                                                 request1.setTemplateId("2047719");
277
                                                 request1.setTemplateId("2047719");
276
                                                 request1.setPhone(caseAffiliate.getRespondentPhone());
278
                                                 request1.setPhone(caseAffiliate.getRespondentPhone());
277
-                                                request1.setTemplateParamSet(new String[]{caseAffiliate.getNameAgent(), caseApplication.getCaseNum(),urlResponnew});
279
+                                                request1.setTemplateParamSet(new String[]{caseAffiliate.getRespondentName(), caseApplication.getCaseNum(),urlResponnew});
278
                                                 Boolean aBoolean1 = SmsUtils.sendSms(request1);
280
                                                 Boolean aBoolean1 = SmsUtils.sendSms(request1);
279
 
281
 
280
 
282
 
339
 
341
 
340
     }
342
     }
341
 
343
 
344
+    @Override
345
+    public SealSignRecord selectSealUrl(MsSignSealDTO dto) throws EsignDemoException {
346
+        Example example = new Example(MsSealSignRecord.class);
347
+        Example.Criteria criteria = example.createCriteria();
348
+        criteria.andEqualTo("caseAppliId", dto.getCaseId());
349
+        List<MsSealSignRecord> sealSignRecords = sealSignRecordMapper.selectByExample(example);
350
+
351
+        Gson gson = new Gson();
352
+        SealSignRecord sealSignRecordReslt = new SealSignRecord();
353
+        if (sealSignRecords != null && sealSignRecords.size() > 0) {
354
+            MsSealSignRecord sealSignRecordselect = sealSignRecords.get(0);
355
+            SealSignRecord sealSignRecord1 = new SealSignRecord();
356
+            BeanUtil.copyProperties(sealSignRecordselect, sealSignRecord1);
357
+            sealSignRecord1.setSignFlowid(sealSignRecordselect.getSignFlowId());
358
+            sealSignRecord1.setOrgnizeNamePsnAccount(sealSignRecordselect.getOrgnNamePsnAcc());
359
+            sealSignRecord1.setOrgnizeName(sealSignRecordselect.getOrgnizeName());
360
+
361
+            EsignHttpResponse signUrl = SignAward.usesealUrl(sealSignRecord1);
362
+            JsonObject signUrlJsonObject = gson.fromJson(signUrl.getBody(), JsonObject.class);
363
+            JsonObject signUrlData = signUrlJsonObject.getAsJsonObject("data");
364
+            String url = signUrlData.get("shortUrl").getAsString();
365
+            sealSignRecordReslt.setSealUrl(url);
366
+        }
367
+        return sealSignRecordReslt;
368
+    }
369
+
342
 
370
 
343
 }
371
 }

+ 7
- 0
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/dept/MsSealSignRecordMapper.xml 查看文件

24
     <result column="position_yorg" jdbcType="DOUBLE" property="positionYorg" />
24
     <result column="position_yorg" jdbcType="DOUBLE" property="positionYorg" />
25
     <result column="file_download_url" jdbcType="LONGVARCHAR" property="fileDownloadUrl" />
25
     <result column="file_download_url" jdbcType="LONGVARCHAR" property="fileDownloadUrl" />
26
   </resultMap>
26
   </resultMap>
27
+
28
+
29
+
30
+
31
+
32
+
33
+
27
 </mapper>
34
 </mapper>