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
b0532416
Commit
b0532416
authored
Jul 04, 2024
by
lanbaoming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-07-04-1提交
parent
42c7d102
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
241 additions
and
247 deletions
+241
-247
TargetLogServiceImpl.java
.../module/order/service/targetLog/TargetLogServiceImpl.java
+241
-247
No files found.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/targetLog/TargetLogServiceImpl.java
View file @
b0532416
...
...
@@ -11,8 +11,10 @@ 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.order.zTest
;
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.dal.mysql.order.ZTestMapper2
;
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
;
...
...
@@ -61,6 +63,8 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
@Resource
private
OrderConsignorService
orderConsignorService
;
@Resource
ZTestMapper2
zTestMapper2
;
public
List
<
TargetLogDO
>
selectList2
(
String
sDate
)
{
return
targetLogMapper
.
selectList2
(
sDate
);
...
...
@@ -208,7 +212,6 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
orderConsignorService
.
getOne
(
new
LambdaQueryWrapper
<
OrderConsignorDO
>().
eq
(
OrderConsignorDO:
:
getOrderId
,
info
.
getOrderId
()).
orderByDesc
(
OrderConsignorDO:
:
getId
).
last
(
"limit 1"
));
if
(
consignorDO
!=
null
&&
!
consignorDO
.
getNoConsignee
()
&&
!
info
.
getHasConsignee
())
{
//getHasConsignee 是否有收货人
...
...
@@ -331,6 +334,7 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
public
void
dealTargetLogTask
(
Long
orderId
,
Date
achievementTime
,
long
targetId
)
{
try
{
long
selectCount
=
targetLogMapper
.
selectCount
(
TargetLogDO:
:
getOrderId
,
orderId
);
...
...
@@ -352,7 +356,7 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
//客户经理
Long
customerId
=
0L
;
Long
saleManid
=
info
.
getSalesmanId
();
int
loglev
=
0
;
int
loglev
=
0
;
CustomerDO
consignorDO
=
customerService
.
getCustomer
(
info
.
getConsignorVO
().
getCustomerId
());
...
...
@@ -367,6 +371,7 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
//customerId = info.getConsignorVO().getCustomerId();
//二期需求修改
customerId
=
consignorDO
.
getId
();
loglev
=
1
;
//客户的客户经理为空,就把业绩归属设为0
if
(
consignorDO
.
getCustomerService
()
==
null
||
consignorDO
.
getCustomerService
()
==
0
||
...
...
@@ -374,9 +379,8 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
saleManid
=
0L
;
orderService
.
updateOrderSalesmanId
(
info
.
getOrderId
(),
0L
);
loglev
=
11
;
loglev
=
11
;
}
loglev
=
1
;
}
else
{
OrderConsigneeDO
orderConsigneeDO
=
...
...
@@ -399,7 +403,7 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
//发货人档案设置控货无收货人且订单无收获人,归属发货人业绩 -- 层级2
if
(
consignorDO
!=
null
)
{
customerId
=
consignorDO
.
getId
();
loglev
=
2
;
loglev
=
2
;
//校验客户的客户经理
if
(
consignorDO
.
getCustomerService
()
==
null
||
consignorDO
.
getCustomerService
()
==
0
||
...
...
@@ -408,7 +412,7 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
saleManid
=
0L
;
orderService
.
updateOrderSalesmanId
(
info
.
getOrderId
(),
0L
);
loglev
=
21
;
loglev
=
21
;
}
}
...
...
@@ -416,24 +420,10 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
List
<
TargetOfferBackVO
>
offerBackVOList
=
targetLogMapper
.
getTargetOfferBackByOrerId
(
orderId
);
if
(
info
.
getDrawee
()
==
1
)
{
//发货人付款
/*
if (info.getDrawee() == 1 &&
CollectionUtil.isNotEmpty(offerBackVOList)) {
//如果是发货人付款且关联报价单,业绩归属发货人 --层级3 第一个
customerId = consignorDO.getId();
}else if(info.getDrawee() == 1 &&
consignorDO.getDefaultPay() ){
// 如果是发货人付款且档案设置默认付运费 --层级4 第一个
customerId = consignorDO.getId();
}else{
//业绩归属方是收货人
customerId = orderConsigneeDO.getCustomerId() ;
}*/
if
(
CollectionUtil
.
isNotEmpty
(
offerBackVOList
))
{
//如果是发货人付款且关联报价单,业绩归属发货人 --层级3 第一个
customerId
=
consignorDO
.
getId
();
loglev
=
3
;
loglev
=
3
;
//校验客户的客户经理
if
(
consignorDO
.
getCustomerService
()
==
null
||
consignorDO
.
getCustomerService
()
==
0
||
...
...
@@ -441,13 +431,13 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
saleManid
=
0L
;
orderService
.
updateOrderSalesmanId
(
info
.
getOrderId
(),
0L
);
loglev
=
31
;
loglev
=
31
;
}
}
else
{
if
(
consignorDO
.
getDefaultPay
())
{
//如果是发货人付款且档案设置默认付运费 --层级4 第一个
customerId
=
consignorDO
.
getId
();
loglev
=
4
;
loglev
=
4
;
//校验客户的客户经理
if
(
consignorDO
.
getCustomerService
()
==
null
||
consignorDO
.
getCustomerService
()
==
0
||
...
...
@@ -455,11 +445,11 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
saleManid
=
0L
;
orderService
.
updateOrderSalesmanId
(
info
.
getOrderId
(),
0L
);
loglev
=
41
;
loglev
=
41
;
}
}
else
{
//业绩归属方是收货人
loglev
=
5
;
loglev
=
5
;
customerId
=
orderConsigneeDO
.
getCustomerId
();
//校验客户的客户经理
if
(
consigneeDO
.
getCustomerService
()
==
null
||
...
...
@@ -468,7 +458,7 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
saleManid
=
0L
;
orderService
.
updateOrderSalesmanId
(
info
.
getOrderId
(),
0L
);
loglev
=
51
;
loglev
=
51
;
}
}
}
...
...
@@ -477,7 +467,7 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
//收货人付款 层级5 第一个
customerId
=
orderConsigneeDO
.
getCustomerId
()
!=
null
?
orderConsigneeDO
.
getCustomerId
()
:
consigneeDO
.
getId
();
loglev
=
5
;
loglev
=
5
;
if
(
consigneeDO
!=
null
&&
(
consigneeDO
.
getCustomerService
()
==
null
||
consigneeDO
.
getCustomerService
()
==
0
))
{
...
...
@@ -512,7 +502,7 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
(
info
.
getDrawee
()
==
3
&&
freight
==
1
))
{
//层级3 第二个 订单关联报价单 && 自定义付款 且发货人付运费
customerId
=
orderConsignorDO
.
getCustomerId
();
loglev
=
3
;
loglev
=
3
;
//校验客户的客户经理
if
(
consignorDO
.
getCustomerService
()
==
null
||
consignorDO
.
getCustomerService
()
==
0
||
...
...
@@ -520,14 +510,14 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
saleManid
=
0L
;
orderService
.
updateOrderSalesmanId
(
info
.
getOrderId
(),
0L
);
loglev
=
31
;
loglev
=
31
;
}
}
else
if
(
CollectionUtil
.
isNotEmpty
(
offerBackVOList
)
&&
(
info
.
getDrawee
()
==
3
&&
clearanceFee
==
1
))
{
//层级3 第三个 订单关联报价单 && 自定义付款 且发货人付清关费
customerId
=
orderConsignorDO
.
getCustomerId
();
loglev
=
3
;
loglev
=
3
;
//校验客户的客户经理
if
(
consignorDO
.
getCustomerService
()
==
null
||
consignorDO
.
getCustomerService
()
==
0
||
...
...
@@ -535,14 +525,14 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
saleManid
=
0L
;
orderService
.
updateOrderSalesmanId
(
info
.
getOrderId
(),
0L
);
loglev
=
32
;
loglev
=
32
;
}
}
else
if
(
consignorDO
.
getDefaultPay
()
&&
(
info
.
getDrawee
()
==
3
&&
freight
==
1
))
{
//层级4 第二个 发货人档案设置默认付运费 且发货人付运费 业绩归属 发货人
customerId
=
orderConsignorDO
.
getCustomerId
();
loglev
=
3
;
loglev
=
3
;
//校验客户的客户经理
if
(
consignorDO
.
getCustomerService
()
==
null
||
consignorDO
.
getCustomerService
()
==
0
||
...
...
@@ -550,14 +540,14 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
saleManid
=
0L
;
orderService
.
updateOrderSalesmanId
(
info
.
getOrderId
(),
0L
);
loglev
=
33
;
loglev
=
33
;
}
}
else
if
(
consignorDO
.
getDefaultPay
()
&&
(
info
.
getDrawee
()
==
3
&&
clearanceFee
==
1
))
{
// 层级4 第三个 发货人档案设置默认付运费 且发货人付清关费 业绩归属发货人
loglev
=
4
;
loglev
=
4
;
customerId
=
orderConsignorDO
.
getCustomerId
();
//校验客户的客户经理
if
(
consignorDO
.
getCustomerService
()
==
null
||
...
...
@@ -566,12 +556,12 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
saleManid
=
0L
;
orderService
.
updateOrderSalesmanId
(
info
.
getOrderId
(),
0L
);
loglev
=
1
;
loglev
=
1
;
}
}
else
{
customerId
=
orderConsigneeDO
.
getCustomerId
();
loglev
=
5
;
loglev
=
5
;
//校验客户的客户经理
if
(
consigneeDO
.
getCustomerService
()
==
null
||
consigneeDO
.
getCustomerService
()
==
0
||
...
...
@@ -579,14 +569,9 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
saleManid
=
0L
;
orderService
.
updateOrderSalesmanId
(
info
.
getOrderId
(),
0L
);
loglev
=
51
;
loglev
=
51
;
}
}
// if(!consignorDO.getDefaultPay() && (info.getDrawee()==3 && freight==2 ) || (info.getDrawee()==3 && clearanceFee==2)){//层级5 第二、第三点 自定义付款且收款人付运费 或自定义付款且收款人付清关费 ,业绩归属收货人
// customerId = orderConsigneeDO.getCustomerId() ;
//
// }
}
}
else
{
...
...
@@ -596,7 +581,7 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
orderConsigneeDO
.
getCustomerId
()
!=
null
?
orderConsigneeDO
.
getCustomerId
()
:
0
;
loglev
=
5
;
loglev
=
5
;
//校验客户的客户经理
if
(
consigneeDO
!=
null
)
{
if
(
consigneeDO
.
getCustomerService
()
==
null
||
...
...
@@ -605,7 +590,7 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
saleManid
=
0L
;
orderService
.
updateOrderSalesmanId
(
info
.
getOrderId
(),
0L
);
loglev
=
52
;
loglev
=
52
;
}
}
}
...
...
@@ -618,8 +603,17 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
targetLogDO
.
setCustomerId
(
customerId
);
//客户经理ID
targetLogDO
.
setUserId
(
saleManid
);
targetLogDO
.
setLoglev
(
100
);
targetLogDO
.
setUpdateTime
(
new
Date
());
targetLogMapper
.
updateById
(
targetLogDO
);
}
catch
(
Exception
e
)
{
zTest
m2
=
new
zTest
();
m2
.
setTestname
(
e
.
getMessage
());
m2
.
setCreatedate
(
new
Date
());
zTestMapper2
.
insert
(
m2
);
}
}
}
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