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
4ec30030
Commit
4ec30030
authored
Nov 08, 2019
by
郝彦辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改日志
parent
bba4e5b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
4 deletions
+58
-4
ExZhuDaiBaiHangReSendController.java
.../controller/external/ExZhuDaiBaiHangReSendController.java
+12
-0
BaiHangZhuDaiService.java
...antgroup/report/service/baihang/BaiHangZhuDaiService.java
+46
-4
No files found.
src/main/java/cn/quantgroup/report/controller/external/ExZhuDaiBaiHangReSendController.java
View file @
4ec30030
...
...
@@ -235,4 +235,16 @@ public class ExZhuDaiBaiHangReSendController {
}
return
baiHangZhuDaiService
.
zhuDaiStockStop
(
type
,
val
);
}
@RequestMapping
(
"/test/bulidD3"
)
public
String
bulidD3
(
String
type
,
String
jsonFile
)
{
try
{
return
baiHangZhuDaiService
.
build_stockRepayMentInfoZhuDai
(
jsonFile
);
}
catch
(
Exception
e
){
log
.
error
(
"bulidD3异常, {} , {} "
,
e
.
getMessage
(),
e
);
return
e
.
getMessage
();
}
}
}
src/main/java/cn/quantgroup/report/service/baihang/BaiHangZhuDaiService.java
View file @
4ec30030
...
...
@@ -21,6 +21,7 @@ import cn.quantgroup.report.service.baihang.util.Base64;
import
cn.quantgroup.report.service.baihang.util.TuoMinUtils
;
import
cn.quantgroup.report.service.http.IHttpService
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.google.common.base.Stopwatch
;
import
com.google.gson.Gson
;
...
...
@@ -37,6 +38,7 @@ import org.springframework.stereotype.Service;
import
javax.annotation.PostConstruct
;
import
java.io.File
;
import
java.io.IOException
;
import
java.security.PublicKey
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
...
...
@@ -842,7 +844,7 @@ public class BaiHangZhuDaiService {
if
(
type
==
0
)
{
log
.
info
(
"All还款整理结束, startTime: {} , endTime: {} , 大小: {} , 总耗时: {} "
,
starTime
,
endTime
,
repaymentInfoList
.
size
(),
((
System
.
currentTimeMillis
()-
log_stUtc
)/
1000
)+
".s"
);
}
else
{
log
.
info
(
"All逾期理结束, startTime: {} , endTime: {} , 大小: {} , 总耗时: {} "
,
starTime
,
endTime
,
repaymentInfoList
.
size
(),
((
System
.
currentTimeMillis
()-
log_stUtc
)/
1000
)+
".s"
);
log
.
info
(
"All逾期
整
理结束, startTime: {} , endTime: {} , 大小: {} , 总耗时: {} "
,
starTime
,
endTime
,
repaymentInfoList
.
size
(),
((
System
.
currentTimeMillis
()-
log_stUtc
)/
1000
)+
".s"
);
}
}
...
...
@@ -1386,11 +1388,51 @@ public class BaiHangZhuDaiService {
System.out.println("starTime="+starTime+",endTime="+endTime);
}*/
AtomicBoolean
D2_Stop
=
new
AtomicBoolean
(
false
);
/* AtomicBoolean D2_Stop = new AtomicBoolean(false);
System.out.println(D2_Stop.get());
D2_Stop.set(true);
System
.
out
.
println
(
D2_Stop
.
get
());
System.out.println(D2_Stop.get());*/
//构建D3
}
public
String
build_stockRepayMentInfoZhuDai
(
String
jsonFile
)
throws
IOException
{
String
sourceStr
=
FileUtils
.
readFileToString
(
new
File
(
jsonFile
),
"utf-8"
);
JSONObject
sourceJson
=
JSON
.
parseObject
(
sourceStr
);
JSONArray
recordsJsonArr
=
sourceJson
.
getJSONArray
(
"RECORDS"
);
System
.
out
.
println
(
"总条数:"
+
recordsJsonArr
.
size
());
//RepaymentInfoZhuDai repaymentLoanInfo = new Gson().fromJson(repaymentLoanInfos.get(i), new TypeToken<RepaymentInfoZhuDai>(){}.getType());
//log.info("众信利民助贷模式TO百行手动报送还款数据单个数据, {}", JSON.toJSONString(repaymentLoanInfo));
String
name
=
""
;
if
(
jsonFile
.
lastIndexOf
(
"/"
)!=-
1
){
//linux
name
=
jsonFile
.
substring
(
jsonFile
.
lastIndexOf
(
"/"
)+
1
,
jsonFile
.
length
());
}
else
{
//windows
name
=
jsonFile
.
substring
(
jsonFile
.
lastIndexOf
(
"\\"
)+
1
,
jsonFile
.
length
());
}
name
=
name
.
substring
(
0
,
name
.
lastIndexOf
(
"."
));
final
String
fileName
=
zl_file_path_name
+
name
;
long
log_stUtc
=
System
.
currentTimeMillis
();
try
{
for
(
int
j
=
0
;
j
<
recordsJsonArr
.
size
();
j
++)
{
String
tmpStr
=
recordsJsonArr
.
getJSONObject
(
j
).
toJSONString
();
RepaymentInfoZhuDai
repaymentInfo
=
new
Gson
().
fromJson
(
tmpStr
,
new
TypeToken
<
RepaymentInfoZhuDai
>()
{}.
getType
());
String
id
=
UUID
.
randomUUID
().
toString
().
replaceAll
(
"-"
,
""
);
repaymentInfo
.
setReqID
(
id
);
FileUtils
.
write
(
new
File
(
fileName
+
"_01.txt"
),
JSON
.
toJSONString
(
repaymentInfo
)
+
"\r\n"
,
"UTF-8"
,
true
);
//脱敏数据写一份
testTuoMinFileWrite
(
fileName
+
"_TEST_01.txt"
,
"shoudongBuild"
,
null
,
null
,
repaymentInfo
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"还款&逾期存量数据处理异常,"
,
e
);
}
//打印日志
log
.
info
(
"All还款||逾期整理结束, 大小: {} , 总耗时: {} "
,
recordsJsonArr
.
size
(),
((
System
.
currentTimeMillis
()
-
log_stUtc
)
/
1000
)
+
".s"
);
return
"百行-助贷还款整理结束"
;
}
}
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