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
961528a4
Commit
961528a4
authored
Aug 01, 2024
by
332784038@qq.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-fix' into dev
parents
702497cf
c8c60dc2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
193 additions
and
80 deletions
+193
-80
OrderBusinessServiceImpl.java
...le/order/service/order/impl/OrderBusinessServiceImpl.java
+193
-80
No files found.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderBusinessServiceImpl.java
View file @
961528a4
...
@@ -2012,87 +2012,87 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
...
@@ -2012,87 +2012,87 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
}
}
}
}
checkOrderSalesman
(
orderDO
,
null
,
consignorDO
,
consigneeDO
,
orderConsignorDO
,
orderConsigneeDO
);
// if (!Objects.equals(orderDO.getStatus(), OrderStatusEnum.DRAFT.getValue())) {
if
(!
Objects
.
equals
(
orderDO
.
getStatus
(),
OrderStatusEnum
.
DRAFT
.
getValue
()))
{
// if (StringUtils.isNotBlank(orderDO.getType()) && orderDO.getType().contains("2")) {
if
(
StringUtils
.
isNotBlank
(
orderDO
.
getType
())
&&
orderDO
.
getType
().
contains
(
"2"
))
{
// if (!Objects.equals(orderDO.getCustomerId(), orderConsignorDO.getCustomerId())) {
if
(!
Objects
.
equals
(
orderDO
.
getCustomerId
(),
orderConsignorDO
.
getCustomerId
()))
{
// // 海外仓归属发货人
// 海外仓归属发货人
// orderDO.setCustomerId(orderConsignorDO.getCustomerId());
orderDO
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
// }
}
// } else {
}
else
{
//
// if (consignorDO != null && !consignorDO.getNoConsignee() && !orderDO.getHasConsignee()) {
if
(
consignorDO
!=
null
&&
!
consignorDO
.
getNoConsignee
()
&&
!
orderDO
.
getHasConsignee
())
{
// if (!Objects.equals(orderDO.getCustomerId(), orderConsignorDO.getCustomerId())) {
if
(!
Objects
.
equals
(
orderDO
.
getCustomerId
(),
orderConsignorDO
.
getCustomerId
()))
{
// // 控货订单归属发货人->修改为发货人档案控货无收货人
// 控货订单归属发货人->修改为发货人档案控货无收货人
// orderDO.setCustomerId(orderConsignorDO.getCustomerId());
orderDO
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
// }
}
// } else {
}
else
{
// // 非控货订单 + 付款人为发货人 归属发货人, 其他归属收货人
// 非控货订单 + 付款人为发货人 归属发货人, 其他归属收货人
// if (orderDO.getDrawee() == 1) {
if
(
orderDO
.
getDrawee
()
==
1
)
{
// if (!Objects.equals(orderDO.getCustomerId(), orderConsignorDO.getCustomerId())) {
if
(!
Objects
.
equals
(
orderDO
.
getCustomerId
(),
orderConsignorDO
.
getCustomerId
()))
{
// // 订单归属发货人
// 订单归属发货人
// orderDO.setCustomerId(orderConsignorDO.getCustomerId());
orderDO
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
// }
}
// } else if (orderDO.getDrawee() == 3) {
}
else
if
(
orderDO
.
getDrawee
()
==
3
)
{
// //自定义付款
//自定义付款
//
// List<CustomDraweeVO> list =
List
<
CustomDraweeVO
>
list
=
// JSONObject.parseArray(orderDO.getCustomDrawee(), CustomDraweeVO.class);
JSONObject
.
parseArray
(
orderDO
.
getCustomDrawee
(),
CustomDraweeVO
.
class
);
// if (CollectionUtil.isNotEmpty(list)) {
if
(
CollectionUtil
.
isNotEmpty
(
list
))
{
//
// List<CustomDraweeVO> freightList = list.stream().filter(s -> s.getName().equals("freight")).collect(Collectors.toList());
List
<
CustomDraweeVO
>
freightList
=
list
.
stream
().
filter
(
s
->
s
.
getName
().
equals
(
"freight"
)).
collect
(
Collectors
.
toList
());
// List<CustomDraweeVO> clearanceFeeList = list.stream().filter(s -> s.getName().equals("clearanceFee")).collect(Collectors.toList());
List
<
CustomDraweeVO
>
clearanceFeeList
=
list
.
stream
().
filter
(
s
->
s
.
getName
().
equals
(
"clearanceFee"
)).
collect
(
Collectors
.
toList
());
// int freight = freightList.get(0).getValue();//运费
int
freight
=
freightList
.
get
(
0
).
getValue
();
//运费
// int clearanceFee = clearanceFeeList.get(0).getValue();//清关费
int
clearanceFee
=
clearanceFeeList
.
get
(
0
).
getValue
();
//清关费
// // 检查订单是否有关联报价单
// 检查订单是否有关联报价单
// OrderAssociationOfferCostEvent offerCostEvent =
OrderAssociationOfferCostEvent
offerCostEvent
=
// new OrderAssociationOfferCostEvent(orderDO.getOrderId(),
new
OrderAssociationOfferCostEvent
(
orderDO
.
getOrderId
(),
// BigDecimal.ZERO, 0, BigDecimal.ZERO,
BigDecimal
.
ZERO
,
0
,
BigDecimal
.
ZERO
,
// 0, false);
0
,
false
);
// applicationContext.publishEvent(offerCostEvent);
applicationContext
.
publishEvent
(
offerCostEvent
);
// if (offerCostEvent.isAssociationOffer() && (orderDO.getDrawee() == 3 && freight == 1)) {//层级3 第二个 订单关联报价单 && 自定义付款 且发货人付运费
if
(
offerCostEvent
.
isAssociationOffer
()
&&
(
orderDO
.
getDrawee
()
==
3
&&
freight
==
1
))
{
//层级3 第二个 订单关联报价单 && 自定义付款 且发货人付运费
//
// orderDO.setCustomerId(orderConsignorDO.getCustomerId());
orderDO
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
// orderDO.setIsInOpenSea(consignorDO.getIsInOpenSea());
orderDO
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
// orderDO.setYejiType(consignorDO.getIsNew() ? 1 : 0);
orderDO
.
setYejiType
(
consignorDO
.
getIsNew
()
?
1
:
0
);
// orderDO.setSalesmanId(consignorDO.getIsInOpenSea() ? 0L : consignorDO.getCustomerService());
orderDO
.
setSalesmanId
(
consignorDO
.
getIsInOpenSea
()
?
0L
:
consignorDO
.
getCustomerService
());
// } else if (offerCostEvent.isAssociationOffer() && (orderDO.getDrawee() == 3 && clearanceFee == 1)) {//层级3 第三个 订单关联报价单 && 自定义付款 且发货人付清关费
}
else
if
(
offerCostEvent
.
isAssociationOffer
()
&&
(
orderDO
.
getDrawee
()
==
3
&&
clearanceFee
==
1
))
{
//层级3 第三个 订单关联报价单 && 自定义付款 且发货人付清关费
//
// orderDO.setCustomerId(orderConsignorDO.getCustomerId());
orderDO
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
// orderDO.setIsInOpenSea(consignorDO.getIsInOpenSea());
orderDO
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
// orderDO.setYejiType(consignorDO.getIsNew() ? 1 : 0);
orderDO
.
setYejiType
(
consignorDO
.
getIsNew
()
?
1
:
0
);
// orderDO.setSalesmanId(consignorDO.getIsInOpenSea() ? 0L : consignorDO.getCustomerService());
orderDO
.
setSalesmanId
(
consignorDO
.
getIsInOpenSea
()
?
0L
:
consignorDO
.
getCustomerService
());
// } else if (consignorDO.getDefaultPay() && (orderDO.getDrawee() == 3 && freight == 1)) { //层级4 第二个 发货人档案设置默认付运费 且发货人付运费 业绩归属 发货人
}
else
if
(
consignorDO
.
getDefaultPay
()
&&
(
orderDO
.
getDrawee
()
==
3
&&
freight
==
1
))
{
//层级4 第二个 发货人档案设置默认付运费 且发货人付运费 业绩归属 发货人
//
// orderDO.setCustomerId(orderConsignorDO.getCustomerId());
orderDO
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
// orderDO.setIsInOpenSea(consignorDO.getIsInOpenSea());
orderDO
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
// orderDO.setYejiType(consignorDO.getIsNew() ? 1 : 0);
orderDO
.
setYejiType
(
consignorDO
.
getIsNew
()
?
1
:
0
);
// orderDO.setSalesmanId(consignorDO.getIsInOpenSea() ? 0L : consignorDO.getCustomerService());
orderDO
.
setSalesmanId
(
consignorDO
.
getIsInOpenSea
()
?
0L
:
consignorDO
.
getCustomerService
());
// } else if (consignorDO.getDefaultPay() && (orderDO.getDrawee() == 3 && clearanceFee == 1)) {// 层级4 第三个 发货人档案设置默认付运费 且发货人付清关费 业绩归属发货人
}
else
if
(
consignorDO
.
getDefaultPay
()
&&
(
orderDO
.
getDrawee
()
==
3
&&
clearanceFee
==
1
))
{
// 层级4 第三个 发货人档案设置默认付运费 且发货人付清关费 业绩归属发货人
// orderDO.setCustomerId(orderConsignorDO.getCustomerId());
orderDO
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
// orderDO.setIsInOpenSea(consignorDO.getIsInOpenSea());
orderDO
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
// orderDO.setYejiType(consignorDO.getIsNew() ? 1 : 0);
orderDO
.
setYejiType
(
consignorDO
.
getIsNew
()
?
1
:
0
);
// orderDO.setSalesmanId(consignorDO.getIsInOpenSea() ? 0L : consignorDO.getCustomerService());
orderDO
.
setSalesmanId
(
consignorDO
.
getIsInOpenSea
()
?
0L
:
consignorDO
.
getCustomerService
());
//
// } else {
}
else
{
// //去掉层级5、6 ,以上不符合的都归收货人
//去掉层级5、6 ,以上不符合的都归收货人
// orderDO.setCustomerId(orderConsigneeDO.getCustomerId() != null ? orderConsigneeDO.getCustomerId() : 0);
orderDO
.
setCustomerId
(
orderConsigneeDO
.
getCustomerId
()
!=
null
?
orderConsigneeDO
.
getCustomerId
()
:
0
);
// orderDO.setIsInOpenSea(consigneeDO.getIsInOpenSea());
orderDO
.
setIsInOpenSea
(
consigneeDO
.
getIsInOpenSea
());
// orderDO.setYejiType(consigneeDO.getIsNew() ? 1 : 0);
orderDO
.
setYejiType
(
consigneeDO
.
getIsNew
()
?
1
:
0
);
// orderDO.setSalesmanId(consigneeDO.getIsInOpenSea() ? 0L : (consigneeDO.getCustomerService() != null ? consigneeDO.getCustomerService() : 0));
orderDO
.
setSalesmanId
(
consigneeDO
.
getIsInOpenSea
()
?
0L
:
(
consigneeDO
.
getCustomerService
()
!=
null
?
consigneeDO
.
getCustomerService
()
:
0
));
//
// }
}
// }
}
// } else {
}
else
{
// if (!Objects.equals(orderDO.getCustomerId(), orderConsigneeDO.getCustomerId())) {
if
(!
Objects
.
equals
(
orderDO
.
getCustomerId
(),
orderConsigneeDO
.
getCustomerId
()))
{
// // 控货订单归属收货人
// 控货订单归属收货人
// orderDO.setCustomerId(orderConsigneeDO.getCustomerId());
orderDO
.
setCustomerId
(
orderConsigneeDO
.
getCustomerId
());
// }
}
// }
}
// }
}
// }
}
// }
}
// 判断该订单、该客户是否有未分配客户异常,如果有,则这个订单不计算业绩
// 判断该订单、该客户是否有未分配客户异常,如果有,则这个订单不计算业绩
List
<
OrderExceptionDO
>
orderExceptionDOList
=
List
<
OrderExceptionDO
>
orderExceptionDOList
=
orderExceptionService
.
getOrderExceptionByCustomerId
(
orderExceptionService
.
getOrderExceptionByCustomerId
(
...
@@ -2120,7 +2120,120 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
...
@@ -2120,7 +2120,120 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
}
}
orderMapper
.
updateById
(
orderDO
);
orderMapper
.
updateById
(
orderDO
);
}
}
public
int
checkOrderSalesman
(
OrderDO
order
,
Long
offerId
,
CustomerDO
consignorDO
,
CustomerDO
consigneeDO
,
OrderConsignorDO
orderConsignorDO
,
OrderConsigneeDO
orderConsigneeDO
)
{
int
customerType
=
1
;
//1-业绩归属发货人,2-业绩归属收货人
if
(
Objects
.
isNull
(
orderConsigneeDO
))
{
//订单收货人
orderConsigneeDO
=
orderConsigneeService
.
getOne
(
new
LambdaQueryWrapper
<
OrderConsigneeDO
>().
eq
(
OrderConsigneeDO:
:
getOrderId
,
order
.
getOrderId
()).
orderByDesc
(
OrderConsigneeDO:
:
getId
).
last
(
"limit 1"
));
}
if
(
Objects
.
isNull
(
orderConsignorDO
))
{
//订单发货人
orderConsignorDO
=
orderConsignorService
.
getOne
(
new
LambdaQueryWrapper
<
OrderConsignorDO
>().
eq
(
OrderConsignorDO:
:
getOrderId
,
order
.
getOrderId
()).
orderByDesc
(
OrderConsignorDO:
:
getId
).
last
(
"limit 1"
));
}
if
(
Objects
.
isNull
(
consignorDO
))
{
//发货人客户
consignorDO
=
customerService
.
getCustomer
(
orderConsignorDO
.
getCustomerId
());
}
if
(
Objects
.
isNull
(
consigneeDO
))
{
consigneeDO
=
customerService
.
getCustomer
(
orderConsigneeDO
.
getCustomerId
());
//收货人客户
}
// 原客户经理
Long
orgCustomerId
=
Objects
.
isNull
(
order
.
getCustomerId
())
?
0L
:
order
.
getCustomerId
();
if
(
Objects
.
nonNull
(
order
.
getType
())
&&
order
.
getType
().
contains
(
"2"
))
{
//层级1
// 海外仓归属发货人
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consignorDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consignorDO
.
getIsInOpenSea
()
?
0L
:
(
consignorDO
.
getCustomerService
()
!=
null
&&
consignorDO
.
getIsCustomerServiceConfirmed
()?
consignorDO
.
getCustomerService
()
:
0
));
}
else
{
if
(
consignorDO
!=
null
&&
!
consignorDO
.
getNoConsignee
()
&&
!
order
.
getHasConsignee
())
{
//发货人档案设置控货无收货人且订单无收获人,归属发货人业绩 -- 层级2
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consignorDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consignorDO
.
getIsInOpenSea
()
?
0L
:
(
consignorDO
.
getCustomerService
()
!=
null
&&
consignorDO
.
getIsCustomerServiceConfirmed
()?
consignorDO
.
getCustomerService
()
:
0
));
}
else
{
if
(
order
.
getDrawee
()
==
1
)
{
//发货人付款
if
(
order
.
getDrawee
()
==
1
&&
offerId
!=
null
)
{
//如果是发货人付款且关联报价单,业绩归属发货人 --层级3 第一个
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consignorDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consignorDO
.
getIsInOpenSea
()
?
0L
:
(
consignorDO
.
getCustomerService
()
!=
null
&&
consignorDO
.
getIsCustomerServiceConfirmed
()?
consignorDO
.
getCustomerService
()
:
0
));
}
else
if
(
order
.
getDrawee
()
==
1
&&
consignorDO
.
getDefaultPay
())
{
// 如果是发货人付款且档案设置默认付运费 --层级4 第一个
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consignorDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consignorDO
.
getIsInOpenSea
()
?
0L
:
(
consignorDO
.
getCustomerService
()
!=
null
&&
consignorDO
.
getIsCustomerServiceConfirmed
()?
consignorDO
.
getCustomerService
()
:
0
));
}
else
{
order
.
setCustomerId
(
orderConsigneeDO
.
getCustomerId
()
!=
null
?
orderConsigneeDO
.
getCustomerId
()
:
0
);
order
.
setIsInOpenSea
(
consigneeDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consigneeDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
Objects
.
nonNull
(
consigneeDO
.
getIsInOpenSea
())
&&
consigneeDO
.
getIsInOpenSea
()
?
0L
:
(
consigneeDO
.
getCustomerService
()
!=
null
&&
consigneeDO
.
getIsCustomerServiceConfirmed
()?
consigneeDO
.
getCustomerService
()
:
0
));
customerType
=
2
;
}
}
else
if
(
order
.
getDrawee
()
==
2
)
{
//收货人付款 层级5 第一个
if
(
consigneeDO
!=
null
)
{
order
.
setCustomerId
(
orderConsigneeDO
.
getCustomerId
());
order
.
setIsInOpenSea
(
consigneeDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consigneeDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
Objects
.
nonNull
(
consigneeDO
.
getIsInOpenSea
())
&&
consigneeDO
.
getIsInOpenSea
()
?
0L
:
(
consigneeDO
.
getCustomerService
()
!=
null
&&
consigneeDO
.
getIsCustomerServiceConfirmed
()?
consigneeDO
.
getCustomerService
()
:
0
));
}
else
{
//没有收货人
order
.
setCustomerId
(
0L
);
order
.
setSalesmanId
(
0L
);
customerType
=
0
;
}
}
else
if
(
order
.
getDrawee
()
==
3
)
{
//自定义付款
List
<
CustomDraweeVO
>
list
=
JSONObject
.
parseArray
(
order
.
getCustomDrawee
(),
CustomDraweeVO
.
class
);
if
(
CollectionUtil
.
isNotEmpty
(
list
))
{
List
<
CustomDraweeVO
>
freightList
=
list
.
stream
().
filter
(
s
->
s
.
getName
().
equals
(
"freight"
)).
collect
(
Collectors
.
toList
());
List
<
CustomDraweeVO
>
clearanceFeeList
=
list
.
stream
().
filter
(
s
->
s
.
getName
().
equals
(
"clearanceFee"
)).
collect
(
Collectors
.
toList
());
int
freight
=
freightList
.
get
(
0
).
getValue
();
//运费
int
clearanceFee
=
clearanceFeeList
.
get
(
0
).
getValue
();
//清关费
if
(
offerId
!=
null
&&
(
order
.
getDrawee
()
==
3
&&
freight
==
1
))
{
//层级3 第二个 订单关联报价单 && 自定义付款 且发货人付运费
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consignorDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consignorDO
.
getIsInOpenSea
()
?
0L
:
(
consignorDO
.
getCustomerService
()
!=
null
&&
consignorDO
.
getIsCustomerServiceConfirmed
()?
consignorDO
.
getCustomerService
()
:
0
));
}
else
if
(
offerId
!=
null
&&
(
order
.
getDrawee
()
==
3
&&
clearanceFee
==
1
))
{
//层级3 第三个 订单关联报价单 && 自定义付款 且发货人付清关费
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consignorDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consignorDO
.
getIsInOpenSea
()
?
0L
:
(
consignorDO
.
getCustomerService
()
!=
null
&&
consignorDO
.
getIsCustomerServiceConfirmed
()?
consignorDO
.
getCustomerService
()
:
0
));
}
else
if
(
consignorDO
.
getDefaultPay
()
&&
(
order
.
getDrawee
()
==
3
&&
freight
==
1
))
{
//层级4 第二个 发货人档案设置默认付运费 且发货人付运费 业绩归属 发货人
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consignorDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consignorDO
.
getIsInOpenSea
()
?
0L
:
(
consignorDO
.
getCustomerService
()
!=
null
&&
consignorDO
.
getIsCustomerServiceConfirmed
()?
consignorDO
.
getCustomerService
()
:
0
));
}
else
if
(
consignorDO
.
getDefaultPay
()
&&
(
order
.
getDrawee
()
==
3
&&
clearanceFee
==
1
))
{
// 层级4 第三个 发货人档案设置默认付运费 且发货人付清关费 业绩归属发货人
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consignorDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consignorDO
.
getIsInOpenSea
()
?
0L
:
(
consignorDO
.
getCustomerService
()
!=
null
&&
consignorDO
.
getIsCustomerServiceConfirmed
()?
consignorDO
.
getCustomerService
()
:
0
));
}
else
{
//去掉层级5、6 ,以上不符合的都归收货人
order
.
setCustomerId
(
orderConsigneeDO
.
getCustomerId
()
!=
null
?
orderConsigneeDO
.
getCustomerId
()
:
0
);
order
.
setIsInOpenSea
(
consigneeDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consigneeDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
Objects
.
nonNull
(
consigneeDO
.
getIsInOpenSea
())
&&
consigneeDO
.
getIsInOpenSea
()
?
0L
:
(
consigneeDO
.
getCustomerService
()
!=
null
&&
consigneeDO
.
getIsCustomerServiceConfirmed
()?
consigneeDO
.
getCustomerService
()
:
0
));
customerType
=
2
;
}
}
}
else
{
//业绩归收货人
order
.
setCustomerId
(
orderConsigneeDO
.
getCustomerId
()
!=
null
?
orderConsigneeDO
.
getCustomerId
()
:
0
);
order
.
setIsInOpenSea
(
consigneeDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consigneeDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
Objects
.
nonNull
(
consigneeDO
.
getIsInOpenSea
())
&&
consigneeDO
.
getIsInOpenSea
()
?
0L
:
(
consigneeDO
.
getCustomerService
()
!=
null
&&
consigneeDO
.
getIsCustomerServiceConfirmed
()?
consigneeDO
.
getCustomerService
()
:
0
));
customerType
=
2
;
}
}
}
// 订单修改是否变动了归属客户,此字段用来判定订单是否需要重置归属客户经理,下单后归属客户的客户经理是固定的,除非订单归属客户变动,才需要重置客户经理
order
.
setIsChargeCustomer
(!
Objects
.
equals
(
order
.
getCustomerId
(),
orgCustomerId
));
return
customerType
;
}
@Override
@Override
public
void
updateOrderOrgWeightUnitAndOrgVolumeUnit
(
List
<
String
>
orderNumbers
)
{
public
void
updateOrderOrgWeightUnitAndOrgVolumeUnit
(
List
<
String
>
orderNumbers
)
{
...
...
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