Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
customer-service
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
QG
customer-service
Commits
7c75febc
Commit
7c75febc
authored
Feb 25, 2022
by
yexiong.wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edit
parent
0e94179c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
VccServiceImpl.java
...a/cn/quantgroup/customer/service/impl/VccServiceImpl.java
+10
-11
No files found.
src/main/java/cn/quantgroup/customer/service/impl/VccServiceImpl.java
View file @
7c75febc
...
...
@@ -21,9 +21,11 @@ import cn.quantgroup.customer.service.http.IHttpService;
import
cn.quantgroup.customer.util.IdUtil
;
import
cn.quantgroup.user.retbean.XUser
;
import
cn.quantgroup.user.vo.UserSysResult
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.google.common.reflect.TypeToken
;
import
com.google.gson.Gson
;
import
com.querydsl.core.types.dsl.BooleanExpression
;
import
com.querydsl.core.types.dsl.Expressions
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -39,11 +41,8 @@ import org.springframework.web.multipart.MultipartFile;
import
javax.annotation.Resource
;
import
javax.transaction.Transactional
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.util.*
;
import
static
cn
.
quantgroup
.
customer
.
constant
.
Constant
.
GSON
;
import
java.util.List
;
@Slf4j
@Service
...
...
@@ -68,7 +67,7 @@ public class VccServiceImpl implements IVccService {
@Override
public
JsonResult
queryPage
(
UserPreRepayInfoQuery
query
)
throws
Exception
{
String
url
=
talosHttp
+
"/vcc/offline_pre_repay/query_page"
;
JSONObject
param
=
JSONObject
.
parseObject
(
GSON
.
toJson
(
query
));
JSONObject
param
=
JSONObject
.
parseObject
(
JSON
.
toJSONString
(
query
));
log
.
info
(
"queryPage | 开始请求talos获取预还款的详情,param={}"
,
param
);
String
post
=
httpService
.
post
(
url
,
param
);
log
.
info
(
"queryPage | 请求talos结束,param={},result={}"
,
param
,
post
);
...
...
@@ -83,7 +82,7 @@ public class VccServiceImpl implements IVccService {
}
JSONObject
data
=
jsonObject
.
getJSONObject
(
"data"
);
JSONArray
list
=
data
.
getJSONArray
(
"list"
);
List
<
QueryPreOfflineRepayVo
>
voList
=
GSON
.
fromJson
(
list
.
toString
(),
new
TypeToken
<
List
<
QueryPreOfflineRepayVo
>>()
{
List
<
QueryPreOfflineRepayVo
>
voList
=
new
Gson
()
.
fromJson
(
list
.
toString
(),
new
TypeToken
<
List
<
QueryPreOfflineRepayVo
>>()
{
}.
getType
());
for
(
int
i
=
0
;
i
<
voList
.
size
();
i
++){
if
(
1
==
query
.
getRepayType
()){
...
...
@@ -93,7 +92,7 @@ public class VccServiceImpl implements IVccService {
List
<
OfflineRepaySubmitRecord
>
byUserIdEqualsAndRepayTypeEquals
=
offlineRepaySubmitRecordRepo
.
findByUserIdEqualsAndRepayTypeEquals
(
voList
.
get
(
i
).
getUserId
(),
1
);
if
(!
CollectionUtils
.
isEmpty
(
byUserIdEqualsAndRepayTypeEquals
)){
for
(
OfflineRepaySubmitRecord
record:
byUserIdEqualsAndRepayTypeEquals
){
List
<
ApplyBill
>
billList
=
GSON
.
fromJson
(
record
.
getBills
(),
new
TypeToken
<
List
<
ApplyBill
>>()
{
List
<
ApplyBill
>
billList
=
new
Gson
()
.
fromJson
(
record
.
getBills
(),
new
TypeToken
<
List
<
ApplyBill
>>()
{
}.
getType
());
log
.
info
(
"billList={},applyBill={}"
,
billList
,
applyBill
);
if
(
billList
.
contains
(
applyBill
)){
...
...
@@ -151,7 +150,7 @@ public class VccServiceImpl implements IVccService {
List
<
OfflineRepaySubmitRecord
>
byUserIdEqualsAndRepayTypeEquals
=
offlineRepaySubmitRecordRepo
.
findByUserIdEqualsAndRepayTypeEqualsAndApprovalStatusNot
(
param
.
getUserId
(),
1
,
2
);
if
(!
CollectionUtils
.
isEmpty
(
byUserIdEqualsAndRepayTypeEquals
)){
for
(
OfflineRepaySubmitRecord
record:
byUserIdEqualsAndRepayTypeEquals
){
List
<
ApplyBill
>
billList
=
GSON
.
fromJson
(
record
.
getBills
(),
new
TypeToken
<
List
<
ApplyBill
>>()
{
List
<
ApplyBill
>
billList
=
new
Gson
()
.
fromJson
(
record
.
getBills
(),
new
TypeToken
<
List
<
ApplyBill
>>()
{
}.
getType
());
if
(!
Collections
.
disjoint
(
list
,
billList
)){
log
.
error
(
"saveSubmitRecord | 提交时发现已经提交过了,请确认,newBills={},existBills={}"
,
list
.
toString
(),
billList
.
toString
());
...
...
@@ -195,7 +194,7 @@ public class VccServiceImpl implements IVccService {
}
OfflineRepaySubmitParam
param
=
new
OfflineRepaySubmitParam
();
BeanUtils
.
copyProperties
(
bySerialNoEquals
,
param
);
List
<
ApplyBill
>
billList
=
GSON
.
fromJson
(
bySerialNoEquals
.
getBills
(),
new
TypeToken
<
List
<
ApplyBill
>>()
{
List
<
ApplyBill
>
billList
=
new
Gson
()
.
fromJson
(
bySerialNoEquals
.
getBills
(),
new
TypeToken
<
List
<
ApplyBill
>>()
{
}.
getType
());
param
.
setList
(
billList
);
String
[]
split
=
bySerialNoEquals
.
getCredentialsAddress
().
split
(
","
);
...
...
@@ -238,7 +237,7 @@ public class VccServiceImpl implements IVccService {
// }
if
(
1
==
bySerialNoEquals
.
getRepayType
()){
//月还账单
List
<
ApplyBill
>
billList
=
GSON
.
fromJson
(
bySerialNoEquals
.
getBills
(),
new
TypeToken
<
List
<
ApplyBill
>>()
{
List
<
ApplyBill
>
billList
=
new
Gson
()
.
fromJson
(
bySerialNoEquals
.
getBills
(),
new
TypeToken
<
List
<
ApplyBill
>>()
{
}.
getType
());
StringBuilder
stringBuilder
=
new
StringBuilder
();
for
(
ApplyBill
applyBill:
billList
){
...
...
@@ -331,7 +330,7 @@ public class VccServiceImpl implements IVccService {
submitRecordVo
.
setApprovalStatusName
(
ApprovalStatus
.
getDescByValue
(
submitRecordVo
.
getApprovalStatus
()));
if
(
1
==
submitRecordVo
.
getRepayType
())
{
//月还账单
List
<
ApplyBill
>
billList
=
GSON
.
fromJson
(
submitRecordVo
.
getBills
(),
new
TypeToken
<
List
<
ApplyBill
>>()
{
List
<
ApplyBill
>
billList
=
new
Gson
()
.
fromJson
(
submitRecordVo
.
getBills
(),
new
TypeToken
<
List
<
ApplyBill
>>()
{
}.
getType
());
StringBuilder
stringBuilder
=
new
StringBuilder
();
for
(
ApplyBill
applyBill
:
billList
)
{
...
...
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