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
e146b07e
Commit
e146b07e
authored
Jul 14, 2020
by
5359
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
正式环境参数修改
parent
e069945b
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
236 additions
and
60 deletions
+236
-60
SignHclcController.java
...om/hand/app/esignHclc/controllers/SignHclcController.java
+77
-1
SignUserInfoHclc.java
...ain/java/com/hand/app/esignHclc/dto/SignUserInfoHclc.java
+11
-0
ISignInfoHclcService.java
.../com/hand/app/esignHclc/service/ISignInfoHclcService.java
+2
-0
SignInfoHclcServiceImpl.java
...d/app/esignHclc/service/impl/SignInfoHclcServiceImpl.java
+115
-56
SignHclcUtils.java
...main/java/com/hand/app/esignHclc/utils/SignHclcUtils.java
+12
-2
logback.xml
core/src/main/resources/logback.xml
+19
-1
No files found.
core/src/main/java/com/hand/app/esignHclc/controllers/SignHclcController.java
View file @
e146b07e
...
...
@@ -5,6 +5,8 @@ import com.hand.app.esignHclc.dto.SignUserAttachInfo;
import
com.hand.app.esignHclc.dto.SignUserInfoHclc
;
import
com.hand.app.esignHclc.dto.SignUserFaceHclc
;
import
com.hand.app.esignHclc.dto.SignUserInfoHclcHis
;
import
com.hand.app.esignHclc.mapper.SignInfoHclcMapper
;
import
com.hand.app.esignHclc.mapper.SignUserInfoHclcHisMapper
;
import
com.hand.app.esignHclc.service.*
;
import
com.hand.hap.core.IRequest
;
import
com.hand.hap.system.controllers.BaseController
;
...
...
@@ -36,6 +38,10 @@ public class SignHclcController extends BaseController {
@Autowired
private
ISignUserInfoHclcHisService
signUserInfoHclcHisService
;
@Autowired
private
SignInfoHclcMapper
signInfoHclcMapper
;
@Autowired
private
SignUserInfoHclcHisMapper
signUserInfoHclcHisMapper
;
@Autowired
private
ISignUserAttachInfoService
iSignUserAttachInfoService
;
...
...
@@ -51,9 +57,13 @@ public class SignHclcController extends BaseController {
public
ResponseData
query
(
HttpServletRequest
request
,
SignUserInfoHclc
dto
)
{
IRequest
requestContext
=
createRequestContext
(
request
);
List
<
SignUserInfoHclc
>
signInfoHclcs
=
new
ArrayList
<>();
String
openId
=
dto
.
getOpenId
();
SignUserInfoHclc
signInfoHclc
=
signHclcService
.
selectByPrimaryKey
(
requestContext
,
dto
);
if
(
Objects
.
nonNull
(
signInfoHclc
))
{
//设置用户信息是否为历史备份信息
signInfoHclc
.
setHistoryFlag
(
"N"
);
//获取人脸核验状态
if
(
Objects
.
nonNull
(
signInfoHclc
.
getFaceAuthId
()))
{
SignUserFaceHclc
signInfoHclcFace
=
new
SignUserFaceHclc
();
...
...
@@ -90,6 +100,24 @@ public class SignHclcController extends BaseController {
signInfoHclc
.
setOrgAttachmentId
(
signUserAttachInfos
.
get
(
0
).
getAttachmentIdHclc
().
toString
());
}
}
}
else
{
//查询是否存在历史注册信息,用于合同查看、文件下载
List
<
SignUserInfoHclcHis
>
userInfoHclcHisList
=
new
ArrayList
<>();
SignUserInfoHclcHis
signUserInfoHclcHis
=
new
SignUserInfoHclcHis
();
signUserInfoHclcHis
.
setOpenId
(
openId
);
signUserInfoHclcHis
.
setAuthFlag
(
"Y"
);
userInfoHclcHisList
=
signUserInfoHclcHisMapper
.
select
(
signUserInfoHclcHis
);
if
(
userInfoHclcHisList
.
size
()
>
0
)
{
signInfoHclc
=
new
SignUserInfoHclc
();
//取历史注册信息中最后的一期
Optional
<
SignUserInfoHclcHis
>
maxResult
=
userInfoHclcHisList
.
stream
().
max
(
Comparator
.
comparing
(
SignUserInfoHclcHis:
:
getHisId
));
if
(
maxResult
.
isPresent
())
{
signUserInfoHclcHis
=
maxResult
.
get
();
BeanUtils
.
copyProperties
(
signUserInfoHclcHis
,
signInfoHclc
);
signInfoHclc
.
setHistoryFlag
(
"Y"
);
}
}
}
if
(
signInfoHclc
!=
null
)
{
...
...
@@ -222,6 +250,7 @@ public class SignHclcController extends BaseController {
map
=
signHclcService
.
deletePersonAccount
(
iRequest
,
agentSignInfo
);
if
(
"0"
.
equalsIgnoreCase
(
map
.
get
(
"code"
).
toString
())
||
"40051667"
.
equalsIgnoreCase
(
map
.
get
(
"code"
).
toString
())
||
"000003"
.
equalsIgnoreCase
(
map
.
get
(
"code"
).
toString
()))
{
signHclcService
.
deleteByPrimaryKey
(
dto
);
map
.
put
(
"code"
,
"0"
);
}
else
{
signHclcService
.
updateByPrimaryKey
(
iRequest
,
dto
);
}
...
...
@@ -231,6 +260,7 @@ public class SignHclcController extends BaseController {
map
=
signHclcService
.
deletePersonAccount
(
iRequest
,
dto
);
if
(
"0"
.
equalsIgnoreCase
(
map
.
get
(
"code"
).
toString
())
||
"40051667"
.
equalsIgnoreCase
(
map
.
get
(
"code"
).
toString
())
||
"000003"
.
equalsIgnoreCase
(
map
.
get
(
"code"
).
toString
()))
{
signHclcService
.
deleteByPrimaryKey
(
dto
);
map
.
put
(
"code"
,
"0"
);
}
}
...
...
@@ -340,4 +370,50 @@ public class SignHclcController extends BaseController {
// @RequestBody(required = true) JSONObject params) {
// return signHclcService.cancelSignFlows(createRequestContext(request), params);
// }
/**
* 电子合同消息发送
*/
@RequestMapping
(
value
=
"/send/wx/message"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
JSONObject
sendWxTemplateMsg
(
HttpServletRequest
request
,
@RequestBody
(
required
=
true
)
JSONObject
params
)
{
JSONObject
json
=
new
JSONObject
();
try
{
//根据客户名称,证件号码获取对应的openId信息
String
idNo
=
params
.
getString
(
"idNo"
);
String
name
=
params
.
getString
(
"name"
);
String
openId
=
null
;
SignUserInfoHclc
signInfoHclc
=
new
SignUserInfoHclc
();
List
<
SignUserInfoHclc
>
infoHclcs
=
new
ArrayList
<>();
signInfoHclc
.
setName
(
name
);
signInfoHclc
.
setIdNo
(
idNo
);
infoHclcs
=
signInfoHclcMapper
.
select
(
signInfoHclc
);
if
(
infoHclcs
.
size
()
>
0
)
{
openId
=
infoHclcs
.
get
(
0
).
getOpenId
();
}
else
{
//查询历史注册信息
SignUserInfoHclcHis
signUserInfoHclcHis
=
new
SignUserInfoHclcHis
();
List
<
SignUserInfoHclcHis
>
userInfoHclcHisList
=
new
ArrayList
<>();
signUserInfoHclcHis
.
setName
(
name
);
signUserInfoHclcHis
.
setIdNo
(
idNo
);
userInfoHclcHisList
=
signUserInfoHclcHisMapper
.
select
(
signUserInfoHclcHis
);
if
(
userInfoHclcHisList
.
size
()
>
0
)
{
openId
=
userInfoHclcHisList
.
get
(
0
).
getOpenId
();
}
}
if
(
openId
!=
null
)
{
params
.
put
(
"openId"
,
openId
);
}
json
=
signHclcService
.
sendWxTemplateMsg
(
params
);
}
catch
(
Exception
e
)
{
json
.
put
(
"code"
,
"000002"
);
json
.
put
(
"message"
,
"微信消息发送失败"
);
e
.
printStackTrace
();
}
return
json
;
}
}
core/src/main/java/com/hand/app/esignHclc/dto/SignUserInfoHclc.java
View file @
e146b07e
...
...
@@ -87,6 +87,9 @@ public class SignUserInfoHclc extends BaseDTO {
@Transient
private
String
mediaId
;
//微信图片资源id
@Transient
private
String
historyFlag
;
//微信图片资源id
public
AttachmentInfo
getAttachmentInfo
()
{
return
attachmentInfo
;
}
...
...
@@ -366,4 +369,12 @@ public class SignUserInfoHclc extends BaseDTO {
public
void
setSealId
(
String
sealId
)
{
this
.
sealId
=
sealId
;
}
public
String
getHistoryFlag
()
{
return
historyFlag
;
}
public
void
setHistoryFlag
(
String
historyFlag
)
{
this
.
historyFlag
=
historyFlag
;
}
}
core/src/main/java/com/hand/app/esignHclc/service/ISignInfoHclcService.java
View file @
e146b07e
...
...
@@ -40,4 +40,6 @@ public interface ISignInfoHclcService extends IBaseService<SignUserInfoHclc>, Pr
// JSONObject cancelSignFlows(IRequest requestContext, JSONObject params);
void
postSignFlowsResult
(
IRequest
iRequest
,
JSONObject
params
);
JSONObject
sendWxTemplateMsg
(
JSONObject
json
);
}
core/src/main/java/com/hand/app/esignHclc/service/impl/SignInfoHclcServiceImpl.java
View file @
e146b07e
This diff is collapsed.
Click to expand it.
core/src/main/java/com/hand/app/esignHclc/utils/SignHclcUtils.java
View file @
e146b07e
...
...
@@ -117,9 +117,9 @@ public class SignHclcUtils {
inStream
.
close
();
result
=
strber
.
toString
();
if
(
httpResponse
.
getStatusLine
().
getStatusCode
()
==
200
)
{
logger
.
info
(
"请求服务器成功, urls ={},params ={} ,contentType ={}
"
,
urls
,
params
.
toString
(),
contentType
);
logger
.
info
(
"请求服务器成功, urls ={},params ={} ,contentType ={}
,result ={}"
,
urls
,
params
.
toString
(),
contentType
,
result
);
}
else
{
logger
.
info
(
"请求服务端失败, urls ={},params ={} ,contentType ={}
"
,
urls
,
params
.
toString
(),
contentType
);
logger
.
info
(
"请求服务端失败, urls ={},params ={} ,contentType ={}
,result ={}"
,
urls
,
params
.
toString
(),
contentType
,
result
);
}
return
result
;
...
...
@@ -299,6 +299,9 @@ public class SignHclcUtils {
e2
.
printStackTrace
();
}
}
logger
.
info
(
"请求服务端成功, url ={},param ={}"
,
url
,
param
);
return
result
;
}
...
...
@@ -347,6 +350,8 @@ public class SignHclcUtils {
if
(
Objects
.
nonNull
(
res
.
get
(
"words_result"
).
toString
()))
{
jsonObject
=
getJsonResult
(
res
);
}
logger
.
info
(
"OCR身份证识别成功, result ={}"
,
jsonObject
.
toString
());
return
jsonObject
;
}
...
...
@@ -366,6 +371,11 @@ public class SignHclcUtils {
if
(
Objects
.
nonNull
(
res
.
get
(
"words_result"
).
toString
()))
{
jsonObject
=
getJsonResult
(
res
);
}
if
(
Objects
.
nonNull
(
jsonObject
.
getString
(
"社会信用代码"
)))
{
jsonObject
.
put
(
"社会信用代码"
,
jsonObject
.
getString
(
"社会信用代码"
).
substring
(
0
,
18
));
}
logger
.
info
(
"OCR营业执照识别识别成功, result ={}"
,
jsonObject
.
toString
());
return
jsonObject
;
}
...
...
core/src/main/resources/logback.xml
View file @
e146b07e
...
...
@@ -11,6 +11,24 @@
</encoder>
</appender>
<appender
name=
"REQ"
class=
"ch.qos.logback.classic.sift.SiftingAppender"
>
<discriminator>
<key>
logName
</key>
<defaultValue>
default
</defaultValue>
</discriminator>
<sift>
<appender
name=
"REQ-${logName}"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<encoder>
<pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level [%X{userId}] [%X{requestId}] %logger - %msg%n
</pattern>
</encoder>
<file>
${catalina.base}/logs/hls-${logName}.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<fileNamePattern>
${catalina.base}/logs/%d{yyyy-MM-dd}/hls-${logName}.log
</fileNamePattern>
</rollingPolicy>
</appender>
</sift>
</appender>
<!-- <appender name="PLATFORM-FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level [%X{accountId}] [%X{requestId}] %logger - %msg%n</pattern>
...
...
@@ -62,7 +80,7 @@
<appender-ref
ref=
"STDOUT"
/>
</logger>
<logger
name=
"com.hand.app.esignHclc.utils.SignHclcUtils"
level=
"INFO"
additivity=
"false"
>
<appender-ref
ref=
"
STDOUT
"
/>
<appender-ref
ref=
"
REQ
"
/>
</logger>
<logger
name=
"com.timevale"
level=
"INFO"
additivity=
"false"
>
<appender-ref
ref=
"STDOUT"
/>
...
...
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