实现用印确认
This commit is contained in:
+11
@@ -5,9 +5,11 @@ import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.exception.EsignDemoException;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.mscase.MsSignSealDTO;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.mscase.SealSignRecord;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseApplicationVO;
|
||||
import com.ruoyi.wisdomarbitrate.service.mscase.MsSignSealService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -42,6 +44,15 @@ public class MsSignSealController extends BaseController {
|
||||
return msSignSealService.sealApply(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用印链接
|
||||
*/
|
||||
@PostMapping("/selectSealUrl")
|
||||
public AjaxResult selectSealUrl(@Validated @RequestBody MsSignSealDTO dto) throws EsignDemoException {
|
||||
SealSignRecord sealUrlRecordselect = msSignSealService.selectSealUrl(dto);
|
||||
return success(sealUrlRecordselect);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+4
@@ -1,7 +1,11 @@
|
||||
package com.ruoyi.wisdomarbitrate.mapper.dept;
|
||||
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.mscase.SealSignRecord;
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.dept.MsSealSignRecord;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface MsSealSignRecordMapper extends Mapper<MsSealSignRecord> {
|
||||
|
||||
}
|
||||
+4
@@ -3,6 +3,7 @@ package com.ruoyi.wisdomarbitrate.service.mscase;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.exception.EsignDemoException;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.mscase.MsSignSealDTO;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.mscase.SealSignRecord;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseApplicationVO;
|
||||
|
||||
public interface MsSignSealService {
|
||||
@@ -11,4 +12,7 @@ public interface MsSignSealService {
|
||||
AjaxResult sureMediationSeal(MsCaseApplicationVO caseApplication) throws EsignDemoException, InterruptedException;
|
||||
|
||||
AjaxResult sealApply(MsSignSealDTO dto);
|
||||
|
||||
|
||||
SealSignRecord selectSealUrl(MsSignSealDTO dto) throws EsignDemoException;
|
||||
}
|
||||
|
||||
+31
-3
@@ -25,6 +25,7 @@ import com.ruoyi.wisdomarbitrate.domain.entity.dept.MsSealSignRecord;
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAffiliate;
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach;
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCasePaymentRecord;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseApplicationVO;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.dept.DeptIdentifyMapper;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.dept.MsSealSignRecordMapper;
|
||||
@@ -39,6 +40,7 @@ import com.ruoyi.wisdomarbitrate.utils.SignAward;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
@@ -82,8 +84,8 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
for (MsCaseAttach caseAttach : caseAttachList) {
|
||||
if (caseAttach.getAnnexType() == 3) {
|
||||
String annexPath = caseAttach.getAnnexPath();
|
||||
String path = "/home/ruoyi" + annexPath;
|
||||
|
||||
// String path = "/home/ruoyi" + annexPath;
|
||||
String path = "D:\\home\\ruoyi\\uploadPath\\upload\\2023\\12\\调解书测试.docx";
|
||||
//获取文件上传地址
|
||||
EsignHttpResponse response = SaaSAPIFileUtils.getUploadUrl(path);
|
||||
String body = response.getBody();
|
||||
@@ -274,7 +276,7 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
SmsUtils.SendSmsRequest request1 = new SmsUtils.SendSmsRequest();
|
||||
request1.setTemplateId("2047719");
|
||||
request1.setPhone(caseAffiliate.getRespondentPhone());
|
||||
request1.setTemplateParamSet(new String[]{caseAffiliate.getNameAgent(), caseApplication.getCaseNum(),urlResponnew});
|
||||
request1.setTemplateParamSet(new String[]{caseAffiliate.getRespondentName(), caseApplication.getCaseNum(),urlResponnew});
|
||||
Boolean aBoolean1 = SmsUtils.sendSms(request1);
|
||||
|
||||
|
||||
@@ -339,5 +341,31 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public SealSignRecord selectSealUrl(MsSignSealDTO dto) throws EsignDemoException {
|
||||
Example example = new Example(MsSealSignRecord.class);
|
||||
Example.Criteria criteria = example.createCriteria();
|
||||
criteria.andEqualTo("caseAppliId", dto.getCaseId());
|
||||
List<MsSealSignRecord> sealSignRecords = sealSignRecordMapper.selectByExample(example);
|
||||
|
||||
Gson gson = new Gson();
|
||||
SealSignRecord sealSignRecordReslt = new SealSignRecord();
|
||||
if (sealSignRecords != null && sealSignRecords.size() > 0) {
|
||||
MsSealSignRecord sealSignRecordselect = sealSignRecords.get(0);
|
||||
SealSignRecord sealSignRecord1 = new SealSignRecord();
|
||||
BeanUtil.copyProperties(sealSignRecordselect, sealSignRecord1);
|
||||
sealSignRecord1.setSignFlowid(sealSignRecordselect.getSignFlowId());
|
||||
sealSignRecord1.setOrgnizeNamePsnAccount(sealSignRecordselect.getOrgnNamePsnAcc());
|
||||
sealSignRecord1.setOrgnizeName(sealSignRecordselect.getOrgnizeName());
|
||||
|
||||
EsignHttpResponse signUrl = SignAward.usesealUrl(sealSignRecord1);
|
||||
JsonObject signUrlJsonObject = gson.fromJson(signUrl.getBody(), JsonObject.class);
|
||||
JsonObject signUrlData = signUrlJsonObject.getAsJsonObject("data");
|
||||
String url = signUrlData.get("shortUrl").getAsString();
|
||||
sealSignRecordReslt.setSealUrl(url);
|
||||
}
|
||||
return sealSignRecordReslt;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -24,4 +24,11 @@
|
||||
<result column="position_yorg" jdbcType="DOUBLE" property="positionYorg" />
|
||||
<result column="file_download_url" jdbcType="LONGVARCHAR" property="fileDownloadUrl" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user