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
72b7e928
Commit
72b7e928
authored
Jul 02, 2024
by
lanbaoming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-07-02-5提交
parent
56b9a1c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
74 additions
and
80 deletions
+74
-80
TargetLogServiceImpl.java
.../module/order/service/targetLog/TargetLogServiceImpl.java
+74
-80
No files found.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/targetLog/TargetLogServiceImpl.java
View file @
72b7e928
...
@@ -311,8 +311,8 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
...
@@ -311,8 +311,8 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
long
targetId
)
{
long
targetId
)
{
long
selectCount
=
long
selectCount
=
targetLogMapper
.
selectCount
(
TargetLogDO:
:
getOrderId
,
targetLogMapper
.
selectCount
(
TargetLogDO:
:
getOrderId
,
orderId
);
orderId
);
if
(
selectCount
==
0L
)
{
if
(
selectCount
==
0L
)
{
return
;
return
;
}
}
//获取订单信息
//获取订单信息
...
@@ -358,24 +358,19 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
...
@@ -358,24 +358,19 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
info
.
getOrderId
()).
orderByDesc
(
info
.
getOrderId
()).
orderByDesc
(
OrderConsignorDO:
:
getId
).
last
(
"limit 1"
));
OrderConsignorDO:
:
getId
).
last
(
"limit 1"
));
if
(
info
.
getIsCargoControl
())
{
if
(
consignorDO
!=
null
&&
!
consignorDO
.
getNoConsignee
()
//控货订单目前按发货人来算
&&
!
info
.
getHasConsignee
())
{
customerId
=
info
.
getConsignorVO
().
getCustomerId
();
//getHasConsignee 是否有收货人
//发货人档案设置控货无收货人且订单无收获人,归属发货人业绩 -- 层级2
if
(
consignorDO
!=
null
)
{
customerId
=
consignorDO
.
getId
();
}
}
else
{
}
else
{
if
(
consignorDO
!=
null
&&
!
consignorDO
.
getNoConsignee
()
List
<
TargetOfferBackVO
>
offerBackVOList
=
&&
!
info
.
getHasConsignee
())
{
targetLogMapper
.
getTargetOfferBackByOrerId
(
orderId
);
//getHasConsignee 是否有收货人
if
(
info
.
getDrawee
()
==
1
)
{
//发货人档案设置控货无收货人且订单无收获人,归属发货人业绩 -- 层级2
//发货人付款
if
(
consignorDO
!=
null
)
{
customerId
=
consignorDO
.
getId
();
}
}
else
{
List
<
TargetOfferBackVO
>
offerBackVOList
=
targetLogMapper
.
getTargetOfferBackByOrerId
(
orderId
);
if
(
info
.
getDrawee
()
==
1
)
{
//发货人付款
/*
/*
if (info.getDrawee() == 1 &&
if (info.getDrawee() == 1 &&
CollectionUtil.isNotEmpty(offerBackVOList)) {
CollectionUtil.isNotEmpty(offerBackVOList)) {
...
@@ -389,82 +384,81 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
...
@@ -389,82 +384,81 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
//业绩归属方是收货人
//业绩归属方是收货人
customerId = orderConsigneeDO.getCustomerId() ;
customerId = orderConsigneeDO.getCustomerId() ;
}*/
}*/
if
(
CollectionUtil
.
isNotEmpty
(
offerBackVOList
))
{
if
(
CollectionUtil
.
isNotEmpty
(
offerBackVOList
))
{
//如果是发货人付款且关联报价单,业绩归属发货人 --层级3 第一个
//如果是发货人付款且关联报价单,业绩归属发货人 --层级3 第一个
customerId
=
consignorDO
.
getId
();
}
else
{
if
(
consignorDO
.
getDefaultPay
())
{
//如果是发货人付款且档案设置默认付运费 --层级4 第一个
customerId
=
consignorDO
.
getId
();
customerId
=
consignorDO
.
getId
();
}
else
{
}
else
{
if
(
consignorDO
.
getDefaultPay
())
{
//业绩归属方是收货人
//如果是发货人付款且档案设置默认付运费 --层级4 第一个
customerId
=
orderConsigneeDO
.
getCustomerId
();
customerId
=
consignorDO
.
getId
();
}
else
{
//业绩归属方是收货人
customerId
=
orderConsigneeDO
.
getCustomerId
();
}
}
}
}
}
else
if
(
info
.
getDrawee
()
==
2
)
{
}
else
if
(
info
.
getDrawee
()
==
2
)
{
//收货人付款 层级5 第一个
//收货人付款 层级5 第一个
customerId
=
orderConsigneeDO
.
getCustomerId
()
!=
null
?
customerId
=
orderConsigneeDO
.
getCustomerId
()
!=
null
?
orderConsigneeDO
.
getCustomerId
()
:
consigneeDO
.
getId
();
orderConsigneeDO
.
getCustomerId
()
:
consigneeDO
.
getId
();
}
else
if
(
info
.
getDrawee
()
==
3
)
{
}
else
if
(
info
.
getDrawee
()
==
3
)
{
//自定义付款
//自定义付款
List
<
CustomDraweeVO
>
list
=
List
<
CustomDraweeVO
>
list
=
JSONObject
.
parseArray
(
info
.
getCustomDrawee
(),
JSONObject
.
parseArray
(
info
.
getCustomDrawee
(),
CustomDraweeVO
.
class
);
CustomDraweeVO
.
class
);
if
(
CollectionUtil
.
isNotEmpty
(
list
))
{
if
(
CollectionUtil
.
isNotEmpty
(
list
))
{
List
<
CustomDraweeVO
>
freightList
=
List
<
CustomDraweeVO
>
freightList
=
list
.
stream
().
filter
(
s
->
s
.
getName
().
equals
(
"freight"
)).
collect
(
Collectors
.
toList
());
list
.
stream
().
filter
(
s
->
s
.
getName
().
equals
(
"freight"
)).
collect
(
Collectors
.
toList
());
List
<
CustomDraweeVO
>
clearanceFeeList
=
List
<
CustomDraweeVO
>
clearanceFeeList
=
list
.
stream
().
filter
(
s
->
s
.
getName
().
equals
(
"clearanceFee"
)).
collect
(
Collectors
.
toList
());
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
();
//清关费
//清关费
if
(
CollectionUtil
.
isNotEmpty
(
offerBackVOList
)
&&
if
(
CollectionUtil
.
isNotEmpty
(
offerBackVOList
)
&&
(
info
.
getDrawee
()
==
3
&&
freight
==
1
))
{
(
info
.
getDrawee
()
==
3
&&
freight
==
1
))
{
//层级3 第二个 订单关联报价单 && 自定义付款 且发货人付运费
//层级3 第二个 订单关联报价单 && 自定义付款 且发货人付运费
customerId
=
orderConsignorDO
.
getCustomerId
();
customerId
=
orderConsignorDO
.
getCustomerId
();
}
else
if
(
CollectionUtil
.
isNotEmpty
(
offerBackVOList
)
}
else
if
(
CollectionUtil
.
isNotEmpty
(
offerBackVOList
)
&&
(
info
.
getDrawee
()
==
3
&&
clearanceFee
==
1
))
{
&&
(
info
.
getDrawee
()
==
3
&&
clearanceFee
==
1
))
{
//层级3 第三个 订单关联报价单 && 自定义付款 且发货人付清关费
//层级3 第三个 订单关联报价单 && 自定义付款 且发货人付清关费
customerId
=
orderConsignorDO
.
getCustomerId
();
customerId
=
orderConsignorDO
.
getCustomerId
();
}
else
if
(
consignorDO
.
getDefaultPay
()
&&
}
else
if
(
consignorDO
.
getDefaultPay
()
&&
(
info
.
getDrawee
()
==
3
&&
freight
==
1
))
{
(
info
.
getDrawee
()
==
3
&&
freight
==
1
))
{
//层级4 第二个 发货人档案设置默认付运费 且发货人付运费 业绩归属 发货人
//层级4 第二个 发货人档案设置默认付运费 且发货人付运费 业绩归属 发货人
customerId
=
orderConsignorDO
.
getCustomerId
();
customerId
=
orderConsignorDO
.
getCustomerId
();
}
else
if
(
consignorDO
.
getDefaultPay
()
&&
}
else
if
(
consignorDO
.
getDefaultPay
()
&&
(
info
.
getDrawee
()
==
3
(
info
.
getDrawee
()
==
3
&&
clearanceFee
==
1
))
{
&&
clearanceFee
==
1
))
{
// 层级4 第三个 发货人档案设置默认付运费 且发货人付清关费 业绩归属发货人
// 层级4 第三个 发货人档案设置默认付运费 且发货人付清关费 业绩归属发货人
customerId
=
orderConsignorDO
.
getCustomerId
();
customerId
=
orderConsignorDO
.
getCustomerId
();
}
else
{
}
else
{
customerId
=
orderConsigneeDO
.
getCustomerId
();
customerId
=
orderConsigneeDO
.
getCustomerId
();
}
}
// if(!consignorDO.getDefaultPay() && (info.getDrawee()==3 && freight==2 ) || (info.getDrawee()==3 && clearanceFee==2)){//层级5 第二、第三点 自定义付款且收款人付运费 或自定义付款且收款人付清关费 ,业绩归属收货人
// if(!consignorDO.getDefaultPay() && (info.getDrawee()==3 && freight==2 ) || (info.getDrawee()==3 && clearanceFee==2)){//层级5 第二、第三点 自定义付款且收款人付运费 或自定义付款且收款人付清关费 ,业绩归属收货人
// customerId = orderConsigneeDO.getCustomerId() ;
// customerId = orderConsigneeDO.getCustomerId() ;
//
//
// }
// }
}
}
}
else
{
//业绩归属收货人
if
(
orderConsigneeDO
!=
null
)
{
customerId
=
orderConsigneeDO
.
getCustomerId
()
!=
null
?
orderConsigneeDO
.
getCustomerId
()
:
0
;
}
}
else
{
//业绩归属收货人
if
(
orderConsigneeDO
!=
null
)
{
customerId
=
orderConsigneeDO
.
getCustomerId
()
!=
null
?
orderConsigneeDO
.
getCustomerId
()
:
0
;
}
}
}
}
}
}
}
}
TargetLogDO
targetLogDO
=
TargetLogDO
targetLogDO
=
targetLogMapper
.
selectById
(
targetId
);
targetLogMapper
.
selectById
(
targetId
);
//客户ID
//客户ID
targetLogDO
.
setCustomerId
(
customerId
);
targetLogDO
.
setCustomerId
(
customerId
);
//客户经理ID
//客户经理ID
...
...
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