Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
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
lanbaoming
jiedao-api-boot-master
Commits
393fc04c
Commit
393fc04c
authored
May 25, 2024
by
liuzeheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
业绩判断
parent
00d1abe9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
84 additions
and
78 deletions
+84
-78
OrderServiceImpl.java
...dao/module/order/service/order/impl/OrderServiceImpl.java
+84
-78
No files found.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderServiceImpl.java
View file @
393fc04c
...
@@ -588,18 +588,18 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -588,18 +588,18 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
// 海外仓归属发货人
// 海外仓归属发货人
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
}
else
{
}
else
{
if
(
order
.
getIsCargoControl
())
{
//
if (order.getIsCargoControl()) {
// 控货订单归属发货人
//
// 控货订单归属发货人
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
//
order.setCustomerId(orderConsignorDO.getCustomerId());
}
else
{
//
} else {
// 非控货订单 + 付款人为发货人 归属发货人, 其他归属收货人
//
// 非控货订单 + 付款人为发货人 归属发货人, 其他归属收货人
if
(
order
.
getDrawee
()
==
1
)
{
//
if (order.getDrawee() == 1) {
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
//
order.setCustomerId(orderConsignorDO.getCustomerId());
}
else
{
//
} else {
customerType
=
2
;
//
customerType = 2;
order
.
setCustomerId
(
orderConsigneeDO
.
getCustomerId
());
//
order.setCustomerId(orderConsigneeDO.getCustomerId());
}
//
}
}
//
}
// 补充业绩规则判断
// 补充业绩规则判断
if
(!
consignorCustomerDO
.
getNoConsignee
()
&&
!
order
.
getHasConsignee
()){
//发货人档案设置控货无收货人且订单无收获人,归属发货人业绩 -- 层级2
if
(!
consignorCustomerDO
.
getNoConsignee
()
&&
!
order
.
getHasConsignee
()){
//发货人档案设置控货无收货人且订单无收获人,归属发货人业绩 -- 层级2
...
@@ -873,18 +873,18 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -873,18 +873,18 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
// 海外仓归属发货人
// 海外仓归属发货人
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
}
else
{
}
else
{
if
(
order
.
getIsCargoControl
())
{
//
if (order.getIsCargoControl()) {
// 控货订单归属发货人
//
// 控货订单归属发货人
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
//
order.setCustomerId(orderConsignorDO.getCustomerId());
}
else
{
//
} else {
// 非控货订单 + 付款人为发货人 归属发货人, 其他归属收货人
//
// 非控货订单 + 付款人为发货人 归属发货人, 其他归属收货人
if
(
order
.
getDrawee
()
==
1
)
{
//
if (order.getDrawee() == 1) {
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
//
order.setCustomerId(orderConsignorDO.getCustomerId());
}
else
{
//
} else {
customerType
=
2
;
//
customerType = 2;
order
.
setCustomerId
(
orderConsigneeDO
.
getCustomerId
());
//
order.setCustomerId(orderConsigneeDO.getCustomerId());
}
//
}
}
//
}
// 补充业绩规则判断
// 补充业绩规则判断
if
(!
consignorDO
.
getNoConsignee
()
&&
!
order
.
getHasConsignee
()){
//发货人档案设置控货无收货人且订单无收获人,归属发货人业绩 -- 层级2
if
(!
consignorDO
.
getNoConsignee
()
&&
!
order
.
getHasConsignee
()){
//发货人档案设置控货无收货人且订单无收获人,归属发货人业绩 -- 层级2
...
@@ -926,7 +926,6 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -926,7 +926,6 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
}
else
{
}
else
{
//业绩归属公司
//业绩归属公司
order
.
setCustomerId
(
0L
)
;
order
.
setSalesmanId
(
0L
);
order
.
setSalesmanId
(
0L
);
}
}
//end
//end
...
@@ -951,10 +950,15 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -951,10 +950,15 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
OrderConsignorDO
orderConsignorDO
=
orderConsignorService
.
getOne
(
new
LambdaQueryWrapper
<
OrderConsignorDO
>().
eq
(
OrderConsignorDO:
:
getOrderId
,
order
.
getOrderId
()).
orderByDesc
(
OrderConsignorDO:
:
getId
).
last
(
"limit 1"
));
OrderConsignorDO
orderConsignorDO
=
orderConsignorService
.
getOne
(
new
LambdaQueryWrapper
<
OrderConsignorDO
>().
eq
(
OrderConsignorDO:
:
getOrderId
,
order
.
getOrderId
()).
orderByDesc
(
OrderConsignorDO:
:
getId
).
last
(
"limit 1"
));
CustomerDO
consignorDO
=
customerService
.
getCustomer
(
orderConsignorDO
.
getCustomerId
());
CustomerDO
consignorDO
=
customerService
.
getCustomer
(
orderConsignorDO
.
getCustomerId
());
CustomerDO
consigneeDO
=
customerService
.
getCustomer
(
orderConsigneeDO
.
getCustomerId
());
//收货人
CustomerDO
consigneeDO
=
customerService
.
getCustomer
(
orderConsigneeDO
.
getCustomerId
());
//收货人
if
(
Objects
.
nonNull
(
order
.
getType
())
&&
order
.
getType
().
contains
(
"2"
))
{
// 海外仓归属发货人
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
()!=
null
?
consignorDO
.
getCustomerService
():
0
)
;
}
else
{
if
(
consignorDO
!=
null
&&
!
consignorDO
.
getNoConsignee
()
&&
!
order
.
getHasConsignee
()){
//发货人档案设置控货无收货人且订单无收获人,归属发货人业绩 -- 层级2
if
(
consignorDO
!=
null
&&
!
consignorDO
.
getNoConsignee
()
&&
!
order
.
getHasConsignee
()){
//发货人档案设置控货无收货人且订单无收获人,归属发货人业绩 -- 层级2
if
(
consignorDO
!=
null
){
if
(
consignorDO
!=
null
){
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
()
);
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
()!=
null
?
consignorDO
.
getCustomerService
():
0
);
}
}
}
}
...
@@ -963,7 +967,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -963,7 +967,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if
(
order
.
getDrawee
()
==
1
&&
CollectionUtil
.
isNotEmpty
(
offerBackVOList
))
{
//如果是发货人付款且关联报价单,业绩归属发货人 --层级3 第一个
if
(
order
.
getDrawee
()
==
1
&&
CollectionUtil
.
isNotEmpty
(
offerBackVOList
))
{
//如果是发货人付款且关联报价单,业绩归属发货人 --层级3 第一个
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
()
);
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
()!=
null
?
consignorDO
.
getCustomerService
():
0
);
}
else
if
(
order
.
getDrawee
()
==
1
&&
consignorDO
.
getDefaultPay
()
){
// 如果是发货人付款且档案设置默认付运费 --层级4 第一个
}
else
if
(
order
.
getDrawee
()
==
1
&&
consignorDO
.
getDefaultPay
()
){
// 如果是发货人付款且档案设置默认付运费 --层级4 第一个
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
...
@@ -1024,6 +1028,8 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -1024,6 +1028,8 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
}
}
}
}
}
private
void
addOrderCustomerService
(
OrderDO
order
,
int
customerType
)
{
private
void
addOrderCustomerService
(
OrderDO
order
,
int
customerType
)
{
if
(
Objects
.
nonNull
(
order
.
getParentOrderId
())
&&
order
.
getParentOrderId
()
>
0
&&
!
order
.
getSplitSeparateOrder
())
{
if
(
Objects
.
nonNull
(
order
.
getParentOrderId
())
&&
order
.
getParentOrderId
()
>
0
&&
!
order
.
getSplitSeparateOrder
())
{
// 拆单子订单,并且未标记为独立订单,则不执行客户经理分配规则,以原单为主
// 拆单子订单,并且未标记为独立订单,则不执行客户经理分配规则,以原单为主
...
...
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