优化签名功能

This commit is contained in:
qitz
2024-02-19 15:06:30 +08:00
parent 5f6b9495b1
commit 483128ca87
@@ -741,6 +741,8 @@ public class MsSignSealServiceImpl implements MsSignSealService {
MsCaseAffiliate caseAffiliate = msCaseAffiliateMapper.selectByPrimaryKey(caseId);
Integer organizeFlag = caseAffiliate.getOrganizeFlag();
MsCaseApplication caseApplication = msCaseApplicationMapper.selectByPrimaryKey(caseId);
SysUser user = new SysUser();
Long userId = SecurityUtils.getUserId();
user.setUserId(userId);
@@ -809,6 +811,36 @@ public class MsSignSealServiceImpl implements MsSignSealService {
}else {
return AjaxResult.error();
}
}else if(roleNames.contains("调解员")){
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();
Long arbitratorId = caseApplication.getMediatorId();
if (arbitratorId!=null) {
SysUser sysUser = sysUserMapper.selectUserById(arbitratorId);
if (sysUser == null) {
return AjaxResult.error();
}
sealSignRecord.setPensonAccount(sysUser.getPhonenumber());
}
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);
}else {
return AjaxResult.error();
}
}
return AjaxResult.success();
}