Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
baihang-report
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
data-spider
baihang-report
Commits
2f56577b
Commit
2f56577b
authored
Dec 11, 2021
by
陈宏杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日志提示
parent
9db0911c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
20 deletions
+19
-20
BaiHangFileReportService.java
...roup/report/service/baihang/BaiHangFileReportService.java
+19
-20
No files found.
src/main/java/cn/quantgroup/report/service/baihang/BaiHangFileReportService.java
View file @
2f56577b
...
...
@@ -877,28 +877,27 @@ public class BaiHangFileReportService {
StringBuffer
sBuffer
=
null
;
List
<
String
>
fileNameList
=
Arrays
.
asList
(
singleFileName
);
for
(
String
fileName
:
fileNameList
)
{
if
(
StringUtils
.
isNotBlank
(
fileName
))
{
subFile
=
new
File
(
HOST_PATH
+
fileName
.
replace
(
"-R.cry"
,
".txt"
));
List
<
String
>
dataList
=
FileUtils
.
readLines
(
subFile
,
"utf-8"
);
List
<
String
>
fieldNameList
=
Arrays
.
asList
(
fieldNames
.
split
(
","
));
for
(
String
dataInfo
:
dataList
)
{
Boolean
noError
=
Boolean
.
TRUE
;
sBuffer
=
new
StringBuffer
(
fileName
).
append
(
","
);
if
(
"A1"
.
equalsIgnoreCase
(
type
)
||
"A1Refuse"
.
equalsIgnoreCase
(
type
))
{
ApplyLoanInfoZhuDai
applyLoanInfoZhuDai
=
JSONObject
.
parseObject
(
dataInfo
,
ApplyLoanInfoZhuDai
.
class
);
sBuffer
.
append
(
applyLoanInfoZhuDai
.
getApplyId
()).
append
(
","
);
for
(
String
fieldName
:
fieldNameList
)
{
Field
declaredField
=
ApplyLoanInfoZhuDai
.
class
.
getDeclaredField
(
fieldName
);
Object
property
=
BeanUtil
.
getProperty
(
applyLoanInfoZhuDai
,
fieldName
);
if
(
Objects
.
isNull
(
property
)
||
Objects
.
isNull
(
declaredField
))
{
noError
=
Boolean
.
FALSE
;
sBuffer
.
append
(
fieldName
).
append
(
","
);
}
subFile
=
new
File
(
HOST_PATH
+
fileName
.
replace
(
"-R.cry"
,
".txt"
));
List
<
String
>
dataList
=
FileUtils
.
readLines
(
subFile
,
"utf-8"
);
List
<
String
>
fieldNameList
=
Arrays
.
asList
(
fieldNames
.
split
(
","
));
for
(
String
dataInfo
:
dataList
)
{
Boolean
noError
=
Boolean
.
TRUE
;
sBuffer
=
new
StringBuffer
(
fileName
).
append
(
","
);
if
(
"A1"
.
equalsIgnoreCase
(
type
)
||
"A1Refuse"
.
equalsIgnoreCase
(
type
))
{
ApplyLoanInfoZhuDai
applyLoanInfoZhuDai
=
JSONObject
.
parseObject
(
dataInfo
,
ApplyLoanInfoZhuDai
.
class
);
log
.
info
(
"数据 {} 正在校验..."
,
applyLoanInfoZhuDai
.
getApplyId
());
sBuffer
.
append
(
applyLoanInfoZhuDai
.
getApplyId
()).
append
(
","
);
for
(
String
fieldName
:
fieldNameList
)
{
Field
declaredField
=
ApplyLoanInfoZhuDai
.
class
.
getDeclaredField
(
fieldName
);
Object
property
=
BeanUtil
.
getProperty
(
applyLoanInfoZhuDai
,
fieldName
);
if
(
Objects
.
isNull
(
property
)
||
Objects
.
isNull
(
declaredField
))
{
noError
=
Boolean
.
FALSE
;
sBuffer
.
append
(
fieldName
).
append
(
","
);
}
}
if
(!
noError
)
{
checkResult
.
add
(
sBuffer
.
append
(
System
.
getProperty
(
"line.separator"
)).
toString
());
}
}
if
(!
noError
)
{
checkResult
.
add
(
sBuffer
.
append
(
System
.
getProperty
(
"line.separator"
)).
toString
());
}
}
}
...
...
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