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
a6d91800
Commit
a6d91800
authored
Jun 02, 2021
by
5359
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
正式环境参数修改
parent
18c9ffa8
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
334 additions
and
62 deletions
+334
-62
SignHclcController.java
...om/hand/app/esignHclc/controllers/SignHclcController.java
+66
-0
SignHclcListenController.java
...d/app/esignHclc/controllers/SignHclcListenController.java
+13
-0
ISignInfoHclcService.java
.../com/hand/app/esignHclc/service/ISignInfoHclcService.java
+6
-0
SignInfoHclcServiceImpl.java
...d/app/esignHclc/service/impl/SignInfoHclcServiceImpl.java
+234
-58
SignHclcUtils.java
...main/java/com/hand/app/esignHclc/utils/SignHclcUtils.java
+12
-4
logback.xml
core/src/main/resources/logback.xml
+3
-0
No files found.
core/src/main/java/com/hand/app/esignHclc/controllers/SignHclcController.java
View file @
a6d91800
...
...
@@ -12,12 +12,16 @@ import com.hand.hap.core.IRequest;
import
com.hand.hap.system.controllers.BaseController
;
import
hls.support.core.wechat.formbean.AttachmentInfo
;
import
com.hand.hap.system.dto.ResponseData
;
import
org.apache.commons.codec.binary.Base64
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.IOException
;
import
java.util.*
;
/**
...
...
@@ -321,6 +325,39 @@ public class SignHclcController extends BaseController {
}
/**
* 获取人身核验地址
*
* @param request
* @param dto 获取人身核验地址
* @return Map
*/
@ResponseBody
@RequestMapping
(
"/auth/api/license/ocr"
)
public
JSONObject
getOcrLicense
(
HttpServletRequest
request
,
@RequestBody
SignUserInfoHclc
dto
)
{
String
img
=
""
;
String
realPath
=
"d:\\1610543886923.jpg"
;
File
file
=
new
File
(
realPath
);
FileInputStream
inputFile
;
byte
[]
buffer
=
null
;
try
{
inputFile
=
new
FileInputStream
(
file
);
buffer
=
new
byte
[(
int
)
file
.
length
()];
inputFile
.
read
(
buffer
);
inputFile
.
close
();
}
catch
(
IOException
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
img
=
Base64
.
encodeBase64String
(
buffer
);
return
signHclcService
.
ocrLicense
(
createRequestContext
(
request
),
img
);
}
/**
* 经办人授权/取消授权
*
...
...
@@ -530,6 +567,21 @@ public class SignHclcController extends BaseController {
}
/**
* 文件直传
*
* @param request
* @param dto 文件直传
* @return Map
*/
@ResponseBody
@RequestMapping
(
"/sign/files/download"
)
public
Map
<
String
,
Object
>
signFileDownload
(
HttpServletRequest
request
,
@RequestBody
AttachmentInfo
dto
)
{
return
signHclcService
.
signFileDownload
(
createRequestContext
(
request
),
dto
);
}
/**
* 创建签署流程
*
...
...
@@ -562,6 +614,20 @@ public class SignHclcController extends BaseController {
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/controllers/SignHclcListenController.java
View file @
a6d91800
...
...
@@ -51,4 +51,17 @@ public class SignHclcListenController extends BaseController {
responseData
.
setMessage
(
"接收成功!"
);
return
responseData
;
}
@ResponseBody
@RequestMapping
(
value
=
"/api/public/user"
,
method
=
RequestMethod
.
POST
)
public
JSONObject
posttest
(
HttpServletRequest
request
,
@RequestBody
(
required
=
false
)
JSONObject
params
)
{
JSONObject
responseData
=
new
JSONObject
();
responseData
.
put
(
"objectVersionNumber"
,
1
);
responseData
.
put
(
"_token"
,
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9/eyJhdWQiOlsiYXBpLXJlc291cmNlIl0sInVzZXJfbmFt=="
);
responseData
.
put
(
"id"
,
1
);
responseData
.
put
(
"code"
,
"lishuangyi"
);
responseData
.
put
(
"name"
,
"黎双意"
);
return
responseData
;
}
}
core/src/main/java/com/hand/app/esignHclc/service/ISignInfoHclcService.java
View file @
a6d91800
...
...
@@ -33,8 +33,12 @@ public interface ISignInfoHclcService extends IBaseService<SignUserInfoHclc>, Pr
Map
<
String
,
Object
>
signFileUpload
(
IRequest
requestContext
,
AttachmentInfo
dto
);
Map
<
String
,
Object
>
signFileDownload
(
IRequest
requestContext
,
AttachmentInfo
dto
);
JSONObject
createSignFlows
(
IRequest
requestContext
,
JSONObject
params
);
JSONObject
cancelSignFlows
(
IRequest
requestContext
,
JSONObject
params
);
String
createTemplateSeals
(
String
accountId
,
String
openId
);
// JSONObject cancelSignFlows(IRequest requestContext, JSONObject params);
...
...
@@ -42,4 +46,6 @@ public interface ISignInfoHclcService extends IBaseService<SignUserInfoHclc>, Pr
void
postSignFlowsResult
(
IRequest
iRequest
,
JSONObject
params
);
JSONObject
sendWxTemplateMsg
(
JSONObject
json
);
JSONObject
ocrLicense
(
IRequest
iRequest
,
String
img
);
}
core/src/main/java/com/hand/app/esignHclc/service/impl/SignInfoHclcServiceImpl.java
View file @
a6d91800
This diff is collapsed.
Click to expand it.
core/src/main/java/com/hand/app/esignHclc/utils/SignHclcUtils.java
View file @
a6d91800
...
...
@@ -116,11 +116,19 @@ public class SignHclcUtils {
inStream
.
close
();
result
=
strber
.
toString
();
if
(!
urls
.
contains
(
"v2/identity/auth/api/ocr/license"
))
{
if
(
httpResponse
.
getStatusLine
().
getStatusCode
()
==
200
)
{
logger
.
info
(
"请求服务器成功, urls ={},params ={} ,contentType ={} ,result ={}"
,
urls
,
params
.
toString
(),
contentType
,
result
);
}
else
{
logger
.
info
(
"请求服务端失败, urls ={},params ={} ,contentType ={} ,result ={}"
,
urls
,
params
.
toString
(),
contentType
,
result
);
}
}
else
{
if
(
httpResponse
.
getStatusLine
().
getStatusCode
()
==
200
)
{
logger
.
info
(
"请求服务器成功, urls ={},contentType ={} ,result ={}"
,
urls
,
contentType
,
result
);
}
else
{
logger
.
info
(
"请求服务端失败, urls ={},contentType ={} ,result ={}"
,
urls
,
contentType
,
result
);
}
}
return
result
;
}
catch
(
Exception
var12
)
{
...
...
core/src/main/resources/logback.xml
View file @
a6d91800
...
...
@@ -82,6 +82,9 @@
<logger
name=
"com.hand.app.esignHclc.utils.SignHclcUtils"
level=
"INFO"
additivity=
"false"
>
<appender-ref
ref=
"REQ"
/>
</logger>
<logger
name=
"com.hand.app.esignHclc.service.impl.SignInfoHclcServiceImpl"
level=
"INFO"
additivity=
"false"
>
<appender-ref
ref=
"REQ"
/>
</logger>
<logger
name=
"com.timevale"
level=
"INFO"
additivity=
"false"
>
<appender-ref
ref=
"STDOUT"
/>
</logger>
...
...
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