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
760f7918
Commit
760f7918
authored
Jun 05, 2023
by
yangliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
眼神科技虹膜增加推送万里红省库流程,同时增加虹膜编号获取方法
parent
a1a74728
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
254 additions
and
2 deletions
+254
-2
src/main/java/com/founder/controller/HmCjController.java
+190
-1
src/main/resources/mapper/loginSqlMap.xml
+1
-1
src/main/resources/static/hmcj/js/yskj.js
+19
-0
src/main/resources/static/xtba/login/images/index_4600.png
+0
-0
src/main/resources/templates/rygl/addryxx.html
+44
-0
No files found.
src/main/java/com/founder/controller/HmCjController.java
View file @
760f7918
package
com
.
founder
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONException
;
import
com.alibaba.fastjson.JSONObject
;
...
...
@@ -13,6 +14,8 @@ import com.founder.service.IHmCjService;
import
com.founder.service.IParamService
;
import
com.founder.utils.FileUtils
;
import
org.apache.commons.codec.binary.Base64
;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
import
org.apache.http.NameValuePair
;
import
org.apache.http.message.BasicNameValuePair
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -40,11 +43,14 @@ import java.util.*;
import
java.util.concurrent.ExecutionException
;
import
java.util.concurrent.Future
;
import
static
com
.
founder
.
model
.
Constant
.
SUBSTR_FOURTEEN
;
/**
* 虹膜采集Controller
*/
@Controller
public
class
HmCjController
{
private
static
Log
log
=
LogFactory
.
getLog
(
HmCjController
.
class
);
@Autowired
private
IHmCjService
hmCjService
;
...
...
@@ -416,7 +422,8 @@ public class HmCjController {
Date
d
=
new
Date
();
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyyMMdd"
);
String
dateNowStr
=
sdf
.
format
(
d
);
res
.
put
(
"request_id"
,
"HMCJ-"
+
user
.
getUnitcode
()+
"-"
+
"911101087740615606"
+
"-"
+
dateNowStr
+
"-0001"
+
asjxgrybh
.
substring
(
19
,
23
));
//res.put("request_id","HMCJ-"+user.getUnitcode()+"-"+"911101087740615606"+"-"+dateNowStr+"-0001"+asjxgrybh.substring(19,23));
res
.
put
(
"request_id"
,
"HMCJ-"
+
user
.
getUnitcode
()+
"-"
+
"91110108797597536U"
+
"-"
+
dateNowStr
+
"-0001"
+
asjxgrybh
.
substring
(
19
,
23
));
}
else
{
res
.
put
(
"request_id"
,
hmxxs
.
get
(
0
).
getRequest_id
());
}
...
...
@@ -639,6 +646,136 @@ public class HmCjController {
return
msg
;
}
@RequestMapping
(
"/sendHmxxToWlh"
)
@ResponseBody
public
boolean
sendHmxxToWlh
(
Model
model
,
String
asjxgrybh
,
HttpServletRequest
request
){
List
<
TbStHm
>
hmxxs
=
hmCjService
.
getHmxxInfoList
(
asjxgrybh
);
AutoTbStRy
xyrC
=
rycjService
.
getRyxxByRybh
(
asjxgrybh
);
//Param param = paramService.getParamById("0103");
String
urlstr
=
"http://74.6.54.187/special/uploadFZKJ"
;
//String allIp = param.getParamvalue();
//String arr_ip[] = allIp.split("#");
//String codeunit = asjxgrybh.substring(1,5);
//for(int i = 0;i<arr_ip.length;i++){
// if(arr_ip[i]!=null&&arr_ip[i].startsWith(codeunit)){
// urlstr = arr_ip[i].substring(5);
// break;
// }
//}
if
(
urlstr
==
null
||
""
.
equals
(
urlstr
)){
//urlstr = "http://124.192.224.46:9017/special/uploadFZKJ";
urlstr
=
"http://74.6.54.187/special/uploadFZKJ"
;
}
User
user
=
(
User
)
request
.
getSession
().
getAttribute
(
"User"
);
Map
<
String
,
Object
>
res
=
new
HashMap
<>();
//res.put("appID", "HuNSDK");
//res.put("appPWD", "HuNSDK12345");
res
.
put
(
"appID"
,
"HaiNSDKxt"
);
res
.
put
(
"appPWD"
,
"HaiNSDKxt123"
);
res
.
put
(
"version"
,
"1.0"
);
Date
d
=
new
Date
();
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyyMMdd"
);
String
dateNowStr
=
sdf
.
format
(
d
);
String
unitcodenew
=
user
.
getUnitcode
();
if
(
hmxxs
.
get
(
0
).
getRequest_id
()==
null
||
""
.
equals
(
hmxxs
.
get
(
0
).
getRequest_id
())){
//res.put("request_id","HMCJ-"+unitcodenew+"-"+"91110108X00380429T"+"-"+dateNowStr+"-0001"+asjxgrybh.substring(19,23));
res
.
put
(
"request_id"
,
"HMCJ-"
+
unitcodenew
+
"-"
+
"911101087740615606"
+
"-"
+
dateNowStr
+
"-0001"
+
asjxgrybh
.
substring
(
19
,
23
));
}
else
{
res
.
put
(
"request_id"
,
hmxxs
.
get
(
0
).
getRequest_id
());
}
Calendar
cal
=
Calendar
.
getInstance
();
String
hour
=
cal
.
get
(
Calendar
.
HOUR
)+
""
;
String
minute
=
cal
.
get
(
Calendar
.
MINUTE
)+
""
;
String
second
=
cal
.
get
(
Calendar
.
SECOND
)+
""
;
if
(
hour
.
length
()==
1
){
hour
=
"0"
+
hour
;
}
if
(
minute
.
length
()==
1
){
minute
=
"0"
+
minute
;
}
if
(
second
.
length
()==
1
){
second
=
"0"
+
second
;
}
res
.
put
(
"ywfssj"
,
dateNowStr
+
hour
+
minute
+
second
);
res
.
put
(
"user_id"
,
user
.
getIdentitycard
());
res
.
put
(
"user_dept"
,
unitcodenew
);
//res.put("user_dept","881000000000");
String
unitname
=
dicItemService
.
queryNameByCode
(
user
.
getUnitcode
(),
"CODE_UNIT"
);
if
(
unitname
==
null
||
""
.
equals
(
unitname
)){
unitname
=
"海南省公安厅"
;
}
res
.
put
(
"user_deptname"
,
unitname
);
if
(
hmxxs
.
get
(
0
).
getSbcsdm
()==
null
||
""
.
equals
(
hmxxs
.
get
(
0
).
getSbcsdm
())){
res
.
put
(
"sbcsdm"
,
"911101087740615606"
);
}
else
{
res
.
put
(
"sbcsdm"
,
hmxxs
.
get
(
0
).
getSbcsdm
());
}
res
.
put
(
"sbxh"
,
"05"
);
if
(
hmxxs
.
get
(
0
).
getSbbh
()==
null
||
""
.
equals
(
hmxxs
.
get
(
0
).
getSbbh
())){
hmxxs
.
get
(
0
).
setSbbh
(
"ECI102_926499991110108774061560600000"
);
res
.
put
(
"sbbh"
,
"ECI102_926499991110108774061560600000"
);
}
else
{
res
.
put
(
"sbbh"
,
hmxxs
.
get
(
0
).
getSbbh
());
}
res
.
put
(
"cjcd"
,
"11"
);
res
.
put
(
"dzmc"
,
xyrC
.
getXzzDzmc
());
res
.
put
(
"jd"
,
""
);
res
.
put
(
"wd"
,
""
);
res
.
put
(
"cjbh"
,
"HM"
+
xyrC
.
getRybh
().
substring
(
1
,
13
)+
dateNowStr
+
"01"
+
xyrC
.
getRybh
().
substring
(
19
,
23
));
res
.
put
(
"cjr_xm"
,
user
.
getTrueName
());
res
.
put
(
"cjr_gmsfhm"
,
user
.
getIdentitycard
());
res
.
put
(
"zyycjdm"
,
"1"
);
for
(
int
i
=
0
;
i
<
hmxxs
.
size
();
i
++){
TbStHm
hm
=
hmxxs
.
get
(
i
);
if
(
"0"
.
equals
(
hm
.
getHmywdm
())){
res
.
put
(
"zyqsqkdm"
,
hm
.
getHmqsqk
());
res
.
put
(
"hmzp_zy"
,
new
BASE64Encoder
().
encode
(
hm
.
getHmsj
()).
replace
(
"\r\n"
,
""
));
res
.
put
(
"zy_xxzlpf"
,
"82"
);
}
else
if
(
"1"
.
equals
(
hm
.
getHmywdm
())){
res
.
put
(
"yyqsqkdm"
,
hm
.
getHmqsqk
());
res
.
put
(
"hmzp_yy"
,
new
BASE64Encoder
().
encode
(
hm
.
getHmsj
()).
replace
(
"\r\n"
,
""
));
res
.
put
(
"yy_xxzlpf"
,
"86"
);
}
}
res
.
put
(
"cjtphs"
,
"1.825"
);
res
.
put
(
"bcjr_rylb"
,
"026"
);
res
.
put
(
"zjbz"
,
"1"
);
res
.
put
(
"lrbz"
,
"2"
);
res
.
put
(
"qzcjbz"
,
"1"
);
res
.
put
(
"bcjr_zjlxdm"
,
"111"
);
String
sfzh
=
""
;
if
(
xyrC
.
getGmsfhm
()==
null
||
""
.
equals
(
xyrC
.
getGmsfhm
())){
sfzh
=
xyrC
.
getZjhm
();
}
else
{
sfzh
=
xyrC
.
getGmsfhm
();
}
res
.
put
(
"bcjr_zjhm"
,
sfzh
);
res
.
put
(
"bcjr_xm"
,
xyrC
.
getXm
());
res
.
put
(
"bcjr_xb"
,
xyrC
.
getXbdm
());
if
(
sfzh
!=
null
&&
sfzh
.
length
()>
SUBSTR_FOURTEEN
){
res
.
put
(
"bcjr_csrq"
,
sfzh
.
substring
(
6
,
10
)+
"-"
+
sfzh
.
substring
(
10
,
12
)+
"-"
+
sfzh
.
substring
(
12
,
14
));
}
else
{
res
.
put
(
"bcjr_csrq"
,
""
);
}
res
.
put
(
"bcjr_mz"
,
xyrC
.
getMzdm
());
res
.
put
(
"bcjr_gj"
,
xyrC
.
getGjdm
());
res
.
put
(
"bcjr_zjqfjg"
,
""
);
res
.
put
(
"bcjr_zjyxqx"
,
""
);
res
.
put
(
"bcjr_hjdz"
,
xyrC
.
getHjdzXzqhdm
());
res
.
put
(
"bcjr_jzdz"
,
xyrC
.
getXzzXzqhdm
());
res
.
put
(
"bcjr_sjhm1"
,
xyrC
.
getLxdm
());
res
.
put
(
"bcjr_sjhm2"
,
xyrC
.
getLxdm2
());
res
.
put
(
"zjzp"
,
xyrC
.
getEdzzpStr64
());
log
.
info
(
"万里红虹膜数据推送接口地址:"
+
urlstr
);
JSONObject
jsonResult
=
FileUtils
.
requestByPost
(
urlstr
,
res
);
log
.
info
(
jsonResult
.
toJSONString
());
boolean
bool
=
true
;
return
bool
;
}
@RequestMapping
(
"/hmxxCy"
)
@ResponseBody
public
boolean
hmxxCy
(
Model
model
,
String
asjxgrybh
,
HttpServletRequest
request
){
...
...
@@ -869,4 +1006,55 @@ public class HmCjController {
}
return
rstmap
;
}
@ResponseBody
@RequestMapping
(
"/getIrisNumber"
)
public
Map
<
String
,
Object
>
getIrisNumber
(
String
zjlxdm
,
String
cxzjhm
,
String
urlstr
)
{
Map
<
String
,
Object
>
res
=
new
HashMap
<>();
Map
<
String
,
Object
>
testres
=
new
HashMap
<>();
Map
<
String
,
Object
>
testres1
=
new
HashMap
<>();
res
.
put
(
"bcjr_zjlxdm"
,
zjlxdm
);
res
.
put
(
"bcjr_zjhm"
,
cxzjhm
);
//testres.put("status_code", "1000");
//testres.put("elapsed_time", "1.865");
//testres.put("message", "获取成功");
//testres1.put("sfcj", "1");
//testres1.put("cjbh", "HM4600000000002023050500000001");
//testres.put("result", testres1);
//JSONObject jsonResult= JSONObject.parseObject(JSON.toJSONString(testres));
JSONObject
jsonResult
=
FileUtils
.
requestByPost
(
urlstr
,
res
);
Map
<
String
,
Object
>
rstmap
=
new
HashMap
<
String
,
Object
>();
if
(
jsonResult
!=
null
){
System
.
out
.
println
(
"jsonResult====="
+
jsonResult
);
String
status_code
=
jsonResult
.
getString
(
"status_code"
);
if
(
"1000"
.
equals
(
status_code
)){
JSONObject
jso
=
jsonResult
.
getJSONObject
(
"result"
);
if
(
jso
!=
null
){
String
sfcj
=
jso
.
getString
(
"sfcj"
);
String
cjbh
=
jso
.
getString
(
"cjbh"
);
if
(
"1"
.
equals
(
sfcj
)){
rstmap
.
put
(
"code"
,
"0"
);
rstmap
.
put
(
"msg"
,
"虹膜采集编号:"
+
cjbh
);
}
else
{
rstmap
.
put
(
"code"
,
"1"
);
rstmap
.
put
(
"msg"
,
"虹膜库无该人员虹膜采集编号!"
);
}
}
else
{
rstmap
.
put
(
"code"
,
"1"
);
rstmap
.
put
(
"msg"
,
"获取虹膜采集编号为空!"
);
}
}
else
{
rstmap
.
put
(
"code"
,
"1"
);
rstmap
.
put
(
"msg"
,
"调用虹膜库接口报错!"
);
}
}
else
{
rstmap
.
put
(
"code"
,
"1"
);
rstmap
.
put
(
"msg"
,
"获取虹膜采集编号为空!"
);
}
return
rstmap
;
}
}
\ No newline at end of file
src/main/resources/mapper/loginSqlMap.xml
View file @
760f7918
...
...
@@ -204,7 +204,7 @@
t.true_name trueName,(select name from sys_dictitem s where s.groupid='CODE_UNIT' and s.code = t.unitcode) as unitname from SYS_USER t where 1=1
and scbz='0'
and username=#{userName}
and password_y
r
hcj=#{password}
and password_y
t
hcj=#{password}
</select>
<update
id=
"updateUser"
parameterType=
"com.founder.model.User"
>
...
...
src/main/resources/static/hmcj/js/yskj.js
View file @
760f7918
...
...
@@ -261,6 +261,25 @@ function yshmts(){
data
:
{
"asjxgrybh"
:
rybh
},
dataType
:
"json"
,
success
:
function
(
data
){
wlhhmts
();
},
error
:
function
(
e
){
console
.
log
(
"error="
+
JSON
.
stringify
(
e
));
wlhhmts
();
}
});
}
function
wlhhmts
(){
//equipID();
//window.open("/testImages?zwbh="+$("#rybh").val()+"&xm="+$("#xm").val()+"&gmsfhm="+$("#zjhm").val());
var
rybh
=
window
.
opener
.
document
.
getElementById
(
"rybh"
).
value
;
$
.
ajax
({
type
:
"POST"
,
url
:
"/sendHmxxToWlh"
,
data
:
{
"asjxgrybh"
:
rybh
},
dataType
:
"json"
,
success
:
function
(
data
){
window
.
close
();
},
error
:
function
(
e
){
...
...
src/main/resources/static/xtba/login/images/index_4600.png
0 → 100644
View file @
760f7918
51.5 KB
src/main/resources/templates/rygl/addryxx.html
View file @
760f7918
...
...
@@ -347,6 +347,7 @@
if
(
data
!=
null
){
debugger
if
(
data
.
hm
>
0
){
$
(
"#hmifcj"
).
attr
(
"src"
,
"/static/rygl/img/yes.png"
);
$
(
'#hmbh'
).
css
(
'display'
,
''
);
}
if
(
data
.
zj
>
0
){
$
(
"#zjifcj"
).
attr
(
"src"
,
"/static/rygl/img/yes.png"
);
...
...
@@ -572,11 +573,13 @@
if
(
hmleftStr64
!=
null
&&
hmleftStr64
!=
""
){
$
(
"#imghead21"
).
attr
(
"src"
,
"data:image/jpg;base64,"
+
hmleftStr64
);
$
(
"#hmifcj"
).
attr
(
"src"
,
"/static/rygl/img/yes.png"
);
$
(
'#hmbh'
).
css
(
'display'
,
''
);
}
var
hmrightStr64
=
$
(
"#r_hmRightBase64"
).
val
();
if
(
hmrightStr64
!=
null
&&
hmrightStr64
!=
""
){
$
(
"#imghead22"
).
attr
(
"src"
,
"data:image/jpg;base64,"
+
hmrightStr64
);
$
(
"#hmifcj"
).
attr
(
"src"
,
"/static/rygl/img/yes.png"
);
$
(
'#hmbh'
).
css
(
'display'
,
''
);
}
var
tstz1Base64
=
$
(
"#tstz1Base64"
).
val
();
if
(
tstz1Base64
!=
null
&&
tstz1Base64
!=
""
){
...
...
@@ -783,6 +786,7 @@
}
if
(
$
(
"#hmzt"
).
val
()
==
"1"
){
$
(
"#hmifcj"
).
attr
(
"src"
,
"/static/rygl/img/yes.png"
);
$
(
'#hmbh'
).
css
(
'display'
,
''
);
}
if
(
$
(
"#zjzt"
).
val
()
==
"1"
){
$
(
"#zjifcj"
).
attr
(
"src"
,
"/static/rygl/img/yes.png"
);
...
...
@@ -2214,6 +2218,7 @@
$
(
"#imghead21"
).
attr
(
"src"
,
"data:image/jpg;base64,"
+
rresult
.
hmzp_zy
);
$
(
"#imghead22"
).
attr
(
"src"
,
"data:image/jpg;base64,"
+
rresult
.
hmzp_yy
);
$
(
"#hmifcj"
).
attr
(
"src"
,
"/static/rygl/img/yes.png"
);
$
(
'#hmbh'
).
css
(
'display'
,
''
);
$
(
"#sbxh"
).
val
(
"wlh"
);
$
(
"#hmzt"
).
val
(
"1"
);
$
.
ajax
({
...
...
@@ -2275,6 +2280,44 @@
}
window
.
open
(
"/toSswpcj?asjxgrybh="
+
$
(
"#rybh"
).
val
()
+
"&xm="
+
$
(
"#xm"
).
val
()
+
"&gmsfhm="
+
$
(
"#gmsfhm"
).
val
());
}
//获取虹膜采集编号
function
getHmcjbh
(){
var
gmsfhm
=
$
(
'#gmsfhm'
).
val
();
var
cyzjdm
=
$
(
"#cyzjdm"
).
combobox
(
"getValue"
);
var
zjhm
=
$
(
'#zjhm'
).
val
();
var
zjlxdm
=
"111"
;
var
cxzjhm
=
""
;
if
(
gmsfhm
==
null
||
gmsfhm
==
''
){
if
(
cyzjdm
>
990
){
zjlxdm
=
"999"
;
}
else
{
zjlxdm
=
cyzjdm
;
}
cxzjhm
=
zjhm
;
}
else
{
cxzjhm
=
gmsfhm
;
}
$
.
ajax
({
url
:
"/getIrisNumber"
,
data
:
{
"zjlxdm"
:
zjlxdm
,
"cxzjhm"
:
cxzjhm
,
"urlstr"
:
"http://74.6.54.187/infoMaintain/getIrisNumber"
},
async
:
false
,
type
:
"post"
,
dataType
:
"json"
,
success
:
function
(
data
){
var
code
=
data
.
code
if
(
code
==
"0"
){
$
.
messager
.
alert
(
'信息获取成功'
,
data
.
msg
);
}
else
{
$
.
messager
.
alert
(
'提示'
,
data
.
msg
);
}
},
error
:
function
(
e
){
//console.log("error="+JSON.stringify(e));
$
.
messager
.
alert
(
'提示'
,
"获取虹膜编号接口异常!"
);
}
});
}
</script>
</head>
...
...
@@ -3051,6 +3094,7 @@
<li
id=
"dna"
><a
onclick=
"openDialog_DNADY()"
><i
class=
"fa fa-print"
></i>
打印DNA标签
</a></li>
<li><a
href=
"javascript:prtzw()"
><i
class=
"fa fa-print"
></i>
打印指纹卡
</a></li>
<li
id=
"zwksm"
style=
"display: none;"
><a
onclick=
"showScan()"
><i
class=
"fa fa-barcode"
></i>
指纹卡扫描
</a></li>
<li
id=
"hmbh"
style=
"display: none;"
><a
onclick=
"getHmcjbh()"
><i
class=
"fa fa-barcode"
></i>
获取虹膜编号
</a></li>
<li
style=
"display: none;"
><a
onclick=
"rxbc()"
><i
class=
"fa fa-barcode"
></i>
生成人像
</a></li>
<li
style=
"margin-top:30px;"
><a
href=
"javascript:toCzsmxz()"
><i
class=
"fa fa-print"
></i>
操作说明文档下载
</a></li>
...
...
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