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
c718e3d1
Commit
c718e3d1
authored
May 23, 2024
by
liuzeheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
补充业绩规则判断
parent
a8ce13fc
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
206 additions
and
69 deletions
+206
-69
TargetLogMapper.java
...dao/module/order/dal/mysql/targetLog/TargetLogMapper.java
+7
-0
OrderBackInfoDto.java
...a/cn/iocoder/yudao/module/order/dto/OrderBackInfoDto.java
+3
-0
OrderServiceImpl.java
...dao/module/order/service/order/impl/OrderServiceImpl.java
+109
-66
TargetLogServiceImpl.java
.../module/order/service/targetLog/TargetLogServiceImpl.java
+74
-3
TargetOfferBackVO.java
...er/yudao/module/order/vo/targetLog/TargetOfferBackVO.java
+13
-0
No files found.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/dal/mysql/targetLog/TargetLogMapper.java
View file @
c718e3d1
...
...
@@ -62,4 +62,11 @@ public interface TargetLogMapper extends AbstractMapper<TargetLogDO> {
"</script>"
})
Date
selectCabinetLoadTime
(
@Param
(
"orderId"
)
Long
orderId
);
@Select
({
"<script>"
,
"select offer_id as offerId, order_id as orderId,order_no as orderNo from ecw_offer offe where deleted=0 and order_id=#{orderId} limit 1"
,
"</script>"
})
List
<
TargetOfferBackVO
>
getTargetOfferBackByOrerId
(
Long
orderId
);
}
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/dto/OrderBackInfoDto.java
View file @
c718e3d1
...
...
@@ -524,6 +524,9 @@ public class OrderBackInfoDto {
@ApiModelProperty
(
value
=
"完成入仓的所有箱内总货物数量"
)
private
Integer
sumQuantityAllFinishedWarehouseIn
;
@ApiModelProperty
(
value
=
"是否有收货人,1-是,0-否"
)
private
Boolean
hasConsignee
=
true
;
public
void
setExceptionReason
(
String
exceptionReason
)
{
this
.
exceptionReason
=
exceptionReason
;
if
(
StringUtils
.
isNotBlank
(
exceptionReason
)
&&
Objects
.
nonNull
(
this
.
lang
))
{
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderServiceImpl.java
View file @
c718e3d1
...
...
@@ -3264,83 +3264,126 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if
(
updateObj
.
getIsCargoControl
())
{
// 控货订单归属发货人
updateObj
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
}
else
{
// 非控货订单 + 付款人为发货人 归属发货人, 其他归属收货人
if
(
updateObj
.
getDrawee
()
==
1
)
{
updateObj
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
}
else
{
customerType
=
2
;
updateObj
.
setCustomerId
(
orderConsigneeDO
.
getCustomerId
());
}
}
}
// 补充业绩规则判断
if
(!
consignorDO
.
getNoConsignee
()
&&
!
updateObj
.
getHasConsignee
()){
//发货人档案设置控货无收货人且订单无收获人,归属发货人业绩 -- 层级2
}
else
{
if
(!
consignorDO
.
getNoConsignee
()
&&
!
updateObj
.
getHasConsignee
()){
//发货人档案设置控货无收货人且订单无收获人,归属发货人业绩 -- 层级2
updateObj
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
())
;
}
if
(
updateReqVO
.
getOfferId
()!=
null
&&
updateObj
.
getDrawee
()==
1
){
//订单关联报价单 && 发货人付款
if
(
updateObj
.
getDrawee
()
==
1
)
{
//发货人付款
if
(
updateObj
.
getDrawee
()
==
1
&&
updateReqVO
.
getOfferId
()
!=
null
)
{
//如果是发货人付款且关联报价单,业绩归属发货人 --层级3 第一个
updateObj
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
())
;
}
else
if
(
updateObj
.
getDrawee
()
==
1
&&
consignorDO
.
getDefaultPay
()
){
// 如果是发货人付款且档案设置默认付运费 --层级4 第一个
updateObj
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
())
;
}
if
(
updateReqVO
.
getOfferId
()!=
null
&&
updateObj
.
getDrawee
()==
3
){
//订单关联报价单 && 自定义付款
}
else
if
(
updateObj
.
getDrawee
()
==
2
)
{
//收货人付款 层级5 第一个
updateObj
.
setCustomerId
(
orderConsigneeDO
.
getCustomerId
())
;
}
else
if
(
updateObj
.
getDrawee
()
==
3
)
{
//自定义付款
List
<
CustomDraweeVO
>
list
=
JSONObject
.
parseArray
(
updateObj
.
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
(
updateReqVO
.
getOfferId
()!=
null
&&
(
updateObj
.
getDrawee
()==
3
&&
freight
==
1
)){
//订单关联报价单 && 自定义付款 且发货人付运费
int
freight
=
freightList
.
get
(
0
).
getValue
()
;
//运费
int
clearanceFee
=
clearanceFeeList
.
get
(
0
).
getValue
();
//清关费
if
(
updateReqVO
.
getOfferId
()!=
null
&&
(
updateObj
.
getDrawee
()==
3
&&
freight
==
1
)){
//层级3 第二个 订单关联报价单 && 自定义付款 且发货人付运费
updateObj
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
())
;
}
if
(
updateReqVO
.
getOfferId
()!=
null
&&
(
updateObj
.
getDrawee
()==
3
&&
clearanceFee
==
1
)){
//订单关联报价单 && 自定义付款 且发货人付清关费
}
else
if
(
updateReqVO
.
getOfferId
()!=
null
&&
(
updateObj
.
getDrawee
()==
3
&&
clearanceFee
==
1
)){
//层级3 第三个 订单关联报价单 && 自定义付款 且发货人付清关费
updateObj
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
())
;
}
}
}
if
(
consignorDO
.
getDefaultPay
()
&&
(
updateObj
.
getDrawee
()==
2
||
updateObj
.
getDrawee
()==
3
)){
//发货人档案设置默认付运费 --层级4
if
(
consignorDO
.
getDefaultPay
()
&&
updateObj
.
getDrawee
()==
2
){
}
else
if
(
consignorDO
.
getDefaultPay
()
&&
(
updateObj
.
getDrawee
()==
3
&&
freight
==
1
)){
//层级4 第二个 发货人档案设置默认付运费 且发货人付运费 业绩归属 发货人
updateObj
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
())
;
}
else
if
(
consignorDO
.
getDefaultPay
()
&&
updateObj
.
getDrawee
()==
3
){
List
<
CustomDraweeVO
>
list
=
JSONObject
.
parseArray
(
updateObj
.
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
(
updateObj
.
getDrawee
()==
1
||
(
updateObj
.
getDrawee
()==
3
&&
freight
==
1
)
||
(
updateObj
.
getDrawee
()==
3
&&
clearanceFee
==
1
)){
//如果是发货人付款 或自定义付款且发货人付运费 或自定义付款且发货人付清关费,业绩归属发货人
}
else
if
(
consignorDO
.
getDefaultPay
()
&&
(
updateObj
.
getDrawee
()==
3
&&
clearanceFee
==
1
)){
// 层级4 第三个 发货人档案设置默认付运费 且发货人付清关费 业绩归属发货人
updateObj
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
())
;
}
else
if
(!
consignorDO
.
getDefaultPay
()
&&
(
updateObj
.
getDrawee
()==
3
&&
freight
==
2
)
||
(
updateObj
.
getDrawee
()==
3
&&
clearanceFee
==
2
)){
//层级5 第二、第三点 自定义付款且收款人付运费 或自定义付款且收款人付清关费 ,业绩归属收货人
updateObj
.
setCustomerId
(
orderConsigneeDO
.
getCustomerId
());
updateObj
.
setSalesmanId
(
orderConsigneeDO
.
getCustomerId
());
}
}
}
}
else
if
(!
consignorDO
.
getDefaultPay
()
&&
updateObj
.
getDrawee
()==
1
&&
updateReqVO
.
getOfferId
()!=
null
){
//发货人没有设置默认付款且发货人付款且没有关联报价单 -- 层级6
}
else
{
//业绩归属公司
updateObj
.
setCustomerId
(
0L
)
;
updateObj
.
setSalesmanId
(
0L
);
}
if
(
updateObj
.
getDrawee
()==
2
||
updateObj
.
getDrawee
()==
3
){
//如果是收货人付款或是自定义付款 --层级5
if
(
updateObj
.
getDrawee
()==
2
){
//订单收货人付款,业绩归属收货人
updateObj
.
setCustomerId
(
orderConsigneeDO
.
getCustomerId
());
}
else
if
(
updateObj
.
getDrawee
()==
3
){
List
<
CustomDraweeVO
>
list
=
JSONObject
.
parseArray
(
updateObj
.
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
((
updateObj
.
getDrawee
()==
3
&&
freight
==
2
)
||
(
updateObj
.
getDrawee
()==
3
&&
clearanceFee
==
2
)){
//自定义付款且收款人付运费 或自定义付款且收款人付清关费 ,业绩归属收货人
// 非控货订单 + 付款人为发货人 归属发货人, 其他归属收货人
if
(
updateObj
.
getDrawee
()
==
1
)
{
updateObj
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
}
else
{
customerType
=
2
;
updateObj
.
setCustomerId
(
orderConsigneeDO
.
getCustomerId
());
}
}
}
}
// 补充业绩规则判断
// if(!consignorDO.getNoConsignee() && !updateObj.getHasConsignee()){//发货人档案设置控货无收货人且订单无收获人,归属发货人业绩 -- 层级2
// updateObj.setCustomerId(orderConsignorDO.getCustomerId()) ;
// }
//
// if(updateReqVO.getOfferId()!=null && updateObj.getDrawee()==1){//订单关联报价单 && 发货人付款
// updateObj.setCustomerId(orderConsignorDO.getCustomerId()) ;
// }
//
// if(updateReqVO.getOfferId()!=null && updateObj.getDrawee()==3 ){//订单关联报价单 && 自定义付款
//
// List<CustomDraweeVO> list = JSONObject.parseArray(updateObj.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(updateReqVO.getOfferId()!=null && ( updateObj.getDrawee()==3 && freight==1 )){//订单关联报价单 && 自定义付款 且发货人付运费
// updateObj.setCustomerId(orderConsignorDO.getCustomerId()) ;
// }
// if(updateReqVO.getOfferId()!=null && ( updateObj.getDrawee()==3 && clearanceFee==1 )){//订单关联报价单 && 自定义付款 且发货人付清关费
// updateObj.setCustomerId(orderConsignorDO.getCustomerId()) ;
// }
// }
//
// }
//
// if(consignorDO.getDefaultPay() && (updateObj.getDrawee()==2 || updateObj.getDrawee()==3)){//发货人档案设置默认付运费 --层级4
// if(consignorDO.getDefaultPay() && updateObj.getDrawee()==2){
// updateObj.setCustomerId(orderConsignorDO.getCustomerId()) ;
// }else if(consignorDO.getDefaultPay() && updateObj.getDrawee()==3){
// List<CustomDraweeVO> list = JSONObject.parseArray(updateObj.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(updateObj.getDrawee()==1 || ( updateObj.getDrawee()==3 && freight==1 ) || ( updateObj.getDrawee()==3 && clearanceFee==1 )){//如果是发货人付款 或自定义付款且发货人付运费 或自定义付款且发货人付清关费,业绩归属发货人
// updateObj.setCustomerId(orderConsignorDO.getCustomerId()) ;
// }
// }
// }
// }
// else if(!consignorDO.getDefaultPay() && updateObj.getDrawee()==1 && updateReqVO.getOfferId()!=null){//发货人没有设置默认付款且发货人付款且没有关联报价单 -- 层级6
// //业绩归属公司
// updateObj.setCustomerId(0L) ;
// updateObj.setSalesmanId(0L);
// }
//
// if(updateObj.getDrawee()==2 || updateObj.getDrawee()==3){//如果是收货人付款或是自定义付款 --层级5
// if(updateObj.getDrawee()==2){//订单收货人付款,业绩归属收货人
// updateObj.setCustomerId(orderConsigneeDO.getCustomerId());
// }else if(updateObj.getDrawee()==3){
// List<CustomDraweeVO> list = JSONObject.parseArray(updateObj.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((updateObj.getDrawee()==3 && freight==2 ) || (updateObj.getDrawee()==3 && clearanceFee==2)){//自定义付款且收款人付运费 或自定义付款且收款人付清关费 ,业绩归属收货人
// updateObj.setCustomerId(orderConsigneeDO.getCustomerId());
// }
// }
//
// }
//
// }
// 更新所属客户经理(业务员)
if
(!
OrderStatusEnum
.
DRAFT
.
getValue
().
equals
(
updateObj
.
getStatus
())
&&
Objects
.
nonNull
(
updateObj
.
getCustomerId
())
&&
updateObj
.
getCustomerId
()
>
0
)
{
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/targetLog/TargetLogServiceImpl.java
View file @
c718e3d1
package
cn
.
iocoder
.
yudao
.
module
.
order
.
service
.
targetLog
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
javax.annotation.Resource
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX
;
import
cn.iocoder.yudao.framework.security.core.LoginUser
;
import
cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customer.CustomerDO
;
import
cn.iocoder.yudao.module.customer.service.customer.CustomerService
;
import
cn.iocoder.yudao.module.order.dal.dataobject.order.OrderDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderConsignee.OrderConsigneeDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderConsignor.OrderConsignorDO
;
import
cn.iocoder.yudao.module.order.dto.OrderBackInfoDto
;
import
cn.iocoder.yudao.module.order.service.order.OrderConsigneeService
;
import
cn.iocoder.yudao.module.order.service.order.OrderConsignorService
;
import
cn.iocoder.yudao.module.order.service.order.OrderQueryService
;
import
cn.iocoder.yudao.module.order.service.order.OrderService
;
import
cn.iocoder.yudao.module.order.enums.TargetLogEnum
;
import
cn.iocoder.yudao.module.order.vo.order.CustomDraweeVO
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.validation.annotation.Validated
;
...
...
@@ -45,6 +55,12 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
@Resource
private
CustomerService
customerService
;
@Resource
private
OrderConsigneeService
orderConsigneeService
;
@Resource
private
OrderConsignorService
orderConsignorService
;
@Override
public
Long
createTargetLog
(
TargetLogCreateReqVO
createReqVO
)
{
...
...
@@ -156,10 +172,65 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
if
(
info
.
getIsCargoControl
())
{
//非海外控货归属发货人
customerId
=
info
.
getConsignorVO
().
getCustomerId
();
}
else
{
if
(
info
.
getDrawee
()
==
1
)
{
//非海外非控货 付款人为发货人 归属发货人
customerId
=
info
.
getConsignorVO
().
getCustomerId
();
}
else
{
//非海外非控货 付款人为其他 归属收货人
// if (info.getDrawee() == 1) {//非海外非控货 付款人为发货人 归属发货人
// customerId = info.getConsignorVO().getCustomerId();
// } else { //非海外非控货 付款人为其他 归属收货人
// customerId = info.getConsigneeVO().getCustomerId();
// }
CustomerDO
consignorDO
=
customerService
.
getCustomer
(
info
.
getConsignorVO
().
getCustomerId
());
CustomerDO
consigneeDO
=
customerService
.
getCustomer
(
info
.
getConsigneeVO
().
getCustomerId
());
//收货人
OrderConsigneeDO
orderConsigneeDO
=
orderConsigneeService
.
getOne
(
new
LambdaQueryWrapper
<
OrderConsigneeDO
>().
eq
(
OrderConsigneeDO:
:
getOrderId
,
info
.
getOrderId
()).
orderByDesc
(
OrderConsigneeDO:
:
getId
).
last
(
"limit 1"
));
OrderConsignorDO
orderConsignorDO
=
orderConsignorService
.
getOne
(
new
LambdaQueryWrapper
<
OrderConsignorDO
>().
eq
(
OrderConsignorDO:
:
getOrderId
,
info
.
getOrderId
()).
orderByDesc
(
OrderConsignorDO:
:
getId
).
last
(
"limit 1"
));
if
(!
consignorDO
.
getNoConsignee
()
&&
!
info
.
getHasConsignee
()){
//发货人档案设置控货无收货人且订单无收获人,归属发货人业绩 -- 层级2
if
(
consignorDO
!=
null
){
customerId
=
consignorDO
.
getId
();
}
}
List
<
TargetOfferBackVO
>
offerBackVOList
=
targetLogMapper
.
getTargetOfferBackByOrerId
(
orderId
)
;
if
(
info
.
getDrawee
()
==
1
)
{
//发货人付款
if
(
info
.
getDrawee
()
==
1
&&
CollectionUtil
.
isNotEmpty
(
offerBackVOList
))
{
//如果是发货人付款且关联报价单,业绩归属发货人 --层级3 第一个
customerId
=
orderConsignorDO
.
getCustomerId
();
}
else
if
(
info
.
getDrawee
()
==
1
&&
consignorDO
.
getDefaultPay
()
){
// 如果是发货人付款且档案设置默认付运费 --层级4 第一个
customerId
=
orderConsignorDO
.
getCustomerId
()
;
}
}
else
if
(
info
.
getDrawee
()
==
2
)
{
//收货人付款 层级5 第一个
customerId
=
orderConsigneeDO
.
getCustomerId
()!=
null
?
orderConsigneeDO
.
getCustomerId
():
consigneeDO
.
getId
();
}
else
if
(
info
.
getDrawee
()
==
3
)
{
//自定义付款
List
<
CustomDraweeVO
>
list
=
JSONObject
.
parseArray
(
info
.
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
(
CollectionUtil
.
isNotEmpty
(
offerBackVOList
)
&&
(
info
.
getDrawee
()==
3
&&
freight
==
1
)){
//层级3 第二个 订单关联报价单 && 自定义付款 且发货人付运费
customerId
=
orderConsignorDO
.
getCustomerId
()
;
}
else
if
(
CollectionUtil
.
isNotEmpty
(
offerBackVOList
)
&&
(
info
.
getDrawee
()==
3
&&
clearanceFee
==
1
)){
//层级3 第三个 订单关联报价单 && 自定义付款 且发货人付清关费
customerId
=
orderConsignorDO
.
getCustomerId
()
;
}
else
if
(
consignorDO
.
getDefaultPay
()
&&
(
info
.
getDrawee
()==
3
&&
freight
==
1
)){
//层级4 第二个 发货人档案设置默认付运费 且发货人付运费 业绩归属 发货人
customerId
=
orderConsignorDO
.
getCustomerId
()
;
}
else
if
(
consignorDO
.
getDefaultPay
()
&&
(
info
.
getDrawee
()==
3
&&
clearanceFee
==
1
)){
// 层级4 第三个 发货人档案设置默认付运费 且发货人付清关费 业绩归属发货人
customerId
=
orderConsignorDO
.
getCustomerId
()
;
}
else
if
(!
consignorDO
.
getDefaultPay
()
&&
(
info
.
getDrawee
()==
3
&&
freight
==
2
)
||
(
info
.
getDrawee
()==
3
&&
clearanceFee
==
2
)){
//层级5 第二、第三点 自定义付款且收款人付运费 或自定义付款且收款人付清关费 ,业绩归属收货人
customerId
=
orderConsigneeDO
.
getCustomerId
()
;
}
}
}
else
{
//业绩归属公司
customerId
=
info
.
getConsigneeVO
().
getCustomerId
();
}
}
}
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/vo/targetLog/TargetOfferBackVO.java
0 → 100644
View file @
c718e3d1
package
cn
.
iocoder
.
yudao
.
module
.
order
.
vo
.
targetLog
;
import
lombok.Data
;
@Data
public
class
TargetOfferBackVO
{
private
Long
offerId
;
private
Long
orderId
;
private
String
orderNo
;
}
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