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
f4ccd689
Commit
f4ccd689
authored
Dec 28, 2019
by
郝彦辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口报送bug
parent
e4b25a58
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
90 additions
and
8 deletions
+90
-8
ManualToolController.java
...cn/quantgroup/report/controller/ManualToolController.java
+2
-2
BaiHangZhuDaiService.java
...antgroup/report/service/baihang/BaiHangZhuDaiService.java
+1
-0
ManualToolService.java
...antgroup/report/service/manualTool/ManualToolService.java
+87
-6
No files found.
src/main/java/cn/quantgroup/report/controller/ManualToolController.java
View file @
f4ccd689
...
...
@@ -137,8 +137,8 @@ public class ManualToolController {
}
@RequestMapping
(
"/d2_saveLog"
)
public
String
d2_saveLog
(
String
d2JsonFileName
,
String
reqIdFileName
,
String
no_reqId_start
){
manualToolService
.
d2_saveLog
(
d2JsonFileName
,
reqIdFileName
,
no_reqId_start
);
public
String
d2_saveLog
(
String
d2JsonFileName
,
String
reqIdFileName
,
String
no_reqId_start
,
String
isHaveRecordId
){
manualToolService
.
d2_saveLog
(
d2JsonFileName
,
reqIdFileName
,
no_reqId_start
,
isHaveRecordId
);
return
"d2_saveLog调用结束"
;
}
...
...
src/main/java/cn/quantgroup/report/service/baihang/BaiHangZhuDaiService.java
View file @
f4ccd689
...
...
@@ -267,6 +267,7 @@ public class BaiHangZhuDaiService {
log
.
warn
(
"比较还款总期数&账单日列表loanInfoReqId: {} , totalTerm: {} , targetRepaymentDayList is null!"
,
loanInfoReqId
,
loanInfozd_tmp
.
getTotalTerm
());
}
String
relationID
=
loanInfozd_tmp
.
getRelationID
();
if
(
relationID
!=
null
){
if
(
relationID
.
length
()>
36
){
//长度[1,36]
...
...
src/main/java/cn/quantgroup/report/service/manualTool/ManualToolService.java
View file @
f4ccd689
...
...
@@ -1932,7 +1932,7 @@ public class ManualToolService implements CommonSuperService {
}
@Async
public
void
d2_saveLog
(
String
d2JsonFileName
,
String
reqIdFileName
,
String
no_reqId_start
)
{
public
void
d2_saveLog
(
String
d2JsonFileName
,
String
reqIdFileName
,
String
no_reqId_start
,
String
isHaveRecordId
)
{
boolean
haveReqID
=
false
;
List
<
String
>
reqID_Str_List
=
null
;
HashMap
<
String
,
String
>
reqID_Map
=
null
;
...
...
@@ -1966,6 +1966,11 @@ public class ManualToolService implements CommonSuperService {
no_reqId
=
Integer
.
parseInt
(
no_reqId_start
);
}
boolean
haveRecordId
=
false
;
if
(
StringUtils
.
isNotEmpty
(
isHaveRecordId
)
&&
isHaveRecordId
.
equals
(
"true"
)){
haveRecordId
=
true
;
}
for
(
int
i
=
0
;
i
<
d2JsonList
.
size
();
i
++){
String
jsonStr
=
d2JsonList
.
get
(
i
);
if
(
jsonStr
.
length
()<
30
){
...
...
@@ -1987,8 +1992,10 @@ public class ManualToolService implements CommonSuperService {
loanInfozd_tmp
.
setOrderID
(
finTechAgencyBusiness
.
getOrderID
());
loanInfozd_tmp
.
setPreCreditLimit
(
finTechAgencyBusiness
.
getPreCreditLimit
());
loanInfozd_tmp
.
setRecordId
(
loanInfozd_tmp
.
getReqID
());
loanInfozd_tmp
.
setReqID
(
null
);
if
(!
haveRecordId
){
loanInfozd_tmp
.
setRecordId
(
loanInfozd_tmp
.
getReqID
());
loanInfozd_tmp
.
setReqID
(
null
);
}
if
(
haveReqID
&&
reqID_Map
.
containsKey
(
loanInfozd_tmp
.
getRecordId
())){
loanInfozd_tmp
.
setReqID
(
reqID_Map
.
get
(
loanInfozd_tmp
.
getRecordId
()));
...
...
@@ -2436,7 +2443,77 @@ public class ManualToolService implements CommonSuperService {
log
.
info
(
"All newD3ReplaceReqId() end."
);
}
public
static
void
main
(
String
[]
args
)
{
private
static
void
check_d2
()
{
try
{
List
<
String
>
d2JsonList
=
ReadOrWriteTxt
.
readTxtList
(
"D:\\用户目录\\Downloads\\d2_1226.tmp"
);
log
.
info
(
"files d2JsonList size="
+
d2JsonList
.
size
());
for
(
int
i
=
0
;
i
<
d2JsonList
.
size
();
i
++){
String
jsonStr
=
d2JsonList
.
get
(
i
);
if
(
jsonStr
.
length
()<
30
){
continue
;
}
//LoanInfoZhuDaiVo loanInfo
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
jsonStr
);
//LoanInfoZhuDai loanInfozd_tmp = JSONObject.parseObject(jsonStr, LoanInfoZhuDai.class);
int
totalTerm
=
jsonObject
.
getInteger
(
"totalTerm"
);
String
targetRepayDateList
=
jsonObject
.
getString
(
"targetRepayDateList"
);
if
(
targetRepayDateList
.
split
(
","
).
length
==
totalTerm
){
FileUtils
.
write
(
new
File
(
"D:\\用户目录\\Downloads\\ok_d2.txt"
),
jsonStr
+
"\n"
,
"UTF-8"
,
true
);
}
else
{
log
.
error
(
jsonObject
.
getString
(
"loanId"
)
+
","
+
targetRepayDateList
.
split
(
","
).
length
+
","
+
totalTerm
);
FileUtils
.
write
(
new
File
(
"D:\\用户目录\\Downloads\\err_d2.txt"
),
jsonStr
+
"\n"
,
"UTF-8"
,
true
);
}
}
log
.
info
(
"All D2 LOG:保存放款记录结束"
);
}
catch
(
Exception
e
){
log
.
error
(
"处理放款记录异常!"
,
e
);
}
}
private
static
void
build_reqID_recordId
()
{
try
{
List
<
String
>
d2JsonList
=
ReadOrWriteTxt
.
readTxtList
(
"D:\\用户目录\\Downloads\\日增日志\\d2_25.txt"
);
log
.
info
(
"files d2JsonList size="
+
d2JsonList
.
size
());
for
(
int
i
=
0
;
i
<
d2JsonList
.
size
();
i
++){
String
jsonStr
=
d2JsonList
.
get
(
i
);
if
(
jsonStr
.
length
()<
30
){
continue
;
}
//LoanInfoZhuDaiVo loanInfo
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
jsonStr
);
jsonObject
.
put
(
"recordId"
,
jsonObject
.
getString
(
"reqID"
));
jsonObject
.
remove
(
"reqID"
);
FileUtils
.
write
(
new
File
(
"D:\\用户目录\\Downloads\\日增日志\\log_d2_25.txt"
),
jsonObject
.
toJSONString
()+
"\n"
,
"UTF-8"
,
true
);
/*LoanInfoZhuDai loanInfozd_tmp = JSONObject.parseObject(jsonStr, LoanInfoZhuDai.class);
int totalTerm = jsonObject.getInteger("totalTerm");
String targetRepayDateList = jsonObject.getString("targetRepayDateList");
if(targetRepayDateList.split(",").length == totalTerm){
FileUtils.write(new File("D:\\用户目录\\Downloads\\ok_d2.txt"), jsonStr+"\n", "UTF-8", true);
}else{
log.error(jsonObject.getString("loanId") + "," + targetRepayDateList.split(",").length + "," + totalTerm);
FileUtils.write(new File("D:\\用户目录\\Downloads\\err_d2.txt"), jsonStr+"\n", "UTF-8", true);
}*/
}
log
.
info
(
"All D2 LOG:保存放款记录结束"
);
}
catch
(
Exception
e
){
log
.
error
(
"处理放款记录异常!"
,
e
);
}
}
public
static
void
main
(
String
[]
args
)
{
// List<String> lineList = ReadOrWriteTxt.readTxtList("D:\\用户目录\\Downloads\\D2_M_01.txt");
// System.out.println("lineList:"+lineList.size());
// StringBuffer buff = new StringBuffer();
...
...
@@ -2497,8 +2574,12 @@ public class ManualToolService implements CommonSuperService {
//build_20191225D3();
newReqId_to_oldReqId22
();
}
//newReqId_to_oldReqId22();
//check_d2();
build_reqID_recordId
();
}
...
...
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