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
eadab47a
Commit
eadab47a
authored
Oct 14, 2020
by
鹿朋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
结清证明下载
parent
b0dad9e9
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
201 additions
and
44 deletions
+201
-44
ActiveApplyOrder.java
.../cn/quantgroup/customer/model/order/ActiveApplyOrder.java
+3
-1
ApplySettleResult.java
...cn/quantgroup/customer/model/order/ApplySettleResult.java
+14
-0
SettleStatus.java
...java/cn/quantgroup/customer/model/order/SettleStatus.java
+16
-0
OrderRest.java
src/main/java/cn/quantgroup/customer/rest/OrderRest.java
+4
-2
JsonResult.java
src/main/java/cn/quantgroup/customer/rest/vo/JsonResult.java
+3
-0
IFileService.java
...ain/java/cn/quantgroup/customer/service/IFileService.java
+12
-0
IIceService.java
...main/java/cn/quantgroup/customer/service/IIceService.java
+4
-2
IOrderService.java
...in/java/cn/quantgroup/customer/service/IOrderService.java
+2
-1
FileServiceImpl.java
.../cn/quantgroup/customer/service/impl/FileServiceImpl.java
+48
-0
IceServiceImpl.java
...a/cn/quantgroup/customer/service/impl/IceServiceImpl.java
+51
-17
OrderServiceImpl.java
...cn/quantgroup/customer/service/impl/OrderServiceImpl.java
+13
-3
UserServiceImpl.java
.../cn/quantgroup/customer/service/impl/UserServiceImpl.java
+31
-18
No files found.
src/main/java/cn/quantgroup/customer/model/order/ActiveApplyOrder.java
View file @
eadab47a
...
...
@@ -45,7 +45,9 @@ public class ActiveApplyOrder {
private
String
updateAt
;
private
String
remark
;
/**
* 0-未申请(显示申请按钮) 1-处理中 2-可下载(显示下载按钮) 3-不支持(按钮不显示)
*/
private
Integer
settleFlag
;
}
src/main/java/cn/quantgroup/customer/model/order/ApplySettleResult.java
0 → 100644
View file @
eadab47a
package
cn
.
quantgroup
.
customer
.
model
.
order
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
/**
* @author lupeng
* 2020/10/14
*/
@Data
@AllArgsConstructor
public
class
ApplySettleResult
{
private
Boolean
result
;
}
src/main/java/cn/quantgroup/customer/model/order/SettleStatus.java
0 → 100644
View file @
eadab47a
package
cn
.
quantgroup
.
customer
.
model
.
order
;
import
lombok.Data
;
/**
* @author lupeng
* 2020/10/14
*/
@Data
public
class
SettleStatus
{
private
Long
loanId
;
/**
* 结清证明申请进度 0-未申请 1-处理中 2-可下载 3-不支持
*/
private
Integer
proofProgress
;
}
src/main/java/cn/quantgroup/customer/rest/OrderRest.java
View file @
eadab47a
...
...
@@ -13,6 +13,8 @@ import org.springframework.web.bind.annotation.PathVariable;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletResponse
;
/**
* @author Wang Xiangwei
* @version 2020/3/9
...
...
@@ -103,8 +105,8 @@ public class OrderRest {
* @return
*/
@GetMapping
(
"/download_settle/{loanId}"
)
public
JsonResult
downloadSettle
(
@PathVariable
Long
loanId
)
{
public
JsonResult
downloadSettle
(
HttpServletResponse
response
,
@PathVariable
Long
loanId
)
{
log
.
info
(
"[结清证明下载],请求参数:loanId={}"
,
loanId
);
return
orderService
.
downloadSettle
(
loanId
);
return
orderService
.
downloadSettle
(
response
,
loanId
);
}
}
src/main/java/cn/quantgroup/customer/rest/vo/JsonResult.java
View file @
eadab47a
...
...
@@ -92,4 +92,7 @@ public class JsonResult<T> implements Serializable {
return
"0000"
.
equals
(
code
)
&&
"0000"
.
equals
(
businessCode
);
}
public
boolean
isCodeSuccess
()
{
return
"0000"
.
equals
(
code
);
}
}
src/main/java/cn/quantgroup/customer/service/IFileService.java
View file @
eadab47a
package
cn
.
quantgroup
.
customer
.
service
;
import
cn.quantgroup.customer.rest.vo.JsonResult
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.BufferedInputStream
;
import
java.net.MalformedURLException
;
...
...
@@ -10,4 +13,13 @@ import java.net.MalformedURLException;
public
interface
IFileService
{
BufferedInputStream
getBufferedInputStream
(
Long
loanId
)
throws
MalformedURLException
,
Exception
;
/**
* 下载文件
* @param response
* @param fileName
* @param file
* @return
*/
JsonResult
outputFile
(
HttpServletResponse
response
,
String
fileName
,
byte
[]
file
);
}
src/main/java/cn/quantgroup/customer/service/IIceService.java
View file @
eadab47a
...
...
@@ -3,9 +3,11 @@ package cn.quantgroup.customer.service;
import
cn.quantgroup.customer.model.order.ApplyOrder
;
import
cn.quantgroup.customer.model.order.FlowNode
;
import
cn.quantgroup.customer.model.order.LoanOrder
;
import
cn.quantgroup.customer.model.order.SettleStatus
;
import
cn.quantgroup.customer.rest.param.applyorder.ApplyOrderQuery
;
import
cn.quantgroup.customer.rest.vo.JsonResult
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -14,9 +16,9 @@ public interface IIceService {
JsonResult
<
LoanOrder
>
findLoanOrder
(
Long
loanId
);
JsonResult
<
List
<
FlowNode
>>
findFlowChart
(
String
orderNo
);
JsonResult
<
Map
<
Long
,
Integer
>>
findSettleFlag
(
List
<
Long
>
loanIds
);
JsonResult
<
List
<
SettleStatus
>>
findSettleFlag
(
List
<
Long
>
loanIds
);
JsonResult
applySettle
(
Long
loanId
);
JsonResult
downloadSettle
(
Long
loanId
);
JsonResult
downloadSettle
(
HttpServletResponse
response
,
Long
loanId
);
}
src/main/java/cn/quantgroup/customer/service/IOrderService.java
View file @
eadab47a
...
...
@@ -7,6 +7,7 @@ import cn.quantgroup.customer.rest.param.ordermapping.OperateEntryParam;
import
cn.quantgroup.customer.rest.param.ordermapping.OrderQueryParam
;
import
cn.quantgroup.customer.rest.vo.JsonResult
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -77,5 +78,5 @@ public interface IOrderService{
* @param loanId
* @return
*/
JsonResult
downloadSettle
(
Long
loanId
);
JsonResult
downloadSettle
(
HttpServletResponse
response
,
Long
loanId
);
}
src/main/java/cn/quantgroup/customer/service/impl/FileServiceImpl.java
View file @
eadab47a
package
cn
.
quantgroup
.
customer
.
service
.
impl
;
import
cn.quantgroup.customer.rest.vo.JsonResult
;
import
cn.quantgroup.customer.service.IFileService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.springframework.stereotype.Service
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.BufferedInputStream
;
import
java.io.IOException
;
import
java.io.OutputStream
;
import
java.io.UnsupportedEncodingException
;
import
java.net.HttpURLConnection
;
import
java.net.MalformedURLException
;
import
java.net.URL
;
import
java.net.URLEncoder
;
/**
* 文件流转发
...
...
@@ -15,6 +23,7 @@ import java.net.URL;
* @version 2020-09-30 17:28
*/
@Service
@Slf4j
public
class
FileServiceImpl
implements
IFileService
{
...
...
@@ -64,4 +73,43 @@ public class FileServiceImpl implements IFileService {
}
return
null
;
}
@Override
public
JsonResult
outputFile
(
HttpServletResponse
response
,
String
fileName
,
byte
[]
file
){
if
(
ArrayUtils
.
isEmpty
(
file
))
{
log
.
info
(
"get file download url failed."
);
return
JsonResult
.
buildErrorStateResult
(
"file is null"
);
}
// 设置相关头信息
response
.
setContentType
(
"multipart/form-data"
);
try
{
fileName
=
URLEncoder
.
encode
(
fileName
,
"UTF8"
);
}
catch
(
UnsupportedEncodingException
e
)
{
log
.
error
(
"fileName encode failed. errorMessage[{}]"
,
e
.
getMessage
());
return
JsonResult
.
buildErrorStateResult
(
"fileName encode failed"
);
}
response
.
setHeader
(
"Content-disposition"
,
"attachment;filename="
+
fileName
);
response
.
addHeader
(
"Pragma"
,
"no-cache"
);
response
.
addHeader
(
"Cache-Control"
,
"no-cache"
);
response
.
addDateHeader
(
"Expries"
,
0
);
// 返回文件
OutputStream
out
=
null
;
try
{
out
=
response
.
getOutputStream
();
out
.
write
(
file
);
out
.
flush
();
}
catch
(
IOException
e
)
{
log
.
error
(
"download file failed. errorMessage[{}]"
,
e
.
getMessage
());
return
JsonResult
.
buildErrorStateResult
(
"download file failed"
);
}
finally
{
if
(
null
!=
out
)
{
try
{
out
.
close
();
}
catch
(
IOException
e
)
{
log
.
error
(
"OutputStream close failed. errorMessage[{}]"
,
e
.
getMessage
());
}
}
}
return
JsonResult
.
buildSuccessResult
(
"ok"
,
null
);
}
}
src/main/java/cn/quantgroup/customer/service/impl/IceServiceImpl.java
View file @
eadab47a
package
cn
.
quantgroup
.
customer
.
service
.
impl
;
import
cn.quantgroup.customer.model.order.ApplyOrder
;
import
cn.quantgroup.customer.model.order.FlowNode
;
import
cn.quantgroup.customer.model.order.LoanOrder
;
import
cn.quantgroup.customer.model.order.*
;
import
cn.quantgroup.customer.rest.param.applyorder.ApplyOrderQuery
;
import
cn.quantgroup.customer.rest.vo.JsonResult
;
import
cn.quantgroup.customer.service.IFileService
;
import
cn.quantgroup.customer.service.IIceService
;
import
cn.quantgroup.customer.service.http.IHttpService
;
import
cn.quantgroup.customer.util.JSONTools
;
...
...
@@ -12,11 +11,16 @@ import com.fasterxml.jackson.core.type.TypeReference;
import
com.google.common.collect.Maps
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
sun.security.pkcs11.wrapper.Constants
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.*
;
import
java.net.URLEncoder
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Objects
;
...
...
@@ -30,6 +34,9 @@ public class IceServiceImpl implements IIceService {
private
final
IHttpService
httpService
;
@Autowired
private
IFileService
fileService
;
@Autowired
public
IceServiceImpl
(
IHttpService
httpService
)
{
...
...
@@ -138,10 +145,10 @@ public class IceServiceImpl implements IIceService {
}
@Override
public
JsonResult
<
Map
<
Long
,
Integer
>>
findSettleFlag
(
List
<
Long
>
loanIds
)
{
public
JsonResult
<
List
<
SettleStatus
>>
findSettleFlag
(
List
<
Long
>
loanIds
)
{
String
logPre
=
"IceService.findSettleFlag"
;
log
.
info
(
"{} 结清状态查询 loanIds={}"
,
logPre
,
loanIds
);
String
url
=
iceUrl
+
""
;
String
url
=
iceUrl
+
"
/middle_office/settle_proof/status
"
;
if
(
CollectionUtils
.
isEmpty
(
loanIds
))
{
log
.
error
(
"{} 订单号全为空 loanIds={}"
,
logPre
,
loanIds
);
return
JsonResult
.
buildErrorStateResult
(
"申请订单号为空"
,
null
);
...
...
@@ -151,7 +158,7 @@ public class IceServiceImpl implements IIceService {
Map
<
String
,
String
>
header
=
Maps
.
newHashMap
();
header
.
put
(
"Content-Type"
,
"application/x-www-form-urlencoded"
);
String
result
=
null
;
String
result
;
try
{
result
=
httpService
.
post
(
url
,
header
,
param
);
log
.
info
(
"{} 结清状态查询 loanIds={},result:{}"
,
logPre
,
loanIds
,
result
);
...
...
@@ -164,9 +171,9 @@ public class IceServiceImpl implements IIceService {
log
.
error
(
"{} 调用失败 url={}, header={},param={},result={}"
,
logPre
,
url
,
header
,
param
,
result
);
return
JsonResult
.
buildErrorStateResult
(
"结清状态查询失败"
,
null
);
}
TypeReference
<
JsonResult
<
Map
<
Long
,
Integer
>>>
typeToken
=
new
TypeReference
<
JsonResult
<
Map
<
Long
,
Integer
>>>()
{
TypeReference
<
JsonResult
<
List
<
SettleStatus
>>>
typeToken
=
new
TypeReference
<
JsonResult
<
List
<
SettleStatus
>>>()
{
};
JsonResult
<
Map
<
Long
,
Integer
>>
jsonResult
=
JSONTools
.
deserialize
(
result
,
typeToken
);
JsonResult
<
List
<
SettleStatus
>>
jsonResult
=
JSONTools
.
deserialize
(
result
,
typeToken
);
return
jsonResult
;
}
...
...
@@ -174,9 +181,9 @@ public class IceServiceImpl implements IIceService {
public
JsonResult
applySettle
(
Long
loanId
)
{
String
logPre
=
"IceService.applySettle"
;
log
.
info
(
"{} 申请结清下载 loanIds={}"
,
logPre
,
loanId
);
String
url
=
iceUrl
+
""
;
if
(
loanId
!
=
null
)
{
log
.
error
(
"{} 申请订单号
为空 loanId={}"
,
logPre
,
loanId
);
String
url
=
iceUrl
+
"
/middle_office/settleproof/apply
"
;
if
(
loanId
=
=
null
)
{
log
.
error
(
"{} 申请订单号
loanId为空"
,
logPre
);
return
JsonResult
.
buildErrorStateResult
(
"申请订单号为空"
,
null
);
}
Map
<
String
,
Object
>
param
=
Maps
.
newHashMap
();
...
...
@@ -184,7 +191,7 @@ public class IceServiceImpl implements IIceService {
Map
<
String
,
String
>
header
=
Maps
.
newHashMap
();
header
.
put
(
"Content-Type"
,
"application/x-www-form-urlencoded"
);
String
result
=
null
;
String
result
;
try
{
result
=
httpService
.
post
(
url
,
header
,
param
);
log
.
info
(
"{} 申请结清下载 loanId={},result:{}"
,
logPre
,
loanId
,
result
);
...
...
@@ -197,14 +204,41 @@ public class IceServiceImpl implements IIceService {
log
.
error
(
"{} 调用失败 url={}, header={},param={},result={}"
,
logPre
,
url
,
header
,
param
,
result
);
return
JsonResult
.
buildErrorStateResult
(
"申请结清下载失败"
,
null
);
}
TypeReference
<
JsonResult
<
Boolean
>>
typeToken
=
new
TypeReference
<
JsonResult
<
Boolean
>
>()
{
TypeReference
<
JsonResult
>
typeToken
=
new
TypeReference
<
JsonResult
>()
{
};
JsonResult
<
Boolean
>
jsonResult
=
JSONTools
.
deserialize
(
result
,
typeToken
);
return
jsonResult
;
return
JSONTools
.
deserialize
(
result
,
typeToken
);
}
@Override
public
JsonResult
downloadSettle
(
Long
loanId
)
{
return
null
;
public
JsonResult
downloadSettle
(
HttpServletResponse
response
,
Long
loanId
)
{
String
logPre
=
"IceService.downloadSettle"
;
log
.
info
(
"{} 结清证明下载 loanIds={}"
,
logPre
,
loanId
);
String
url
=
iceUrl
+
"/middle_office/settle_proof/download"
;
if
(
loanId
==
null
)
{
log
.
error
(
"{} 申请订单号loanId为空 loanId"
,
logPre
);
return
JsonResult
.
buildErrorStateResult
(
"申请订单号为空"
,
null
);
}
Map
<
String
,
Object
>
param
=
Maps
.
newHashMap
();
param
.
put
(
"loanId"
,
loanId
);
Map
<
String
,
String
>
header
=
Maps
.
newHashMap
();
header
.
put
(
"Content-Type"
,
"application/x-www-form-urlencoded"
);
String
result
;
try
{
result
=
httpService
.
post
(
url
,
header
,
param
);
log
.
info
(
"{} 结清证明下载 loanId={},result:{}"
,
logPre
,
loanId
,
result
);
}
catch
(
Exception
e
)
{
log
.
error
(
"{} 通讯异常 url={},param={}"
,
logPre
,
url
,
param
,
e
);
return
JsonResult
.
buildErrorStateResult
(
"通讯异常"
,
null
);
}
if
(
StringUtils
.
isBlank
(
result
))
{
log
.
error
(
"{} 调用失败 url={}, header={},param={},result={}"
,
logPre
,
url
,
header
,
param
,
result
);
return
JsonResult
.
buildErrorStateResult
(
"结清证明下载失败"
,
null
);
}
TypeReference
<
JsonResult
>
typeToken
=
new
TypeReference
<
JsonResult
>()
{
};
JsonResult
<
byte
[]>
jsonResult
=
JSONTools
.
deserialize
(
result
,
typeToken
);
return
fileService
.
outputFile
(
response
,
System
.
currentTimeMillis
()
+
loanId
+
"settle.pdf"
,
jsonResult
.
getData
());
}
}
src/main/java/cn/quantgroup/customer/service/impl/OrderServiceImpl.java
View file @
eadab47a
...
...
@@ -19,6 +19,7 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
javax.servlet.http.HttpServletResponse
;
import
java.math.BigDecimal
;
import
java.util.*
;
...
...
@@ -46,6 +47,8 @@ public class OrderServiceImpl implements IOrderService {
@Autowired
private
IIceService
iceService
;
@Autowired
private
IFileService
fileService
;
...
...
@@ -470,12 +473,19 @@ public class OrderServiceImpl implements IOrderService {
@Override
public
JsonResult
applySettle
(
Long
loanId
)
{
return
iceService
.
applySettle
(
loanId
);
JsonResult
iceResult
=
iceService
.
applySettle
(
loanId
);
ApplySettleResult
result
=
new
ApplySettleResult
(
true
);
if
(!
iceResult
.
isCodeSuccess
())
{
result
.
setResult
(
false
);
return
JsonResult
.
buildErrorStateResult
(
"申请失败"
,
result
);
}
else
{
return
JsonResult
.
buildSuccessResult
(
"申请成功"
,
result
);
}
}
@Override
public
JsonResult
downloadSettle
(
Long
loanId
)
{
return
iceService
.
downloadSettle
(
loanId
);
public
JsonResult
downloadSettle
(
HttpServletResponse
response
,
Long
loanId
)
{
return
iceService
.
downloadSettle
(
response
,
loanId
);
}
/**
...
...
src/main/java/cn/quantgroup/customer/service/impl/UserServiceImpl.java
View file @
eadab47a
...
...
@@ -8,6 +8,7 @@ import cn.quantgroup.customer.model.Tuple;
import
cn.quantgroup.customer.model.kaordermapping.LoanOrderMapping
;
import
cn.quantgroup.customer.model.order.ActiveApplyOrder
;
import
cn.quantgroup.customer.model.order.ApplyOrder
;
import
cn.quantgroup.customer.model.order.SettleStatus
;
import
cn.quantgroup.customer.model.xyqbuser.UserBasicInfo
;
import
cn.quantgroup.customer.model.xyqbuser.UserCombination
;
import
cn.quantgroup.customer.repo.UserRepo
;
...
...
@@ -482,6 +483,20 @@ public class UserServiceImpl implements IUserService {
Map
<
String
,
String
>
data
=
mapJsonResult
.
getData
();
activeApplyOrders
.
forEach
(
e
->
e
.
setChannelOrderNo
(
data
.
get
(
e
.
getApplyOrderNo
())));
}
// 添加能否申请结清证明
JsonResult
<
List
<
SettleStatus
>>
settleFlagResult
=
null
;
if
(
CollectionUtils
.
isNotEmpty
(
activeApplyOrders
))
{
settleFlagResult
=
iceService
.
findSettleFlag
(
activeApplyOrders
.
stream
().
filter
(
it
->
it
.
getLoanId
()
!=
null
).
map
(
ActiveApplyOrder:
:
getLoanId
).
collect
(
Collectors
.
toList
()));
}
if
(
settleFlagResult
!=
null
&&
settleFlagResult
.
isCodeSuccess
())
{
for
(
ActiveApplyOrder
activeOrder
:
activeApplyOrders
)
{
for
(
SettleStatus
settleStatus
:
settleFlagResult
.
getData
())
{
if
(
settleStatus
.
getLoanId
().
equals
(
activeOrder
.
getLoanId
()))
{
activeOrder
.
setSettleFlag
(
settleStatus
.
getProofProgress
());
}
}
}
}
}
if
(
CollectionUtils
.
isNotEmpty
(
invalidApplyOrders
))
{
...
...
@@ -527,7 +542,22 @@ public class UserServiceImpl implements IUserService {
//JsonResult<ApplyOrder> applyOrders = xyqbService.findApplyOrders(applyOrderQuery);
//todo 替换中台接口
JsonResult
<
ApplyOrder
>
applyOrders
=
iceService
.
findApplyOrders
(
applyOrderQuery
);
// // 添加能否结清标记
// if (applyOrders.isSuccess()) {
// JsonResult<Map<Long, Integer>> settleFlagResult = null;
// List<ActiveApplyOrder> activeOrders = applyOrders.getData().getActiveOrders();
// if (CollectionUtils.isNotEmpty(activeOrders)) {
// settleFlagResult = iceService.findSettleFlag(activeOrders.stream().filter(it-> it.getLoanId() != null).map(ActiveApplyOrder::getLoanId).collect(Collectors.toList()));
// }
// if (settleFlagResult != null && settleFlagResult.isSuccess()) {
// for (ActiveApplyOrder activeOrder : activeOrders) {
// Integer flag = settleFlagResult.getData().get(activeOrder.getLoanId());
// if (activeOrder.getLoanId() != null && flag != null) {
// activeOrder.setSettleFlag(flag);
// }
// }
// }
// }
return
applyOrders
;
}
...
...
@@ -541,23 +571,6 @@ public class UserServiceImpl implements IUserService {
//JsonResult<ApplyOrder> applyOrders = xyqbService.findApplyOrders(applyOrderQuery);
//todo 替换中台接口
JsonResult
<
ApplyOrder
>
applyOrders
=
iceService
.
findApplyOrders
(
applyOrderQuery
);
// 添加能否结清标记
if
(
applyOrders
.
isSuccess
())
{
JsonResult
<
Map
<
Long
,
Integer
>>
settleFlagResult
=
null
;
List
<
ActiveApplyOrder
>
activeOrders
=
applyOrders
.
getData
().
getActiveOrders
();
if
(
CollectionUtils
.
isNotEmpty
(
activeOrders
))
{
settleFlagResult
=
iceService
.
findSettleFlag
(
activeOrders
.
stream
().
filter
(
it
->
it
.
getLoanId
()
!=
null
).
map
(
ActiveApplyOrder:
:
getLoanId
).
collect
(
Collectors
.
toList
()));
}
if
(
settleFlagResult
!=
null
&&
settleFlagResult
.
isSuccess
())
{
for
(
ActiveApplyOrder
activeOrder
:
activeOrders
)
{
Integer
flag
=
settleFlagResult
.
getData
().
get
(
activeOrder
.
getLoanId
());
if
(
activeOrder
.
getLoanId
()
!=
null
&&
flag
!=
null
)
{
activeOrder
.
setSettleFlag
(
flag
);
}
}
}
}
return
applyOrders
;
}
...
...
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