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
00d1abe9
Commit
00d1abe9
authored
May 25, 2024
by
liuzeheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
判空
parent
f0c3f018
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
219 additions
and
176 deletions
+219
-176
OrderServiceImpl.java
...dao/module/order/service/order/impl/OrderServiceImpl.java
+204
-165
TargetLogServiceImpl.java
.../module/order/service/targetLog/TargetLogServiceImpl.java
+15
-11
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 @
00d1abe9
This diff is collapsed.
Click to expand it.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/targetLog/TargetLogServiceImpl.java
View file @
00d1abe9
...
...
@@ -166,19 +166,21 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
OrderBackInfoDto
info
=
orderQueryService
.
info
(
orderId
);
if
(
info
!=
null
&&
info
.
getSalesmanId
()!=
null
&&
info
.
getSalesmanId
()>
0L
)
{
//客户经理
Long
customerId
=
0L
;
CustomerDO
consignorDO
=
customerService
.
getCustomer
(
info
.
getConsignorVO
().
getCustomerId
());
CustomerDO
consigneeDO
=
customerService
.
getCustomer
(
info
.
getConsigneeVO
().
getCustomerId
());
//收货人
if
(
info
.
getType
().
contains
(
"2"
))
{
//海外仓归属发货人
customerId
=
info
.
getConsignorVO
().
getCustomerId
();
}
else
{
if
(
info
.
getIsCargoControl
())
{
//非海外控货归属发货人
customerId
=
info
.
getConsignorVO
().
getCustomerId
();
//customerId = info.getConsignorVO().getCustomerId(); //二期需求修改
customerId
=
consignorDO
.
getId
();
}
else
{
// if (info.getIsCargoControl()) {//非海外控货归属发货人
// 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
!=
null
&&
!
consignorDO
.
getNoConsignee
()
&&
!
info
.
getHasConsignee
()){
//发货人档案设置控货无收货人且订单无收获人,归属发货人业绩 -- 层级2
...
...
@@ -191,12 +193,14 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
if
(
info
.
getDrawee
()
==
1
)
{
//发货人付款
if
(
info
.
getDrawee
()
==
1
&&
CollectionUtil
.
isNotEmpty
(
offerBackVOList
))
{
//如果是发货人付款且关联报价单,业绩归属发货人 --层级3 第一个
customerId
=
orderConsignorDO
.
getCustomer
Id
();
customerId
=
consignorDO
.
get
Id
();
}
else
if
(
info
.
getDrawee
()
==
1
&&
consignorDO
.
getDefaultPay
()
){
// 如果是发货人付款且档案设置默认付运费 --层级4 第一个
customerId
=
orderConsignorDO
.
getCustomerId
()
;
customerId
=
consignorDO
.
getId
();
}
else
{
customerId
=
consignorDO
.
getId
();
}
}
else
if
(
info
.
getDrawee
()
==
2
)
{
//收货人付款 层级5 第一个
}
else
if
(
info
.
getDrawee
()
==
2
&&
CollectionUtil
.
isEmpty
(
offerBackVOList
)
&&
!
consignorDO
.
getDefaultPay
()
)
{
//收货人付款 层级5 第一个
customerId
=
orderConsigneeDO
.
getCustomerId
()!=
null
?
orderConsigneeDO
.
getCustomerId
():
consigneeDO
.
getId
();
}
else
if
(
info
.
getDrawee
()
==
3
)
{
//自定义付款
...
...
@@ -229,10 +233,10 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
}
else
{
//业绩归属公司
customerId
=
info
.
getConsigneeVO
().
getCustomerId
()
;
return
;
}
}
//
}
}
TargetLogDO
targetLogDO
=
new
TargetLogDO
();
targetLogDO
.
setOrderId
(
orderId
);
...
...
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