优化签名功能 #63
+40
@@ -102,6 +102,46 @@ public class MsSignSealController extends BaseController {
|
||||
return msSignSealService.msCaseSign(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* PC端申请人签名
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/msCaseSignUrlApplyPC")
|
||||
public AjaxResult msCaseSignUrlApplyPC(@RequestBody MsSignSealDTO dto) throws EsignDemoException {
|
||||
if (dto.getCaseId() == null) {
|
||||
return error("参数校验失败");
|
||||
}
|
||||
return msSignSealService.msCaseSignUrlApplyPC(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* PC端被申请人签名
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/msCaseSignUrlResPC")
|
||||
public AjaxResult msCaseSignUrlResPC(@RequestBody MsSignSealDTO dto) throws EsignDemoException {
|
||||
if (dto.getCaseId() == null) {
|
||||
return error("参数校验失败");
|
||||
}
|
||||
return msSignSealService.msCaseSignUrlResPC(dto);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 小程序端申请人签名
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/msCaseSignUrlApplyAPP")
|
||||
public AjaxResult msCaseSignUrlApplyAPP(@RequestBody MsSignSealDTO dto) throws EsignDemoException {
|
||||
if (dto.getCaseId() == null) {
|
||||
return error("参数校验失败");
|
||||
}
|
||||
return msSignSealService.msCaseSignUrlApplyAPP(dto);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+6
@@ -26,4 +26,10 @@ public interface MsSignSealService {
|
||||
AjaxResult msCaseFile(List<Long> ids);
|
||||
|
||||
AjaxResult msCaseSign(MsSignSealDTO dto);
|
||||
|
||||
AjaxResult msCaseSignUrlApplyPC(MsSignSealDTO dto) throws EsignDemoException;
|
||||
|
||||
AjaxResult msCaseSignUrlResPC(MsSignSealDTO dto) throws EsignDemoException;
|
||||
|
||||
AjaxResult msCaseSignUrlApplyAPP(MsSignSealDTO dto) throws EsignDemoException;
|
||||
}
|
||||
|
||||
+30
-6
@@ -1455,7 +1455,14 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
|
||||
SealSignRecord sealSignRecordapply = new SealSignRecord();
|
||||
sealSignRecordapply.setSignFlowid(signFlowId);
|
||||
sealSignRecordapply.setPensonAccount(caseAffiliate.getContactTelphoneAgent());
|
||||
|
||||
String nameAgent = caseAffiliate.getNameAgent();
|
||||
if(StringUtils.isNotBlank(nameAgent)){
|
||||
sealSignRecordapply.setPensonAccount(caseAffiliate.getContactTelphoneAgent());
|
||||
}else {
|
||||
sealSignRecordapply.setPensonAccount(caseAffiliate.getApplicationPhone());
|
||||
}
|
||||
|
||||
EsignHttpResponse signUrl = SignAward.signUrlMediation(sealSignRecordapply);
|
||||
JsonObject signUrlJsonObject = gson.fromJson(signUrl.getBody(), JsonObject.class);
|
||||
JsonObject signUrlData = signUrlJsonObject.getAsJsonObject("data");
|
||||
@@ -1465,8 +1472,13 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
//发送签名链接短信,尊敬的{1}用户,您的{2}调解案件,签名链接{3},请点击链接签名,如非本人操作,请忽略本短信
|
||||
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
||||
request.setTemplateId("2047719");
|
||||
request.setPhone(caseAffiliate.getContactTelphoneAgent());
|
||||
request.setTemplateParamSet(new String[]{caseAffiliate.getNameAgent(), application.getCaseNum(),urlapplynew});
|
||||
if(StringUtils.isNotBlank(nameAgent)){
|
||||
request.setPhone(caseAffiliate.getContactTelphoneAgent());
|
||||
request.setTemplateParamSet(new String[]{caseAffiliate.getNameAgent(), application.getCaseNum(),urlapplynew});
|
||||
}else {
|
||||
request.setPhone(caseAffiliate.getApplicationPhone());
|
||||
request.setTemplateParamSet(new String[]{caseAffiliate.getApplicationName(), application.getCaseNum(),urlapplynew});
|
||||
}
|
||||
Boolean aBoolean = SmsUtils.sendSms(request);
|
||||
|
||||
SealSignRecord sealSignRecordRespon = new SealSignRecord();
|
||||
@@ -1556,7 +1568,13 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
|
||||
SealSignRecord sealSignRecordapply = new SealSignRecord();
|
||||
sealSignRecordapply.setSignFlowid(signFlowId);
|
||||
sealSignRecordapply.setPensonAccount(caseAffiliate.getContactTelphoneAgent());
|
||||
String nameAgent = caseAffiliate.getNameAgent();
|
||||
if(StringUtils.isNotBlank(nameAgent)){
|
||||
sealSignRecordapply.setPensonAccount(caseAffiliate.getContactTelphoneAgent());
|
||||
}else {
|
||||
sealSignRecordapply.setPensonAccount(caseAffiliate.getApplicationPhone());
|
||||
}
|
||||
|
||||
EsignHttpResponse signUrl = SignAward.signUrlMediation(sealSignRecordapply);
|
||||
JsonObject signUrlJsonObject = gson.fromJson(signUrl.getBody(), JsonObject.class);
|
||||
JsonObject signUrlData = signUrlJsonObject.getAsJsonObject("data");
|
||||
@@ -1566,8 +1584,14 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
//发送签名链接短信,尊敬的{1}用户,您的{2}调解案件,签名链接{3},请点击链接签名,如非本人操作,请忽略本短信
|
||||
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
||||
request.setTemplateId("2047719");
|
||||
request.setPhone(caseAffiliate.getContactTelphoneAgent());
|
||||
request.setTemplateParamSet(new String[]{caseAffiliate.getNameAgent(), application.getCaseNum(),urlapplynew});
|
||||
|
||||
if(StringUtils.isNotBlank(nameAgent)){
|
||||
request.setPhone(caseAffiliate.getContactTelphoneAgent());
|
||||
request.setTemplateParamSet(new String[]{caseAffiliate.getNameAgent(), application.getCaseNum(),urlapplynew});
|
||||
}else {
|
||||
request.setPhone(caseAffiliate.getApplicationPhone());
|
||||
request.setTemplateParamSet(new String[]{caseAffiliate.getApplicationName(), application.getCaseNum(),urlapplynew});
|
||||
}
|
||||
Boolean aBoolean = SmsUtils.sendSms(request);
|
||||
|
||||
SealSignRecord sealSignRecordRespon = new SealSignRecord();
|
||||
|
||||
+105
@@ -20,6 +20,7 @@ import com.ruoyi.common.exception.EsignDemoException;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.EmailOutUtil;
|
||||
import com.ruoyi.common.utils.SmsUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.file.SaaSAPIFileUtils;
|
||||
import com.ruoyi.system.domain.entity.flow.MsCaseFlow;
|
||||
import com.ruoyi.system.mapper.SysUserMapper;
|
||||
@@ -722,6 +723,110 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult msCaseSignUrlApplyPC(MsSignSealDTO dto) throws EsignDemoException {
|
||||
Long caseId = dto.getCaseId();
|
||||
MsCaseAffiliate caseAffiliate = msCaseAffiliateMapper.selectByPrimaryKey(caseId);
|
||||
Integer organizeFlag = caseAffiliate.getOrganizeFlag();
|
||||
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();
|
||||
if(organizeFlag!=null){
|
||||
SealSignRecord sealSignRecord = new SealSignRecord();
|
||||
if(organizeFlag.intValue()==1){
|
||||
sealSignRecord.setPensonAccount(caseAffiliate.getContactTelphoneAgent());
|
||||
sealSignRecord.setPensonName(caseAffiliate.getNameAgent());
|
||||
}else {
|
||||
String nameAgent = caseAffiliate.getNameAgent();
|
||||
if(StringUtils.isNotBlank(nameAgent)){
|
||||
sealSignRecord.setPensonAccount(caseAffiliate.getContactTelphoneAgent());
|
||||
sealSignRecord.setPensonName(caseAffiliate.getNameAgent());
|
||||
}else {
|
||||
sealSignRecord.setPensonAccount(caseAffiliate.getApplicationPhone());
|
||||
sealSignRecord.setPensonName(caseAffiliate.getApplicationName());
|
||||
}
|
||||
}
|
||||
sealSignRecord.setSignFlowid(signFlowid);
|
||||
|
||||
Gson gson = new Gson();
|
||||
EsignHttpResponse signUrl = SignAward.signUrl(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);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult msCaseSignUrlResPC(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.signUrl(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);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult msCaseSignUrlApplyAPP(MsSignSealDTO dto) throws EsignDemoException {
|
||||
Long caseId = dto.getCaseId();
|
||||
MsCaseAffiliate caseAffiliate = msCaseAffiliateMapper.selectByPrimaryKey(caseId);
|
||||
Integer organizeFlag = caseAffiliate.getOrganizeFlag();
|
||||
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();
|
||||
if(organizeFlag!=null){
|
||||
SealSignRecord sealSignRecord = new SealSignRecord();
|
||||
if(organizeFlag.intValue()==1){
|
||||
sealSignRecord.setPensonAccount(caseAffiliate.getContactTelphoneAgent());
|
||||
sealSignRecord.setPensonName(caseAffiliate.getNameAgent());
|
||||
}else {
|
||||
String nameAgent = caseAffiliate.getNameAgent();
|
||||
if(StringUtils.isNotBlank(nameAgent)){
|
||||
sealSignRecord.setPensonAccount(caseAffiliate.getContactTelphoneAgent());
|
||||
sealSignRecord.setPensonName(caseAffiliate.getNameAgent());
|
||||
}else {
|
||||
sealSignRecord.setPensonAccount(caseAffiliate.getApplicationPhone());
|
||||
sealSignRecord.setPensonName(caseAffiliate.getApplicationName());
|
||||
}
|
||||
}
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过邮件发送裁决书文件
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user