优化签名功能 #78

Merged
qtz merged 2 commits from qtz1 into dev 2024-02-19 07:09:49 +00:00
@@ -741,6 +741,8 @@ public class MsSignSealServiceImpl implements MsSignSealService {
MsCaseAffiliate caseAffiliate = msCaseAffiliateMapper.selectByPrimaryKey(caseId); MsCaseAffiliate caseAffiliate = msCaseAffiliateMapper.selectByPrimaryKey(caseId);
Integer organizeFlag = caseAffiliate.getOrganizeFlag(); Integer organizeFlag = caseAffiliate.getOrganizeFlag();
MsCaseApplication caseApplication = msCaseApplicationMapper.selectByPrimaryKey(caseId);
SysUser user = new SysUser(); SysUser user = new SysUser();
Long userId = SecurityUtils.getUserId(); Long userId = SecurityUtils.getUserId();
user.setUserId(userId); user.setUserId(userId);
@@ -809,6 +811,36 @@ public class MsSignSealServiceImpl implements MsSignSealService {
}else { }else {
return AjaxResult.error(); 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(); return AjaxResult.success();
} }