REQ-3581: 备份

This commit is contained in:
yanglin 2025-02-12 18:10:48 +08:00
parent a79f78aa9f
commit d17a906d7c
2 changed files with 7 additions and 11 deletions

View File

@ -226,9 +226,9 @@ public class EssClient implements InitializingBean {
return response.getFlowResourceUrlInfos()[0].getResourceUrlInfos()[0].getUrl();
}
public String getContractSignUrlPC(EssPerson superAdmin, String essContractId, EssPerson signPerson) {
public String getContractSignUrlPC(String essContractId, EssPerson signPerson) {
ChannelCreateOrganizationBatchSignUrlRequest request = new ChannelCreateOrganizationBatchSignUrlRequest();
request.setAgent(agent(superAdmin));
request.setAgent(agent(signPerson));
request.setFlowIds(new String[]{essContractId});
request.setOpenId(PersonOpenId.create(signPerson.getOuId(), signPerson.getPersonId()).toOpenId());
ChannelCreateOrganizationBatchSignUrlResponse response = exec(invocation()
@ -239,9 +239,9 @@ public class EssClient implements InitializingBean {
return response.getSignUrl();
}
public String getContractSignUrlWeixinApp(EssPerson superAdmin, String essContractId, EssPerson signPerson) {
public String getContractSignUrlWeixinApp(String essContractId, EssPerson signPerson) {
CreateSignUrlsRequest request = new CreateSignUrlsRequest();
request.setAgent(agent(superAdmin));
request.setAgent(agent(signPerson));
request.setFlowIds(new String[]{essContractId});
request.setOpenId(PersonOpenId.create(signPerson.getOuId(), signPerson.getPersonId()).toOpenId());
CreateSignUrlsResponse response = exec(invocation()

View File

@ -161,22 +161,18 @@ class ApiController implements EssApi {
BizAssertions.assertNotNull(contract, "合同不存在: {}", request.getEssContractId());
EssPerson signPerson = essPersonDao.find(request.getOuId(), request.getPersonId(), false).orElse(null);
BizAssertions.assertNotNull(signPerson, "当前签署人员未加入单位, 无法签署");
//noinspection DataFlowIssue
EssPerson superAdmin = orgManager.getSuperAdminOrThrow(contract.getCreatorOuId());
String signUrl = "";
if (request.getUrlType() == GetContractSignUrlRequest.URLType.WEIXIN_APP)
//noinspection DataFlowIssue
signUrl = essClient.getContractSignUrlWeixinApp(superAdmin, request.getEssContractId(), signPerson);
signUrl = essClient.getContractSignUrlWeixinApp(request.getEssContractId(), signPerson);
else if (request.getUrlType() == GetContractSignUrlRequest.URLType.PC)
//noinspection DataFlowIssue
signUrl = essClient.getContractSignUrlPC(superAdmin, request.getEssContractId(), signPerson);
signUrl = essClient.getContractSignUrlPC(request.getEssContractId(), signPerson);
GetContractSignUrlResponse response = new GetContractSignUrlResponse();
response.setSignUrl(signUrl);
return ApiResult.ok(response);
}
@SuppressWarnings("DataFlowIssue")
@Override
@SuppressWarnings("DataFlowIssue")
public ApiResult<DownloadSingedContractPdfResponse>
getContractPDFUrl(DownloadSingedContractPdfRequest request) {
EssContract contract = essContractDao