Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
Y
yzg-util
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
YZG
yzg-util
Commits
d8a880e3
Commit
d8a880e3
authored
Jun 20, 2020
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SQL层级处理的支持
parent
ee88dbc8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
105 additions
and
0 deletions
+105
-0
TestSfzUtil.java
yzg-util-base/src/test/java/helper/TestSfzUtil.java
+45
-0
非法身份证.csv
yzg-util-base/src/test/java/helper/非法身份证.csv
+60
-0
No files found.
yzg-util-base/src/test/java/helper/TestSfzUtil.java
0 → 100644
View file @
d8a880e3
package
helper
;
import
base.DemoVo
;
import
com.yanzuoguang.util.helper.FileHelper
;
import
com.yanzuoguang.util.helper.SfzhUtil
;
import
com.yanzuoguang.util.helper.StringHelper
;
import
com.yanzuoguang.util.helper.TypeHelper
;
import
com.yanzuoguang.util.vo.ResponseResult
;
import
helper.vo.ResponseDataMainResult
;
import
org.junit.Test
;
import
java.io.File
;
import
java.lang.reflect.Method
;
import
java.util.List
;
public
class
TestSfzUtil
{
public
ResponseDataMainResult
<
List
<
DemoVo
>,
DemoVo
>
getReturnType
()
{
return
null
;
}
@Test
public
void
test
()
throws
NoSuchMethodException
{
// 获取泛型的返回值类型
String
file
=
getFile
(
"非法身份证.csv"
);
String
s
=
FileHelper
.
readFile
(
new
File
(
file
),
"utf-8"
);
String
[]
lines
=
s
.
split
(
"\\n"
);
for
(
String
line
:
lines
)
{
if
(!
SfzhUtil
.
validateCard
(
line
))
{
System
.
out
.
println
(
line
);
}
}
}
private
String
getFile
(
String
from
)
{
// 注意,路径应为文件在工程中的相对路径
File
f
=
new
File
(
"src/test/java/helper/"
+
from
);
if
(!
f
.
exists
())
{
System
.
out
.
println
(
f
.
getAbsoluteFile
());
throw
new
RuntimeException
(
"视频文件不存在"
);
}
return
f
.
getAbsolutePath
();
}
}
yzg-util-base/src/test/java/helper/非法身份证.csv
0 → 100644
View file @
d8a880e3
王蕾
陈俊
06151196
h08200453
翟景国
肖清林
1102231911196362
2301219607163029
4002198009081038
4228022008018174
4320197505140428
5403025406051517
128104198607012564
130633198709206640
130682199800170029
130916199607150420
142743199907103220
201221199909156043
231203198911181216
310105199607278412
320222198211245039
32070519770903353x
32070519770903353X
320922198201180316
330185198203024527
330782199206130002
330803197902153618
340303199502140848
34040319950617282x
34040319950617282X
340521199711130531
352225199602153816
352225499602153816
360681198901284152
371324199606060033
379687200110090027
410726198400314001
410928199411161215
430202197309212020
430981199810306622
441481199310231682
445225198902250362
500226198512136731
500236199504245042
510212196303275012
510212196508150824
510221198111052521
51022619420820074x
51022619420820074X
510402195509282231
510622199805260614
511025200202242448
512223195004052161
513030199709285917
513921200001228552
52021819830111664x
523527199701141732
610423199202256168
610629189611255834
620102197608042615
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