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
48eaf413
Commit
48eaf413
authored
Nov 18, 2019
by
郝彦辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A1要求uploadTs时间为真实时间
parent
c69c2ec3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
104 additions
and
14 deletions
+104
-14
ManualToolService.java
...antgroup/report/service/manualTool/ManualToolService.java
+102
-4
ApplyLoanInfoMapper.xml
.../quantgroup/report/mapper/baihang/ApplyLoanInfoMapper.xml
+2
-10
No files found.
src/main/java/cn/quantgroup/report/service/manualTool/ManualToolService.java
View file @
48eaf413
...
@@ -1002,6 +1002,104 @@ public class ManualToolService implements CommonSuperService {
...
@@ -1002,6 +1002,104 @@ public class ManualToolService implements CommonSuperService {
public
static
void
buildA1_uploadTs
(
String
newJsonFile
,
String
oldJsonFile
)
{
newJsonFile
=
"D:\\用户目录\\Downloads\\生产数据\\new_lhp_A1_20170209_20191025_01.txt"
;
String
fileName
=
"D:\\用户目录\\Downloads\\生产数据\\new201911181620_lhp_A1_20170209_20191025_01.txt"
;
List
<
String
>
newJsonList
=
ReadOrWriteTxt
.
readTxtList
(
newJsonFile
);
System
.
out
.
println
(
"newJsonList大小:"
+
newJsonList
.
size
());
for
(
int
i
=
0
;
i
<
newJsonList
.
size
();
i
++){
System
.
out
.
println
(
"Start:"
+
i
);
String
strJson
=
newJsonList
.
get
(
i
);
if
(
strJson
.
length
()
<
30
){
//#applyInfo #singleLoanAccountInfo
continue
;
}
ApplyLoanInfoZhuDai
applyInfo
=
new
Gson
().
fromJson
(
strJson
,
new
TypeToken
<
ApplyLoanInfoZhuDai
>(){}.
getType
());
if
(
applyInfo
.
getApplyDate
()!=
null
){
applyInfo
.
setUploadTs
(
applyInfo
.
getApplyDate
());
//applyDate
}
applyInfo
.
setOpCode
(
"M"
);
try
{
FileUtils
.
write
(
new
File
(
fileName
),
JSON
.
toJSONString
(
applyInfo
)+
"\r\n"
,
"UTF-8"
,
true
);
}
catch
(
IOException
e
)
{
System
.
err
.
println
(
"build data,"
+
e
);
}
}
System
.
err
.
println
(
"build data buildA1_uploadTs end."
);
}
public
static
void
buildD2_uploadTs
(
String
newJsonFile
,
String
oldJsonFile
)
{
newJsonFile
=
"D:\\用户目录\\Downloads\\生产数据\\uploadTs_M_201911181718\\new_lhp_D2_20170209_20191025_01.txt"
;
String
fileName
=
"D:\\用户目录\\Downloads\\生产数据\\uploadTs_M_201911181718\\new201911181720_D2_20170209_20191025_01.txt"
;
List
<
String
>
newJsonList
=
ReadOrWriteTxt
.
readTxtList
(
newJsonFile
);
System
.
out
.
println
(
"newJsonList大小:"
+
newJsonList
.
size
());
for
(
int
i
=
0
;
i
<
newJsonList
.
size
();
i
++){
System
.
out
.
println
(
"Start:"
+
i
);
String
strJson
=
newJsonList
.
get
(
i
);
if
(
strJson
.
length
()
<
30
){
//#applyInfo #singleLoanAccountInfo
continue
;
}
LoanInfoZhuDai
loanInfozd_tmp
=
new
Gson
().
fromJson
(
strJson
,
new
TypeToken
<
LoanInfoZhuDai
>(){}.
getType
());
if
(
loanInfozd_tmp
.
getApplyDate
()!=
null
){
loanInfozd_tmp
.
setUploadTs
(
loanInfozd_tmp
.
getIssueDate
());
//issueDate
}
loanInfozd_tmp
.
setOpCode
(
"M"
);
try
{
FileUtils
.
write
(
new
File
(
fileName
),
JSON
.
toJSONString
(
loanInfozd_tmp
)+
"\r\n"
,
"UTF-8"
,
true
);
}
catch
(
IOException
e
)
{
System
.
err
.
println
(
"build data,"
+
e
);
}
}
System
.
err
.
println
(
"build data buildD2_uploadTs end."
);
}
public
static
void
buildD3_uploadTs
(
String
newJsonFile
,
String
oldJsonFile
)
{
newJsonFile
=
"D:\\用户目录\\Downloads\\生产数据\\uploadTs_M_201911181718\\bak1\\new_D3_01.txt"
;
String
fileName
=
"D:\\用户目录\\Downloads\\生产数据\\uploadTs_M_201911181718\\new201911181720_D3_01.txt"
;
List
<
String
>
newJsonList
=
ReadOrWriteTxt
.
readTxtList
(
newJsonFile
);
System
.
out
.
println
(
"newJsonList大小:"
+
newJsonList
.
size
());
Map
<
String
,
String
>
new_uploadTs_Map
=
new
HashMap
<>(
newJsonList
.
size
());
for
(
int
i
=
0
;
i
<
newJsonList
.
size
();
i
++){
System
.
out
.
println
(
"Start:"
+
i
);
String
strJson
=
newJsonList
.
get
(
i
);
if
(
strJson
.
length
()
<
30
){
//#applyInfo #singleLoanAccountInfo
continue
;
}
RepaymentInfoZhuDai
repaymentLoanInfo
=
new
Gson
().
fromJson
(
strJson
,
new
TypeToken
<
RepaymentInfoZhuDai
>(){}.
getType
());
if
(
"normal"
.
equals
(
repaymentLoanInfo
.
getTermStatus
().
trim
())
){
repaymentLoanInfo
.
setUploadTs
(
repaymentLoanInfo
.
getRealRepaymentDate
());
//realRepaymentDate
}
else
{
//overdue
repaymentLoanInfo
.
setUploadTs
(
repaymentLoanInfo
.
getStatusConfirmAt
());
//statusConfirmAt
}
repaymentLoanInfo
.
setOpCode
(
"M"
);
try
{
FileUtils
.
write
(
new
File
(
fileName
),
JSON
.
toJSONString
(
repaymentLoanInfo
)+
"\r\n"
,
"UTF-8"
,
true
);
}
catch
(
IOException
e
)
{
System
.
err
.
println
(
"build data,"
+
e
);
}
}
System
.
err
.
println
(
"build data buildD3_uploadTs end."
);
}
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
// List<String> lineList = ReadOrWriteTxt.readTxtList("D:\\用户目录\\Downloads\\D2_M_01.txt");
// List<String> lineList = ReadOrWriteTxt.readTxtList("D:\\用户目录\\Downloads\\D2_M_01.txt");
...
@@ -1034,13 +1132,13 @@ public class ManualToolService implements CommonSuperService {
...
@@ -1034,13 +1132,13 @@ public class ManualToolService implements CommonSuperService {
// private static final String P2_48MD5 = "d4893490905d534e6fc1512ba6619d14df8c312362589342";
// private static final String P2_48MD5 = "d4893490905d534e6fc1512ba6619d14df8c312362589342";
// private static final String P3_48MD5 = "57971a003213360c6fa09f4b257d5eb5441ba97a5450aa63";
// private static final String P3_48MD5 = "57971a003213360c6fa09f4b257d5eb5441ba97a5450aa63";
//
// System.out.println(MD5Util.get48Md5("172.20.1.92"));
// System.out.println(MD5Util.get48Md5("172.20.1.92"));
// System.out.println(MD5Util.verify48Md5("root2","d4893490905d534e6fc1512ba6619d14df8c312362589342"));
System
.
out
.
println
(
MD5Util
.
verify48Md5
(
"root2"
,
"d4893490905d534e6fc1512ba6619d14df8c312362589342"
));
//buildA1_uploadTs(null,null);
//buildD2_uploadTs(null,null);
buildD3_uploadTs
(
null
,
null
);
}
}
}
}
src/main/resources/cn/quantgroup/report/mapper/baihang/ApplyLoanInfoMapper.xml
View file @
48eaf413
...
@@ -61,11 +61,7 @@
...
@@ -61,11 +61,7 @@
select
select
a.id reqID
a.id reqID
,'A' opCode
,'A' opCode
-- ,DATE_FORMAT(now(),'%Y-%m-%dT%H:%i:%S') uploadTs
,DATE_FORMAT(now(),'%Y-%m-%dT%H:%i:%S') uploadTs
,DATE_FORMAT(case when i.created_at is null and h.created_at
<
= f.created_at then h.created_at
when i.created_at is null and h.created_at>f.created_at then f.created_at
else i.created_at end,'%Y-%m-%dT%H:%i:%S') as uploadTs
,'1' isFinTechAgencyBusiness
,'1' isFinTechAgencyBusiness
,DATE_FORMAT(case when i.created_at is null and h.created_at
<
= f.created_at then h.created_at
,DATE_FORMAT(case when i.created_at is null and h.created_at
<
= f.created_at then h.created_at
when i.created_at is null and h.created_at>f.created_at then f.created_at
when i.created_at is null and h.created_at>f.created_at then f.created_at
...
@@ -119,11 +115,7 @@
...
@@ -119,11 +115,7 @@
select
select
a.id reqID
a.id reqID
,'A' opCode
,'A' opCode
-- ,DATE_FORMAT(now(),'%Y-%m-%dT%H:%i:%S') uploadTs
,DATE_FORMAT(now(),'%Y-%m-%dT%H:%i:%S') uploadTs
,DATE_FORMAT(case when i.created_at is null and h.created_at
<
= f.created_at then h.created_at
when i.created_at is null and h.created_at>f.created_at then f.created_at
else i.created_at end,'%Y-%m-%dT%H:%i:%S') as uploadTs
,'1' isFinTechAgencyBusiness
,'1' isFinTechAgencyBusiness
,DATE_FORMAT(case when i.created_at is null and h.created_at
<
=f.created_at then h.created_at
,DATE_FORMAT(case when i.created_at is null and h.created_at
<
=f.created_at then h.created_at
when i.created_at is null and h.created_at>f.created_at then f.created_at
when i.created_at is null and h.created_at>f.created_at then f.created_at
...
...
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