Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hnxtbaboot
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨亮
hnxtbaboot
Commits
62e0fd1d
Commit
62e0fd1d
authored
Sep 16, 2022
by
wuchengwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
中科虹霸推送
parent
9f17b442
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
14 deletions
+49
-14
hnxtba-interface/src/main/java/com/founder/controller/HmCjTsController.java
+37
-14
hnxtba-interface/src/main/java/com/founder/model/TsHmResultDto.java
+12
-0
No files found.
hnxtba-interface/src/main/java/com/founder/controller/HmCjTsController.java
View file @
62e0fd1d
...
...
@@ -693,11 +693,17 @@ public class HmCjTsController {
TsHmResultDto
tsHmResultDto
=
new
TsHmResultDto
();
String
sbcsdm
=
resultList
.
get
(
0
).
getSbcsdm
().
substring
(
resultList
.
get
(
0
).
getSbcsdm
().
length
()
-
4
);
if
(
IRIS_EQUIPMENT_ZKHB
.
equals
(
sbcsdm
))
{
HmResult
hmResult
=
new
HmResult
();
hmResult
.
setCjjg
(
"0"
);
hmResult
.
setXxms
(
"中科虹霸已推送!"
);
tsHmResultDto
.
setResult
(
hmResult
);
tsHmResultDto
.
setMessage
(
"中科虹霸!"
);
log
.
info
(
"进入中科虹霸"
);
//中科虹霸
jsonObject
=
sendHmxxToHongba
(
resultList
);
tsHmResultDto
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
jsonObject
),
TsHmResultDto
.
class
);
log
.
info
(
"中科虹霸转型赋值为{}"
,
tsHmResultDto
.
toString
());
if
(
tsHmResultDto
==
null
)
{
tsHmResultDto
=
new
TsHmResultDto
();
tsHmResultDto
.
setMessage
(
"中科虹霸返回参数为空!"
);
tsHmResultDto
.
setResult
(
new
HmResult
());
}
log
.
info
(
"中科虹霸返回结果:{}"
,
jsonObject
!=
null
?
jsonObject
.
toJSONString
()
:
"结果为空!"
);
}
else
if
(
IRIS_EQUIPMENT_YSKJ
.
equals
(
sbcsdm
))
{
//眼神科技
jsonObject
=
sendHmxxToYanShenTs
(
resultList
);
...
...
@@ -727,12 +733,25 @@ public class HmCjTsController {
//1-采集成功 2-虹膜已存在
for
(
TbStHm
hm
:
resultList
)
{
if
(
tsHmResultDto
!=
null
)
{
String
str
=
tsHmResultDto
.
getMessage
()
+
tsHmResultDto
.
getResult
().
getXxms
();
log
.
info
(
"tsHmResultDto值为:{}"
,
tsHmResultDto
.
toString
());
if
(!
"cjbh校验重复,数据重复上传"
.
equals
(
tsHmResultDto
.
getMessage
())){
String
str
=
""
;
try
{
str
=
tsHmResultDto
.
getMessage
()
+
(
tsHmResultDto
.
getResult
()
!=
null
?
tsHmResultDto
.
getResult
().
getXxms
():
null
);
}
catch
(
Exception
e
){
log
.
info
(
"空指针异常:{}"
,
e
.
getMessage
());
continue
;
}
hm
.
setTsjgmx
(
str
.
length
()
>
1500
?
str
.
substring
(
1500
):
str
);
if
(
tsHmResultDto
.
getResult
()
!=
null
&&
(
"1"
.
equals
(
tsHmResultDto
.
getResult
().
getCjjg
())
||
"2"
.
equals
(
tsHmResultDto
.
getResult
().
getCjjg
())))
{
hm
.
setSfts
(
"1"
);
// 将推送状态改为已推送
}
}
else
{
hm
.
setSfts
(
"1"
);
hm
.
setTsjgmx
(
tsHmResultDto
.
getMessage
());
}
hmCjService
.
updateHmSfts
(
hm
);
}
}
...
...
@@ -765,21 +784,22 @@ public class HmCjTsController {
Map
<
String
,
Object
>
res
=
new
HashMap
<>();
if
(
UNIT_ZZ
.
equals
(
codeunit
))
{
res
.
put
(
"client_id"
,
"
fangzheng
"
);
res
.
put
(
"client_secret"
,
"
fangzheng
"
);
res
.
put
(
"client_id"
,
"
hnfz
"
);
res
.
put
(
"client_secret"
,
"
hnfz
"
);
}
else
{
res
.
put
(
"client_id"
,
"
xietong
"
);
res
.
put
(
"client_secret"
,
"
xietong
"
);
res
.
put
(
"client_id"
,
"
hnfz
"
);
res
.
put
(
"client_secret"
,
"
hnfz
"
);
}
res
.
put
(
"version"
,
"1.
0
"
);
res
.
put
(
"version"
,
"1.
2.5.220601
"
);
Date
d
=
new
Date
();
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyyMMdd"
);
String
dateNowStr
=
sdf
.
format
(
d
);
String
unitcodenew
=
getNewCode
(
hmxxs
.
get
(
0
).
getUnitcode
());
//
String unitcodenew = getNewCode(hmxxs.get(0).getUnitcode());
if
(
hmxxs
.
get
(
0
).
getRequest_id
()
==
null
||
""
.
equals
(
hmxxs
.
get
(
0
).
getRequest_id
()))
{
res
.
put
(
"request_id"
,
"HMCJ-"
+
unitcodenew
+
"-"
+
"91110108797597536U"
+
"-"
+
dateNowStr
+
"-0001"
+
hmxxs
.
get
(
0
).
getRybh
().
substring
(
19
,
23
));
res
.
put
(
"request_id"
,
"HMCJ-"
+
hmxxs
.
get
(
0
).
getRybh
().
substring
(
1
,
13
)
+
"-"
+
"91110108797597536U"
+
"-"
+
dateNowStr
+
"-0001"
+
hmxxs
.
get
(
0
).
getRybh
().
substring
(
19
,
23
));
//res.put("request_id","HMCJ-"+user.getUnitcode()+"-"+"911101087740615606"+"-"+dateNowStr+"-0001"+asjxgrybh.substring(19,23));
}
else
{
log
.
info
(
"请求id不为空"
);
res
.
put
(
"request_id"
,
hmxxs
.
get
(
0
).
getRequest_id
());
}
Calendar
cal
=
Calendar
.
getInstance
();
...
...
@@ -797,7 +817,7 @@ public class HmCjTsController {
}
res
.
put
(
"ywfssj"
,
dateNowStr
+
hour
+
minute
+
second
);
res
.
put
(
"user_id"
,
hmxxs
.
get
(
0
).
getIdentitycard
());
res
.
put
(
"user_dept"
,
unitcodenew
);
res
.
put
(
"user_dept"
,
hmxxs
.
get
(
0
).
getRybh
().
substring
(
1
,
13
)
);
String
unitname
=
dicItemService
.
queryNameByCode
(
hmxxs
.
get
(
0
).
getUnitcode
(),
"CODE_UNIT"
);
if
(
unitname
==
null
||
""
.
equals
(
unitname
))
{
unitname
=
"湖南省公安厅"
;
...
...
@@ -868,6 +888,9 @@ public class HmCjTsController {
}
else
{
sfzh
=
hmxxs
.
get
(
0
).
getGmsfhm
();
}
if
(
StringUtils
.
isBlank
(
sfzh
)){
res
.
put
(
"bcjr_zjlxdm"
,
"999"
);
}
res
.
put
(
"bcjr_zjhm"
,
sfzh
);
res
.
put
(
"bcjr_xm"
,
hmxxs
.
get
(
0
).
getXm
());
res
.
put
(
"bcjr_xb"
,
hmxxs
.
get
(
0
).
getXbdm
());
...
...
hnxtba-interface/src/main/java/com/founder/model/TsHmResultDto.java
View file @
62e0fd1d
...
...
@@ -71,4 +71,16 @@ public class TsHmResultDto {
public
void
setResult
(
HmResult
result
)
{
this
.
result
=
result
;
}
@Override
public
String
toString
()
{
return
"TsHmResultDto{"
+
"status_code='"
+
status_code
+
'\''
+
", elapsed_time="
+
elapsed_time
+
", message='"
+
message
+
'\''
+
", version='"
+
version
+
'\''
+
", request_i='"
+
request_i
+
'\''
+
", result="
+
result
+
'}'
;
}
}
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