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
64a3562e
Commit
64a3562e
authored
Mar 10, 2020
by
王向伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单流程图查看
parent
59c38dc3
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
195 additions
and
23 deletions
+195
-23
FlowNode.java
...ain/java/cn/quantgroup/customer/model/order/FlowNode.java
+31
-0
OrderRest.java
src/main/java/cn/quantgroup/customer/rest/OrderRest.java
+10
-0
OrderMappingQueryParam.java
...tomer/rest/param/ordermapping/OrderMappingQueryParam.java
+2
-0
UserCombinationParam.java
...tgroup/customer/rest/param/user/UserCombinationParam.java
+5
-0
IOrderService.java
...in/java/cn/quantgroup/customer/service/IOrderService.java
+20
-0
IUserService.java
...ain/java/cn/quantgroup/customer/service/IUserService.java
+0
-1
IXyqbService.java
...ain/java/cn/quantgroup/customer/service/IXyqbService.java
+4
-1
OrderServiceImpl.java
...cn/quantgroup/customer/service/impl/OrderServiceImpl.java
+59
-0
UserServiceImpl.java
.../cn/quantgroup/customer/service/impl/UserServiceImpl.java
+54
-19
XyqbServiceImpl.java
.../cn/quantgroup/customer/service/impl/XyqbServiceImpl.java
+10
-2
No files found.
src/main/java/cn/quantgroup/customer/model/order/FlowNode.java
0 → 100644
View file @
64a3562e
package
cn
.
quantgroup
.
customer
.
model
.
order
;
import
lombok.Data
;
/**
*
* @author Wang Xiangwei
* @version 2020/3/10
*/
@Data
public
class
FlowNode
{
/**
* 节点标识
*/
private
String
node
;
/**
* 节点描述
*/
private
String
name
;
/**
* 节点备注
*/
private
String
remark
;
/**
* 0: 未经过, 1: 已经过, 2: 当前节点, 3: 失败最终节点
*/
private
Integer
status
;
}
src/main/java/cn/quantgroup/customer/rest/OrderRest.java
View file @
64a3562e
package
cn
.
quantgroup
.
customer
.
rest
;
import
cn.quantgroup.customer.rest.vo.JsonResult
;
import
cn.quantgroup.customer.service.IOrderService
;
import
cn.quantgroup.customer.service.IXyqbService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -22,9 +23,18 @@ public class OrderRest {
@Autowired
private
IXyqbService
xyqbService
;
@Autowired
private
IOrderService
orderService
;
@GetMapping
(
"/loan/{loanId}"
)
public
JsonResult
getLoanOrderDetail
(
@PathVariable
Long
loanId
){
return
xyqbService
.
findLoanDetail
(
loanId
);
}
@GetMapping
(
"/flowchart/{orderNo}"
)
public
JsonResult
getFlowChart
(
@PathVariable
String
orderNo
){
return
orderService
.
findFlowChart
(
orderNo
);
}
}
src/main/java/cn/quantgroup/customer/rest/param/ordermapping/OrderMappingQueryParam.java
View file @
64a3562e
...
...
@@ -13,5 +13,7 @@ public class OrderMappingQueryParam {
private
String
channelOrderNo
;
private
Long
channelId
;
private
String
applyOrderNo
;
}
src/main/java/cn/quantgroup/customer/rest/param/user/UserCombinationParam.java
View file @
64a3562e
...
...
@@ -10,6 +10,11 @@ import lombok.Data;
@Data
public
class
UserCombinationParam
{
/**
* 渠道号
*/
private
Long
channelId
;
/**
* 渠道订单号
*/
...
...
src/main/java/cn/quantgroup/customer/service/IOrderService.java
0 → 100644
View file @
64a3562e
package
cn
.
quantgroup
.
customer
.
service
;
import
cn.quantgroup.customer.model.order.FlowNode
;
import
cn.quantgroup.customer.rest.vo.JsonResult
;
import
java.util.List
;
/**
* @author Wang Xiangwei
* @version 2020/3/10
*/
public
interface
IOrderService
{
/**
* 查看流程图
* @param applyOrderNo
* @return
*/
JsonResult
<
List
<
FlowNode
>>
findFlowChart
(
String
applyOrderNo
);
}
src/main/java/cn/quantgroup/customer/service/IUserService.java
View file @
64a3562e
package
cn
.
quantgroup
.
customer
.
service
;
import
cn.quantgroup.customer.model.xyqbuser.UserBasicInfo
;
import
cn.quantgroup.customer.rest.param.phone.ModifyPhoneAudit
;
import
cn.quantgroup.customer.rest.param.phone.ModifyPhoneFeedback
;
import
cn.quantgroup.customer.rest.param.phone.ModifyPhoneQuery
;
...
...
src/main/java/cn/quantgroup/customer/service/IXyqbService.java
View file @
64a3562e
package
cn
.
quantgroup
.
customer
.
service
;
import
cn.quantgroup.customer.model.order.FlowNode
;
import
cn.quantgroup.customer.rest.param.card.ModifyReservePhone
;
import
cn.quantgroup.customer.rest.param.card.UnBindCardModel
;
import
cn.quantgroup.customer.rest.param.applyorder.ApplyOrderQuery
;
import
cn.quantgroup.customer.rest.param.repay.RepayOrderQuery
;
import
cn.quantgroup.customer.rest.vo.JsonResult
;
import
java.util.List
;
public
interface
IXyqbService
{
String
findRepayOrders
(
RepayOrderQuery
repayOrderQuery
);
...
...
@@ -22,7 +25,7 @@ public interface IXyqbService {
* @param orderNo 申请订单号
* @return
*/
JsonResult
findFlowChart
(
String
orderNo
);
JsonResult
<
List
<
FlowNode
>>
findFlowChart
(
String
orderNo
);
/**
...
...
src/main/java/cn/quantgroup/customer/service/impl/OrderServiceImpl.java
0 → 100644
View file @
64a3562e
package
cn
.
quantgroup
.
customer
.
service
.
impl
;
import
cn.quantgroup.customer.model.kaordermapping.LoanOrderMapping
;
import
cn.quantgroup.customer.model.order.FlowNode
;
import
cn.quantgroup.customer.rest.param.ordermapping.OrderMappingQueryParam
;
import
cn.quantgroup.customer.rest.vo.JsonResult
;
import
cn.quantgroup.customer.service.IKaService
;
import
cn.quantgroup.customer.service.IOrderService
;
import
cn.quantgroup.customer.service.IXyqbService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Objects
;
/**
* @author Wang Xiangwei
* @version 2020/3/10
*/
@Slf4j
@Service
public
class
OrderServiceImpl
implements
IOrderService
{
@Autowired
private
IKaService
kaService
;
@Autowired
private
IXyqbService
xyqbService
;
@Override
public
JsonResult
<
List
<
FlowNode
>>
findFlowChart
(
String
applyOrderNo
)
{
String
logPre
=
"OrderServiceImpl.findFlowChart"
;
log
.
info
(
"{} 查询流程图 applyOrderNo={}"
,
logPre
,
applyOrderNo
);
OrderMappingQueryParam
param
=
new
OrderMappingQueryParam
();
param
.
setApplyOrderNo
(
applyOrderNo
);
JsonResult
<
LoanOrderMapping
>
orderMappingResult
=
kaService
.
findOrderMapping
(
param
);
LoanOrderMapping
head
=
null
;
if
(
orderMappingResult
.
isSuccess
()){
head
=
orderMappingResult
.
getData
();
log
.
info
(
"{},申请订单号查询orderMapping applyOrderNo={},data={}"
,
logPre
,
applyOrderNo
,
head
);
}
JsonResult
<
List
<
FlowNode
>>
flowChart
=
xyqbService
.
findFlowChart
(
applyOrderNo
);
if
(!
flowChart
.
isSuccess
()){
return
flowChart
;
}
List
<
FlowNode
>
flowNodeList
=
flowChart
.
getData
();
if
(!
Objects
.
isNull
(
head
)){
FlowNode
flowNode
=
new
FlowNode
();
flowNode
.
setName
(
"渠道用户信息导入"
);
flowNode
.
setStatus
(
1
);
flowNode
.
setNode
(
head
.
getId
().
toString
());
flowNodeList
.
add
(
0
,
flowNode
);
}
return
JsonResult
.
buildSuccessResult
(
""
,
flowNodeList
);
}
}
src/main/java/cn/quantgroup/customer/service/impl/UserServiceImpl.java
View file @
64a3562e
...
...
@@ -187,15 +187,18 @@ public class UserServiceImpl implements IUserService {
}
if
(!
Objects
.
isNull
(
userCombinationParam
.
getLoanId
())
||
StringUtils
.
isNotBlank
(
userCombinationParam
.
getChannelOrderNo
())
||
StringUtils
.
isNotBlank
(
userCombinationParam
.
getOrderNo
()))
{
if
(!
Objects
.
isNull
(
userCombinationParam
.
getLoanId
())
||
StringUtils
.
isNotBlank
(
userCombinationParam
.
getChannelOrderNo
())
||
StringUtils
.
isNotBlank
(
userCombinationParam
.
getOrderNo
()))
{
//通过ka获得userId然后通过userId查询
OrderMappingQueryParam
param
=
new
OrderMappingQueryParam
();
param
.
setApplyOrderNo
(
userCombinationParam
.
getOrderNo
());
param
.
setChannelOrderNo
(
userCombinationParam
.
getChannelOrderNo
());
param
.
setLoanId
(
userCombinationParam
.
getLoanId
());
param
.
setChannelId
(
userCombinationParam
.
getChannelId
());
JsonResult
<
LoanOrderMapping
>
orderMapping
=
kaService
.
findOrderMapping
(
param
);
if
(!
orderMapping
.
isSuccess
())
{
log
.
error
(
"{} 查询用户失败 param={} result={}"
,
LOG_PRE
,
param
,
orderMapping
);
if
(!
orderMapping
.
isSuccess
()
||
Objects
.
isNull
(
orderMapping
.
getData
()))
{
log
.
error
(
"{} 查询用户失败 param={} result={}"
,
LOG_PRE
,
param
,
orderMapping
);
return
orderMapping
;
}
Long
qgUserId
=
orderMapping
.
getData
().
getQgUserId
();
...
...
@@ -292,63 +295,75 @@ public class UserServiceImpl implements IUserService {
}
/**
* 验证参数不全为空且合法
* 验证参数
* 分两类 订单类查询参数 用户类查询参数 订单类参数优先级高
* 每类参数只能有一个 如 订单类参数只能有一个(有申请订单号就不能有借款订单号和渠道订单号) 用户类同理
*
* @param userCombinationParam
* @return
*/
private
Tuple
<
Boolean
,
String
>
validate
(
UserCombinationParam
userCombinationParam
)
{
Tuple
<
Boolean
,
String
>
result
=
new
Tuple
<>();
result
.
setKey
(
true
);
int
paramCount
=
0
;
result
.
setKey
(
false
);
if
(
Objects
.
isNull
(
userCombinationParam
))
{
result
.
setKey
(
false
);
result
.
setValue
(
"对象为空"
);
return
result
;
}
if
(
StringUtils
.
isNotBlank
(
userCombinationParam
.
getChannelOrderNo
()))
{
return
result
;
if
(
Objects
.
isNull
(
userCombinationParam
.
getChannelId
()))
{
result
.
setValue
(
"查询参数渠道订单号和渠道号要同时存在"
);
return
result
;
}
paramCount
++;
}
if
(
StringUtils
.
isNotBlank
(
userCombinationParam
.
getIdNo
()))
{
if
(
IdcardUtils
.
validateIdCard18
(
userCombinationParam
.
getIdNo
())
||
IdcardUtils
.
validateIdCard15
(
userCombinationParam
.
getIdNo
()))
{
return
result
;
paramCount
++
;
}
else
{
result
.
setKey
(
false
);
result
.
setValue
(
"身份证号格式有误"
);
return
result
;
}
}
if
(
StringUtils
.
isNotBlank
(
userCombinationParam
.
getOrderNo
()))
{
return
result
;
paramCount
++
;
}
if
(!
Objects
.
isNull
(
userCombinationParam
.
getUserId
()))
{
return
result
;
paramCount
++
;
}
if
(
StringUtils
.
isNotBlank
(
userCombinationParam
.
getPhoneNo
()))
{
if
(
ValidationUtil
.
validatePhoneNo
(
userCombinationParam
.
getPhoneNo
()))
{
return
result
;
paramCount
++
;
}
else
{
result
.
setKey
(
false
);
result
.
setValue
(
"手机号格式错误"
);
return
result
;
}
}
if
(
StringUtils
.
isNotBlank
(
userCombinationParam
.
getUuid
()))
{
return
result
;
paramCount
++
;
}
if
(!
Objects
.
isNull
(
userCombinationParam
.
getLoanId
()))
{
paramCount
++;
}
//参数个数验证
if
(
paramCount
==
0
)
{
result
.
setValue
(
"参数全部为空"
);
return
result
;
}
if
(
paramCount
>
1
)
{
result
.
setValue
(
"参数个数大于一个"
);
return
result
;
}
result
.
setKey
(
false
);
result
.
setValue
(
"字段全部为空"
);
result
.
setKey
(
true
);
return
result
;
}
...
...
@@ -362,9 +377,29 @@ public class UserServiceImpl implements IUserService {
return
userInfo
;
}
UserBasicInfo
userBasicInfo
=
(
UserBasicInfo
)
userInfo
.
getData
();
//申请订单查询(如果查询参数是渠道订单号)将渠道订单号转为借款订单号和申请订单号
Long
loanId
=
userCombinationParam
.
getLoanId
();
String
applyNo
=
userCombinationParam
.
getOrderNo
();
if
(
StringUtils
.
isNotBlank
(
userCombinationParam
.
getChannelOrderNo
()))
{
OrderMappingQueryParam
orderMappingQueryParam
=
new
OrderMappingQueryParam
();
orderMappingQueryParam
.
setChannelId
(
userCombinationParam
.
getChannelId
());
orderMappingQueryParam
.
setChannelOrderNo
(
userCombinationParam
.
getChannelOrderNo
());
JsonResult
<
LoanOrderMapping
>
orderMappingJsonResult
=
kaService
.
findOrderMapping
(
orderMappingQueryParam
);
LoanOrderMapping
data
;
if
(!
orderMappingJsonResult
.
isSuccess
()
||
Objects
.
isNull
(
data
=
orderMappingJsonResult
.
getData
()))
{
log
.
error
(
"{} 根据渠道号查询orderMapping失败 result={}"
,
logPre
,
orderMappingJsonResult
);
return
orderMappingJsonResult
;
}
loanId
=
data
.
getLoanId
();
applyNo
=
data
.
getApplyNo
();
}
//申请订单查询
ApplyOrderQuery
applyOrderQuery
=
new
ApplyOrderQuery
();
applyOrderQuery
.
setLoanId
(
userCombinationParam
.
getLoanId
()
);
applyOrderQuery
.
setOrderNo
(
userCombinationParam
.
getOrderNo
()
);
applyOrderQuery
.
setLoanId
(
loanId
);
applyOrderQuery
.
setOrderNo
(
applyNo
);
applyOrderQuery
.
setUserId
(
userBasicInfo
.
getUserId
());
JsonResult
applyOrders
=
xyqbService
.
findApplyOrders
(
applyOrderQuery
);
if
(!
applyOrders
.
isSuccess
())
{
...
...
src/main/java/cn/quantgroup/customer/service/impl/XyqbServiceImpl.java
View file @
64a3562e
package
cn
.
quantgroup
.
customer
.
service
.
impl
;
import
cn.quantgroup.customer.model.order.ApplyOrder
;
import
cn.quantgroup.customer.model.order.FlowNode
;
import
cn.quantgroup.customer.rest.param.applyorder.ApplyOrderQuery
;
import
cn.quantgroup.customer.rest.param.card.ModifyReservePhone
;
import
cn.quantgroup.customer.rest.param.card.UnBindCardModel
;
...
...
@@ -93,7 +94,7 @@ public class XyqbServiceImpl implements IXyqbService {
}
@Override
public
JsonResult
findFlowChart
(
String
orderNo
)
{
public
JsonResult
<
List
<
FlowNode
>>
findFlowChart
(
String
orderNo
)
{
String
logPre
=
"XyqbServiceImpl.findFlowChart"
;
log
.
info
(
"{} 流程日志查询 orderNo={}"
,
logPre
,
orderNo
);
String
url
=
xyqbSysUrl
+
"/ex/inside/customer_sys/query/applyOrder"
;
...
...
@@ -108,10 +109,17 @@ public class XyqbServiceImpl implements IXyqbService {
header
.
put
(
"Content-type"
,
"application/x-www-form-urlencoded"
);
JsonResult
jsonResult
=
httpService
.
post
(
url
,
header
,
param
,
JsonResult
.
class
);
if
(
Objects
.
isNull
(
jsonResult
)
||
jsonResult
.
isSuccess
()){
if
(
Objects
.
isNull
(
jsonResult
)
||
!
jsonResult
.
isSuccess
()){
log
.
error
(
"{} 调用信用钱包失败 url={}, header={},param={},result={}"
,
logPre
,
url
,
header
,
param
,
jsonResult
);
return
JsonResult
.
buildErrorStateResult
(
"流程日志查询失败"
,
null
);
}
List
data
=
(
List
)
jsonResult
.
getData
();
List
<
FlowNode
>
flowNodeList
=
new
ArrayList
<>();
data
.
forEach
(
e
->{
flowNodeList
.
add
(
GSON
.
fromJson
(
e
.
toString
(),
FlowNode
.
class
));
});
jsonResult
.
setData
(
flowNodeList
);
return
jsonResult
;
}
...
...
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