优化和解功能
This commit is contained in:
+62
@@ -1228,6 +1228,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
// 查询案件相关人员
|
||||
MsCaseAffiliate caseAffiliate = msCaseAffiliateMapper.selectByPrimaryKey(id);
|
||||
Integer isReconci = attach.getIsReconci();
|
||||
|
||||
if(attach.getAnnexId()!=null){
|
||||
MsCaseAttach caseAttach = msCaseAttachMapper.queryAnnexById(attach.getAnnexId());
|
||||
if (caseAttach.getAnnexType() == AnnexTypeEnum.MEDIATE_BOOK.getCode()) {
|
||||
@@ -1686,6 +1687,66 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(isReconci.intValue()==1){
|
||||
EsignHttpResponse response3 = SignAward.createByFileReconci(sealSignRecord);
|
||||
|
||||
JSONObject jsonObject3 = JSONObject.parseObject(response3.getBody());
|
||||
if (jsonObject3 != null) {
|
||||
if (jsonObject3.getIntValue("code") == 0) {
|
||||
//获取签署流程ID
|
||||
JSONObject data1 = jsonObject3.getJSONObject("data");
|
||||
String signFlowId = data1.getString("signFlowId");
|
||||
//保存案件id,文件id,文件名称.流程id到签署用印记录表里
|
||||
sealSignRecord.setCaseAppliId(caseApplication.getId());
|
||||
sealSignRecord.setSignFlowid(signFlowId);
|
||||
sealSignRecord.setSignFlowStatus(1);//待签名
|
||||
MsSealSignRecord msSealSignRecord = new MsSealSignRecord();
|
||||
BeanUtil.copyProperties(sealSignRecord, msSealSignRecord);
|
||||
msSealSignRecord.setFileId(sealSignRecord.getFileid());
|
||||
msSealSignRecord.setFileName(sealSignRecord.getFilename());
|
||||
msSealSignRecord.setSignFlowId(sealSignRecord.getSignFlowid());
|
||||
sealSignRecordMapper.insert(msSealSignRecord);
|
||||
|
||||
SealSignRecord sealSignRecordapply = new SealSignRecord();
|
||||
sealSignRecordapply.setSignFlowid(signFlowId);
|
||||
sealSignRecordapply.setPensonAccount(caseAffiliate.getContactTelphoneAgent());
|
||||
EsignHttpResponse signUrl = SignAward.signUrlMediation(sealSignRecordapply);
|
||||
JsonObject signUrlJsonObject = gson.fromJson(signUrl.getBody(), JsonObject.class);
|
||||
JsonObject signUrlData = signUrlJsonObject.getAsJsonObject("data");
|
||||
String urlapply = signUrlData.get("shortUrl").getAsString();
|
||||
String urlapplynew = urlapply.substring(urlapply.lastIndexOf("/")+1);
|
||||
|
||||
//发送签名链接短信,尊敬的{1}用户,您的{2}调解案件,签名链接{3},请点击链接签名,如非本人操作,请忽略本短信
|
||||
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
||||
request.setTemplateId("2047719");
|
||||
request.setPhone(caseAffiliate.getContactTelphoneAgent());
|
||||
request.setTemplateParamSet(new String[]{caseAffiliate.getNameAgent(), caseApplication.getCaseNum(),urlapplynew});
|
||||
Boolean aBoolean = SmsUtils.sendSms(request);
|
||||
|
||||
SealSignRecord sealSignRecordRespon = new SealSignRecord();
|
||||
sealSignRecordRespon.setSignFlowid(signFlowId);
|
||||
sealSignRecordRespon.setPensonAccount(caseAffiliate.getRespondentPhone());
|
||||
EsignHttpResponse signUrlRespon = SignAward.signUrlMediation(sealSignRecordRespon);
|
||||
JsonObject signUrlJsonObjectRespon = gson.fromJson(signUrlRespon.getBody(), JsonObject.class);
|
||||
JsonObject signUrlDataRespon = signUrlJsonObjectRespon.getAsJsonObject("data");
|
||||
String urlRespon = signUrlDataRespon.get("shortUrl").getAsString();
|
||||
String urlResponnew = urlRespon.substring(urlRespon.lastIndexOf("/")+1);
|
||||
|
||||
SmsUtils.SendSmsRequest request1 = new SmsUtils.SendSmsRequest();
|
||||
request1.setTemplateId("2047719");
|
||||
request1.setPhone(caseAffiliate.getRespondentPhone());
|
||||
request1.setTemplateParamSet(new String[]{caseAffiliate.getRespondentName(), caseApplication.getCaseNum(),urlResponnew});
|
||||
Boolean aBoolean1 = SmsUtils.sendSms(request1);
|
||||
|
||||
} else {
|
||||
throw new ServiceException(jsonObject3.getString("message"));
|
||||
}
|
||||
} else {
|
||||
return AjaxResult.error();
|
||||
}
|
||||
|
||||
}else {
|
||||
/*DeptIdentify deptIdentify1 = new DeptIdentify();
|
||||
deptIdentify1.setSealStatus(1); // 印章状态为启用
|
||||
//根据机构名称查询部门id
|
||||
@@ -1807,6 +1868,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
} else {
|
||||
return AjaxResult.error();
|
||||
}
|
||||
}
|
||||
}else{
|
||||
return AjaxResult.error();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user