Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xzxt-api-report
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
雷紫添
xzxt-api-report
Commits
21fe5276
Commit
21fe5276
authored
Sep 09, 2019
by
雷紫添
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加身份证验证
parent
396a8955
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
11 deletions
+17
-11
src/main/java/com/founder/common/IdentityCardVerification.java
+1
-4
src/main/java/com/founder/controller/JccjController.java
+10
-4
src/main/java/com/founder/task/ScheduleTask.java
+1
-0
src/main/java/com/founder/test.java
+1
-1
src/main/resources/application-dev.yml
+4
-2
No files found.
src/main/java/com/founder/common/IdentityCardVerification.java
View file @
21fe5276
...
@@ -16,15 +16,12 @@ public class IdentityCardVerification {
...
@@ -16,15 +16,12 @@ public class IdentityCardVerification {
System.out.println(IdentityCardVerification("110101199003074370"));
System.out.println(IdentityCardVerification("110101199003074370"));
}*/
}*/
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
IdentityCardVerification
(
"152105199609301229"
));
}
/**
/**
*身份证验证
*身份证验证
* @param idStr
* @param idStr
* @return
* @return
*/
*/
public
static
String
IdentityCardVerification
(
String
idStr
){
public
String
IdentityCardVerification
(
String
idStr
){
String
[]
wf
=
{
"1"
,
"0"
,
"x"
,
"9"
,
"8"
,
"7"
,
"6"
,
"5"
,
"4"
,
"3"
,
"2"
};
String
[]
wf
=
{
"1"
,
"0"
,
"x"
,
"9"
,
"8"
,
"7"
,
"6"
,
"5"
,
"4"
,
"3"
,
"2"
};
String
[]
checkCode
=
{
"7"
,
"9"
,
"10"
,
"5"
,
"8"
,
"4"
,
"2"
,
"1"
,
"6"
,
"3"
,
"7"
,
"9"
,
"10"
,
"5"
,
"8"
,
"4"
,
"2"
};
String
[]
checkCode
=
{
"7"
,
"9"
,
"10"
,
"5"
,
"8"
,
"4"
,
"2"
,
"1"
,
"6"
,
"3"
,
"7"
,
"9"
,
"10"
,
"5"
,
"8"
,
"4"
,
"2"
};
String
iDCardNo
=
""
;
String
iDCardNo
=
""
;
...
...
src/main/java/com/founder/controller/JccjController.java
View file @
21fe5276
...
@@ -4,10 +4,7 @@ package com.founder.controller;
...
@@ -4,10 +4,7 @@ package com.founder.controller;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.founder.common.CodeMsg
;
import
com.founder.common.*
;
import
com.founder.common.IpADdress
;
import
com.founder.common.IpADressLock
;
import
com.founder.common.RedisLock
;
import
com.founder.model.Face
;
import
com.founder.model.Face
;
import
com.founder.model.Jccj
;
import
com.founder.model.Jccj
;
import
com.founder.service.AutoSeqService
;
import
com.founder.service.AutoSeqService
;
...
@@ -39,6 +36,8 @@ public class JccjController {
...
@@ -39,6 +36,8 @@ public class JccjController {
private
RedisLock
redisLock
;
private
RedisLock
redisLock
;
@Autowired
@Autowired
private
IpADressLock
ipADressLock
;
private
IpADressLock
ipADressLock
;
@Autowired
private
IdentityCardVerification
identityCardVerification
;
@Value
(
value
=
"${redistimeout}"
)
@Value
(
value
=
"${redistimeout}"
)
private
int
redistimeout
;
private
int
redistimeout
;
@Value
(
value
=
"${ftpserverip}"
)
@Value
(
value
=
"${ftpserverip}"
)
...
@@ -50,6 +49,13 @@ public class JccjController {
...
@@ -50,6 +49,13 @@ public class JccjController {
public
Object
queryDatas
(
HttpServletRequest
request
,
@RequestBody
Jccj
jccj
)
{
public
Object
queryDatas
(
HttpServletRequest
request
,
@RequestBody
Jccj
jccj
)
{
//1.验证是否非法调用()
//1.验证是否非法调用()
Map
<
String
,
Object
>
res
=
new
HashMap
<>();
Map
<
String
,
Object
>
res
=
new
HashMap
<>();
String
idStr
=
identityCardVerification
.
IdentityCardVerification
(
jccj
.
getUser_id
());
if
(
!
jccj
.
getUser_id
().
equals
(
idStr
)){
res
.
put
(
"status_code"
,
"010103"
);
res
.
put
(
"message"
,
idStr
);
res
.
put
(
"taskid"
,
jccj
.
getTaskid
());
return
res
;
}
if
(!
ipADressLock
.
getIpAddress
(
request
)){
if
(!
ipADressLock
.
getIpAddress
(
request
)){
res
.
put
(
"status_code"
,
"010102"
);
res
.
put
(
"status_code"
,
"010102"
);
res
.
put
(
"message"
,
"访问ip地址未授权"
);
res
.
put
(
"message"
,
"访问ip地址未授权"
);
...
...
src/main/java/com/founder/task/ScheduleTask.java
View file @
21fe5276
...
@@ -25,6 +25,7 @@ public class ScheduleTask {
...
@@ -25,6 +25,7 @@ public class ScheduleTask {
}
}
private
void
xxbsSerevice
(){
private
void
xxbsSerevice
(){
logger
.
info
(
"This is a say method!"
+
format
.
format
(
new
Date
()));
//1.从表中获取未上报的信息
//1.从表中获取未上报的信息
/*直接从服务器获取zip包并转成base64
/*直接从服务器获取zip包并转成base64
...
...
src/main/java/com/founder/test.java
View file @
21fe5276
...
@@ -41,7 +41,7 @@ public class test {
...
@@ -41,7 +41,7 @@ public class test {
jccj
.
setXxsb_zip
(
encodedText
);
jccj
.
setXxsb_zip
(
encodedText
);
jccj
.
setTaskid
(
"JCXX-R1100000500002014070008"
);
jccj
.
setTaskid
(
"JCXX-R1100000500002014070008"
);
jccj
.
setUser_id
(
"1427281889975
88
823"
);
jccj
.
setUser_id
(
"1427281889975
3333333
823"
);
jccj
.
setUser_dept
(
"1400000000"
);
jccj
.
setUser_dept
(
"1400000000"
);
jccj
.
setVersion
(
"1.00"
);
jccj
.
setVersion
(
"1.00"
);
//发送,httpclient 包含zip包
//发送,httpclient 包含zip包
...
...
src/main/resources/application-dev.yml
View file @
21fe5276
...
@@ -61,4 +61,6 @@ codemsg:
...
@@ -61,4 +61,6 @@ codemsg:
-
code
:
"
010102"
-
code
:
"
010102"
name
:
"
访问ip地址未授权"
name
:
"
访问ip地址未授权"
-
code
:
"
010103"
-
code
:
"
010103"
name
:
"
请勿重复提交"
name
:
"
请勿重复提交"
\ No newline at end of file
-
code
:
"
010104"
name
:
"
用户身份证信息有误"
\ No newline at end of file
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