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
38a62aea
Commit
38a62aea
authored
Aug 12, 2021
by
5359
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
中登网开发
parent
4af0a560
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
17 deletions
+18
-17
ZdwWsRequestsServiceImpl.java
.../zhongDengWang/service/impl/ZdwWsRequestsServiceImpl.java
+10
-9
ClientInitReg.java
.../java/com/hand/app/zhongDengWang/utils/ClientInitReg.java
+8
-8
No files found.
core/src/main/java/com/hand/app/zhongDengWang/service/impl/ZdwWsRequestsServiceImpl.java
View file @
38a62aea
package
com
.
hand
.
app
.
zhongDengWang
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.hand.app.zhongDengWang.service.IZdwWsRequestsService
;
import
com.hand.app.zhongDengWang.dto.ZdwLoginTokenInterface
;
...
...
@@ -14,18 +13,18 @@ import com.hand.app.zhongDengWang.mapper.ZdwLoginTokenInterfaceMapper;
import
com.hand.app.zhongDengWang.mapper.FndZhongDengLinesMapper
;
import
com.hand.app.zhongDengWang.mapper.FndZhongDengBatchMapper
;
import
com.hand.app.zhongDengWang.utils.ClientUtils
;
import
com.hand.app.zhongDengWang.ws.init.WSInitRegisterService
;
import
com.hand.app.zhongDengWang.ws.init.WSInitRegisterServiceService
;
import
com.hand.app.zhongDengWang.ws.terminate.WSTerminateRegisterService
;
import
com.hand.app.zhongDengWang.ws.terminate.WSTerminateRegisterServiceService
;
import
com.hand.app.zhongDengWang.ws.amend.WSAmendRegisterService
;
import
com.hand.app.zhongDengWang.ws.amend.WSAmendRegisterServiceService
;
import
com.hand.app.zhongDengWang.ws.extend.WSExtendRegisterService
;
import
com.hand.app.zhongDengWang.ws.extend.WSExtendRegisterServiceService
;
import
com.hand.app.zhongDengWang.ws.init.WSInitRegisterService
;
import
com.hand.app.zhongDengWang.ws.init.WSInitRegisterServiceService
;
import
com.hand.app.zhongDengWang.ws.login.WSLoginService
;
import
com.hand.app.zhongDengWang.ws.login.WSLoginServiceService
;
import
com.hand.app.zhongDengWang.dto.FndAtmAttachmentDto
;
import
com.hand.app.zhongDengWang.mapper.FndAtmAttachmentMapper
;
import
com.hand.app.zhongDengWang.ws.terminate.WSTerminateRegisterService
;
import
com.hand.app.zhongDengWang.ws.terminate.WSTerminateRegisterServiceService
;
import
com.hand.hap.core.IRequest
;
import
com.hand.hap.lock.components.DatabaseLockProvider
;
import
com.hand.hap.system.dto.DTOStatus
;
...
...
@@ -332,6 +331,7 @@ public class ZdwWsRequestsServiceImpl implements IZdwWsRequestsService {
/*根据传入ids循环上报中登网*/
synchronized
(
lock
)
{
for
(
FndZhongDengBatch
batch
:
fndZhongDengBatches
)
{
/*根据批次id获取该批次下所有上报行id*/
FndZhongDengLines
fndZhongDengLines
=
new
FndZhongDengLines
();
fndZhongDengLines
.
setLineId
(
batch
.
getLineId
());
fndZhongDengLines
=
fndZhongDengLinesMapper
.
selectByPrimaryKey
(
fndZhongDengLines
);
...
...
@@ -342,6 +342,7 @@ public class ZdwWsRequestsServiceImpl implements IZdwWsRequestsService {
String
xmlFileContent
=
""
;
String
attachmentZipPath
=
""
;
/*获取xml报文文件所在路径*/
FndAtmAttachmentDto
fndAtmAttachmentDto
=
new
FndAtmAttachmentDto
();
fndAtmAttachmentDto
.
setAttachmentId
(
fndZhongDengLines
.
getAttachmentXmlId
());
fndAtmAttachmentDto
=
fndAtmAttachmentMapper
.
selectByPrimaryKey
(
fndAtmAttachmentDto
);
...
...
@@ -349,7 +350,7 @@ public class ZdwWsRequestsServiceImpl implements IZdwWsRequestsService {
/*解析xml文件内容*/
xmlFileContent
=
new
String
(
Objects
.
requireNonNull
(
ClientUtils
.
getxmlFileContent
(
fndAtmAttachmentDto
.
getFilePath
())));
/*
插入接口日志表
*/
/*
初始登记
*/
if
(
"INIT"
.
equalsIgnoreCase
(
fndZhongDengLines
.
getUpStage
()))
{
resultJson
=
registerInit
(
fndZhongDengLines
.
getTypebz
(),
platformAuthCode
,
loginToken
,
fndAtmAttachmentDto
.
getFileName
(),
xmlFileContent
,
fndZhongDengLines
.
getLineId
());
}
...
...
@@ -395,8 +396,6 @@ public class ZdwWsRequestsServiceImpl implements IZdwWsRequestsService {
fndZhongDengLines
.
setReturnMsg
(
error
);
}
fndZhongDengLines
.
setUpDate
(
new
Date
());
fndZhongDengLines
.
set__status
(
DTOStatus
.
UPDATE
);
}
catch
(
RuntimeException
e
)
{
e
.
printStackTrace
();
}
catch
(
Exception
e
)
{
...
...
@@ -405,6 +404,8 @@ public class ZdwWsRequestsServiceImpl implements IZdwWsRequestsService {
fndZhongDengLines
.
setUpStatus
(
"FAIL"
);
fndZhongDengLines
.
setReturnMsg
(
e
.
getMessage
());
}
fndZhongDengLines
.
setUpDate
(
new
Date
());
fndZhongDengLines
.
set__status
(
DTOStatus
.
UPDATE
);
fndZhongDengLinesList
.
add
(
fndZhongDengLines
);
}
}
...
...
@@ -462,7 +463,7 @@ public class ZdwWsRequestsServiceImpl implements IZdwWsRequestsService {
cachedThreadPool
.
execute
(
new
Runnable
()
{
@Override
public
void
run
()
{
// d
// d
o
try
{
registerThread
(
request
,
fndZhongDengBatchList
,
loginToken
);
}
catch
(
Exception
e
)
{
...
...
core/src/main/java/com/hand/app/zhongDengWang/utils/ClientInitReg.java
View file @
38a62aea
...
...
@@ -46,10 +46,10 @@ public class ClientInitReg {
//登记内容xml
String
xmlFileContent
=
""
;
try
{
loginToken
=
SM2Utils
.
encryptByKeyStr
(
loginToken
,
clientKey
);
//
loginToken = SM2Utils.encryptByKeyStr(loginToken, clientKey);
xmlFileContent
=
new
String
(
getxmlFileContent
());
xmlFileContent
=
SM2Utils
.
encryptByKeyStr
(
xmlFileContent
,
clientKey
);
platformAuthCode
=
SM2Utils
.
encryptByKeyStr
(
platformAuthCode
,
clientKey
);
//
xmlFileContent = SM2Utils.encryptByKeyStr(xmlFileContent,clientKey);
//
platformAuthCode=SM2Utils.encryptByKeyStr(platformAuthCode,clientKey);
}
catch
(
IOException
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
...
...
@@ -65,11 +65,11 @@ public class ClientInitReg {
}
WSInitRegisterServiceService
service
=
new
WSInitRegisterServiceService
();
WSInitRegisterService
reg
=
service
.
getWSInitRegisterServicePort
();
byte
[]
returns
=
reg
.
initRegister
(
"AT"
.
getBytes
(),
platformAuthCode
.
getBytes
(),
loginToken
.
getBytes
(),
"lr"
.
getBytes
(),
xmlFileContent
.
getBytes
(),
getAttachmentZip
());
System
.
out
.
println
(
"dddd"
+
new
String
(
returns
));
//
WSInitRegisterServiceService service=new WSInitRegisterServiceService();
//
WSInitRegisterService reg=service.getWSInitRegisterServicePort();
//
//
byte[] returns = reg.initRegister("AT".getBytes(),platformAuthCode.getBytes(), loginToken.getBytes(), "lr".getBytes(), xmlFileContent.getBytes(), getAttachmentZip());
//
System.out.println("dddd"+new String(returns));
}
...
...
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