Commit ae86d535 authored by tangwei's avatar tangwei

修改bug

parent 7b204e5a
......@@ -43,9 +43,9 @@ public class HouseholdContractServiceImpl extends BaseService<HouseholdContractD
// @Value("${qiyuesuo.category}")
String category="智信能源合同";
// @Value("${qiyuesuo.companyTenantName}")
String companyTenantName="智信能源科技有限公司-测试";
String companyTenantName="智信能源科技有限公司";
//@Value("${qiyuesuo.companyUsername}")
String companyUsername="唐伟";
String companyUsername="于鹏";
@Value("${qiyuesuo.companyContact}")
String companyContact;
......
......@@ -138,6 +138,7 @@ public class QiyuesuoServiceImpl {
signatory2.setReceiver(new User(companyUsername, companyContact, "MOBILE"));
signatory2.setSerialNo(2);
Action action = new Action("COMPANY", 0);
signatory2.addAction(action);
// 设置签署方
contract.addSignatory(signatory1);
......@@ -145,10 +146,15 @@ public class QiyuesuoServiceImpl {
// 创建合同
ContractDraftRequest request = new ContractDraftRequest(contract);
logger.info("创建草稿合同调用前"+JSON.toJSONString(request));
String response = sdkClient.service(request);
SdkResponse<Contract> responseObj = JSONUtils.toQysResponse(response, Contract.class);
// 返回结果
Contract result=new Contract();
logger.info("创建草稿合同调用后"+JSON.toJSONString(responseObj));
if(responseObj.getCode() == 0) {
result = responseObj.getResult();
logger.info(JSON.toJSONString(responseObj));
......@@ -205,8 +211,11 @@ public class QiyuesuoServiceImpl {
logger.info("合同参数"+JSON.toJSONString(params));
DocumentAddByTemplateRequest request = new DocumentAddByTemplateRequest(contractId,
emplateId , params, subject);
logger.info("添加合同文档前", JSON.toJSONString(request));
String response = sdkClient.service(request);
SdkResponse<DocumentAddResult> responseObj = JSONUtils.toQysResponse(response, DocumentAddResult.class);
logger.info("添加合同文档后", JSON.toJSONString(responseObj));
DocumentAddResult result=null;
if (responseObj.getCode() == 0) {
result = responseObj.getResult();
......@@ -224,8 +233,10 @@ public class QiyuesuoServiceImpl {
// 发起合同
SdkResponse<Object> responseObj =null;
ContractSendRequest request = new ContractSendRequest(contractId, stampers);
logger.info("发起合同前", JSON.toJSONString(request));
String response = sdkClient.service(request);
responseObj = JSONUtils.toQysResponse(response);
logger.info("发起合同后", JSON.toJSONString(responseObj));
if(responseObj.getCode() == 0) {
logger.info("合同发起成功");
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment