Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
cffd14e1
Commit
cffd14e1
authored
Aug 22, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加接口
parent
58cdb651
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
333 additions
and
45 deletions
+333
-45
ContractDataDto.java
...eejoin/amos/boot/module/hygf/api/dto/ContractDataDto.java
+32
-0
TemplateParamDto.java
...ejoin/amos/boot/module/hygf/api/dto/TemplateParamDto.java
+15
-0
HouseholdContract.java
...n/amos/boot/module/hygf/api/entity/HouseholdContract.java
+7
-1
HouseholdContractController.java
...dule/hygf/biz/controller/HouseholdContractController.java
+27
-0
QiyuesuoController.java
...s/boot/module/hygf/biz/controller/QiyuesuoController.java
+18
-44
QiyuesuoServiceImpl.java
...oot/module/hygf/biz/service/impl/QiyuesuoServiceImpl.java
+234
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/ContractDataDto.java
0 → 100644
View file @
cffd14e1
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
dto
;
import
lombok.Data
;
/**
* @description:
* @author: tw
* @createDate: 2023/8/21
*/
@Data
public
class
ContractDataDto
{
String
username
;
String
contact
;
String
IDCard
;
String
subject
;
String
endTime
;
String
expireTime
;
String
category
;
String
companyTenantName
;
String
companyUsername
;
String
companyContact
;
Long
emplateId
;
String
companykeyword
;
Integer
companyPage
;
Double
companyOffsetX
;
Double
companyOffsetY
;
String
personalkeyword
;
Integer
personalPage
;
Double
personalOffsetX
;
Double
personalOffsetY
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/TemplateParamDto.java
0 → 100644
View file @
cffd14e1
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
dto
;
import
lombok.Data
;
/**
* @description:
* @author: tw
* @createDate: 2023/8/21
*/
@Data
public
class
TemplateParamDto
{
private
String
key
;
private
String
value
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/HouseholdContract.java
View file @
cffd14e1
...
@@ -221,9 +221,15 @@ public class HouseholdContract extends BaseEntity {
...
@@ -221,9 +221,15 @@ public class HouseholdContract extends BaseEntity {
*/
*/
@TableField
(
"station_power"
)
@TableField
(
"station_power"
)
private
Double
stationPower
;
private
Double
stationPower
;
/***
*合同契约锁id'
* */
@TableField
(
"contract_lock_id"
)
@TableField
(
"contract_lock_id"
)
private
Double
contractLockId
;
private
Double
contractLockId
;
/**
* 印章id
* */
@TableField
(
"seal_id"
)
@TableField
(
"seal_id"
)
private
Double
sealId
;
private
Double
sealId
;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/HouseholdContractController.java
View file @
cffd14e1
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.HouseholdContractEnum
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.HouseholdContractPageDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.HouseholdContractPageDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.HouseholdContract
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.HouseholdContract
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -112,4 +113,30 @@ public class HouseholdContractController extends BaseController {
...
@@ -112,4 +113,30 @@ public class HouseholdContractController extends BaseController {
public
ResponseModel
<
List
<
HouseholdContractDto
>>
selectForList
()
{
public
ResponseModel
<
List
<
HouseholdContractDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
householdContractServiceImpl
.
queryForHouseholdContractList
());
return
ResponseHelper
.
buildResponse
(
householdContractServiceImpl
.
queryForHouseholdContractList
());
}
}
//去签署
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"post"
,
value
=
"根据sequenceNbr发起"
,
notes
=
"根据sequenceNbr发起"
)
public
ResponseModel
<
HouseholdContractDto
>
qsBySequenceNbrHouseholdContract
(
@RequestBody
HouseholdContractDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
householdContractServiceImpl
.
updateWithModel
(
model
));
}
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/
test
.java
→
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/
QiyuesuoController
.java
View file @
cffd14e1
...
@@ -10,10 +10,12 @@ import com.qiyuesuo.sdk.v2.response.ContractListResult;
...
@@ -10,10 +10,12 @@ import com.qiyuesuo.sdk.v2.response.ContractListResult;
import
com.qiyuesuo.sdk.v2.response.DocumentAddResult
;
import
com.qiyuesuo.sdk.v2.response.DocumentAddResult
;
import
com.qiyuesuo.sdk.v2.response.MiniappTicketResult
;
import
com.qiyuesuo.sdk.v2.response.MiniappTicketResult
;
import
com.qiyuesuo.sdk.v2.response.SdkResponse
;
import
com.qiyuesuo.sdk.v2.response.SdkResponse
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.QiyuesuoServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -35,59 +37,31 @@ import java.util.Map;
...
@@ -35,59 +37,31 @@ import java.util.Map;
* @createDate: 2023/8/18
* @createDate: 2023/8/18
*/
*/
@RestController
@RestController
@Api
(
tags
=
"
经销商单位信息
Api"
)
@Api
(
tags
=
"
契税锁
Api"
)
@RequestMapping
(
value
=
"/
test
"
)
@RequestMapping
(
value
=
"/
qiyuesuo
"
)
public
class
test
{
public
class
QiyuesuoController
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
test
.
class
);
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
QiyuesuoController
.
class
);
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"post"
,
value
=
"获取经销商单位"
,
notes
=
"获取经销商单位"
)
@PostMapping
(
value
=
"/getUnit888"
)
public
ResponseModel
<
Object
>
getUnit
(
@RequestBody
UserAuthMiniappTicketRequest
request
)
{
String
serverUrl
=
"https://openapi.qiyuesuo.cn"
;
@Autowired
String
accessKey
=
"TdBmNkjAYd"
;
QiyuesuoServiceImpl
qiyuesuoService
;
String
accessSecret
=
"y8KiDFKKDdC9Ld9Cm5zuy2rpXjxP5Z"
;
SdkClient
sdkClient
=
new
SdkClient
(
serverUrl
,
accessKey
,
accessSecret
);
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"post"
,
value
=
"个人token"
,
notes
=
"个人token"
)
@PostMapping
(
value
=
"/getUserToken"
)
String
response
=
null
;
public
ResponseModel
<
Object
>
getSdkResponse
(
@RequestBody
UserAuthMiniappTicketRequest
request
)
{
try
{
response
=
sdkClient
.
service
(
request
);
}
catch
(
Exception
e
)
{
throw
new
BaseSdkException
(
"调用接口错误,错误原因:"
+
e
.
getMessage
());
}
SdkResponse
<
MiniappTicketResult
>
result
=
JSONUtils
.
toQysResponse
(
response
,
MiniappTicketResult
.
class
);
if
(!
result
.
getCode
().
equals
(
0
))
{
throw
new
BaseSdkException
(
"获取个人认证Ticket失败,失败原因:"
+
result
.
getCode
()+
","
+
result
.
getMessage
());
}
System
.
out
.
println
(
"获取个人认证Ticket成功,Ticket:"
+
result
.
getResult
().
getTicket
());
SdkResponse
<
MiniappTicketResult
>
result
=
qiyuesuoService
.
getSdkResponse
(
request
);
return
ResponseHelper
.
buildResponse
(
result
.
getResult
());
return
ResponseHelper
.
buildResponse
(
result
.
getResult
());
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"post"
,
value
=
"获取经销商单位"
,
notes
=
"获取经销商单位"
)
@ApiOperation
(
httpMethod
=
"post"
,
value
=
"合同token"
,
notes
=
"合同token"
)
@PostMapping
(
value
=
"/getUnit999"
)
@PostMapping
(
value
=
"/getContractToken"
)
public
ResponseModel
<
Object
>
getUnit999
(
@RequestBody
ContractMiniappTicketRequest
request
)
{
public
ResponseModel
<
Object
>
getContractSdkResponse
(
@RequestBody
ContractMiniappTicketRequest
request
)
{
String
serverUrl
=
"https://openapi.qiyuesuo.cn"
;
String
accessKey
=
"TdBmNkjAYd"
;
String
accessSecret
=
"y8KiDFKKDdC9Ld9Cm5zuy2rpXjxP5Z"
;
SdkClient
sdkClient
=
new
SdkClient
(
serverUrl
,
accessKey
,
accessSecret
);
SdkResponse
<
MiniappTicketResult
>
result
=
qiyuesuoService
.
getContractSdkResponse
(
request
);
String
response
=
null
;
try
{
response
=
sdkClient
.
service
(
request
);
}
catch
(
Exception
e
)
{
throw
new
BaseSdkException
(
"调用接口错误,错误原因:"
+
e
.
getMessage
());
}
SdkResponse
<
MiniappTicketResult
>
result
=
JSONUtils
.
toQysResponse
(
response
,
MiniappTicketResult
.
class
);
if
(!
result
.
getCode
().
equals
(
0
))
{
throw
new
BaseSdkException
(
"获取合同签署Ticket失败,失败原因:"
+
result
.
getCode
()
+
","
+
result
.
getMessage
());
}
return
ResponseHelper
.
buildResponse
(
result
.
getResult
());
return
ResponseHelper
.
buildResponse
(
result
.
getResult
());
}
}
...
@@ -104,7 +78,7 @@ public class test {
...
@@ -104,7 +78,7 @@ public class test {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"post"
,
value
=
"获取经销商单位"
,
notes
=
"
获取经销商单位
"
)
@ApiOperation
(
httpMethod
=
"post"
,
value
=
"获取经销商单位"
,
notes
=
"
liebiao
"
)
@PostMapping
(
value
=
"/getUnit1000"
)
@PostMapping
(
value
=
"/getUnit1000"
)
public
ResponseModel
<
ContractListResult
>
getUnit1000
(
@RequestBody
ContractListRequest
request
)
{
public
ResponseModel
<
ContractListResult
>
getUnit1000
(
@RequestBody
ContractListRequest
request
)
{
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/QiyuesuoServiceImpl.java
0 → 100644
View file @
cffd14e1
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.qiyuesuo.sdk.v2.SdkClient
;
import
com.qiyuesuo.sdk.v2.bean.*
;
import
com.qiyuesuo.sdk.v2.exception.BaseSdkException
;
import
com.qiyuesuo.sdk.v2.json.JSONUtils
;
import
com.qiyuesuo.sdk.v2.request.*
;
import
com.qiyuesuo.sdk.v2.response.DocumentAddResult
;
import
com.qiyuesuo.sdk.v2.response.MiniappTicketResult
;
import
com.qiyuesuo.sdk.v2.response.SdkResponse
;
import
com.yeejoin.amos.boot.module.common.api.dto.ContractDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.ContractDataDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.TemplateParamDto
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
/**
* @description:
* @author: tw
* @createDate: 2023/8/21
*/
@Service
public
class
QiyuesuoServiceImpl
{
@Value
(
"${qiyuesuo.serverUrl}"
)
String
serverUrl
;
@Value
(
"${qiyuesuo.accessKey}"
)
String
accessKey
;
@Value
(
"${qiyuesuo.accessSecret}"
)
String
accessSecret
;
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
QiyuesuoServiceImpl
.
class
);
/***
*
* 个人权限
* */
public
SdkResponse
<
MiniappTicketResult
>
getSdkResponse
(
UserAuthMiniappTicketRequest
request
){
SdkClient
sdkClient
=
new
SdkClient
(
serverUrl
,
accessKey
,
accessSecret
);
String
response
=
null
;
try
{
response
=
sdkClient
.
service
(
request
);
}
catch
(
Exception
e
)
{
throw
new
BaseSdkException
(
"调用接口错误,错误原因:"
+
e
.
getMessage
());
}
SdkResponse
<
MiniappTicketResult
>
result
=
JSONUtils
.
toQysResponse
(
response
,
MiniappTicketResult
.
class
);
if
(!
result
.
getCode
().
equals
(
0
))
{
throw
new
BaseSdkException
(
"获取个人认证Ticket失败,失败原因:"
+
result
.
getCode
()+
","
+
result
.
getMessage
());
}
return
result
;
}
/**
合同授权
*
* **/
public
SdkResponse
<
MiniappTicketResult
>
getContractSdkResponse
(
ContractMiniappTicketRequest
request
){
SdkClient
sdkClient
=
new
SdkClient
(
serverUrl
,
accessKey
,
accessSecret
);
String
response
=
null
;
try
{
response
=
sdkClient
.
service
(
request
);
}
catch
(
Exception
e
)
{
throw
new
BaseSdkException
(
"调用接口错误,错误原因:"
+
e
.
getMessage
());
}
SdkResponse
<
MiniappTicketResult
>
result
=
JSONUtils
.
toQysResponse
(
response
,
MiniappTicketResult
.
class
);
if
(!
result
.
getCode
().
equals
(
0
))
{
throw
new
BaseSdkException
(
"获取合同签署Ticket失败,失败原因:"
+
result
.
getCode
()
+
","
+
result
.
getMessage
());
}
return
result
;
}
/**
*创建合同
*
*
* **/
public
Long
addContract
(
ContractDataDto
contractDataDto
,
List
<
TemplateParamDto
>
templateParam
){
String
username
=
contractDataDto
.
getUsername
();
String
contact
=
contractDataDto
.
getContact
();
String
IDCard
=
contractDataDto
.
getIDCard
();
String
subject
=
contractDataDto
.
getSubject
();
String
endTime
=
contractDataDto
.
getEndTime
();
String
expireTime
=
contractDataDto
.
getExpireTime
();
String
category
=
contractDataDto
.
getCategory
();
String
companyTenantName
=
contractDataDto
.
getCompanyTenantName
();
String
companyUsername
=
contractDataDto
.
getCompanyUsername
();
String
companyContact
=
contractDataDto
.
getCompanyContact
();
Long
emplateId
=
contractDataDto
.
getEmplateId
();
String
companykeyword
=
contractDataDto
.
getCompanykeyword
();
Integer
companyPage
=
contractDataDto
.
getCompanyPage
();
Double
companyOffsetX
=
contractDataDto
.
getCompanyOffsetX
();
Double
companyOffsetY
=
contractDataDto
.
getCompanyOffsetY
();
String
personalkeyword
=
contractDataDto
.
getPersonalkeyword
();
Integer
personalPage
=
contractDataDto
.
getPersonalPage
();
Double
personalOffsetX
=
contractDataDto
.
getPersonalOffsetX
();
Double
personalOffsetY
=
contractDataDto
.
getPersonalOffsetY
();
SdkClient
sdkClient
=
new
SdkClient
(
serverUrl
,
accessKey
,
accessSecret
);
// 合同基本参数
//进行日期格式化
Contract
contract
=
new
Contract
();
contract
.
setSubject
(
subject
);
contract
.
setDescription
(
subject
);
contract
.
setExpireTime
(
expireTime
);
contract
.
setEndTime
(
endTime
);
contract
.
setCategory
(
new
Category
(
category
));
contract
.
setSend
(
false
);
// 个人
Signatory
signatory1
=
new
Signatory
();
signatory1
.
setTenantName
(
username
);
signatory1
.
setTenantType
(
"PERSONAL"
);
signatory1
.
setReceiver
(
new
User
(
username
,
contact
,
"MOBILE"
));
signatory1
.
setSerialNo
(
1
);
// 对接方
Signatory
signatory2
=
new
Signatory
();
signatory2
.
setTenantName
(
companyTenantName
);
signatory2
.
setTenantType
(
"COMPANY"
);
signatory2
.
setReceiver
(
new
User
(
companyUsername
,
companyContact
,
"MOBILE"
));
signatory2
.
setSerialNo
(
2
);
Action
action
=
new
Action
(
"COMPANY"
,
0
);
signatory2
.
addAction
(
action
);
// 设置签署方
contract
.
addSignatory
(
signatory1
);
contract
.
addSignatory
(
signatory2
);
// 创建合同
ContractDraftRequest
request
=
new
ContractDraftRequest
(
contract
);
String
response
=
sdkClient
.
service
(
request
);
SdkResponse
<
Contract
>
responseObj
=
JSONUtils
.
toQysResponse
(
response
,
Contract
.
class
);
// 返回结果
Contract
result
=
new
Contract
();
if
(
responseObj
.
getCode
()
==
0
)
{
result
=
responseObj
.
getResult
();
logger
.
info
(
JSON
.
toJSONString
(
responseObj
));
}
else
{
logger
.
info
(
"请求失败,错误码:{},错误信息:{}"
,
responseObj
.
getCode
(),
responseObj
.
getMessage
());
}
DocumentAddResult
documentAddResult
=
this
.
getDocumentAddResult
(
result
.
getId
(),
subject
,
templateParam
,
emplateId
);
List
<
Signatory
>
list
=
result
.
getSignatories
();
Long
ActionId
=
null
;
Long
SignatoryId
=
null
;
for
(
Signatory
signatory
:
list
)
{
if
(
signatory
.
getTenantType
().
equals
(
"COMPANY"
)){
ActionId
=
signatory
.
getActions
().
get
(
0
).
getId
();
}
else
{
SignatoryId
=
signatory
.
getId
();
}
}
// 发起时可以设置签署位置
Stamper
stamper
=
new
Stamper
();
stamper
.
setActionId
(
ActionId
);
stamper
.
setDocumentId
(
documentAddResult
.
getDocumentId
());
stamper
.
setKeyword
(
companykeyword
);
stamper
.
setType
(
"COMPANY"
);
stamper
.
setPage
(
companyPage
);
stamper
.
setOffsetX
(
companyOffsetX
);
stamper
.
setOffsetY
(
companyOffsetY
);
Stamper
stamper2
=
new
Stamper
();
stamper2
.
setSignatoryId
(
SignatoryId
);
stamper2
.
setDocumentId
(
documentAddResult
.
getDocumentId
());
stamper
.
setKeyword
(
personalkeyword
);
stamper2
.
setType
(
"PERSONAL"
);
stamper2
.
setPage
(
personalPage
);
stamper2
.
setOffsetX
(
personalOffsetX
);
stamper2
.
setOffsetY
(
personalOffsetY
);
List
<
Stamper
>
stampers
=
new
ArrayList
<>();
stampers
.
add
(
stamper
);
stampers
.
add
(
stamper2
);
SdkResponse
<
Object
>
data
=
this
.
getSdkResponse
(
result
.
getId
(),
stampers
);
return
result
.
getId
();
}
public
DocumentAddResult
getDocumentAddResult
(
Long
contractId
,
String
subject
,
List
<
TemplateParamDto
>
templateParam
,
Long
emplateId
)
{
SdkClient
sdkClient
=
new
SdkClient
(
serverUrl
,
accessKey
,
accessSecret
);
// 添加合同文档
List
<
TemplateParam
>
params
=
new
ArrayList
<>();
for
(
TemplateParamDto
templateParamDto
:
templateParam
)
{
params
.
add
(
new
TemplateParam
(
templateParamDto
.
getKey
(),
templateParamDto
.
getValue
()));
}
DocumentAddByTemplateRequest
request
=
new
DocumentAddByTemplateRequest
(
contractId
,
emplateId
,
params
,
subject
);
String
response
=
sdkClient
.
service
(
request
);
SdkResponse
<
DocumentAddResult
>
responseObj
=
JSONUtils
.
toQysResponse
(
response
,
DocumentAddResult
.
class
);
DocumentAddResult
result
=
null
;
if
(
responseObj
.
getCode
()
==
0
)
{
result
=
responseObj
.
getResult
();
logger
.
info
(
"添加合同文档成功,文档ID:{}"
,
JSON
.
toJSONString
(
result
));
}
else
{
logger
.
info
(
"请求失败,错误码:{},错误信息:{}"
,
responseObj
.
getCode
(),
responseObj
.
getMessage
());
}
return
result
;
}
public
SdkResponse
<
Object
>
getSdkResponse
(
Long
contractId
,
List
<
Stamper
>
stampers
){
SdkClient
sdkClient
=
new
SdkClient
(
serverUrl
,
accessKey
,
accessSecret
);
// 发起合同
SdkResponse
<
Object
>
responseObj
=
null
;
ContractSendRequest
request
=
new
ContractSendRequest
(
contractId
,
stampers
);
String
response
=
sdkClient
.
service
(
request
);
responseObj
=
JSONUtils
.
toQysResponse
(
response
);
if
(
responseObj
.
getCode
()
==
0
)
{
logger
.
info
(
"合同发起成功"
);
}
else
{
logger
.
info
(
"请求失败,错误码:{},错误信息:{}"
,
responseObj
.
getCode
(),
responseObj
.
getMessage
());
}
return
responseObj
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment