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
1a378fca
Commit
1a378fca
authored
May 22, 2020
by
郝彦辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sendBaiHangData百行自动报送工具优化
parent
21b300f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
15 deletions
+66
-15
ManualToolService.java
...antgroup/report/service/manualTool/ManualToolService.java
+66
-15
No files found.
src/main/java/cn/quantgroup/report/service/manualTool/ManualToolService.java
View file @
1a378fca
...
@@ -105,6 +105,8 @@ public class ManualToolService implements CommonSuperService {
...
@@ -105,6 +105,8 @@ public class ManualToolService implements CommonSuperService {
String
D2_url
=
"/manual/buquan/mainLoanInfoSend"
;
String
D2_url
=
"/manual/buquan/mainLoanInfoSend"
;
String
D3_url
=
"/manual/buquan/mainRepaymentLoanInfo"
;
String
D3_url
=
"/manual/buquan/mainRepaymentLoanInfo"
;
String
cNameWhiteListFile
=
base_path
+
"/baihang/changedName_loanId_whiteList.txt"
;
if
(
StringUtils
.
isBlank
(
RSA_PRIVATEKEY
))
{
if
(
StringUtils
.
isBlank
(
RSA_PRIVATEKEY
))
{
resultMap
.
put
(
"error"
,
"参数错误1"
);
resultMap
.
put
(
"error"
,
"参数错误1"
);
return
resultMap
;
return
resultMap
;
...
@@ -198,6 +200,22 @@ public class ManualToolService implements CommonSuperService {
...
@@ -198,6 +200,22 @@ public class ManualToolService implements CommonSuperService {
List
<
String
>
reqIDList
=
new
ArrayList
<>();
List
<
String
>
reqIDList
=
new
ArrayList
<>();
List
<
String
>
loanIdList
=
new
ArrayList
<
String
>();
List
<
String
>
loanIdList
=
new
ArrayList
<
String
>();
//2020.05.22 第一次报完D2后,修改了姓名,导致D3中姓名和D2中不一致,百行回复这样的D3数据不用补报修复
Map
<
String
,
String
>
cNameLoanIdMap
=
new
HashMap
<>();
try
{
List
<
String
>
changedNameList
=
ReadOrWriteTxt
.
readTxtList
(
cNameWhiteListFile
);
if
(
changedNameList
!=
null
&&
changedNameList
.
size
()>
0
){
for
(
String
context
:
changedNameList
){
//LoanId|历史姓名|修改后姓名
String
value
=
context
.
trim
();
cNameLoanIdMap
.
put
(
value
.
split
(
","
)[
0
],
value
);
}
}
}
catch
(
Exception
e
){
log
.
error
(
"读取报送D3时修改过姓名的用户loanId白名单异常!"
,
e
);
}
JSONArray
jsonArray
=
JSONArray
.
parseArray
(
jsaonResult
);
JSONArray
jsonArray
=
JSONArray
.
parseArray
(
jsaonResult
);
resultMsg
.
append
(
"getReqIdByRemoteLog size="
+
(
jsonArray
!=
null
?
jsonArray
.
size
()
:
"null"
)
);
resultMsg
.
append
(
"getReqIdByRemoteLog size="
+
(
jsonArray
!=
null
?
jsonArray
.
size
()
:
"null"
)
);
for
(
int
i
=
0
;
i
<
jsonArray
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
jsonArray
.
size
();
i
++)
{
...
@@ -228,23 +246,44 @@ public class ManualToolService implements CommonSuperService {
...
@@ -228,23 +246,44 @@ public class ManualToolService implements CommonSuperService {
log
.
info
(
"RepaymentLoanInfoDbMapper getReqIdByRemoteLog reqID to D3:"
+
JSON
.
toJSONString
(
recordIdArray
));
log
.
info
(
"RepaymentLoanInfoDbMapper getReqIdByRemoteLog reqID to D3:"
+
JSON
.
toJSONString
(
recordIdArray
));
List
<
RepaymentLoanInfoLog
>
tmpLogList
=
repaymentLoanInfoDbMapper
.
findByD3RecordId
(
recordIdArray
);
List
<
RepaymentLoanInfoLog
>
tmpLogList
=
repaymentLoanInfoDbMapper
.
findByD3RecordId
(
recordIdArray
);
List
<
RepaymentInfoZhuDai
>
repaymentLoanInfoList
=
new
ArrayList
<>(
tmpLogList
.
size
());
int
cNameSize
=
0
;
boolean
lengthIs0
=
(
json_hk_D3
.
length
()==
0
);
//List<RepaymentInfoZhuDai> repaymentLoanInfoList = new ArrayList<>(tmpLogList.size());
for
(
RepaymentLoanInfoLog
logBean
:
tmpLogList
)
{
for
(
RepaymentLoanInfoLog
logBean
:
tmpLogList
)
{
//查询d2使用
loanIdList
.
add
(
logBean
.
getLoanId
());
//如果不在白名单里
RepaymentInfoZhuDai
voBean
=
new
RepaymentInfoZhuDai
();
if
(!
cNameLoanIdMap
.
containsKey
(
logBean
.
getLoanId
())){
//添加了忽略username属性的赋值
//BeanUtils.copyProperties(book,book2,"username");
//查询d2使用
BeanUtils
.
copyProperties
(
logBean
,
voBean
);
loanIdList
.
add
(
logBean
.
getLoanId
());
voBean
.
setOpCode
(
"M"
);
if
(
voBean
.
getOverdueStatus
()
==
null
)
{
RepaymentInfoZhuDai
voBean
=
new
RepaymentInfoZhuDai
();
voBean
.
setOverdueStatus
(
""
);
//添加了忽略username属性的赋值
//BeanUtils.copyProperties(book,book2,"username");
BeanUtils
.
copyProperties
(
logBean
,
voBean
);
voBean
.
setOpCode
(
"M"
);
if
(
voBean
.
getOverdueStatus
()
==
null
)
{
voBean
.
setOverdueStatus
(
""
);
}
//repaymentLoanInfoList.add(voBean);
if
(
lengthIs0
){
lengthIs0
=
false
;
json_hk_D3
.
append
(
JSONObject
.
toJSONString
(
voBean
));
}
else
{
json_hk_D3
.
append
(
char_n
);
json_hk_D3
.
append
(
JSONObject
.
toJSONString
(
voBean
));
}
}
else
{
cNameSize
++;
log
.
info
(
"用户报送D3时修改姓名, 跳过补报, WhiteList: {} "
,
cNameLoanIdMap
.
get
(
logBean
.
getLoanId
()));
}
}
repaymentLoanInfoList
.
add
(
voBean
);
}
}
resultMsg
.
append
(
" |D3 List size="
+
repaymentLoanInfoList
.
size
());
resultMsg
.
append
(
" |D3 List size="
+
tmpLogList
.
size
());
resultMsg
.
append
(
" |D3 修改姓名跳过="
+
cNameSize
);
boolean
lengthIs0
=
(
json_hk_D3
.
length
()==
0
);
/*
boolean lengthIs0 = (json_hk_D3.length()==0);
for (RepaymentInfoZhuDai vo : repaymentLoanInfoList){
for (RepaymentInfoZhuDai vo : repaymentLoanInfoList){
if(lengthIs0){
if(lengthIs0){
lengthIs0 = false;
lengthIs0 = false;
...
@@ -253,7 +292,7 @@ public class ManualToolService implements CommonSuperService {
...
@@ -253,7 +292,7 @@ public class ManualToolService implements CommonSuperService {
json_hk_D3.append(char_n);
json_hk_D3.append(char_n);
json_hk_D3.append(JSONObject.toJSONString(vo));
json_hk_D3.append(JSONObject.toJSONString(vo));
}
}
}
}
*/
}
}
...
@@ -3566,6 +3605,18 @@ public class ManualToolService implements CommonSuperService {
...
@@ -3566,6 +3605,18 @@ public class ManualToolService implements CommonSuperService {
}
}
}
}
private
static
void
buildSelectSql_hmd264
()
{
//`name`,`phone_no`,`id_no`,`type`
List
<
String
>
oldD3ReqIdFileList
=
ReadOrWriteTxt
.
readTxtList
(
"E:\\桌面_工作\\黑名单项目\\20200317\\参数.txt"
);
System
.
out
.
println
(
"开始,list Size="
+
oldD3ReqIdFileList
.
size
());
for
(
String
str:
oldD3ReqIdFileList
){
//599e2b99de5c4959890e65f302b810c9,5c536844-7c11-41de-ad77-6dce26115a5f,BaiRongSpecialList_c,1003,2018-10-20 00:00:00
String
[]
arry
=
str
.
trim
().
split
(
","
);
String
black_list_new
=
"select * from black_list_new b where b.`name`='"
+
arry
[
0
]+
"' and b.phone_no='"
+
arry
[
1
]+
"' and b.id_no='"
+
arry
[
2
]+
"' and b.type='"
+
arry
[
3
]+
"' UNION "
;
System
.
out
.
printf
(
black_list_new
+
"\n"
);
}
System
.
out
.
println
(
"结束,list Size="
+
oldD3ReqIdFileList
.
size
());
}
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
...
@@ -3584,7 +3635,7 @@ public class ManualToolService implements CommonSuperService {
...
@@ -3584,7 +3635,7 @@ public class ManualToolService implements CommonSuperService {
// buildSelectInsert_hmd();
// buildSelectInsert_hmd();
bairong_ziduab_build
();
//
bairong_ziduab_build();
}
}
...
...
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