实现签名功能 #64

Merged
qtz merged 2 commits from qtz into dev 2024-02-05 02:28:50 +00:00
3 changed files with 40 additions and 0 deletions
@@ -142,6 +142,19 @@ public class MsSignSealController extends BaseController {
return msSignSealService.msCaseSignUrlApplyAPP(dto); return msSignSealService.msCaseSignUrlApplyAPP(dto);
} }
/**
* 小程序端被申请人签名
* @param dto
* @return
*/
@PostMapping("/msCaseSignUrlResAPP")
public AjaxResult msCaseSignUrlResAPP(@RequestBody MsSignSealDTO dto) throws EsignDemoException {
if (dto.getCaseId() == null) {
return error("参数校验失败");
}
return msSignSealService.msCaseSignUrlResAPP(dto);
}
@@ -32,4 +32,6 @@ public interface MsSignSealService {
AjaxResult msCaseSignUrlResPC(MsSignSealDTO dto) throws EsignDemoException; AjaxResult msCaseSignUrlResPC(MsSignSealDTO dto) throws EsignDemoException;
AjaxResult msCaseSignUrlApplyAPP(MsSignSealDTO dto) throws EsignDemoException; AjaxResult msCaseSignUrlApplyAPP(MsSignSealDTO dto) throws EsignDemoException;
AjaxResult msCaseSignUrlResAPP(MsSignSealDTO dto) throws EsignDemoException;
} }
@@ -827,6 +827,31 @@ public class MsSignSealServiceImpl implements MsSignSealService {
} }
@Override
public AjaxResult msCaseSignUrlResAPP(MsSignSealDTO dto) throws EsignDemoException {
Long caseId = dto.getCaseId();
MsCaseAffiliate caseAffiliate = msCaseAffiliateMapper.selectByPrimaryKey(caseId);
SealSignRecord sealSignRecordres = new SealSignRecord();
MsSealSignRecord mssealSignRecord = new MsSealSignRecord();
mssealSignRecord.setCaseAppliId(caseId);
List<MsSealSignRecord> sealSignRecords = sealSignRecordMapper.selectSealSignRecord(mssealSignRecord);
if (sealSignRecords != null && sealSignRecords.size() > 0) {
String signFlowid = sealSignRecords.get(0).getSignFlowId();
SealSignRecord sealSignRecord = new SealSignRecord();
sealSignRecord.setPensonAccount(caseAffiliate.getRespondentPhone());
sealSignRecord.setSignFlowid(signFlowid);
Gson gson = new Gson();
EsignHttpResponse signUrl = SignAward.signUrlMediation(sealSignRecord);
JsonObject signUrlJsonObject = gson.fromJson(signUrl.getBody(), JsonObject.class);
JsonObject signUrlData = signUrlJsonObject.getAsJsonObject("data");
String urlapply = signUrlData.get("shortUrl").getAsString();
sealSignRecordres.setSealUrl(urlapply);
}
return AjaxResult.success(sealSignRecordres);
}
/** /**
* 通过邮件发送裁决书文件 * 通过邮件发送裁决书文件
* *