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
bff0f3f1
Commit
bff0f3f1
authored
Aug 25, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加日志
parent
17e8f5ec
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
20 deletions
+38
-20
HouseholdContractController.java
...dule/hygf/biz/controller/HouseholdContractController.java
+0
-3
HouseholdContractServiceImpl.java
...e/hygf/biz/service/impl/HouseholdContractServiceImpl.java
+0
-3
QiyuesuoServiceImpl.java
...oot/module/hygf/biz/service/impl/QiyuesuoServiceImpl.java
+38
-14
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/HouseholdContractController.java
View file @
bff0f3f1
...
...
@@ -202,10 +202,7 @@ public class HouseholdContractController extends BaseController {
@PostMapping
(
value
=
"/reissue"
)
@ApiOperation
(
httpMethod
=
"post"
,
value
=
"重新发起"
,
notes
=
"重新发起"
)
public
ResponseModel
<
HouseholdContract
>
reissue
(
@RequestBody
HouseholdContract
model
)
{
HouseholdContract
householdContract
=
householdContractServiceImpl
.
reissueinitiateHouseholdContract
(
model
);
return
ResponseHelper
.
buildResponse
(
householdContract
);
}
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/HouseholdContractServiceImpl.java
View file @
bff0f3f1
...
...
@@ -195,11 +195,9 @@ public class HouseholdContractServiceImpl extends BaseService<HouseholdContractD
public
HouseholdContract
reissueinitiateHouseholdContract
(
HouseholdContract
model
){
HouseholdContract
peasantHousehold
=
this
.
getById
(
model
.
getSequenceNbr
());
//生成合同
HouseholdContract
householdContract
=
new
HouseholdContract
();
householdContract
.
setPartyA
(
model
.
getPartyA
());
householdContract
.
setPartyB
(
model
.
getPartyB
());
householdContract
.
setContractTemplateId
(
model
.
getContractTemplateId
());
...
...
@@ -235,7 +233,6 @@ public class HouseholdContractServiceImpl extends BaseService<HouseholdContractD
ContractDataDto
contractDataDto
=
new
ContractDataDto
();
contractDataDto
.
setUsername
(
householdContract
.
getPartyA
());
contractDataDto
.
setContact
(
householdContract
.
getPeasantHouseholdPhone
());
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/QiyuesuoServiceImpl.java
View file @
bff0f3f1
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.TypeReference
;
import
com.qiyuesuo.sdk.v2.SdkClient
;
import
com.qiyuesuo.sdk.v2.bean.*
;
import
com.qiyuesuo.sdk.v2.bean.vo.DocumentUrlVO
;
...
...
@@ -11,6 +12,7 @@ import com.qiyuesuo.sdk.v2.response.*;
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
jdk.internal.org.objectweb.asm.tree.TryCatchBlockNode
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Value
;
...
...
@@ -89,6 +91,10 @@ public class QiyuesuoServiceImpl {
public
Long
addContract
(
ContractDataDto
contractDataDto
,
List
<
TemplateParamDto
>
templateParam
){
SdkResponse
<
Contract
>
responseObj
=
null
;
// 返回结果
Contract
result
=
new
Contract
();
String
username
=
contractDataDto
.
getUsername
();
String
contact
=
contractDataDto
.
getContact
();
String
IDCard
=
contractDataDto
.
getIDCard
();
...
...
@@ -109,6 +115,7 @@ public class QiyuesuoServiceImpl {
Double
personalOffsetX
=
contractDataDto
.
getPersonalOffsetX
();
Double
personalOffsetY
=
contractDataDto
.
getPersonalOffsetY
();
List
<
Long
>
corpSealIds
=
contractDataDto
.
getSealId
();
try
{
SdkClient
sdkClient
=
new
SdkClient
(
serverUrl
,
accessKey
,
accessSecret
);
// 合同基本参数
//进行日期格式化
...
...
@@ -142,10 +149,13 @@ 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
();
responseObj
=
JSONUtils
.
toQysResponse
(
response
,
Contract
.
class
);
logger
.
info
(
"创建草稿合同调用后"
+
JSON
.
toJSONString
(
responseObj
));
}
catch
(
Exception
e
){
e
.
printStackTrace
();
throw
new
RuntimeException
(
"创建草稿合同失败"
);
}
if
(
responseObj
.
getCode
()
==
0
)
{
result
=
responseObj
.
getResult
();
logger
.
info
(
JSON
.
toJSONString
(
responseObj
));
...
...
@@ -189,6 +199,9 @@ public class QiyuesuoServiceImpl {
public
DocumentAddResult
getDocumentAddResult
(
Long
contractId
,
String
subject
,
List
<
TemplateParamDto
>
templateParam
,
Long
emplateId
)
{
DocumentAddResult
result
=
null
;
SdkResponse
<
DocumentAddResult
>
responseObj
=
null
;
try
{
SdkClient
sdkClient
=
new
SdkClient
(
serverUrl
,
accessKey
,
accessSecret
);
// 添加合同文档
List
<
TemplateParam
>
params
=
new
ArrayList
<>();
...
...
@@ -197,38 +210,49 @@ public class QiyuesuoServiceImpl {
params
.
add
(
new
TemplateParam
(
templateParamDto
.
getKey
(),
templateParamDto
.
getValue
()));
}
}
logger
.
info
(
"
合同
参数"
+
JSON
.
toJSONString
(
params
));
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
);
responseObj
=
JSONUtils
.
toQysResponse
(
response
,
DocumentAddResult
.
class
);
logger
.
info
(
"添加合同文档后"
,
JSON
.
toJSONString
(
responseObj
));
DocumentAddResult
result
=
null
;
if
(
responseObj
.
getCode
()
==
0
)
{
}
catch
(
Exception
e
){
e
.
printStackTrace
();
throw
new
RuntimeException
(
"添加合同文档失败"
);
}
if
(
responseObj
!=
null
&&
responseObj
.
getCode
()
==
0
)
{
result
=
responseObj
.
getResult
();
logger
.
info
(
"添加合同文档成功,文档ID:{}"
,
JSON
.
toJSONString
(
result
));
}
else
{
throw
new
RuntimeException
(
"
请求失败"
);
throw
new
RuntimeException
(
"
添加合同文档"
+
responseObj
.
getMessage
()
);
}
return
result
;
}
public
SdkResponse
<
Object
>
getSdkResponse
(
Long
contractId
,
List
<
Stamper
>
stampers
){
SdkClient
sdkClient
=
new
SdkClient
(
serverUrl
,
accessKey
,
accessSecret
);
// 发起合同
SdkResponse
<
Object
>
responseObj
=
null
;
try
{
SdkClient
sdkClient
=
new
SdkClient
(
serverUrl
,
accessKey
,
accessSecret
);
ContractSendRequest
request
=
new
ContractSendRequest
(
contractId
,
stampers
);
logger
.
info
(
"发起合同前"
,
JSON
.
toJSONString
(
request
));
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
(
"合同发起成功"
);
}
catch
(
Exception
e
){
e
.
printStackTrace
();
throw
new
RuntimeException
(
"请求契约锁发起合同接口失败"
);
}
logger
.
info
(
"请求契约锁发起合同后"
,
JSON
.
toJSONString
(
responseObj
));
if
(
responseObj
!=
null
&&
responseObj
.
getCode
()
==
0
)
{
logger
.
info
(
"请求契约锁发起合同成功"
);
}
else
{
throw
new
RuntimeException
(
"请求失败"
+
responseObj
.
getMessage
());
throw
new
RuntimeException
(
"请求
契约锁发起合同
失败"
+
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