Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hls-support-rlwx
Project
Project
Details
Activity
Releases
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
rl
hls-support-rlwx
Commits
02073cf3
Commit
02073cf3
authored
Apr 28, 2020
by
5359
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码提交git
parent
45854c17
Pipeline
#5827
canceled with stages
Changes
15
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
863 additions
and
273 deletions
+863
-273
SIGN_INFO_HCLC_FACE.sql
.../src/main/java/2020-2-24/sequence/SIGN_INFO_HCLC_FACE.sql
+35
-0
SIGN_INFO_HCLC_FACE_S.sql
...rc/main/java/2020-2-24/sequence/SIGN_INFO_HCLC_FACE_S.sql
+7
-0
sign_info_hclc.sql
core-db/src/main/java/2020-2-24/table/sign_info_hclc.sql
+59
-0
pom.xml
core/pom.xml
+10
-0
SignHclcController.java
...om/hand/app/esignHclc/controllers/SignHclcController.java
+40
-1
SignUserInfoHclc.java
...ain/java/com/hand/app/esignHclc/dto/SignUserInfoHclc.java
+20
-0
ISignInfoHclcService.java
.../com/hand/app/esignHclc/service/ISignInfoHclcService.java
+4
-0
OrganSignInfoHclcServiceImpl.java
.../esignHclc/service/impl/OrganSignInfoHclcServiceImpl.java
+115
-72
SignInfoHclcServiceImpl.java
...d/app/esignHclc/service/impl/SignInfoHclcServiceImpl.java
+378
-109
SignHclcUtils.java
...main/java/com/hand/app/esignHclc/utils/SignHclcUtils.java
+80
-9
SignInfoHclcMapper.xml
...ain/resources/app/esignHclc/mapper/SignInfoHclcMapper.xml
+6
-5
config.properties
core/src/main/resources/config.properties
+4
-0
config.properties
core/src/main/resources/profiles/dev/config.properties
+35
-26
config.properties
core/src/main/resources/profiles/sit/config.properties
+35
-26
config.properties
core/src/main/resources/profiles/uat/config.properties
+35
-25
No files found.
core-db/src/main/java/2020-2-24/sequence/SIGN_INFO_HCLC_FACE.sql
0 → 100644
View file @
02073cf3
-- Create table
create
table
SIGN_INFO_HCLC_FACE
(
FACEAUTH_ID
NUMBER
not
null
,
OPEN_ID
VARCHAR2
(
30
)
not
null
,
FACEAUTH_STATUS
VARCHAR2
(
30
),
URL
VARCHAR2
(
2000
),
SHORT_LINK
VARCHAR2
(
2000
),
RETURN_CODE
VARCHAR2
(
30
),
RETURN_MESSAGE
VARCHAR2
(
2000
),
OBJECT_VERSION_NUMBER
NUMBER
(
38
)
default
1
,
REQUEST_ID
NUMBER
(
38
)
default
-
1
,
PROGRAM_ID
NUMBER
(
38
)
default
-
1
,
CREATED_BY
NUMBER
(
38
)
default
-
1
,
CREATION_DATE
TIMESTAMP
(
6
)
default
CURRENT_TIMESTAMP
,
LAST_UPDATED_BY
NUMBER
(
38
)
default
-
1
,
LAST_UPDATE_DATE
TIMESTAMP
(
6
)
default
CURRENT_TIMESTAMP
,
LAST_UPDATE_LOGIN
NUMBER
(
38
)
default
-
1
,
FLOW_ID
VARCHAR2
(
30
)
);
-- Add comments to the columns
comment
on
column
SIGN_INFO_HCLC_FACE
.
OPEN_ID
is
'微信openid'
;
comment
on
column
SIGN_INFO_HCLC_FACE
.
FACEAUTH_STATUS
is
'人脸认证结果'
;
comment
on
column
SIGN_INFO_HCLC_FACE
.
URL
is
'认证地址原始链接'
;
comment
on
column
SIGN_INFO_HCLC_FACE
.
SHORT_LINK
is
'认证地址短连接'
;
comment
on
column
SIGN_INFO_HCLC_FACE
.
FLOW_ID
is
'认证流程Id'
;
-- Create/Recreate primary, unique and foreign key constraints
alter
table
SIGN_INFO_HCLC_FACE
add
constraint
SIGN_INFO_HCLC_FACE_PK
primary
key
(
FACEAUTH_ID
)
using
index
;
core-db/src/main/java/2020-2-24/sequence/SIGN_INFO_HCLC_FACE_S.sql
0 → 100644
View file @
02073cf3
-- Create sequence
create
sequence
SIGN_INFO_HCLC_FACE_S
minvalue
1
maxvalue
9999999999999999999999999999
start
with
10001
increment
by
1
cache
20
;
core-db/src/main/java/2020-2-24/table/sign_info_hclc.sql
0 → 100644
View file @
02073cf3
-- Create table
create
table
SIGN_INFO_HCLC
(
OPEN_ID
VARCHAR2
(
30
)
not
null
,
ID_NO
VARCHAR2
(
30
)
not
null
,
NAME
VARCHAR2
(
200
)
not
null
,
MOBILE
VARCHAR2
(
30
)
not
null
,
EMAIL
VARCHAR2
(
30
),
ORIGIN_ID
VARCHAR2
(
30
),
TITLE
VARCHAR2
(
200
),
ADDRESS
VARCHAR2
(
300
),
ACCOUNT_ID
VARCHAR2
(
30
),
FACEAUTH_STATUS
VARCHAR2
(
30
),
CTITYPE
NUMBER
,
AGENT_TYPE
NUMBER
,
AGENT_ID_NO
VARCHAR2
(
30
),
AGENT_NAME
VARCHAR2
(
30
),
LEGAL_ID_NO
VARCHAR2
(
30
),
LEGAL_NAME
VARCHAR2
(
30
),
OBJECT_VERSION_NUMBER
NUMBER
(
38
)
default
1
,
REQUEST_ID
NUMBER
(
38
)
default
-
1
,
PROGRAM_ID
NUMBER
(
38
)
default
-
1
,
CREATED_BY
NUMBER
(
38
)
default
-
1
,
CREATION_DATE
TIMESTAMP
(
6
)
default
CURRENT_TIMESTAMP
,
LAST_UPDATED_BY
NUMBER
(
38
)
default
-
1
,
LAST_UPDATE_DATE
TIMESTAMP
(
6
)
default
CURRENT_TIMESTAMP
,
LAST_UPDATE_LOGIN
NUMBER
(
38
)
default
-
1
);
-- Add comments to the columns
comment
on
column
SIGN_INFO_HCLC
.
OPEN_ID
is
'微信openid'
;
comment
on
column
SIGN_INFO_HCLC
.
ID_NO
is
'身份证件号(组织机构号)'
;
comment
on
column
SIGN_INFO_HCLC
.
NAME
is
'用户名称(组织机构名称)'
;
comment
on
column
SIGN_INFO_HCLC
.
MOBILE
is
'手机号'
;
comment
on
column
SIGN_INFO_HCLC
.
EMAIL
is
'邮件'
;
comment
on
column
SIGN_INFO_HCLC
.
ORIGIN_ID
is
'原始用户id'
;
comment
on
column
SIGN_INFO_HCLC
.
CTITYPE
is
'用户类型(1-个人,2-法人)'
;
comment
on
column
SIGN_INFO_HCLC
.
AGENT_TYPE
is
'经办人类型(1-组织其他员工,2-法定代表人)'
;
comment
on
column
SIGN_INFO_HCLC
.
AGENT_ID_NO
is
'经办人身份证号码'
;
comment
on
column
SIGN_INFO_HCLC
.
AGENT_NAME
is
'经办人姓名'
;
comment
on
column
SIGN_INFO_HCLC
.
LEGAL_ID_NO
is
'法定代表人身份证号码'
;
comment
on
column
SIGN_INFO_HCLC
.
LEGAL_NAME
is
'法定代表人姓名'
;
-- Create/Recreate primary, unique and foreign key constraints
alter
table
SIGN_INFO_HCLC
add
constraint
SIGN_INFO_HCLC_PK
primary
key
(
OPEN_ID
)
using
index
;
-- Create/Recreate indexes
create
index
SIGN_INFO_HCLC_N1
on
SIGN_INFO_HCLC
(
ID_NO
,
OPEN_ID
);
core/pom.xml
View file @
02073cf3
...
@@ -225,6 +225,16 @@
...
@@ -225,6 +225,16 @@
${project.basedir}/src/main/webapp/WEB-INF/lib/aliyun-java-sdk-dysmsapi-1.0.0-SANPSHOT.jar
${project.basedir}/src/main/webapp/WEB-INF/lib/aliyun-java-sdk-dysmsapi-1.0.0-SANPSHOT.jar
</systemPath>
</systemPath>
</dependency>
</dependency>
<dependency>
<groupId>
org.slf4j
</groupId>
<artifactId>
slf4j-api
</artifactId>
<version>
RELEASE
</version>
</dependency>
<dependency>
<groupId>
com.baidu.aip
</groupId>
<artifactId>
java-sdk
</artifactId>
<version>
4.12.0
</version>
</dependency>
<!-- <dependency>
<!-- <dependency>
<groupId>com.hand</groupId>
<groupId>com.hand</groupId>
<artifactId>hap-db</artifactId>
<artifactId>hap-db</artifactId>
...
...
core/src/main/java/com/hand/app/esignHclc/controllers/SignHclcController.java
View file @
02073cf3
...
@@ -212,7 +212,14 @@ public class SignHclcController extends BaseController {
...
@@ -212,7 +212,14 @@ public class SignHclcController extends BaseController {
dto
.
setCreateMessage
(
""
);
dto
.
setCreateMessage
(
""
);
//注销经办人用户
//注销经办人用户
map
=
signHclcService
.
deletePersonAccount
(
iRequest
,
dto
);
//初始化经办人人脸识别信息
SignUserInfoHclc
agentSignInfo
=
new
SignUserInfoHclc
();
agentSignInfo
.
setOpenId
(
dto
.
getOpenId
());
agentSignInfo
.
setIdNo
(
dto
.
getAgentIdNo
());
agentSignInfo
.
setMobile
(
dto
.
getMobile
());
agentSignInfo
.
setName
(
dto
.
getAgentName
());
agentSignInfo
.
setAccountId
(
dto
.
getAgentAccountId
());
map
=
signHclcService
.
deletePersonAccount
(
iRequest
,
agentSignInfo
);
if
(
"0"
.
equalsIgnoreCase
(
map
.
get
(
"code"
).
toString
())
||
"40051667"
.
equalsIgnoreCase
(
map
.
get
(
"code"
).
toString
())
||
"000003"
.
equalsIgnoreCase
(
map
.
get
(
"code"
).
toString
()))
{
if
(
"0"
.
equalsIgnoreCase
(
map
.
get
(
"code"
).
toString
())
||
"40051667"
.
equalsIgnoreCase
(
map
.
get
(
"code"
).
toString
())
||
"000003"
.
equalsIgnoreCase
(
map
.
get
(
"code"
).
toString
()))
{
signHclcService
.
deleteByPrimaryKey
(
dto
);
signHclcService
.
deleteByPrimaryKey
(
dto
);
}
else
{
}
else
{
...
@@ -301,4 +308,36 @@ public class SignHclcController extends BaseController {
...
@@ -301,4 +308,36 @@ public class SignHclcController extends BaseController {
@RequestBody
(
required
=
true
)
JSONObject
params
)
{
@RequestBody
(
required
=
true
)
JSONObject
params
)
{
return
signHclcService
.
createSignFlows
(
createRequestContext
(
request
),
params
);
return
signHclcService
.
createSignFlows
(
createRequestContext
(
request
),
params
);
}
}
/**
* 创建印章
*
* @param request
* @param dto 创建签署流程
* @return Map
*/
@ResponseBody
@RequestMapping
(
value
=
"/sign/seal/create"
,
method
=
RequestMethod
.
POST
)
public
JSONObject
createPersonSeal
(
HttpServletRequest
request
,
@RequestBody
SignUserInfoHclc
dto
)
{
JSONObject
json
=
new
JSONObject
();
String
sealId
=
signHclcService
.
createTemplateSeals
(
dto
.
getAccountId
(),
dto
.
getOpenId
());
json
.
put
(
"sealId"
,
sealId
);
return
json
;
}
// /**
// * 创建签署流程
// *
// * @param request
// * @param params 创建签署流程
// * @return Map
// */
// @ResponseBody
// @RequestMapping(value = "/sign/flows/cancel", method = RequestMethod.POST)
// public JSONObject cancelSignFlows(HttpServletRequest request,
// @RequestBody(required = true) JSONObject params) {
// return signHclcService.cancelSignFlows(createRequestContext(request), params);
// }
}
}
core/src/main/java/com/hand/app/esignHclc/dto/SignUserInfoHclc.java
View file @
02073cf3
...
@@ -50,6 +50,10 @@ public class SignUserInfoHclc extends BaseDTO {
...
@@ -50,6 +50,10 @@ public class SignUserInfoHclc extends BaseDTO {
private
String
authFlag
;
// 用户通过认证状态
private
String
authFlag
;
// 用户通过认证状态
private
String
dealerFlag
;
// 是否代理店
private
String
sealId
;
// 是否代理店
@Transient
@Transient
private
String
attachmentId
;
//身份证附件id
private
String
attachmentId
;
//身份证附件id
...
@@ -346,4 +350,20 @@ public class SignUserInfoHclc extends BaseDTO {
...
@@ -346,4 +350,20 @@ public class SignUserInfoHclc extends BaseDTO {
public
void
setAuthFlag
(
String
authFlag
)
{
public
void
setAuthFlag
(
String
authFlag
)
{
this
.
authFlag
=
authFlag
;
this
.
authFlag
=
authFlag
;
}
}
public
String
getDealerFlag
()
{
return
dealerFlag
;
}
public
void
setDealerFlag
(
String
dealerFlag
)
{
this
.
dealerFlag
=
dealerFlag
;
}
public
String
getSealId
()
{
return
sealId
;
}
public
void
setSealId
(
String
sealId
)
{
this
.
sealId
=
sealId
;
}
}
}
core/src/main/java/com/hand/app/esignHclc/service/ISignInfoHclcService.java
View file @
02073cf3
...
@@ -35,5 +35,9 @@ public interface ISignInfoHclcService extends IBaseService<SignUserInfoHclc>, Pr
...
@@ -35,5 +35,9 @@ public interface ISignInfoHclcService extends IBaseService<SignUserInfoHclc>, Pr
JSONObject
createSignFlows
(
IRequest
requestContext
,
JSONObject
params
);
JSONObject
createSignFlows
(
IRequest
requestContext
,
JSONObject
params
);
String
createTemplateSeals
(
String
accountId
,
String
openId
);
// JSONObject cancelSignFlows(IRequest requestContext, JSONObject params);
void
postSignFlowsResult
(
IRequest
iRequest
,
JSONObject
params
);
void
postSignFlowsResult
(
IRequest
iRequest
,
JSONObject
params
);
}
}
core/src/main/java/com/hand/app/esignHclc/service/impl/OrganSignInfoHclcServiceImpl.java
View file @
02073cf3
...
@@ -47,7 +47,7 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
...
@@ -47,7 +47,7 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
//用户认证接口信息
//用户认证接口信息
public
static
final
String
indivSysName
=
"HCLC_FACE_API"
;
public
static
final
String
indivSysName
=
"HCLC_FACE_API"
;
public
static
final
String
tokenApiName
=
"getToken"
;
public
static
final
String
tokenApiName
=
"getToken"
;
public
static
final
String
orgApiName
=
"
o
rgAuthUrl"
;
public
static
final
String
orgApiName
=
"
getO
rgAuthUrl"
;
public
static
final
String
getOrgIdApiName
=
"getOrgByThirdId"
;
public
static
final
String
getOrgIdApiName
=
"getOrgByThirdId"
;
//电子签章接口信息
//电子签章接口信息
public
static
final
String
signatureSysName
=
"HCLC_ELECTRONIC_SIGNATURE"
;
public
static
final
String
signatureSysName
=
"HCLC_ELECTRONIC_SIGNATURE"
;
...
@@ -66,7 +66,7 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
...
@@ -66,7 +66,7 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
Map
<
String
,
Object
>
mapOrgan
=
new
HashMap
<>();
Map
<
String
,
Object
>
mapOrgan
=
new
HashMap
<>();
if
(
Objects
.
isNull
(
info
.
getOpenId
()))
{
if
(
Objects
.
isNull
(
info
.
getOpenId
())
||
"undefined"
.
equalsIgnoreCase
(
info
.
getOpenId
())
)
{
logger
.
error
(
"关键参数openId不存在,调用失败!"
);
logger
.
error
(
"关键参数openId不存在,调用失败!"
);
mapOrgan
.
put
(
"code"
,
"1"
);
mapOrgan
.
put
(
"code"
,
"1"
);
mapOrgan
.
put
(
"message"
,
"关键参数openId不存在,调用失败!"
);
mapOrgan
.
put
(
"message"
,
"关键参数openId不存在,调用失败!"
);
...
@@ -88,6 +88,9 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
...
@@ -88,6 +88,9 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
accountStatus
=
"AGENT_ADD"
;
accountStatus
=
"AGENT_ADD"
;
getUrlType
=
"AGENT"
;
getUrlType
=
"AGENT"
;
}
else
{
}
else
{
signInfoHclc
.
setCtitype
(
2L
);
signInfoHclc
.
setAgentType
(
info
.
getAgentType
());
if
(
"Y"
.
equalsIgnoreCase
(
signInfoHclc
.
getAuthFlag
()))
{
if
(
"Y"
.
equalsIgnoreCase
(
signInfoHclc
.
getAuthFlag
()))
{
mapOrgan
.
put
(
"code"
,
"2"
);
mapOrgan
.
put
(
"code"
,
"2"
);
mapOrgan
.
put
(
"message"
,
"机构认证已完成,无需重复验证!"
);
mapOrgan
.
put
(
"message"
,
"机构认证已完成,无需重复验证!"
);
...
@@ -95,7 +98,7 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
...
@@ -95,7 +98,7 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
}
}
//移动端用户信息发生变更,需要注销e签宝账户,重新创建,并获取核验url
//移动端用户信息发生变更,需要注销e签宝账户,重新创建,并获取核验url
if
(!
signInfoHclc
.
getAgentIdNo
().
equalsIgnoreCase
(
info
.
getAgentIdNo
())
||
!
signInfoHclc
.
getAgentName
().
equalsIgnoreCase
(
info
.
getAgentName
())
||
!
signInfoHclc
.
getMobile
().
equalsIgnoreCase
(
info
.
getMobile
()))
{
if
(!
info
.
getAgentIdNo
().
equalsIgnoreCase
(
signInfoHclc
.
getAgentIdNo
())
||
!
info
.
getAgentName
().
equalsIgnoreCase
(
signInfoHclc
.
getAgentName
())
||
!
info
.
getMobile
().
equalsIgnoreCase
(
signInfoHclc
.
getMobile
()))
{
//e签宝账户不存在,需要创建e签宝账户
//e签宝账户不存在,需要创建e签宝账户
if
(
Objects
.
isNull
(
signInfoHclc
.
getAgentAccountId
()))
{
if
(
Objects
.
isNull
(
signInfoHclc
.
getAgentAccountId
()))
{
accountStatus
=
"AGENT_ADD"
;
accountStatus
=
"AGENT_ADD"
;
...
@@ -151,24 +154,48 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
...
@@ -151,24 +154,48 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
if
(
"AGENT"
.
equalsIgnoreCase
(
getUrlType
))
{
if
(
"AGENT"
.
equalsIgnoreCase
(
getUrlType
))
{
//初始化经办人人脸识别信息
//初始化经办人人脸识别信息
SignUserInfoHclc
agentSignInfo
=
new
SignUserInfoHclc
();
SignUserInfoHclc
agentSignInfo
=
new
SignUserInfoHclc
();
agentSignInfo
.
setOpenId
(
signInfoHclc
.
getOpenId
());
agentSignInfo
.
setOpenId
(
info
.
getOpenId
());
agentSignInfo
.
setIdNo
(
signInfoHclc
.
getAgentIdNo
());
agentSignInfo
.
setIdNo
(
info
.
getAgentIdNo
());
agentSignInfo
.
setMobile
(
signInfoHclc
.
getMobile
());
agentSignInfo
.
setMobile
(
info
.
getMobile
());
agentSignInfo
.
setName
(
signInfoHclc
.
getAgentName
());
agentSignInfo
.
setName
(
info
.
getAgentName
());
agentSignInfo
.
setCtitype
(
signInfoHclc
.
getCtitype
());
if
(!
"AGENT_EXISTS"
.
equalsIgnoreCase
(
accountStatus
))
{
if
(!
"AGENT_EXISTS"
.
equalsIgnoreCase
(
accountStatus
))
{
//移动端用户信息发生变更,先注销e签宝用户
//移动端用户信息发生变更,先注销e签宝用户
if
(
"AGENT_MODIFY"
.
equalsIgnoreCase
(
accountStatus
))
{
if
(
"AGENT_MODIFY"
.
equalsIgnoreCase
(
accountStatus
))
{
if
(
Objects
.
nonNull
(
signInfoHclc
.
getAccountId
()))
{
mapOrgan
=
deleteOrgansAccount
(
iRequest
,
signInfoHclc
);
if
(!
"0"
.
equalsIgnoreCase
(
mapOrgan
.
get
(
"code"
).
toString
())
&&
!
"40051667"
.
equalsIgnoreCase
(
mapOrgan
.
get
(
"code"
).
toString
()))
{
return
mapOrgan
;
}
//注销成功
signInfoHclc
.
setAccountId
(
""
);
// signInfoHclc.setAuthAccountId("");
//重新设置机构用户信息
signInfoHclc
.
setIdNo
(
info
.
getIdNo
());
signInfoHclc
.
setName
(
info
.
getName
());
signInfoHclc
.
setLegalIdNo
(
info
.
getLegalIdNo
());
signInfoHclc
.
setLegalName
(
info
.
getLegalName
());
signInfoHclc
.
setOrgAuthId
(
null
);
}
agentSignInfo
.
setAccountId
(
signInfoHclc
.
getAgentAccountId
());
agentSignInfo
.
setAccountId
(
signInfoHclc
.
getAgentAccountId
());
mapOrgan
=
iSignInfoHclcService
.
deletePersonAccount
(
iRequest
,
agentSignInfo
);
mapOrgan
=
iSignInfoHclcService
.
deletePersonAccount
(
iRequest
,
agentSignInfo
);
//注销成功
//注销成功
if
(
"0"
.
equalsIgnoreCase
(
mapOrgan
.
get
(
"code"
).
toString
()))
{
if
(
"0"
.
equalsIgnoreCase
(
mapOrgan
.
get
(
"code"
).
toString
())
||
"40051667"
.
equalsIgnoreCase
(
mapOrgan
.
get
(
"code"
).
toString
())
)
{
agentSignInfo
.
setAccountId
(
""
);
agentSignInfo
.
setAccountId
(
""
);
signInfoHclc
.
setAgentAccountId
(
""
);
signInfoHclc
.
setAgentAccountId
(
""
);
signInfoHclc
.
setAuthAgentAccountId
(
""
);
signInfoHclc
.
setAuthAgentAccountId
(
""
);
//重新设置经办人信息
//重新设置经办人信息
signInfoHclc
.
setAgentIdNo
(
info
.
getAgentIdNo
());
signInfoHclc
.
setAgentIdNo
(
info
.
getAgentIdNo
());
signInfoHclc
.
setAgentName
(
info
.
getAgentName
());
signInfoHclc
.
setAgentName
(
info
.
getAgentName
());
if
(
signInfoHclc
.
getAgentType
().
compareTo
(
1L
)
==
0
)
{
signInfoHclc
.
setLegalIdNo
(
info
.
getLegalIdNo
());
signInfoHclc
.
setLegalName
(
info
.
getLegalName
());
}
signInfoHclc
.
setMobile
(
info
.
getMobile
());
signInfoHclc
.
setMobile
(
info
.
getMobile
());
signInfoHclc
.
setAgentType
(
info
.
getAgentType
());
signInfoHclc
.
setAgentType
(
info
.
getAgentType
());
signInfoHclc
.
setFaceAuthId
(
null
);
signInfoHclc
.
setFaceAuthId
(
null
);
...
@@ -176,17 +203,22 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
...
@@ -176,17 +203,22 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
}
}
//注销e签宝用户或者只创建e签宝账户
//注销e签宝用户或者只创建e签宝账户
if
(
mapOrgan
.
size
()
==
0
||
"0"
.
equalsIgnoreCase
(
mapOrgan
.
get
(
"code"
).
toString
()))
{
if
(
mapOrgan
.
size
()
==
0
||
"0"
.
equalsIgnoreCase
(
mapOrgan
.
get
(
"code"
).
toString
())
||
"40051667"
.
equalsIgnoreCase
(
mapOrgan
.
get
(
"code"
).
toString
())
)
{
//创建e签宝账户
//创建e签宝账户
mapOrgan
=
iSignInfoHclcService
.
addPersonAccount
(
agentSignInfo
);
mapOrgan
=
iSignInfoHclcService
.
addPersonAccount
(
agentSignInfo
);
//创建成功
//创建成功
if
(
"0"
.
equalsIgnoreCase
(
mapOrgan
.
get
(
"code"
).
toString
()))
{
if
(
"0"
.
equalsIgnoreCase
(
mapOrgan
.
get
(
"code"
).
toString
()))
{
signInfoHclc
.
setAgentAccountId
(
mapOrgan
.
get
(
"accountId"
).
toString
());
signInfoHclc
.
setAgentAccountId
(
mapOrgan
.
get
(
"accountId"
).
toString
());
signInfoHclc
.
setSealId
(
mapOrgan
.
get
(
"sealId"
).
toString
());
if
(
"AGENT_ADD"
.
equalsIgnoreCase
(
accountStatus
))
{
if
(
"AGENT_ADD"
.
equalsIgnoreCase
(
accountStatus
))
{
//重新设置经办人信息
//重新设置经办人信息
signInfoHclc
.
setAgentIdNo
(
info
.
getAgentIdNo
());
signInfoHclc
.
setAgentIdNo
(
info
.
getAgentIdNo
());
signInfoHclc
.
setAgentName
(
info
.
getAgentName
());
signInfoHclc
.
setAgentName
(
info
.
getAgentName
());
if
(
signInfoHclc
.
getAgentType
().
compareTo
(
1L
)
==
0
)
{
signInfoHclc
.
setLegalIdNo
(
info
.
getLegalIdNo
());
signInfoHclc
.
setLegalName
(
info
.
getLegalName
());
}
signInfoHclc
.
setMobile
(
info
.
getMobile
());
signInfoHclc
.
setMobile
(
info
.
getMobile
());
signInfoHclc
.
setAgentType
(
info
.
getAgentType
());
signInfoHclc
.
setAgentType
(
info
.
getAgentType
());
}
}
...
@@ -210,33 +242,33 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
...
@@ -210,33 +242,33 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
//获取鉴权Token接口结果返回成功
//获取鉴权Token接口结果返回成功
if
(
Objects
.
nonNull
(
token
))
{
if
(
Objects
.
nonNull
(
token
))
{
agentSignInfo
.
setAccountId
(
signInfoHclc
.
getAgentAccountId
());
// agentSignInfo.setAccountId(signInfoHclc.getAgentAccountId());
//获取身份验证公有云账户id
// //获取身份验证公有云账户id
if
(
signInfoHclc
.
getAuthAgentAccountId
()
==
null
||
""
.
equalsIgnoreCase
(
signInfoHclc
.
getAuthAgentAccountId
()))
{
// if (signInfoHclc.getAuthAgentAccountId() == null || "".equalsIgnoreCase(signInfoHclc.getAuthAgentAccountId())) {
mapOrgan
=
iSignInfoHclcService
.
getByThirdId
(
agentSignInfo
,
token
);
// mapOrgan = iSignInfoHclcService.getByThirdId(agentSignInfo, token);
if
(
"0"
.
equalsIgnoreCase
(
mapOrgan
.
get
(
"code"
).
toString
()))
{
// if ("0".equalsIgnoreCase(mapOrgan.get("code").toString())) {
signInfoHclc
.
setAuthAgentAccountId
(
mapOrgan
.
get
(
"authAccountId"
).
toString
());
// signInfoHclc.setAuthAgentAccountId(mapOrgan.get("authAccountId").toString());
}
// }
}
// }
if
(
signInfoHclc
.
getAuthAgentAccountId
()
==
null
||
""
.
equalsIgnoreCase
(
signInfoHclc
.
getAuthAgentAccountId
()))
{
// if (signInfoHclc.getAuthAgentAccountId() == null || "".equalsIgnoreCase(signInfoHclc.getAuthAgentAccountId())) {
mapOrgan
.
put
(
"code"
,
"10"
);
// mapOrgan.put("code", "10");
mapOrgan
.
put
(
"message"
,
"获取验证公有云accountId失败,请检查!"
);
// mapOrgan.put("message", "获取验证公有云accountId失败,请检查!");
}
else
{
// } else {
//
agentSignInfo
.
setAuthAccountId
(
signInfoHclc
.
getAuthAgentAccountId
());
// agentSignInfo.setAuthAccountId(signInfoHclc.getAuthAgentAccountId());
//设置经办人人脸验证成功跳转地址
//设置经办人人脸验证成功跳转地址
agentSignInfo
.
setRedirectUrl
(
info
.
getRedirectUrl
());
agentSignInfo
.
setRedirectUrl
(
info
.
getRedirectUrl
());
//获取个人核身认证地址
//获取个人核身认证地址
mapOrgan
=
iSignInfoHclcService
.
getFaceUrlHttp
(
iRequest
,
agentSignInfo
,
token
);
mapOrgan
=
iSignInfoHclcService
.
getFaceUrlHttp
(
iRequest
,
agentSignInfo
,
token
);
//接口结果返回成功
//接口结果返回成功
if
(
"0"
.
equalsIgnoreCase
(
mapOrgan
.
get
(
"code"
).
toString
()))
{
if
(
"0"
.
equalsIgnoreCase
(
mapOrgan
.
get
(
"code"
).
toString
()))
{
signInfoHclc
.
setFaceAuthId
(
Long
.
valueOf
(
mapOrgan
.
get
(
"faceAuthId"
).
toString
()));
signInfoHclc
.
setFaceAuthId
(
Long
.
valueOf
(
mapOrgan
.
get
(
"faceAuthId"
).
toString
()));
}
}
}
// }
}
}
//获取鉴权Token接口结果返回失败
//获取鉴权Token接口结果返回失败
else
{
else
{
...
@@ -262,11 +294,12 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
...
@@ -262,11 +294,12 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
mapOrgan
.
put
(
"code"
,
"10"
);
mapOrgan
.
put
(
"code"
,
"10"
);
mapOrgan
.
put
(
"message"
,
"企业对公打款认证已完成,无需重复验证!"
);
mapOrgan
.
put
(
"message"
,
"企业对公打款认证已完成,无需重复验证!"
);
return
mapOrgan
;
return
mapOrgan
;
}
else
if
(
"AUTHING"
.
equalsIgnoreCase
(
signInfoHclcOrg
.
getAuthStatus
()))
{
mapOrgan
.
put
(
"code"
,
"11"
);
mapOrgan
.
put
(
"message"
,
"企业对公打款认证中,请耐心等待认证结果!"
);
return
mapOrgan
;
}
}
// else if ("AUTHING".equalsIgnoreCase(signInfoHclcOrg.getAuthStatus())) {
// mapOrgan.put("code", "11");
// mapOrgan.put("message", "企业对公打款认证中,请耐心等待认证结果!");
// return mapOrgan;
// }
}
}
//e签宝账户不存在,需要新增
//e签宝账户不存在,需要新增
...
@@ -315,9 +348,9 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
...
@@ -315,9 +348,9 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
if
(
"ORG_MODIFY"
.
equalsIgnoreCase
(
accountStatus
))
{
if
(
"ORG_MODIFY"
.
equalsIgnoreCase
(
accountStatus
))
{
mapOrgan
=
deleteOrgansAccount
(
iRequest
,
signInfoHclc
);
mapOrgan
=
deleteOrgansAccount
(
iRequest
,
signInfoHclc
);
//注销成功
//注销成功
if
(
"0"
.
equalsIgnoreCase
(
mapOrgan
.
get
(
"code"
).
toString
()))
{
if
(
"0"
.
equalsIgnoreCase
(
mapOrgan
.
get
(
"code"
).
toString
())
||
"40051667"
.
equalsIgnoreCase
(
mapOrgan
.
get
(
"code"
).
toString
())
)
{
signInfoHclc
.
setAccountId
(
""
);
signInfoHclc
.
setAccountId
(
""
);
signInfoHclc
.
setAuthAccountId
(
""
);
//
signInfoHclc.setAuthAccountId("");
//重新设置机构用户信息
//重新设置机构用户信息
signInfoHclc
.
setIdNo
(
info
.
getIdNo
());
signInfoHclc
.
setIdNo
(
info
.
getIdNo
());
signInfoHclc
.
setName
(
info
.
getName
());
signInfoHclc
.
setName
(
info
.
getName
());
...
@@ -328,7 +361,7 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
...
@@ -328,7 +361,7 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
}
}
//创建e签宝账户
//创建e签宝账户
if
(
mapOrgan
.
size
()
==
0
||
"0"
.
equalsIgnoreCase
(
mapOrgan
.
get
(
"code"
).
toString
()))
{
if
(
mapOrgan
.
size
()
==
0
||
"0"
.
equalsIgnoreCase
(
mapOrgan
.
get
(
"code"
).
toString
())
||
"40051667"
.
equalsIgnoreCase
(
mapOrgan
.
get
(
"code"
).
toString
())
)
{
//初始化经办人人脸识别信息
//初始化经办人人脸识别信息
SignUserInfoHclc
ogrSignInfo
=
new
SignUserInfoHclc
();
SignUserInfoHclc
ogrSignInfo
=
new
SignUserInfoHclc
();
ogrSignInfo
.
setAgentAccountId
(
signInfoHclc
.
getAgentAccountId
());
ogrSignInfo
.
setAgentAccountId
(
signInfoHclc
.
getAgentAccountId
());
...
@@ -370,26 +403,26 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
...
@@ -370,26 +403,26 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
if
(
Objects
.
nonNull
(
token
))
{
if
(
Objects
.
nonNull
(
token
))
{
//获取身份验证公有云账户id
// //获取身份验证公有云账户id
if
(
signInfoHclc
.
getAuthAccountId
()
==
null
||
""
.
equalsIgnoreCase
(
signInfoHclc
.
getAuthAccountId
()))
{
// if (signInfoHclc.getAuthAccountId() == null || "".equalsIgnoreCase(signInfoHclc.getAuthAccountId())) {
mapOrgan
=
getByThirdId
(
signInfoHclc
,
token
);
// mapOrgan = getByThirdId(signInfoHclc, token);
if
(
"0"
.
equalsIgnoreCase
(
mapOrgan
.
get
(
"code"
).
toString
()))
{
// if ("0".equalsIgnoreCase(mapOrgan.get("code").toString())) {
signInfoHclc
.
setAuthAccountId
(
mapOrgan
.
get
(
"authOrgAccountId"
).
toString
());
// signInfoHclc.setAuthAccountId(mapOrgan.get("authOrgAccountId").toString());
}
// }
}
// }
if
(
signInfoHclc
.
getAuthAccountId
()
==
null
||
""
.
equalsIgnoreCase
(
signInfoHclc
.
getAuthAccountId
()))
{
// if (signInfoHclc.getAuthAccountId() == null || "".equalsIgnoreCase(signInfoHclc.getAuthAccountId())) {
mapOrgan
.
put
(
"code"
,
"10"
);
// mapOrgan.put("code", "10");
mapOrgan
.
put
(
"message"
,
"获取验证公有云accountId失败,请检查!"
);
// mapOrgan.put("message", "获取验证公有云accountId失败,请检查!");
}
else
{
// } else {
signInfoHclc
.
setRedirectUrl
(
info
.
getRedirectUrl
());
signInfoHclc
.
setRedirectUrl
(
info
.
getRedirectUrl
());
//获取组织机构核身地址
//获取组织机构核身地址
mapOrgan
=
this
.
getOrgAuthUrlHttp
(
iRequest
,
signInfoHclc
,
token
);
mapOrgan
=
this
.
getOrgAuthUrlHttp
(
iRequest
,
signInfoHclc
,
token
);
if
(
"0"
.
equalsIgnoreCase
(
mapOrgan
.
get
(
"code"
).
toString
()))
{
if
(
"0"
.
equalsIgnoreCase
(
mapOrgan
.
get
(
"code"
).
toString
()))
{
signInfoHclc
.
setOrgAuthId
(
Long
.
valueOf
(
mapOrgan
.
get
(
"orgAuthId"
).
toString
()));
signInfoHclc
.
setOrgAuthId
(
Long
.
valueOf
(
mapOrgan
.
get
(
"orgAuthId"
).
toString
()));
}
}
}
// }
}
else
{
}
else
{
mapOrgan
.
put
(
"code"
,
"2"
);
mapOrgan
.
put
(
"code"
,
"2"
);
...
@@ -417,7 +450,7 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
...
@@ -417,7 +450,7 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
json1
.
put
(
"notifyUrl"
,
info
.
getNotifyUrl
());
json1
.
put
(
"notifyUrl"
,
info
.
getNotifyUrl
());
json1
.
put
(
"redirectUrl"
,
info
.
getRedirectUrl
());
json1
.
put
(
"redirectUrl"
,
info
.
getRedirectUrl
());
//
个人
认证基本信息
//
企业/组织
认证基本信息
JSONObject
json2
=
new
JSONObject
();
JSONObject
json2
=
new
JSONObject
();
//组织机构名称
//组织机构名称
json2
.
put
(
"name"
,
info
.
getName
());
json2
.
put
(
"name"
,
info
.
getName
());
...
@@ -431,22 +464,31 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
...
@@ -431,22 +464,31 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
json2
.
put
(
"egalRepCertType"
,
"INDIVIDUAL_CH_IDCARD"
);
json2
.
put
(
"egalRepCertType"
,
"INDIVIDUAL_CH_IDCARD"
);
//法定代表人姓名
//法定代表人姓名
json2
.
put
(
"legalRepName"
,
info
.
getLegalName
());
json2
.
put
(
"legalRepName"
,
info
.
getLegalName
());
//经办人姓名
json2
.
put
(
"agentName"
,
info
.
getAgentName
());
//经办人身份证号
json2
.
put
(
"agentIdNo"
,
info
.
getAgentIdNo
());
//法定代表人地区/国籍
//法定代表人地区/国籍
json2
.
put
(
"legalRepNationality"
,
""
);
//
json2.put("legalRepNationality", "");
//经办人身份1 企业法定代表人;2 企业授权代理人
//经办人身份1 企业法定代表人;2 企业授权代理人
json2
.
put
(
"operatorType"
,
info
.
getAgentType
());
json2
.
put
(
"operatorType"
,
info
.
getAgentType
());
//组织核验类型,“1”:三要素核验;“2”:四要素核验;不填为不指定核验类型
//组织核验类型,“1”:三要素核验;“2”:四要素核验;不填为不指定核验类型
json2
.
put
(
"verifyType"
,
"2"
);
json2
.
put
(
"verifyType"
,
"2"
);
//认证配置信息
JSONObject
json3
=
new
JSONObject
();
String
[]
str
=
new
String
[]{
"name"
,
"certNo"
,
"legalRepName"
,
"legalRepCertNo"
,
"agentName"
,
"agentIdNo"
};
json3
.
put
(
"indivUneditableInfo"
,
str
);
JSONObject
result
=
new
JSONObject
();
JSONObject
result
=
new
JSONObject
();
result
.
put
(
"agentAccountId"
,
info
.
getAuthAgentAccountId
());
//
result.put("agentAccountId", info.getAuthAgentAccountId());
result
.
put
(
"authType"
,
"ORG_BANK_TRANSFER"
);
//组织机构对公账户打款认证
result
.
put
(
"authType"
,
"ORG_BANK_TRANSFER"
);
//组织机构对公账户打款认证
result
.
put
(
"contextInfo"
,
json1
);
result
.
put
(
"contextInfo"
,
json1
);
result
.
put
(
"orgEntity"
,
json2
);
result
.
put
(
"orgEntity"
,
json2
);
result
.
put
(
"repeatIdentity"
,
false
);
result
.
put
(
"configParams"
,
json3
);
// result.put("repeatIdentity", false);
JSONObject
json
=
new
JSONObject
(
result
);
JSONObject
json
=
new
JSONObject
(
result
);
String
param
=
json
.
toString
();
//
String param = json.toString();
//设置http请求head信息
//设置http请求head信息
Map
<
String
,
String
>
headInfo
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
headInfo
=
new
HashMap
<
String
,
String
>();
...
@@ -457,12 +499,12 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
...
@@ -457,12 +499,12 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
try
{
try
{
//初始化接口信息
//初始化接口信息
String
orgApiurl
=
iSignInfoHclcService
.
getApiUrl
(
indivSysName
,
orgApiName
);
String
orgApiurl
=
iSignInfoHclcService
.
getApiUrl
(
indivSysName
,
orgApiName
);
orgApiurl
=
orgApiurl
.
replace
(
"{accountId}"
,
info
.
getAuthAccountId
());
//
orgApiurl = orgApiurl.replace("{accountId}", info.getAuthAccountId());
logger
.
debug
(
"upload url: {}"
,
orgApiurl
);
logger
.
debug
(
"upload url: {}"
,
orgApiurl
);
SignHclcUtils
signHclcUtils1
=
new
SignHclcUtils
();
SignHclcUtils
signHclcUtils1
=
new
SignHclcUtils
();
//发送http请求
//发送http请求
String
stringResult
=
signHclcUtils1
.
postString
(
orgApiurl
,
param
,
headInfo
);
String
stringResult
=
signHclcUtils1
.
postString
(
orgApiurl
,
json
,
headInfo
,
signHclcUtils1
.
APPLICATION_JSON
);
//解析返回结果
//解析返回结果
JSONObject
jsonResult
=
JSONObject
.
parseObject
(
stringResult
);
JSONObject
jsonResult
=
JSONObject
.
parseObject
(
stringResult
);
...
@@ -476,6 +518,7 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
...
@@ -476,6 +518,7 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
map
.
put
(
"code"
,
"0"
);
map
.
put
(
"code"
,
"0"
);
map
.
put
(
"orgAuthId"
,
signInfoHclcFace
.
getAuthId
());
map
.
put
(
"orgAuthId"
,
signInfoHclcFace
.
getAuthId
());
map
.
put
(
"url"
,
data
.
getString
(
"url"
));
map
.
put
(
"url"
,
data
.
getString
(
"url"
));
map
.
put
(
"AuthType"
,
"ORG"
);
map
.
put
(
"message"
,
"获取url成功!"
);
map
.
put
(
"message"
,
"获取url成功!"
);
}
else
{
}
else
{
map
.
put
(
"code"
,
jsonResult
.
getString
(
"code"
));
map
.
put
(
"code"
,
jsonResult
.
getString
(
"code"
));
...
@@ -546,7 +589,7 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
...
@@ -546,7 +589,7 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
//发送http请求
//发送http请求
SignHclcUtils
signHclcUtils1
=
new
SignHclcUtils
();
SignHclcUtils
signHclcUtils1
=
new
SignHclcUtils
();
String
stringResult
=
signHclcUtils1
.
postString
(
url
,
param
,
headInfo
);
String
stringResult
=
signHclcUtils1
.
postString
(
url
,
json
,
headInfo
,
signHclcUtils1
.
APPLICATION_JSON
);
//解析返回结果
//解析返回结果
JSONObject
jsonResult
=
JSONObject
.
parseObject
(
stringResult
);
JSONObject
jsonResult
=
JSONObject
.
parseObject
(
stringResult
);
...
@@ -583,7 +626,7 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
...
@@ -583,7 +626,7 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
if
(
Objects
.
isNull
(
signInfoHclc
.
getAccountId
())
||
""
.
equalsIgnoreCase
(
signInfoHclc
.
getAccountId
()))
{
if
(
Objects
.
isNull
(
signInfoHclc
.
getAccountId
())
||
""
.
equalsIgnoreCase
(
signInfoHclc
.
getAccountId
()))
{
logger
.
debug
(
"e签宝机构账户 accountId: {} 不存在,无需注销!"
,
signInfoHclc
.
getAccountId
());
logger
.
debug
(
"e签宝机构账户 accountId: {} 不存在,无需注销!"
,
signInfoHclc
.
getAccountId
());
map
.
put
(
"code"
,
"
000012
"
);
map
.
put
(
"code"
,
"
40051667
"
);
map
.
put
(
"message"
,
"e签宝机构账户不存在,无需注销!"
);
map
.
put
(
"message"
,
"e签宝机构账户不存在,无需注销!"
);
return
map
;
return
map
;
}
}
...
@@ -614,11 +657,11 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
...
@@ -614,11 +657,11 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
//发送http请求
//发送http请求
SignHclcUtils
signHclcUtils1
=
new
SignHclcUtils
();
SignHclcUtils
signHclcUtils1
=
new
SignHclcUtils
();
String
stringResult
=
signHclcUtils1
.
postString
(
url
,
param
,
headInfo
);
String
stringResult
=
signHclcUtils1
.
postString
(
url
,
json
,
headInfo
,
signHclcUtils1
.
APPLICATION_JSON
);
//解析返回结果
//解析返回结果
JSONObject
jsonResult
=
JSONObject
.
parseObject
(
stringResult
);
JSONObject
jsonResult
=
JSONObject
.
parseObject
(
stringResult
);
if
(
"0"
.
equalsIgnoreCase
(
jsonResult
.
getString
(
"errCode"
))
||
"40051667"
.
equalsIgnoreCase
(
map
.
get
(
"code"
).
toString
(
)))
{
if
(
"0"
.
equalsIgnoreCase
(
jsonResult
.
getString
(
"errCode"
))
||
"40051667"
.
equalsIgnoreCase
(
jsonResult
.
getString
(
"errCode"
)))
{
map
.
put
(
"code"
,
"0"
);
map
.
put
(
"code"
,
"0"
);
map
.
put
(
"message"
,
"e签宝机构用户注销成功!"
);
map
.
put
(
"message"
,
"e签宝机构用户注销成功!"
);
}
else
{
}
else
{
...
...
core/src/main/java/com/hand/app/esignHclc/service/impl/SignInfoHclcServiceImpl.java
View file @
02073cf3
...
@@ -3,7 +3,6 @@ package com.hand.app.esignHclc.service.impl;
...
@@ -3,7 +3,6 @@ package com.hand.app.esignHclc.service.impl;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.hand.app.esign.service.ISignInfoService
;
import
com.hand.app.esign.utils.AlgorithmHelper
;
import
com.hand.app.esign.utils.AlgorithmHelper
;
import
com.hand.app.esignHclc.dto.SignFlowsInfoHclc
;
import
com.hand.app.esignHclc.dto.SignFlowsInfoHclc
;
import
com.hand.app.esignHclc.dto.SignUserAttachInfo
;
import
com.hand.app.esignHclc.dto.SignUserAttachInfo
;
...
@@ -74,6 +73,10 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
...
@@ -74,6 +73,10 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
private
String
apiKey
;
private
String
apiKey
;
@Value
(
"${wx.image.path}"
)
@Value
(
"${wx.image.path}"
)
private
String
imagePath
;
private
String
imagePath
;
@Value
(
"${tsign.api.listenSignUrl}"
)
private
String
listenSignUrl
;
@Value
(
"${tsign.api.signRedirectUrl}"
)
private
String
signRedirectUrl
;
private
CloseableHttpClient
httpClient
;
private
CloseableHttpClient
httpClient
;
...
@@ -81,7 +84,7 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
...
@@ -81,7 +84,7 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
//用户认证接口信息
//用户认证接口信息
public
static
final
String
indivSysName
=
"HCLC_FACE_API"
;
public
static
final
String
indivSysName
=
"HCLC_FACE_API"
;
public
static
final
String
tokenApiName
=
"getToken"
;
public
static
final
String
tokenApiName
=
"getToken"
;
public
static
final
String
indivApiName
=
"
i
ndivAuthUrl"
;
public
static
final
String
indivApiName
=
"
getI
ndivAuthUrl"
;
public
static
final
String
getAccIdApiName
=
"getAccByThirdId"
;
public
static
final
String
getAccIdApiName
=
"getAccByThirdId"
;
//公众号接口信息
//公众号接口信息
public
static
final
String
wxSysName
=
"wxgzh_hitachics"
;
public
static
final
String
wxSysName
=
"wxgzh_hitachics"
;
...
@@ -90,13 +93,16 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
...
@@ -90,13 +93,16 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
public
static
final
String
hclcSysName
=
"HCL_UPLOAD_FILE"
;
public
static
final
String
hclcSysName
=
"HCL_UPLOAD_FILE"
;
public
static
final
String
hclcUpLoadApiName
=
"upload"
;
public
static
final
String
hclcUpLoadApiName
=
"upload"
;
public
static
final
String
hclcDownloadApiName
=
"download"
;
public
static
final
String
hclcDownloadApiName
=
"download"
;
public
static
final
String
signSendApiName
=
"SignSendApiName"
;
public
static
final
String
signFileDownApiName
=
"elecContractDownload"
;
//电子签章接口信息
//电子签章接口信息
public
static
final
String
signatureSysName
=
"HCLC_ELECTRONIC_SIGNATURE"
;
public
static
final
String
signatureSysName
=
"HCLC_ELECTRONIC_SIGNATURE"
;
public
static
final
String
accountsApiName
=
"outerAccounts"
;
public
static
final
String
accountsApiName
=
"outerAccounts"
;
public
static
final
String
deleteApiName
=
"accountsDelete"
;
public
static
final
String
deleteApiName
=
"accountsDelete"
;
public
static
final
String
signatureUpLoadApiName
=
"fileUpload"
;
public
static
final
String
signatureUpLoadApiName
=
"fileUpload"
;
public
static
final
String
signFlowsApiName
=
"signFlows"
;
public
static
final
String
signFlowsApiName
=
"signFlows"
;
public
static
final
String
getUrlsApiName
=
"getSignFlowDocUrls"
;
public
static
final
String
getSignUrlsApiName
=
"getSignFlowDocUrls"
;
public
static
final
String
createSealsApiName
=
"createTemplateSeals"
;
private
static
final
String
HASH_ALGORITHM
=
"HmacSHA256"
;
private
static
final
String
HASH_ALGORITHM
=
"HmacSHA256"
;
...
@@ -127,7 +133,7 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
...
@@ -127,7 +133,7 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(
Objects
.
isNull
(
info
.
getOpenId
()))
{
if
(
Objects
.
isNull
(
info
.
getOpenId
())
||
"undefined"
.
equalsIgnoreCase
(
info
.
getOpenId
())
)
{
logger
.
error
(
"关键参数openId不存在,调用失败!"
);
logger
.
error
(
"关键参数openId不存在,调用失败!"
);
map
.
put
(
"code"
,
"000001"
);
map
.
put
(
"code"
,
"000001"
);
map
.
put
(
"message"
,
"关键参数openId不存在,调用失败!"
);
map
.
put
(
"message"
,
"关键参数openId不存在,调用失败!"
);
...
@@ -147,6 +153,7 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
...
@@ -147,6 +153,7 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
signInfoHclc
=
this
.
insertSelective
(
iRequest
,
info
);
signInfoHclc
=
this
.
insertSelective
(
iRequest
,
info
);
accountStatus
=
"ADD"
;
accountStatus
=
"ADD"
;
}
else
{
}
else
{
signInfoHclc
.
setCtitype
(
1L
);
if
(
"Y"
.
equalsIgnoreCase
(
signInfoHclc
.
getAuthFlag
()))
{
if
(
"Y"
.
equalsIgnoreCase
(
signInfoHclc
.
getAuthFlag
()))
{
map
.
put
(
"code"
,
"000002"
);
map
.
put
(
"code"
,
"000002"
);
map
.
put
(
"message"
,
"人脸核身认证已完成,无需重复验证!"
);
map
.
put
(
"message"
,
"人脸核身认证已完成,无需重复验证!"
);
...
@@ -222,10 +229,17 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
...
@@ -222,10 +229,17 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
//创建e签宝账户
//创建e签宝账户
if
(
map
.
size
()
==
0
||
"0"
.
equalsIgnoreCase
(
map
.
get
(
"code"
).
toString
())
||
"40051667"
.
equalsIgnoreCase
(
map
.
get
(
"code"
).
toString
()))
{
if
(
map
.
size
()
==
0
||
"0"
.
equalsIgnoreCase
(
map
.
get
(
"code"
).
toString
())
||
"40051667"
.
equalsIgnoreCase
(
map
.
get
(
"code"
).
toString
()))
{
map
=
addPersonAccount
(
signInfoHclc
);
//初始化经办人人脸识别信息
SignUserInfoHclc
signInfo
=
new
SignUserInfoHclc
();
signInfo
.
setOpenId
(
signInfoHclc
.
getOpenId
());
signInfo
.
setIdNo
(
info
.
getIdNo
());
signInfo
.
setMobile
(
info
.
getMobile
());
signInfo
.
setName
(
info
.
getName
());
map
=
addPersonAccount
(
signInfo
);
//创建成功
//创建成功
if
(
"0"
.
equalsIgnoreCase
(
map
.
get
(
"code"
).
toString
()))
{
if
(
"0"
.
equalsIgnoreCase
(
map
.
get
(
"code"
).
toString
()))
{
signInfoHclc
.
setAccountId
(
map
.
get
(
"accountId"
).
toString
());
signInfoHclc
.
setAccountId
(
map
.
get
(
"accountId"
).
toString
());
signInfoHclc
.
setSealId
(
map
.
get
(
"sealId"
).
toString
());
if
(
"ADD"
.
equalsIgnoreCase
(
accountStatus
))
{
if
(
"ADD"
.
equalsIgnoreCase
(
accountStatus
))
{
//重新设置个人用户信息
//重新设置个人用户信息
signInfoHclc
.
setIdNo
(
info
.
getIdNo
());
signInfoHclc
.
setIdNo
(
info
.
getIdNo
());
...
@@ -251,26 +265,26 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
...
@@ -251,26 +265,26 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
if
(
Objects
.
nonNull
(
token
))
{
if
(
Objects
.
nonNull
(
token
))
{
//获取身份验证公有云账户id
//
//获取身份验证公有云账户id
if
(
signInfoHclc
.
getAuthAccountId
()
==
null
||
""
.
equalsIgnoreCase
(
signInfoHclc
.
getAuthAccountId
()))
{
//
if (signInfoHclc.getAuthAccountId() == null || "".equalsIgnoreCase(signInfoHclc.getAuthAccountId())) {
map
=
getByThirdId
(
signInfoHclc
,
token
);
//
map = getByThirdId(signInfoHclc, token);
if
(
"0"
.
equalsIgnoreCase
(
map
.
get
(
"code"
).
toString
()))
{
//
if ("0".equalsIgnoreCase(map.get("code").toString())) {
signInfoHclc
.
setAuthAccountId
(
map
.
get
(
"authAccountId"
).
toString
());
//
signInfoHclc.setAuthAccountId(map.get("authAccountId").toString());
}
//
}
}
//
}
if
(
signInfoHclc
.
getAuthAccountId
()
==
null
||
""
.
equalsIgnoreCase
(
signInfoHclc
.
getAuthAccountId
()))
{
//
if (signInfoHclc.getAuthAccountId() == null || "".equalsIgnoreCase(signInfoHclc.getAuthAccountId())) {
map
.
put
(
"code"
,
"000010"
);
//
map.put("code", "000010");
map
.
put
(
"message"
,
"获取验证公有云accountId失败,请检查!"
);
//
map.put("message", "获取验证公有云accountId失败,请检查!");
}
else
{
//
} else {
signInfoHclc
.
setRedirectUrl
(
info
.
getRedirectUrl
());
signInfoHclc
.
setRedirectUrl
(
info
.
getRedirectUrl
());
//获取个人核身认证地址
//获取个人核身认证地址
map
=
getFaceUrlHttp
(
iRequest
,
signInfoHclc
,
token
);
map
=
getFaceUrlHttp
(
iRequest
,
signInfoHclc
,
token
);
if
(
"0"
.
equalsIgnoreCase
(
map
.
get
(
"code"
).
toString
()))
{
if
(
"0"
.
equalsIgnoreCase
(
map
.
get
(
"code"
).
toString
()))
{
signInfoHclc
.
setFaceAuthId
(
Long
.
valueOf
(
map
.
get
(
"faceAuthId"
).
toString
()));
signInfoHclc
.
setFaceAuthId
(
Long
.
valueOf
(
map
.
get
(
"faceAuthId"
).
toString
()));
}
}
}
// }
}
else
{
}
else
{
map
.
put
(
"code"
,
"000007"
);
map
.
put
(
"code"
,
"000007"
);
...
@@ -342,9 +356,9 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
...
@@ -342,9 +356,9 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
result
.
put
(
"contextInfo"
,
json1
);
result
.
put
(
"contextInfo"
,
json1
);
result
.
put
(
"indivInfo"
,
json2
);
result
.
put
(
"indivInfo"
,
json2
);
result
.
put
(
"configParams"
,
json3
);
result
.
put
(
"configParams"
,
json3
);
result
.
put
(
"repeatIdentity"
,
true
);
//
result.put("repeatIdentity", true);
JSONObject
json
=
new
JSONObject
(
result
);
JSONObject
json
=
new
JSONObject
(
result
);
String
param
=
json
.
toString
();
//
String param = json.toString();
//设置http请求head信息
//设置http请求head信息
Map
<
String
,
String
>
headInfo
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
headInfo
=
new
HashMap
<
String
,
String
>();
...
@@ -354,12 +368,13 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
...
@@ -354,12 +368,13 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
try
{
try
{
//初始化接口url信息
//初始化接口url信息
String
faceApiurl
=
getApiUrl
(
indivSysName
,
indivApiName
).
replace
(
"{accountId}"
,
info
.
getAuthAccountId
());
// String faceApiurl = getApiUrl(indivSysName, indivApiName).replace("{accountId}", info.getAuthAccountId());
logger
.
debug
(
"upload url: {}"
,
faceApiurl
);
String
faceApiurl
=
getApiUrl
(
indivSysName
,
indivApiName
);
logger
.
debug
(
"get face api url: {}"
,
faceApiurl
);
//发送http请求
//发送http请求
SignHclcUtils
signHclcUtils1
=
new
SignHclcUtils
();
SignHclcUtils
signHclcUtils1
=
new
SignHclcUtils
();
String
stringResult
=
signHclcUtils1
.
postString
(
faceApiurl
,
param
,
headInfo
);
String
stringResult
=
signHclcUtils1
.
postString
(
faceApiurl
,
json
,
headInfo
,
signHclcUtils1
.
APPLICATION_JSON
);
//解析返回结果
//解析返回结果
JSONObject
jsonResult
=
JSONObject
.
parseObject
(
stringResult
);
JSONObject
jsonResult
=
JSONObject
.
parseObject
(
stringResult
);
...
@@ -372,18 +387,19 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
...
@@ -372,18 +387,19 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
map
.
put
(
"code"
,
"0"
);
map
.
put
(
"code"
,
"0"
);
map
.
put
(
"faceAuthId"
,
signInfoHclcFace
.
getAuthId
());
map
.
put
(
"faceAuthId"
,
signInfoHclcFace
.
getAuthId
());
map
.
put
(
"AuthType"
,
"FACE"
);
map
.
put
(
"url"
,
data
.
getString
(
"url"
));
map
.
put
(
"url"
,
data
.
getString
(
"url"
));
map
.
put
(
"message"
,
"获取url成功!"
);
map
.
put
(
"message"
,
"获取url成功!"
);
}
else
{
}
else
{
map
.
put
(
"code"
,
"8"
);
map
.
put
(
"code"
,
"
00000
8"
);
map
.
put
(
"message"
,
"获取人脸核身认证url失败,"
+
jsonResult
.
getString
(
"message"
));
map
.
put
(
"message"
,
"获取人脸核身认证url失败,"
+
jsonResult
.
getString
(
"message"
));
}
}
signInfoHclcFace
.
setReturnCode
(
jsonResult
.
getString
(
"code"
));
signInfoHclcFace
.
setReturnCode
(
jsonResult
.
getString
(
"code"
));
signInfoHclcFace
.
setReturnMessage
(
jsonResult
.
getString
(
"message"
));
signInfoHclcFace
.
setReturnMessage
(
jsonResult
.
getString
(
"message"
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
map
.
put
(
"code"
,
"9"
);
map
.
put
(
"code"
,
"
00000
9"
);
map
.
put
(
"message"
,
"访问e签宝人脸核身地址失败,请检查!"
);
map
.
put
(
"message"
,
"访问e签宝人脸核身地址失败,请检查!"
);
signInfoHclcFace
.
setReturnCode
(
"
3
"
);
signInfoHclcFace
.
setReturnCode
(
"
000009
"
);
signInfoHclcFace
.
setReturnMessage
(
e
.
getMessage
());
signInfoHclcFace
.
setReturnMessage
(
e
.
getMessage
());
}
}
...
@@ -409,11 +425,11 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
...
@@ -409,11 +425,11 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
try
{
try
{
//初始化接口url信息
//初始化接口url信息
String
face
Apiurl
=
getApiUrl
(
indivSysName
,
getAccIdApiName
)
+
"?"
+
param
;
String
accId
Apiurl
=
getApiUrl
(
indivSysName
,
getAccIdApiName
)
+
"?"
+
param
;
logger
.
debug
(
"get
face api url: {}"
,
face
Apiurl
);
logger
.
debug
(
"get
accountId api url: {}"
,
accId
Apiurl
);
//发送http请求
//发送http请求
HttpResponse
execute
=
HttpUtil
.
getJson
(
face
Apiurl
,
headInfo
);
HttpResponse
execute
=
HttpUtil
.
getJson
(
accId
Apiurl
,
headInfo
);
int
httpReponseCode
;
int
httpReponseCode
;
String
stringResult
=
null
;
String
stringResult
=
null
;
JSONObject
responseBody
=
new
JSONObject
();
JSONObject
responseBody
=
new
JSONObject
();
...
@@ -436,16 +452,16 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
...
@@ -436,16 +452,16 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
map
.
put
(
"authAccountId"
,
data
.
getString
(
"accountId"
));
map
.
put
(
"authAccountId"
,
data
.
getString
(
"accountId"
));
map
.
put
(
"message"
,
"获取个人云账户成功!"
);
map
.
put
(
"message"
,
"获取个人云账户成功!"
);
}
else
{
}
else
{
map
.
put
(
"code"
,
"8"
);
map
.
put
(
"code"
,
"
00000
8"
);
map
.
put
(
"message"
,
"获取个人云账户失败,"
+
jsonResult
.
getString
(
"message"
));
map
.
put
(
"message"
,
"获取个人云账户失败,"
+
jsonResult
.
getString
(
"message"
));
}
}
}
else
{
}
else
{
map
.
put
(
"code"
,
"10"
);
map
.
put
(
"code"
,
"
0000
10"
);
map
.
put
(
"message"
,
"获取个人云账户发送网络请求失败,请检查个人云地址信息!"
);
map
.
put
(
"message"
,
"获取个人云账户发送网络请求失败,请检查个人云地址信息!"
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
map
.
put
(
"code"
,
"9"
);
map
.
put
(
"code"
,
"
00000
9"
);
map
.
put
(
"message"
,
e
.
getMessage
());
map
.
put
(
"message"
,
e
.
getMessage
());
}
}
...
@@ -900,7 +916,6 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
...
@@ -900,7 +916,6 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
public
Map
<
String
,
Object
>
addPersonAccount
(
SignUserInfoHclc
signInfoHclc
)
{
public
Map
<
String
,
Object
>
addPersonAccount
(
SignUserInfoHclc
signInfoHclc
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
//业务方交互上下文信息
//业务方交互上下文信息
JSONObject
result
=
new
JSONObject
();
JSONObject
result
=
new
JSONObject
();
//银行卡号
//银行卡号
...
@@ -942,14 +957,19 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
...
@@ -942,14 +957,19 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
//发送http请求
//发送http请求
SignHclcUtils
signHclcUtils1
=
new
SignHclcUtils
();
SignHclcUtils
signHclcUtils1
=
new
SignHclcUtils
();
String
stringResult
=
signHclcUtils1
.
postString
(
url
,
param
,
headInfo
);
String
stringResult
=
signHclcUtils1
.
postString
(
url
,
json
,
headInfo
,
signHclcUtils1
.
APPLICATION_JSON
);
//解析返回结果
//解析返回结果
JSONObject
jsonResult
=
JSONObject
.
parseObject
(
stringResult
);
JSONObject
jsonResult
=
JSONObject
.
parseObject
(
stringResult
);
if
(
"0"
.
equalsIgnoreCase
(
jsonResult
.
getString
(
"errCode"
)))
{
if
(
"0"
.
equalsIgnoreCase
(
jsonResult
.
getString
(
"errCode"
)))
{
JSONObject
data
=
jsonResult
.
getJSONObject
(
"data"
);
JSONObject
data
=
jsonResult
.
getJSONObject
(
"data"
);
//设置返回accountId
//设置返回accountId
map
.
put
(
"accountId"
,
data
.
getString
(
"accountId"
));
map
.
put
(
"accountId"
,
data
.
getString
(
"accountId"
));
String
sealId
=
createTemplateSeals
(
data
.
getString
(
"accountId"
),
signInfoHclc
.
getOpenId
());
map
.
put
(
"sealId"
,
sealId
);
map
.
put
(
"code"
,
"0"
);
map
.
put
(
"code"
,
"0"
);
map
.
put
(
"message"
,
"个人e签宝账户创建成功!"
);
map
.
put
(
"message"
,
"个人e签宝账户创建成功!"
);
}
else
{
}
else
{
...
@@ -960,12 +980,62 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
...
@@ -960,12 +980,62 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"create person account failed, msg:{}"
,
e
.
getMessage
());
logger
.
error
(
"create person account failed, msg:{}"
,
e
.
getMessage
());
map
.
put
(
"code"
,
"000006"
);
map
.
put
(
"code"
,
"000006"
);
map
.
put
(
"message"
,
"个人e签宝账户创建
成功
失败,"
+
e
.
getMessage
());
map
.
put
(
"message"
,
"个人e签宝账户创建失败,"
+
e
.
getMessage
());
}
}
return
map
;
return
map
;
}
}
public
String
createTemplateSeals
(
String
accountId
,
String
openId
)
{
//业务方交互上下文信息
JSONObject
result
=
new
JSONObject
();
//创建用户返回的天印签章系统的用户id
result
.
put
(
"accountId"
,
accountId
);
//印章颜色
result
.
put
(
"color"
,
"BLACK"
);
//模板类型
result
.
put
(
"templateType"
,
"BORDERLESS"
);
//用户的唯一标识可以为客户业务系统内唯一标识
result
.
put
(
"uniqueId"
,
openId
);
JSONObject
json
=
new
JSONObject
(
result
);
String
param
=
json
.
toString
();
//获取HMAC加密后的X-timevale-signature签名信息
AlgorithmHelper
algorithmHelper
=
new
AlgorithmHelper
();
String
EncryptedString
=
algorithmHelper
.
getXtimevaleSignature
(
param
,
projectSecret
,
HASH_ALGORITHM
,
"UTF-8"
);
//设置http请求head信息
Map
<
String
,
String
>
headInfo
=
new
HashMap
<
String
,
String
>();
headInfo
.
put
(
"x-timevale-project-id"
,
projectId
);
headInfo
.
put
(
"x-timevale-signature"
,
EncryptedString
);
try
{
//初始化接口信息
String
url
=
getApiUrl
(
signatureSysName
,
createSealsApiName
);
logger
.
debug
(
"create seals url: {}"
,
url
);
//发送http请求
SignHclcUtils
signHclcUtils1
=
new
SignHclcUtils
();
String
stringResult
=
signHclcUtils1
.
postString
(
url
,
json
,
headInfo
,
signHclcUtils1
.
APPLICATION_JSON
);
//解析返回结果
JSONObject
jsonResult
=
JSONObject
.
parseObject
(
stringResult
);
if
(
"0"
.
equalsIgnoreCase
(
jsonResult
.
getString
(
"errCode"
)))
{
JSONObject
data
=
jsonResult
.
getJSONObject
(
"data"
);
return
data
.
getString
(
"sealId"
);
}
else
{
logger
.
error
(
"create seals failed, errCode:{} ,msg:{}"
,
jsonResult
.
getString
(
"errCode"
),
jsonResult
.
getString
(
"msg"
));
return
"-1"
;
}
}
catch
(
Exception
e
)
{
logger
.
error
(
"create seals failed, msg:{}"
,
e
.
getMessage
());
return
"-1"
;
}
}
public
Map
<
String
,
Object
>
deletePersonAccount
(
IRequest
iRequest
,
SignUserInfoHclc
signInfoHclc
)
{
public
Map
<
String
,
Object
>
deletePersonAccount
(
IRequest
iRequest
,
SignUserInfoHclc
signInfoHclc
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
...
@@ -978,12 +1048,6 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
...
@@ -978,12 +1048,6 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
return
map
;
return
map
;
}
}
if
(
Objects
.
isNull
(
signInfoHclc
.
getAccountId
()))
{
logger
.
debug
(
"e签宝个人账户不存在,无需注销!"
);
map
.
put
(
"code"
,
"000003"
);
map
.
put
(
"message"
,
"e签宝个人账户不存在,无需注销!"
);
return
map
;
}
String
accountId
=
""
;
String
accountId
=
""
;
...
@@ -993,6 +1057,14 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
...
@@ -993,6 +1057,14 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
}
else
{
}
else
{
accountId
=
signInfoHclc
.
getAgentAccountId
();
accountId
=
signInfoHclc
.
getAgentAccountId
();
}
}
if
(
Objects
.
isNull
(
accountId
)
||
""
.
equalsIgnoreCase
(
accountId
))
{
logger
.
debug
(
"e签宝个人账户不存在,无需注销!"
);
map
.
put
(
"code"
,
"40051667"
);
map
.
put
(
"message"
,
"e签宝个人账户不存在,无需注销!"
);
return
map
;
}
//业务方交互上下文信息
//业务方交互上下文信息
JSONObject
result
=
new
JSONObject
();
JSONObject
result
=
new
JSONObject
();
//创建内部用户返回的天印签章系统的用户id
//创建内部用户返回的天印签章系统的用户id
...
@@ -1019,11 +1091,11 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
...
@@ -1019,11 +1091,11 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
//发送http请求
//发送http请求
SignHclcUtils
signHclcUtils1
=
new
SignHclcUtils
();
SignHclcUtils
signHclcUtils1
=
new
SignHclcUtils
();
String
stringResult
=
signHclcUtils1
.
postString
(
url
,
param
,
headInfo
);
String
stringResult
=
signHclcUtils1
.
postString
(
url
,
json
,
headInfo
,
signHclcUtils1
.
APPLICATION_JSON
);
//解析返回结果
//解析返回结果
JSONObject
jsonResult
=
JSONObject
.
parseObject
(
stringResult
);
JSONObject
jsonResult
=
JSONObject
.
parseObject
(
stringResult
);
if
(
"0"
.
equalsIgnoreCase
(
jsonResult
.
getString
(
"errCode"
))
||
"40051667"
.
equalsIgnoreCase
(
map
.
get
(
"code"
).
toString
(
)))
{
if
(
"0"
.
equalsIgnoreCase
(
jsonResult
.
getString
(
"errCode"
))
||
"40051667"
.
equalsIgnoreCase
(
jsonResult
.
getString
(
"errCode"
)))
{
map
.
put
(
"code"
,
"0"
);
map
.
put
(
"code"
,
"0"
);
map
.
put
(
"message"
,
"e签宝个人用户注销成功!"
);
map
.
put
(
"message"
,
"e签宝个人用户注销成功!"
);
}
else
{
}
else
{
...
@@ -1049,49 +1121,101 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
...
@@ -1049,49 +1121,101 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
//解析签署人信息集合,替换用户信息为accountId
//解析签署人信息集合,替换用户信息为accountId
JSONArray
signers
=
params
.
getJSONArray
(
"signers"
);
JSONArray
signers
=
params
.
getJSONArray
(
"signers"
);
JSONArray
signersNew
=
new
JSONArray
();
JSONArray
signersNew
=
new
JSONArray
();
String
initiatorAccountId
=
""
;
//
String initiatorAccountId = "";
for
(
int
i
=
0
;
i
<
signers
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
signers
.
size
();
i
++)
{
JSONObject
json1
=
signers
.
getJSONObject
(
i
);
JSONObject
json1
=
signers
.
getJSONObject
(
i
);
String
idNo
=
json1
.
getString
(
"idNo"
);
String
idNo
=
json1
.
getString
(
"idNo"
);
String
name
=
json1
.
getString
(
"name"
);
String
name
=
json1
.
getString
(
"name"
);
String
role
=
json1
.
getString
(
"role"
);
String
role
=
json1
.
getString
(
"role"
);
SignUserInfoHclc
signInfoHclc
=
new
SignUserInfoHclc
();
if
(
"HCLC"
.
equalsIgnoreCase
(
role
))
{
signInfoHclc
.
setAuthFlag
(
"Y"
);
//代理店匹配用户名称
json1
.
put
(
"accountId"
,
"0d83cfe0-4d86-11ea-b71a-b8599f3574b6"
);
if
(
"AGENT"
.
equalsIgnoreCase
(
role
))
{
json1
.
put
(
"authorizationOrganizeId"
,
"f858b8e9-5c3a-11ea-8486-506b4bfdce3c"
);
signInfoHclc
.
setName
(
name
);
}
else
{
}
else
{
signInfoHclc
.
setIdNo
(
idNo
);
SignUserInfoHclc
signInfoHclc
=
new
SignUserInfoHclc
();
signInfoHclc
.
setAuthFlag
(
"Y"
);
signInfoHclc
.
setName
(
name
);
signInfoHclc
.
setName
(
name
);
}
List
<
SignUserInfoHclc
>
signInfoHclcs
=
signInfoHclcMapper
.
queryUserInfo
(
signInfoHclc
);
//代理店匹配用户名称
if
(
signInfoHclcs
.
size
()
==
0
)
{
if
(
Objects
.
nonNull
(
idNo
))
{
logger
.
error
(
"create sign flows failed, account:{} is not defined in wx"
,
name
+
idNo
);
signInfoHclc
.
setIdNo
(
idNo
);
jsonResult
.
put
(
"code"
,
"2"
);
}
jsonResult
.
put
(
"message"
,
"创建签署流程失败,用户"
+
name
+
idNo
+
"在移动端未成功注册,请先注册!"
);
return
jsonResult
;
List
<
SignUserInfoHclc
>
signInfoHclcs
=
signInfoHclcMapper
.
queryUserInfo
(
signInfoHclc
);
}
else
{
if
(
signInfoHclcs
.
size
()
==
0
)
{
signInfoHclc
=
signInfoHclcs
.
get
(
0
);
logger
.
error
(
"create sign flows failed, account:{} is not defined in wx"
,
name
+
idNo
);
json1
.
put
(
"accountType"
,
signInfoHclc
.
getCtitype
());
jsonResult
.
put
(
"errCode"
,
"2"
);
json1
.
put
(
"uniqueId"
,
signInfoHclc
.
getOpenId
());
jsonResult
.
put
(
"msg"
,
"创建签署流程失败,用户"
+
name
+
idNo
+
"在移动端未完成实名认证,请先认证!"
);
//用户类型是个人时
return
jsonResult
;
if
(
signInfoHclc
.
getCtitype
().
compareTo
(
1L
)
==
0
)
{
json1
.
put
(
"accountId"
,
signInfoHclc
.
getAccountId
());
//用户类型是机构时
}
else
{
}
else
{
json1
.
put
(
"accountId"
,
signInfoHclc
.
getAgentAccountId
());
signInfoHclc
=
signInfoHclcs
.
get
(
0
);
json1
.
put
(
"authorizationOrganizeId"
,
signInfoHclc
.
getAccountId
());
json1
.
put
(
"contactMobile"
,
signInfoHclc
.
getMobile
());
//用户类型是个人时
if
(
signInfoHclc
.
getCtitype
().
compareTo
(
1L
)
==
0
)
{
json1
.
put
(
"accountId"
,
signInfoHclc
.
getAccountId
());
json1
.
put
(
"uniqueId"
,
signInfoHclc
.
getOpenId
());
//用户类型是机构时
}
else
{
json1
.
put
(
"accountId"
,
signInfoHclc
.
getAgentAccountId
());
json1
.
put
(
"authorizationOrganizeId"
,
signInfoHclc
.
getAccountId
());
json1
.
put
(
"uniqueId"
,
signInfoHclc
.
getOpenId
());
}
// //代理店设置发起人
// if ("AGENT".equalsIgnoreCase(role)) {
// initiatorAccountId = signInfoHclc.getAccountId();
// }
}
}
//代理店设置发起人
//判断文字签字印章自定义模板是否存在
if
(
"AGENT"
.
equalsIgnoreCase
(
role
))
{
if
(
Objects
.
nonNull
(
signInfoHclc
.
getSealId
())
&&
!
"-1"
.
equalsIgnoreCase
(
signInfoHclc
.
getSealId
()))
{
initiatorAccountId
=
signInfoHclc
.
getAccountId
();
//获取签署文档信息
JSONArray
signDocDetails
=
json1
.
getJSONArray
(
"signDocDetails"
);
JSONArray
signDocDetailsNew
=
new
JSONArray
();
//解析签署文档信息
for
(
int
j
=
0
;
j
<
signDocDetails
.
size
();
j
++)
{
JSONObject
detail
=
signDocDetails
.
getJSONObject
(
j
);
//获取签署位置信息
JSONArray
signPos
=
detail
.
getJSONArray
(
"signPos"
);
JSONArray
signPosNew
=
new
JSONArray
();
for
(
int
k
=
0
;
k
<
signPos
.
size
();
k
++)
{
JSONObject
pos
=
signPos
.
getJSONObject
(
k
);
//个人签字统一更换签字模板
if
(
signInfoHclc
.
getCtitype
().
compareTo
(
1L
)
==
0
)
{
pos
.
remove
(
"sealId"
);
pos
.
put
(
"sealId"
,
signInfoHclc
.
getSealId
());
}
else
{
//企业签字判断是否存在PERSON签字,更换签字模板
String
signIdentity
=
pos
.
getString
(
"signIdentity"
);
if
(
"PERSON"
.
equalsIgnoreCase
(
signIdentity
))
{
pos
.
remove
(
"sealId"
);
pos
.
put
(
"sealId"
,
signInfoHclc
.
getSealId
());
}
}
signPosNew
.
add
(
pos
);
}
detail
.
remove
(
"signPos"
);
detail
.
put
(
"signPos"
,
signPosNew
);
signDocDetailsNew
.
add
(
detail
);
}
json1
.
remove
(
"signDocDetails"
);
json1
.
put
(
"signDocDetails"
,
signDocDetailsNew
);
}
}
}
}
json1
.
put
(
"accountType"
,
"2"
);
json1
.
remove
(
"idNo"
);
json1
.
remove
(
"idNo"
);
json1
.
remove
(
"name"
);
json1
.
remove
(
"name"
);
json1
.
remove
(
"role"
);
json1
.
remove
(
"role"
);
...
@@ -1106,13 +1230,15 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
...
@@ -1106,13 +1230,15 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
//第三方业务码
//第三方业务码
result
.
put
(
"bizNo"
,
params
.
get
(
"bizNo"
));
result
.
put
(
"bizNo"
,
params
.
get
(
"bizNo"
));
//签署回调通知地址
//签署回调通知地址
result
.
put
(
"callbackUrl"
,
params
.
get
(
"callbackUrl"
)
);
result
.
put
(
"callbackUrl"
,
listenSignUrl
);
//流程备注
//流程备注
result
.
put
(
"comments"
,
params
.
get
(
"comments"
));
result
.
put
(
"comments"
,
params
.
get
(
"comments"
));
// //抄送人信息集合签署成功后通知抄送人
// //抄送人信息集合签署成功后通知抄送人
// result.put("copyViewers", params.get("copyViewers"));
// result.put("copyViewers", params.get("copyViewers"));
//发起人用户id
//发起人用户id,默认hclc发起
result
.
put
(
"initiatorAccountId"
,
initiatorAccountId
);
result
.
put
(
"initiatorAccountId"
,
"f858b8e9-5c3a-11ea-8486-506b4bfdce3c"
);
//签署完成重定向地址
result
.
put
(
"redirectUrl"
,
signRedirectUrl
);
//流程文档信息集合
//流程文档信息集合
result
.
put
(
"signDocs"
,
params
.
get
(
"signDocs"
));
result
.
put
(
"signDocs"
,
params
.
get
(
"signDocs"
));
//签署人信息集合
//签署人信息集合
...
@@ -1120,6 +1246,9 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
...
@@ -1120,6 +1246,9 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
//流程主题
//流程主题
result
.
put
(
"subject"
,
params
.
get
(
"subject"
));
result
.
put
(
"subject"
,
params
.
get
(
"subject"
));
//一键落章
result
.
put
(
"signSceneNo"
,
"QSCJ0001"
);
JSONObject
json
=
new
JSONObject
(
result
);
JSONObject
json
=
new
JSONObject
(
result
);
String
param
=
json
.
toString
();
String
param
=
json
.
toString
();
...
@@ -1138,7 +1267,7 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
...
@@ -1138,7 +1267,7 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
//初始化接口信息
//初始化接口信息
String
url
=
getApiUrl
(
signatureSysName
,
signFlowsApiName
);
String
url
=
getApiUrl
(
signatureSysName
,
signFlowsApiName
);
logger
.
debug
(
"
upload
url: {}"
,
url
);
logger
.
debug
(
"
sign flows
url: {}"
,
url
);
signFlowsInfoHclc
.
setContractNo
(
params
.
getString
(
"bizNo"
));
signFlowsInfoHclc
.
setContractNo
(
params
.
getString
(
"bizNo"
));
signFlowsInfoHclc
.
setSignAction
(
"SIGN_CREATE"
);
signFlowsInfoHclc
.
setSignAction
(
"SIGN_CREATE"
);
...
@@ -1149,7 +1278,7 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
...
@@ -1149,7 +1278,7 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
//发送http请求
//发送http请求
SignHclcUtils
signHclcUtils1
=
new
SignHclcUtils
();
SignHclcUtils
signHclcUtils1
=
new
SignHclcUtils
();
String
stringResult
=
signHclcUtils1
.
postString
(
url
,
param
,
headInfo
);
String
stringResult
=
signHclcUtils1
.
postString
(
url
,
json
,
headInfo
,
signHclcUtils1
.
APPLICATION_JSON
);
//解析返回结果
//解析返回结果
jsonResult
=
JSONObject
.
parseObject
(
stringResult
);
jsonResult
=
JSONObject
.
parseObject
(
stringResult
);
...
@@ -1165,31 +1294,33 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
...
@@ -1165,31 +1294,33 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
//解析返回签署信息集合,替换accountId为用户信息
//解析返回签署信息集合,替换accountId为用户信息
JSONArray
signUrls
=
data
.
getJSONArray
(
"signUrls"
);
JSONArray
signUrls
=
data
.
getJSONArray
(
"signUrls"
);
JSONArray
signUrlsNew
=
new
JSONArray
();
for
(
int
i
=
0
;
i
<
signUrls
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
signUrls
.
size
();
i
++)
{
JSONObject
signUrl
=
signUrls
.
getJSONObject
(
i
);
JSONObject
signUrl
=
signUrls
.
getJSONObject
(
i
);
//根据uniqueId获取用户信息
SignUserInfoHclc
signInfoHclc
=
new
SignUserInfoHclc
();
signInfoHclc
.
setOpenId
(
signUrl
.
getString
(
"uniqueId"
));
signInfoHclc
=
this
.
selectByPrimaryKey
(
requestContext
,
signInfoHclc
);
signUrl
.
put
(
"idNo"
,
signInfoHclc
.
getIdNo
());
//建机自己
signUrl
.
put
(
"name"
,
signInfoHclc
.
getName
());
if
(
"0d83cfe0-4d86-11ea-b71a-b8599f3574b6"
.
equalsIgnoreCase
(
signUrl
.
getString
(
"accountId"
)))
{
signUrl
.
put
(
"name"
,
"日立建机"
);
}
else
{
//根据uniqueId获取用户信息
SignUserInfoHclc
signInfoHclc
=
new
SignUserInfoHclc
();
signInfoHclc
.
setOpenId
(
signUrl
.
getString
(
"uniqueId"
));
signInfoHclc
=
this
.
selectByPrimaryKey
(
requestContext
,
signInfoHclc
);
signUrl
.
put
(
"idNo"
,
signInfoHclc
.
getIdNo
());
signUrl
.
put
(
"name"
,
signInfoHclc
.
getName
());
}
signUrl
.
remove
(
"accountId"
);
signUrl
.
remove
(
"accountId"
);
signUrl
.
remove
(
"accountName"
);
signUrl
.
remove
(
"accountName"
);
signUrlsNew
.
add
(
signUrl
);
}
}
jsonResult
.
remove
(
"signUrls"
);
jsonResult
.
put
(
"signUrls"
,
signUrlsNew
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"create sign flows failed, msg:{}"
,
e
.
getMessage
());
logger
.
error
(
"create sign flows failed, msg:{}"
,
e
.
getMessage
());
jsonResult
.
put
(
"
code"
,
"
4"
);
jsonResult
.
put
(
"
errCode"
,
"00000
4"
);
jsonResult
.
put
(
"m
essage
"
,
"创建签署流程失败,"
+
e
.
getMessage
());
jsonResult
.
put
(
"m
sg
"
,
"创建签署流程失败,"
+
e
.
getMessage
());
}
}
if
(
Objects
.
nonNull
(
signFlowsInfoHclc
))
{
if
(
Objects
.
nonNull
(
signFlowsInfoHclc
))
{
...
@@ -1223,30 +1354,79 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
...
@@ -1223,30 +1354,79 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
map
=
getSignFlowDocUrls
(
signFlowsInfoHclc
.
getSignFlowId
());
map
=
getSignFlowDocUrls
(
signFlowsInfoHclc
.
getSignFlowId
());
params
.
remove
(
"finishDocUrlBeans"
);
params
.
remove
(
"finishDocUrlBeans"
);
params
.
put
(
"finishDocUrlBeans"
,
map
.
get
(
"signDocUrlList"
));
params
.
put
(
"finishDocUrlBeans"
,
map
.
get
(
"signDocUrlList"
));
//角色签署完成状态回调,替换用户信息
}
else
if
(
"SIGN_FLOW_UPDATE"
.
equalsIgnoreCase
(
params
.
getString
(
"action"
)))
{
JSONObject
accountInfo
=
params
.
getJSONObject
(
"accountInfo"
);
SignUserInfoHclc
signUserInfoHclc
=
new
SignUserInfoHclc
();
//判断是否机构用户
if
(
Objects
.
isNull
(
accountInfo
.
getString
(
"authOrgId"
))
||
""
.
equalsIgnoreCase
(
accountInfo
.
getString
(
"authOrgId"
)))
{
signUserInfoHclc
.
setAccountId
(
accountInfo
.
getString
(
"accountId"
));
}
else
{
signUserInfoHclc
.
setAccountId
(
accountInfo
.
getString
(
"authOrgId"
));
}
JSONObject
accountInfoNew
=
new
JSONObject
();
if
(
"f858b8e9-5c3a-11ea-8486-506b4bfdce3c"
.
equalsIgnoreCase
(
signUserInfoHclc
.
getAccountId
()))
{
accountInfoNew
.
put
(
"ctino"
,
""
);
accountInfoNew
.
put
(
"name"
,
"日立建机"
);
}
else
{
//获取移动端用户信息
signUserInfoHclc
=
signInfoHclcMapper
.
selectOne
(
signUserInfoHclc
);
accountInfoNew
.
put
(
"ctino"
,
signUserInfoHclc
.
getIdNo
());
accountInfoNew
.
put
(
"name"
,
signUserInfoHclc
.
getName
());
}
params
.
remove
(
"accountInfo"
);
params
.
put
(
"accountInfo"
,
accountInfoNew
);
}
}
try
{
try
{
//初始化接口信息
//初始化接口信息
String
url
=
getApiUrl
(
hclcSysName
,
getUrlsApiName
);
String
url
=
getApiUrl
(
hclcSysName
,
signSendApiName
);
logger
.
debug
(
"upload url: {}"
,
url
);
logger
.
debug
(
"sign flow url: {}"
,
url
);
Map
<
String
,
String
>
headInfo
=
new
HashMap
<
String
,
String
>();
headInfo
.
put
(
"Content-Type"
,
"application/x-www-form-urlencoded"
);
String
param
=
params
.
toString
();
JSONObject
requestData
=
new
JSONObject
();
requestData
.
put
(
"requestData"
,
params
.
toString
());
//发送http请求
//发送http请求
SignHclcUtils
signHclcUtils1
=
new
SignHclcUtils
();
SignHclcUtils
signHclcUtils1
=
new
SignHclcUtils
();
String
stringResult
=
signHclcUtils1
.
postString
(
url
,
param
,
null
);
String
stringResult
=
signHclcUtils1
.
postString
(
url
,
requestData
,
headInfo
,
signHclcUtils1
.
APPLICATION_FORM_URLENCODED
);
//解析返回结果
//解析返回结果
JSONObject
jsonResult
=
JSONObject
.
parseObject
(
stringResult
);
JSONObject
jsonResult
=
JSONObject
.
parseObject
(
stringResult
);
if
(
"
0"
.
equalsIgnoreCase
(
jsonResult
.
getString
(
"code
"
)))
{
if
(
"
true"
.
equalsIgnoreCase
(
jsonResult
.
getString
(
"success
"
)))
{
signFlowsInfoHclc
.
setSendFlag
(
"Y"
);
signFlowsInfoHclc
.
setSendFlag
(
"Y"
);
iSignFlowsInfoHclcService
.
updateByPrimaryKey
(
iRequest
,
signFlowsInfoHclc
);
iSignFlowsInfoHclcService
.
updateByPrimaryKey
(
iRequest
,
signFlowsInfoHclc
);
}
else
{
}
else
{
logger
.
error
(
"
get sign flow doc urls failed, errCode:{} ,msg:{}"
,
jsonResult
.
getString
(
"errCode"
),
jsonResult
.
getString
(
"msg
"
));
logger
.
error
(
"
post sign flow failed, errCode:{} ,msg:{}"
,
jsonResult
.
getJSONObject
(
"error"
).
getString
(
"code"
),
jsonResult
.
getJSONObject
(
"error"
).
getString
(
"message
"
));
}
}
//签署终结状态回调,签署完成下载签署文件
if
(
"SIGN_FLOW_FINISH"
.
equalsIgnoreCase
(
params
.
getString
(
"action"
)))
{
//初始化签署文件下载接口信息
String
signUrl
=
getApiUrl
(
hclcSysName
,
signFileDownApiName
);
logger
.
debug
(
"sign flow url: {}"
,
url
);
Map
<
String
,
String
>
downHeadInfo
=
new
HashMap
<
String
,
String
>();
headInfo
.
put
(
"Content-Type"
,
"application/x-www-form-urlencoded"
);
//发送http请求
String
stringResult2
=
signHclcUtils1
.
postString
(
signUrl
,
params
,
downHeadInfo
,
signHclcUtils1
.
APPLICATION_FORM_URLENCODED
);
//解析返回结果
JSONObject
jsonResult2
=
JSONObject
.
parseObject
(
stringResult2
);
if
(!
"true"
.
equalsIgnoreCase
(
jsonResult2
.
getString
(
"success"
)))
{
logger
.
error
(
"down sign file failed, errCode:{} ,msg:{}"
,
jsonResult2
.
getJSONObject
(
"error"
).
getString
(
"code"
),
jsonResult2
.
getJSONObject
(
"error"
).
getString
(
"message"
));
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"
get sign flow doc urls
failed ,msg:{}"
,
e
.
getMessage
());
logger
.
error
(
"
post sign flow
failed ,msg:{}"
,
e
.
getMessage
());
}
}
}
}
...
@@ -1255,15 +1435,11 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
...
@@ -1255,15 +1435,11 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
//业务方交互上下文信息
//业务方交互上下文信息
JSONObject
result
=
new
JSONObject
();
String
param
=
"signFlowId="
+
signFlowId
+
"&intranetFlag=Y"
;
//银行卡号
result
.
put
(
"signFlowId"
,
signFlowId
);
JSONObject
json
=
new
JSONObject
(
result
);
String
param
=
json
.
toString
();
//获取HMAC加密后的X-timevale-signature签名信息
//获取HMAC加密后的X-timevale-signature签名信息
AlgorithmHelper
algorithmHelper
=
new
AlgorithmHelper
();
AlgorithmHelper
algorithmHelper
=
new
AlgorithmHelper
();
String
EncryptedString
=
algorithmHelper
.
getXtimevaleSignature
(
param
,
projectSecret
,
HASH_ALGORITHM
,
"UTF-8"
);
String
EncryptedString
=
algorithmHelper
.
getXtimevaleSignature
(
""
,
projectSecret
,
HASH_ALGORITHM
,
"UTF-8"
);
//设置http请求head信息
//设置http请求head信息
Map
<
String
,
String
>
headInfo
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
headInfo
=
new
HashMap
<
String
,
String
>();
...
@@ -1273,12 +1449,12 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
...
@@ -1273,12 +1449,12 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
try
{
try
{
//初始化接口信息
//初始化接口信息
String
url
=
getApiUrl
(
signatureSysName
,
getUrlsApiName
);
String
url
=
getApiUrl
(
signatureSysName
,
get
Sign
UrlsApiName
);
logger
.
debug
(
"upload url: {}"
,
url
);
logger
.
debug
(
"upload url: {}"
,
url
);
//发送http请求
//发送http请求
SignHclcUtils
signHclcUtils1
=
new
SignHclcUtils
();
SignHclcUtils
signHclcUtils1
=
new
SignHclcUtils
();
String
stringResult
=
signHclcUtils1
.
postString
(
url
,
param
,
headInfo
);
String
stringResult
=
signHclcUtils1
.
getStr
(
url
,
param
,
headInfo
);
//解析返回结果
//解析返回结果
JSONObject
jsonResult
=
JSONObject
.
parseObject
(
stringResult
);
JSONObject
jsonResult
=
JSONObject
.
parseObject
(
stringResult
);
...
@@ -1295,10 +1471,103 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
...
@@ -1295,10 +1471,103 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"create person account failed, msg:{}"
,
e
.
getMessage
());
logger
.
error
(
"create person account failed, msg:{}"
,
e
.
getMessage
());
map
.
put
(
"code"
,
"1"
);
map
.
put
(
"code"
,
"
00000
1"
);
map
.
put
(
"message"
,
"获取签署流程文档下载地址失败,请检查!"
+
e
.
getMessage
());
map
.
put
(
"message"
,
"获取签署流程文档下载地址失败,请检查!"
+
e
.
getMessage
());
}
}
return
map
;
return
map
;
}
}
// public JSONObject cancelSignFlows(IRequest requestContext, JSONObject params) {
//
// JSONObject jsonResult = new JSONObject();
//
//
// JSONObject result = new JSONObject();
// //第三方业务码
// result.put("bizNo", params.get("bizNo"));
// //作废原因
// result.put("reason", params.get("reason"));
// //原签署流程id
// result.put("signFlowId", params.get("signFlowId"));
//
// JSONObject json = new JSONObject(result);
// String param = json.toString();
//
// //获取HMAC加密后的X-timevale-signature签名信息
// AlgorithmHelper algorithmHelper = new AlgorithmHelper();
// String EncryptedString = algorithmHelper.getXtimevaleSignature(param, projectSecret, HASH_ALGORITHM, "UTF-8");
//
// //设置http请求head信息
// Map<String, String> headInfo = new HashMap<String, String>();
// headInfo.put("x-timevale-project-id", projectId);
// headInfo.put("x-timevale-signature", EncryptedString);
//
// SignFlowsInfoHclc signFlowsInfoHclc = new SignFlowsInfoHclc();
//
// try {
//
// //初始化接口信息
// String url = getApiUrl(signatureSysName, signFlowsApiName);
// logger.debug("sign flows url: {}", url);
//
// signFlowsInfoHclc.setContractNo(params.getString("bizNo"));
// signFlowsInfoHclc.setSignAction("SIGN_CANCEL");
// signFlowsInfoHclc.setStatus("5");
// signFlowsInfoHclc.setRequestClob(param);
// signFlowsInfoHclc = iSignFlowsInfoHclcService.insertSelective(requestContext, signFlowsInfoHclc);
//
//
// //发送http请求
// SignHclcUtils signHclcUtils1 = new SignHclcUtils();
// String stringResult = signHclcUtils1.postString(url, param, headInfo);
//
// //解析返回结果
// jsonResult = JSONObject.parseObject(stringResult);
// signFlowsInfoHclc.setResponseClob(stringResult);
// if (!"0".equalsIgnoreCase(jsonResult.getString("errCode"))) {
// logger.error("create sign flows failed, errCode:{} ,msg:{}", jsonResult.getString("errCode"), jsonResult.getString("msg"));
// } else {
//
// JSONObject data = jsonResult.getJSONObject("data");
// signFlowsInfoHclc.setSignFlowId(data.getString("signFlowId"));
// signFlowsInfoHclc.setReturnCode(jsonResult.getString("errCode"));
// signFlowsInfoHclc.setReturnMsg(jsonResult.getString("msg"));
//
// //解析返回签署信息集合,替换accountId为用户信息
// JSONArray signUrls = data.getJSONArray("signUrls");
// for (int i = 0; i < signUrls.size(); i++) {
// JSONObject signUrl = signUrls.getJSONObject(i);
//
// //建机自己
// if ("0d83cfe0-4d86-11ea-b71a-b8599f3574b6".equalsIgnoreCase(signUrl.getString("accountId"))) {
// signUrl.put("name", "日立建机");
// } else {
// //根据uniqueId获取用户信息
// SignUserInfoHclc signInfoHclc = new SignUserInfoHclc();
// signInfoHclc.setOpenId(signUrl.getString("uniqueId"));
// signInfoHclc = this.selectByPrimaryKey(requestContext, signInfoHclc);
//
// signUrl.put("idNo", signInfoHclc.getIdNo());
// signUrl.put("name", signInfoHclc.getName());
// }
//
//
// signUrl.remove("accountId");
// signUrl.remove("accountName");
//
// }
// }
//
// } catch (Exception e) {
// logger.error("create sign flows failed, msg:{}", e.getMessage());
// jsonResult.put("errCode", "000004");
// jsonResult.put("msg", "创建签署流程失败," + e.getMessage());
// }
//
// if (Objects.nonNull(signFlowsInfoHclc)) {
// iSignFlowsInfoHclcService.updateByPrimaryKey(requestContext, signFlowsInfoHclc);
// }
// return jsonResult;
// }
}
}
core/src/main/java/com/hand/app/esignHclc/utils/SignHclcUtils.java
View file @
02073cf3
...
@@ -10,11 +10,14 @@ import com.hand.app.esignHclc.dto.SignUserInfoHclc;
...
@@ -10,11 +10,14 @@ import com.hand.app.esignHclc.dto.SignUserInfoHclc;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
org.apache.commons.codec.binary.Base64
;
import
org.apache.commons.codec.binary.Base64
;
import
org.apache.http.HttpResponse
;
import
org.apache.http.HttpResponse
;
import
org.apache.http.NameValuePair
;
import
org.apache.http.client.HttpClient
;
import
org.apache.http.client.HttpClient
;
import
org.apache.http.client.entity.UrlEncodedFormEntity
;
import
org.apache.http.client.methods.HttpPost
;
import
org.apache.http.client.methods.HttpPost
;
import
org.apache.http.entity.StringEntity
;
import
org.apache.http.entity.StringEntity
;
import
org.apache.http.impl.client.HttpClientBuilder
;
import
org.apache.http.impl.client.HttpClientBuilder
;
import
org.apache.http.message.BasicHeader
;
import
org.apache.http.message.BasicHeader
;
import
org.apache.http.message.BasicNameValuePair
;
import
javax.crypto.Cipher
;
import
javax.crypto.Cipher
;
import
javax.crypto.KeyGenerator
;
import
javax.crypto.KeyGenerator
;
...
@@ -41,6 +44,8 @@ public class SignHclcUtils {
...
@@ -41,6 +44,8 @@ public class SignHclcUtils {
public
static
final
String
APP_ID
=
"18653557"
;
public
static
final
String
APP_ID
=
"18653557"
;
public
static
final
String
API_KEY
=
"VD5jNFLsuBQE4vvjTtQoKQtt"
;
public
static
final
String
API_KEY
=
"VD5jNFLsuBQE4vvjTtQoKQtt"
;
public
static
final
String
SECRET_KEY
=
"Bx1O0kQ7W9YDprTOaLr2MPcPupsn7w7z"
;
public
static
final
String
SECRET_KEY
=
"Bx1O0kQ7W9YDprTOaLr2MPcPupsn7w7z"
;
public
static
final
String
APPLICATION_JSON
=
"application/json"
;
public
static
final
String
APPLICATION_FORM_URLENCODED
=
"application/x-www-form-urlencoded"
;
public
SignHclcUtils
()
{
public
SignHclcUtils
()
{
}
}
...
@@ -62,25 +67,39 @@ public class SignHclcUtils {
...
@@ -62,25 +67,39 @@ public class SignHclcUtils {
/**
/**
* 向指定URL发送POST方法的请求
* 向指定URL发送POST方法的请求
*
*
* @param urls 发送请求的URL
* @param urls
发送请求的URL
* @param
json
请求参数,请求参数应该是 JSON 的形式。
* @param
params
请求参数,请求参数应该是 JSON 的形式。
* @return URL 所代表远程资源的响应结果
* @return URL 所代表远程资源的响应结果
*/
*/
public
String
postString
(
String
urls
,
String
json
,
Map
<
String
,
String
>
headInfo
)
{
public
String
postString
(
String
urls
,
JSONObject
params
,
Map
<
String
,
String
>
headInfo
,
String
contentType
)
{
HttpClient
client
=
HttpClientBuilder
.
create
().
build
();
HttpClient
client
=
HttpClientBuilder
.
create
().
build
();
HttpPost
post
=
new
HttpPost
(
urls
);
HttpPost
post
=
new
HttpPost
(
urls
);
post
.
setHeader
(
"Content-Type"
,
"application/json"
);
String
result
=
""
;
String
result
=
""
;
try
{
try
{
StringEntity
s
=
new
StringEntity
(
json
,
"utf-8"
);
s
.
setContentEncoding
(
new
BasicHeader
(
"Content-Type"
,
"application/json"
));
if
(
Objects
.
nonNull
(
headInfo
))
{
if
(
Objects
.
nonNull
(
headInfo
))
{
for
(
Map
.
Entry
<
String
,
String
>
entry
:
headInfo
.
entrySet
())
{
for
(
Map
.
Entry
<
String
,
String
>
entry
:
headInfo
.
entrySet
())
{
post
.
setHeader
(
entry
.
getKey
(),
entry
.
getValue
());
post
.
setHeader
(
entry
.
getKey
(),
entry
.
getValue
());
}
}
}
}
post
.
setEntity
(
s
);
if
(
APPLICATION_JSON
.
equalsIgnoreCase
(
contentType
))
{
String
json
=
params
.
toString
();
StringEntity
s
=
new
StringEntity
(
json
,
"utf-8"
);
s
.
setContentEncoding
(
new
BasicHeader
(
"Content-Type"
,
APPLICATION_JSON
));
post
.
setHeader
(
"Content-Type"
,
APPLICATION_JSON
);
post
.
setEntity
(
s
);
}
else
if
(
APPLICATION_FORM_URLENCODED
.
equalsIgnoreCase
(
contentType
))
{
List
<
NameValuePair
>
nameValuePairList
=
new
ArrayList
<
NameValuePair
>();
for
(
String
key
:
params
.
keySet
())
{
nameValuePairList
.
add
(
new
BasicNameValuePair
(
key
,
params
.
get
(
key
).
toString
()));
}
UrlEncodedFormEntity
formEntity
=
new
UrlEncodedFormEntity
(
nameValuePairList
,
"utf-8"
);
formEntity
.
setContentType
(
"application/x-www-form-urlencoded; charset=UTF-8"
);
post
.
setEntity
(
formEntity
);
}
HttpResponse
httpResponse
=
client
.
execute
(
post
);
HttpResponse
httpResponse
=
client
.
execute
(
post
);
InputStream
inStream
=
httpResponse
.
getEntity
().
getContent
();
InputStream
inStream
=
httpResponse
.
getEntity
().
getContent
();
BufferedReader
reader
=
new
BufferedReader
(
new
InputStreamReader
(
inStream
,
"utf-8"
));
BufferedReader
reader
=
new
BufferedReader
(
new
InputStreamReader
(
inStream
,
"utf-8"
));
...
@@ -106,6 +125,51 @@ public class SignHclcUtils {
...
@@ -106,6 +125,51 @@ public class SignHclcUtils {
}
}
}
}
// public String postFormUrlEncoded(String url, JSONObject params, Map<String, String> headInfo) {
// HttpClient httpClient = HttpClientBuilder.create().build();
// HttpPost post = new HttpPost(url);
// String result = "";
// try {
// if (Objects.nonNull(headInfo)) {
// for (Map.Entry<String, String> entry : headInfo.entrySet()) {
// post.setHeader(entry.getKey(), entry.getValue());
// }
// }
// if (params != null) {
// List<NameValuePair> nameValuePairList = new ArrayList<NameValuePair>();
// for (String key : params.keySet()) {
// nameValuePairList.add(new BasicNameValuePair(key, params.get(key).toString()));
// }
// UrlEncodedFormEntity formEntity = new UrlEncodedFormEntity(nameValuePairList, "utf-8");
// formEntity.setContentType("application/x-www-form-urlencoded; charset=UTF-8");
// post.setEntity(formEntity);
// }
//
// HttpResponse httpResponse = httpClient.execute(post);
// InputStream inStream = httpResponse.getEntity().getContent();
// BufferedReader reader = new BufferedReader(new InputStreamReader(inStream, "utf-8"));
// StringBuilder strber = new StringBuilder();
// String line = null;
//
// while ((line = reader.readLine()) != null) {
// strber.append(line + "\n");
// }
//
// inStream.close();
// result = strber.toString();
// if (httpResponse.getStatusLine().getStatusCode() == 200) {
// System.out.println("请求服务器成功");
// } else {
// System.out.println("请求服务端失败");
// }
//
// return result;
// } catch (Exception var12) {
// var12.printStackTrace();
// throw new RuntimeException(var12);
// }
// }
public
String
getJSON
(
String
url
)
{
public
String
getJSON
(
String
url
)
{
try
{
try
{
URL
thisurl
=
new
URL
(
url
);
URL
thisurl
=
new
URL
(
url
);
...
@@ -184,7 +248,7 @@ public class SignHclcUtils {
...
@@ -184,7 +248,7 @@ public class SignHclcUtils {
* @param param 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。
* @param param 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。
* @return URL 所代表远程资源的响应结果
* @return URL 所代表远程资源的响应结果
*/
*/
public
static
String
getStr
(
String
url
,
String
param
)
{
public
static
String
getStr
(
String
url
,
String
param
,
Map
<
String
,
String
>
headInfo
)
{
String
result
=
""
;
String
result
=
""
;
BufferedReader
in
=
null
;
BufferedReader
in
=
null
;
try
{
try
{
...
@@ -196,6 +260,13 @@ public class SignHclcUtils {
...
@@ -196,6 +260,13 @@ public class SignHclcUtils {
connection
.
setRequestProperty
(
"accept"
,
"*/*"
);
connection
.
setRequestProperty
(
"accept"
,
"*/*"
);
connection
.
setRequestProperty
(
"connection"
,
"Keep-Alive"
);
connection
.
setRequestProperty
(
"connection"
,
"Keep-Alive"
);
connection
.
setRequestProperty
(
"user-agent"
,
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"
);
connection
.
setRequestProperty
(
"user-agent"
,
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"
);
if
(
Objects
.
nonNull
(
headInfo
))
{
for
(
Map
.
Entry
<
String
,
String
>
entry
:
headInfo
.
entrySet
())
{
connection
.
setRequestProperty
(
entry
.
getKey
(),
entry
.
getValue
());
}
}
// 建立实际的连接
// 建立实际的连接
connection
.
connect
();
connection
.
connect
();
// 获取所有响应头字段
// 获取所有响应头字段
...
@@ -236,7 +307,7 @@ public class SignHclcUtils {
...
@@ -236,7 +307,7 @@ public class SignHclcUtils {
try
{
try
{
SignHclcUtils
signHclcUtils
=
new
SignHclcUtils
();
SignHclcUtils
signHclcUtils
=
new
SignHclcUtils
();
String
param
=
"appId="
+
appId
+
"&secret="
+
secret
+
"&grantType=client_credentials"
;
String
param
=
"appId="
+
appId
+
"&secret="
+
secret
+
"&grantType=client_credentials"
;
String
stringResult
=
signHclcUtils
.
getStr
(
faceApiUrl
,
param
);
String
stringResult
=
signHclcUtils
.
getStr
(
faceApiUrl
,
param
,
null
);
JSONObject
json2
=
JSONObject
.
parseObject
(
stringResult
);
JSONObject
json2
=
JSONObject
.
parseObject
(
stringResult
);
if
(
"0"
.
equalsIgnoreCase
(
json2
.
getString
(
"code"
)))
{
if
(
"0"
.
equalsIgnoreCase
(
json2
.
getString
(
"code"
)))
{
JSONObject
data
=
json2
.
getJSONObject
(
"data"
);
JSONObject
data
=
json2
.
getJSONObject
(
"data"
);
...
...
core/src/main/resources/app/esignHclc/mapper/SignInfoHclcMapper.xml
View file @
02073cf3
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
<result
column=
"AUTH_AGENT_ACCOUNT_ID"
property=
"authAgentAccountId"
jdbcType=
"VARCHAR"
/>
<result
column=
"AUTH_AGENT_ACCOUNT_ID"
property=
"authAgentAccountId"
jdbcType=
"VARCHAR"
/>
<result
column=
"ORG_ATTACHMENT_ID"
property=
"orgAttachmentId"
jdbcType=
"VARCHAR"
/>
<result
column=
"ORG_ATTACHMENT_ID"
property=
"orgAttachmentId"
jdbcType=
"VARCHAR"
/>
<result
column=
"AUTH_FLAG"
property=
"authFlag"
jdbcType=
"VARCHAR"
/>
<result
column=
"AUTH_FLAG"
property=
"authFlag"
jdbcType=
"VARCHAR"
/>
<result
column=
"SEAL_ID"
property=
"sealId"
jdbcType=
"VARCHAR"
/>
</resultMap>
</resultMap>
<select
id=
"queryUserInfo"
resultMap=
"BaseResultMap"
parameterType=
"com.hand.app.esignHclc.dto.SignUserInfoHclc"
>
<select
id=
"queryUserInfo"
resultMap=
"BaseResultMap"
parameterType=
"com.hand.app.esignHclc.dto.SignUserInfoHclc"
>
...
@@ -34,19 +35,19 @@
...
@@ -34,19 +35,19 @@
from SIGN_USER_INFO_HCLC
from SIGN_USER_INFO_HCLC
<where>
<where>
<if
test=
"openId != null"
>
<if
test=
"openId != null"
>
and
OPEN_ID
= #{openId,jdbcType=DECIMAL}
and
open_id
= #{openId,jdbcType=DECIMAL}
</if>
</if>
<if
test=
"idNo != null"
>
<if
test=
"idNo != null"
>
and
ID_NO
= #{idNo,jdbcType=VARCHAR}
and
id_no
= #{idNo,jdbcType=VARCHAR}
</if>
</if>
<if
test=
"name != null"
>
<if
test=
"name != null"
>
and name = #{
NAME
,jdbcType=VARCHAR}
and name = #{
name
,jdbcType=VARCHAR}
</if>
</if>
<if
test=
"accountId != null"
>
<if
test=
"accountId != null"
>
and nvl(
ACCOUNT_ID
,'N') = #{accountId,jdbcType=VARCHAR}
and nvl(
account_id
,'N') = #{accountId,jdbcType=VARCHAR}
</if>
</if>
<if
test=
"authFlag != null"
>
<if
test=
"authFlag != null"
>
and nvl(
AUTH_FLAG
,'N') = #{authFlag,jdbcType=VARCHAR}
and nvl(
auth_flag
,'N') = #{authFlag,jdbcType=VARCHAR}
</if>
</if>
</where>
</where>
order by account_id
order by account_id
...
...
core/src/main/resources/config.properties
View file @
02073cf3
...
@@ -122,6 +122,10 @@ tsign.face.api.appId=4438798562
...
@@ -122,6 +122,10 @@ tsign.face.api.appId=4438798562
tsign.face.api.secret
=
4024c2b5e503a84da6d126fdc6f0da81
tsign.face.api.secret
=
4024c2b5e503a84da6d126fdc6f0da81
#认证结果通知地址
#认证结果通知地址
tsign.api.notifyUrl
=
http://101.133.225.167/core/api/public/listen/auth/result
tsign.api.notifyUrl
=
http://101.133.225.167/core/api/public/listen/auth/result
#签署结果通知地址
tsign.api.listenSignUrl
=
http://101.133.225.167/core/api/public/listen/sign/flow
#签署完成跳转地址
tsign.api.signRedirectUrl
=
http://sign.hitachics.com/www/#/ElectronicContract
#微信公众号apiKey
#微信公众号apiKey
wx.apiKey
=
handexinxi
wx.apiKey
=
handexinxi
#微信公众号接口地址
#微信公众号接口地址
...
...
core/src/main/resources/profiles/dev/config.properties
View file @
02073cf3
...
@@ -10,19 +10,19 @@ redis.useSentinel=false
...
@@ -10,19 +10,19 @@ redis.useSentinel=false
redis.ip
=
localhost
redis.ip
=
localhost
redis.port
=
6379
redis.port
=
6379
redis.db
=
10
redis.db
=
7
#redis.password=123456
db.jndiName
=
java:comp/env/jdbc/hls_support
db.jndiName
=
java:comp/env/jdbc/dr_app_dev
# db.type property is used for activiti
# db.type property is used for activiti
db.type
=
mysql
#db.type=mysql
#db.type=oracle
db.type
=
oracle
#db.type=mssql
#db.type=hana
#db.type=hana
mybatis.identity
=
JDBC
#
mybatis.identity=JDBC
#
mybatis.identity=SEQUENCE
mybatis.identity
=
SEQUENCE
# environment
# environment
env.code
=
SIT
env.code
=
SIT
...
@@ -97,11 +97,10 @@ ureport.fileStoreDir=
...
@@ -97,11 +97,10 @@ ureport.fileStoreDir=
wx.token
=
fdbiabwehuiv
wx.token
=
fdbiabwehuiv
#企业号
#企业号
qy.wx.token
=
YDQFbrP4wAdA5TTSBxSCKk
qy.wx.token
=
cjndksabebubcjd
qy.wx.encodingAESKey
=
RuGAoQ7DHt0GdV9OkCLqYbzNBhDbiuuUiUskeltdcYK
qy.wx.encodingAESKey
=
z2W9lyOAR1XjY8mopEmiSqib0TlBZzCFiCLp6IdS2Iv
qy.wx.corpId
=
ww77bcfe6939a185fe
qy.wx.corpId
=
ww4ca7a88ea2843535
qy.wx.corpSecret
=
pj0kw409qsMX6DnWF6iUYwhCQOom5oE7B7sAgHazHX4
qy.wx.corpSecret
=
tE3QJtYf89IsdlF99wZyo_QKEbb7lRFsJuIiuk8YOJ8
## end
## end
...
@@ -110,23 +109,33 @@ domain=http://localhost:8070/core/
...
@@ -110,23 +109,33 @@ domain=http://localhost:8070/core/
#set task size
#set task size
thread.taskSize
=
5
thread.taskSize
=
5
markImgPath
=
C:/Users/����/Desktop/test9.png
#esignHclc
tsign.project.id
=
1000029
#esign dev
tsign.project.secret
=
2e66a86bbc6fa9000d4a5f272cbc70e1
tsign.project.id
=
1111563517
#e签宝地址
tsign.project.secret
=
95439b0863c241c63a861b87d1e647b7
tsign.api.url
=
http://139.196.17.22:8035
tsign.api.url
=
http://121.40.164.61:8080/tgmonitor/rest/app!getAPIInfo2
#用户认证地址
tsign.face.api.url
=
https://smlopenapi.esign.cn
#用户认证用户
tsign.face.api.appId
=
4438798562
#用户认证密码
tsign.face.api.secret
=
4024c2b5e503a84da6d126fdc6f0da81
#认证结果通知地址
tsign.api.notifyUrl
=
http://101.133.225.167/core/api/public/listen/auth/result
#签署结果通知地址
tsign.api.listenSignUrl
=
http://101.133.225.167/core/api/public/listen/sign/flow
#签署完成跳转地址
tsign.api.signRedirectUrl
=
http://sign.hitachics.com/www/#/ElectronicContract
#微信公众号apiKey
wx.apiKey
=
handexinxi
#微信公众号接口地址
wx.apiHttpUrl
=
https://wxgzh.hitachics.com/hcs-public-server/internal/third/
#微信服务器图片保存中台路径
wx.image.path
=
D:
\\
app_dev
\\
apache-tomcat-app
\\
app_file
#esign
#tsign.project.id=1111565057
#tsign.project.secret=cf74f42ab268ae0b31ba2ee98e84bab5
#tsign.api.url=http://openapi.tsign.cn:8080/tgmonitor/rest/app!getAPIInfo2
#aliyun
aliyun.accessKeyId
=
LTAI4BKXkUQW1jVY
aliyun.accessKeySecret
=
TlaBwgHASAshVfPX6jMWgQahx9epse
face.check.enable
=
false
face.check.enable
=
false
#金格电子合同配置文件地址
#金格电子合同配置文件地址
electronic.signature.path
=
/Volumes/work/idea/APIconfig
electronic.signature.path
=
/Volumes/work/idea/APIconfig
\ No newline at end of file
core/src/main/resources/profiles/sit/config.properties
View file @
02073cf3
...
@@ -10,19 +10,19 @@ redis.useSentinel=false
...
@@ -10,19 +10,19 @@ redis.useSentinel=false
redis.ip
=
localhost
redis.ip
=
localhost
redis.port
=
6379
redis.port
=
6379
redis.db
=
10
redis.db
=
7
#redis.password=123456
db.jndiName
=
java:comp/env/jdbc/hls_support
db.jndiName
=
java:comp/env/jdbc/dr_app_dev
# db.type property is used for activiti
# db.type property is used for activiti
db.type
=
mysql
#db.type=mysql
#db.type=oracle
db.type
=
oracle
#db.type=mssql
#db.type=hana
#db.type=hana
mybatis.identity
=
JDBC
#
mybatis.identity=JDBC
#
mybatis.identity=SEQUENCE
mybatis.identity
=
SEQUENCE
# environment
# environment
env.code
=
SIT
env.code
=
SIT
...
@@ -97,11 +97,10 @@ ureport.fileStoreDir=
...
@@ -97,11 +97,10 @@ ureport.fileStoreDir=
wx.token
=
fdbiabwehuiv
wx.token
=
fdbiabwehuiv
#企业号
#企业号
qy.wx.token
=
cjndksabebubcjd
qy.wx.token
=
YDQFbrP4wAdA5TTSBxSCKk
qy.wx.encodingAESKey
=
z2W9lyOAR1XjY8mopEmiSqib0TlBZzCFiCLp6IdS2Iv
qy.wx.encodingAESKey
=
RuGAoQ7DHt0GdV9OkCLqYbzNBhDbiuuUiUskeltdcYK
qy.wx.corpId
=
ww4ca7a88ea2843535
qy.wx.corpId
=
ww77bcfe6939a185fe
qy.wx.corpSecret
=
tE3QJtYf89IsdlF99wZyo_QKEbb7lRFsJuIiuk8YOJ8
qy.wx.corpSecret
=
pj0kw409qsMX6DnWF6iUYwhCQOom5oE7B7sAgHazHX4
## end
## end
...
@@ -110,23 +109,33 @@ domain=http://localhost:8070/core/
...
@@ -110,23 +109,33 @@ domain=http://localhost:8070/core/
#set task size
#set task size
thread.taskSize
=
5
thread.taskSize
=
5
markImgPath
=
C:/Users/����/Desktop/test9.png
#esignHclc
tsign.project.id
=
1000029
#esign dev
tsign.project.secret
=
2e66a86bbc6fa9000d4a5f272cbc70e1
tsign.project.id
=
1111563517
#e签宝地址
tsign.project.secret
=
95439b0863c241c63a861b87d1e647b7
tsign.api.url
=
http://139.196.17.22:8035
tsign.api.url
=
http://121.40.164.61:8080/tgmonitor/rest/app!getAPIInfo2
#用户认证地址
tsign.face.api.url
=
https://smlopenapi.esign.cn
#用户认证用户
tsign.face.api.appId
=
4438798562
#用户认证密码
tsign.face.api.secret
=
4024c2b5e503a84da6d126fdc6f0da81
#认证结果通知地址
tsign.api.notifyUrl
=
http://101.133.225.167/core/api/public/listen/auth/result
#签署结果通知地址
tsign.api.listenSignUrl
=
http://101.133.225.167/core/api/public/listen/sign/flow
#签署完成跳转地址
tsign.api.signRedirectUrl
=
http://sign.hitachics.com/www/#/ElectronicContract
#微信公众号apiKey
wx.apiKey
=
handexinxi
#微信公众号接口地址
wx.apiHttpUrl
=
https://wxgzh.hitachics.com/hcs-public-server/internal/third/
#微信服务器图片保存中台路径
wx.image.path
=
D:
\\
app_dev
\\
apache-tomcat-app
\\
app_file
#esign
#tsign.project.id=1111565057
#tsign.project.secret=cf74f42ab268ae0b31ba2ee98e84bab5
#tsign.api.url=http://openapi.tsign.cn:8080/tgmonitor/rest/app!getAPIInfo2
#aliyun
aliyun.accessKeyId
=
LTAI4BKXkUQW1jVY
aliyun.accessKeySecret
=
TlaBwgHASAshVfPX6jMWgQahx9epse
face.check.enable
=
false
face.check.enable
=
false
#金格电子合同配置文件地址
#金格电子合同配置文件地址
electronic.signature.path
=
/Volumes/work/idea/APIconfig
electronic.signature.path
=
/Volumes/work/idea/APIconfig
\ No newline at end of file
core/src/main/resources/profiles/uat/config.properties
View file @
02073cf3
...
@@ -10,19 +10,19 @@ redis.useSentinel=false
...
@@ -10,19 +10,19 @@ redis.useSentinel=false
redis.ip
=
localhost
redis.ip
=
localhost
redis.port
=
6379
redis.port
=
6379
redis.db
=
10
redis.db
=
7
#redis.password=123456
db.jndiName
=
java:comp/env/jdbc/hls_support
db.jndiName
=
java:comp/env/jdbc/dr_app_dev
# db.type property is used for activiti
# db.type property is used for activiti
db.type
=
mysql
#db.type=mysql
#db.type=oracle
db.type
=
oracle
#db.type=mssql
#db.type=hana
#db.type=hana
mybatis.identity
=
JDBC
#
mybatis.identity=JDBC
#
mybatis.identity=SEQUENCE
mybatis.identity
=
SEQUENCE
# environment
# environment
env.code
=
SIT
env.code
=
SIT
...
@@ -97,10 +97,10 @@ ureport.fileStoreDir=
...
@@ -97,10 +97,10 @@ ureport.fileStoreDir=
wx.token
=
fdbiabwehuiv
wx.token
=
fdbiabwehuiv
#企业号
#企业号
qy.wx.token
=
YDQFbrP4wAdA5TTSBxSCKk
qy.wx.token
=
cjndksabebubcjd
qy.wx.encodingAESKey
=
RuGAoQ7DHt0GdV9OkCLqYbzNBhDbiuuUiUskeltdcYK
qy.wx.encodingAESKey
=
z2W9lyOAR1XjY8mopEmiSqib0TlBZzCFiCLp6IdS2Iv
qy.wx.corpId
=
ww
77bcfe6939a185fe
qy.wx.corpId
=
ww
4ca7a88ea2843535
qy.wx.corpSecret
=
pj0kw409qsMX6DnWF6iUYwhCQOom5oE7B7sAgHazHX4
qy.wx.corpSecret
=
tE3QJtYf89IsdlF99wZyo_QKEbb7lRFsJuIiuk8YOJ8
## end
## end
...
@@ -109,23 +109,33 @@ domain=http://localhost:8070/core/
...
@@ -109,23 +109,33 @@ domain=http://localhost:8070/core/
#set task size
#set task size
thread.taskSize
=
5
thread.taskSize
=
5
markImgPath
=
C:/Users/����/Desktop/test9.png
#esignHclc
tsign.project.id
=
1000029
tsign.project.secret
=
2e66a86bbc6fa9000d4a5f272cbc70e1
#e签宝地址
tsign.api.url
=
http://139.196.17.22:8035
#用户认证地址
tsign.face.api.url
=
https://smlopenapi.esign.cn
#用户认证用户
tsign.face.api.appId
=
4438798562
#用户认证密码
tsign.face.api.secret
=
4024c2b5e503a84da6d126fdc6f0da81
#认证结果通知地址
tsign.api.notifyUrl
=
http://101.133.225.167/core/api/public/listen/auth/result
#签署结果通知地址
tsign.api.listenSignUrl
=
http://101.133.225.167/core/api/public/listen/sign/flow
#签署完成跳转地址
tsign.api.signRedirectUrl
=
http://sign.hitachics.com/www/#/ElectronicContract
#微信公众号apiKey
wx.apiKey
=
handexinxi
#微信公众号接口地址
wx.apiHttpUrl
=
https://wxgzh.hitachics.com/hcs-public-server/internal/third/
#微信服务器图片保存中台路径
wx.image.path
=
D:
\\
app_dev
\\
apache-tomcat-app
\\
app_file
#esign dev
tsign.project.id
=
1111563517
tsign.project.secret
=
95439b0863c241c63a861b87d1e647b7
tsign.api.url
=
http://121.40.164.61:8080/tgmonitor/rest/app!getAPIInfo2
#esign
#tsign.project.id=1111565057
#tsign.project.secret=cf74f42ab268ae0b31ba2ee98e84bab5
#tsign.api.url=http://openapi.tsign.cn:8080/tgmonitor/rest/app!getAPIInfo2
#aliyun
aliyun.accessKeyId
=
LTAI4BKXkUQW1jVY
aliyun.accessKeySecret
=
TlaBwgHASAshVfPX6jMWgQahx9epse
face.check.enable
=
false
face.check.enable
=
false
#金格电子合同配置文件地址
#金格电子合同配置文件地址
electronic.signature.path
=
/Volumes/work/idea/APIconfig
electronic.signature.path
=
/Volumes/work/idea/APIconfig
\ No newline at end of file
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