REQ-3581: 备份
This commit is contained in:
parent
23bc9c9f55
commit
7dbec39f79
@ -204,20 +204,20 @@ public class EssClient implements InitializingBean {
|
|||||||
|
|
||||||
String createContractByFile(EssPerson superAdmin,
|
String createContractByFile(EssPerson superAdmin,
|
||||||
List<String> contractFileIds,
|
List<String> contractFileIds,
|
||||||
CreateContractInfo contractInfo,
|
CreateContractInfo contract,
|
||||||
String customerData) throws TencentCloudSDKException {
|
String customerData) throws TencentCloudSDKException {
|
||||||
Map<Long, OrganizationalUnitVO> orgProfiles = essSupport
|
Map<Long, OrganizationalUnitVO> orgProfiles = essSupport
|
||||||
.getOrgProfiles(contractInfo.getApprovers().stream()
|
.getOrgProfiles(contract.getApprovers().stream()
|
||||||
.map(ApproverInfo::getOuId)
|
.map(ApproverInfo::getOuId)
|
||||||
.collect(toList())).stream()
|
.collect(toList())).stream()
|
||||||
.collect(toMap(OrganizationalUnitVO::getId, identity()));
|
.collect(toMap(OrganizationalUnitVO::getId, identity()));
|
||||||
Map<Long, PersonProfileDto> personProfiles = essSupport
|
Map<Long, PersonProfileDto> personProfiles = essSupport
|
||||||
.getPersonProfiles(contractInfo.getApprovers().stream()
|
.getPersonProfiles(contract.getApprovers().stream()
|
||||||
.map(ApproverInfo::getPersonId)
|
.map(ApproverInfo::getPersonId)
|
||||||
.collect(toList())).stream()
|
.collect(toList())).stream()
|
||||||
.collect(toMap(PersonProfileDto::getId, identity()));
|
.collect(toMap(PersonProfileDto::getId, identity()));
|
||||||
ArrayList<FlowApproverInfo> approvers = new ArrayList<>();
|
ArrayList<FlowApproverInfo> approvers = new ArrayList<>();
|
||||||
for (ApproverInfo approverInfo : contractInfo.getApprovers()) {
|
for (ApproverInfo approverInfo : contract.getApprovers()) {
|
||||||
OrganizationalUnitVO orgProfile = orgProfiles.get(approverInfo.getOuId());
|
OrganizationalUnitVO orgProfile = orgProfiles.get(approverInfo.getOuId());
|
||||||
BizAssertions.assertNotNull(orgProfile, "找不到单位信息: ", approverInfo.getOuId());
|
BizAssertions.assertNotNull(orgProfile, "找不到单位信息: ", approverInfo.getOuId());
|
||||||
PersonProfileDto personProfile = personProfiles.get(approverInfo.getPersonId());
|
PersonProfileDto personProfile = personProfiles.get(approverInfo.getPersonId());
|
||||||
@ -243,17 +243,17 @@ public class EssClient implements InitializingBean {
|
|||||||
}
|
}
|
||||||
ChannelCreateFlowByFilesRequest request = new ChannelCreateFlowByFilesRequest();
|
ChannelCreateFlowByFilesRequest request = new ChannelCreateFlowByFilesRequest();
|
||||||
request.setAgent(agent(superAdmin));
|
request.setAgent(agent(superAdmin));
|
||||||
request.setSignBeanTag(contractInfo.getSignBeanTag());
|
request.setSignBeanTag(contract.getSignBeanTag());
|
||||||
request.setFlowName(contractInfo.getContractName());
|
request.setFlowName(contract.getContractName());
|
||||||
request.setFileIds(contractFileIds.toArray(new String[0]));
|
request.setFileIds(contractFileIds.toArray(new String[0]));
|
||||||
request.setFlowApprovers(approvers.toArray(new FlowApproverInfo[0]));
|
request.setFlowApprovers(approvers.toArray(new FlowApproverInfo[0]));
|
||||||
request.setUnordered(!contractInfo.isSignOrdered());
|
request.setUnordered(!contract.isSignOrdered());
|
||||||
request.setCustomerData(customerData);
|
request.setCustomerData(customerData);
|
||||||
if (contractInfo.getDeadlineMs() != null)
|
if (contract.getDeadlineMs() != null)
|
||||||
request.setDeadline(contractInfo.getDeadlineMs() / 1000);
|
request.setDeadline(contract.getDeadlineMs() / 1000);
|
||||||
ChannelCreateFlowByFilesResponse response = call(Func.<ChannelCreateFlowByFilesResponse>func()
|
ChannelCreateFlowByFilesResponse response = call(Func.<ChannelCreateFlowByFilesResponse>func()
|
||||||
.context("ChannelCreateFlowByFiles")
|
.context("ChannelCreateFlowByFiles")
|
||||||
.subject(contractInfo.getContractName())
|
.subject(contract.getContractName())
|
||||||
.subject2(ChannelCreateFlowByFilesResponse::getFlowId)
|
.subject2(ChannelCreateFlowByFilesResponse::getFlowId)
|
||||||
.request(request)
|
.request(request)
|
||||||
.command(() -> manage.ChannelCreateFlowByFiles(request)));
|
.command(() -> manage.ChannelCreateFlowByFiles(request)));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user