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
3e7053ff
Commit
3e7053ff
authored
Aug 12, 2024
by
332784038@qq.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-fix' into dev
parents
47145330
66cef53e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
41 deletions
+52
-41
CustomerMapper.xml
...ore/src/main/resources/mapper/customer/CustomerMapper.xml
+16
-7
OrderWarehouseInServiceImpl.java
...service/orderWarehouseIn/OrderWarehouseInServiceImpl.java
+36
-34
No files found.
yudao-module-customer/yudao-module-customer-core/src/main/resources/mapper/customer/CustomerMapper.xml
View file @
3e7053ff
...
...
@@ -796,7 +796,11 @@
-- 捞取时间置为空
a.catch_time = null,
-- 移交客户重置报价延期次数为0
a.create_offer_postpone_num = 0
a.create_offer_postpone_num = 0,
-- 20240809修改 zendao #195 客户业绩类型字段,判断条件变更
-- 新客户置为1
a.is_new = (case when a.status = 3 then 0 else 1 end)
WHERE id in
<foreach
item=
'customer'
index=
'index'
collection=
'customerList'
open=
'('
separator=
','
close=
')'
>
#{customer.id}
...
...
@@ -859,8 +863,6 @@
a.is_in_open_sea = 0,
a.enter_open_sea_time = null,
-- 客户经理
a.customer_service = #{loginUserId},
-- 确认接收置为true #2201 公海池捞取客户后,捞取客户直接进入我的客户
a.is_customer_service_confirmed = 1,
-- 分配时间
...
...
@@ -874,7 +876,14 @@
a.status = if(a.status = 2, 1, a.status),
-- 预计进入公海池时间
a.estimate_enter_open_sea_time = #{estimateEnterOpenSeaTime}
a.estimate_enter_open_sea_time = #{estimateEnterOpenSeaTime},
-- 20240809修改 zendao #195 客户业绩类型字段,判断条件变更
-- 不同客户经理更新为新客户; 同一客户经理,成交为老客户,非已成交状态为新客户
a.is_new = (case when a.customer_service != #{loginUserId} then 1 else (if(a.status = 3, 0, 1)) end),
-- 客户经理 (这个要放到后面,因为前面有用到这条件)
a.customer_service = #{loginUserId}
WHERE id = #{customerId}
</update>
...
...
@@ -884,9 +893,9 @@
update ecw_customer a
set a.is_new = 0
where a.deleted = 0 and a.is_new = 1 and a.id = #{customerId}
and exists(
select 1 from ecw_target_log where deleted = 0 and customer_id = a.id
)
-- 20240809修改 zendao #195 客户业绩类型字段,判断条件变更
and a.status = 3
-- and exists(select 1 from ecw_target_log where deleted = 0 and customer_id = a.id
)
</update>
<sql
id=
"orderQuery"
>
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/orderWarehouseIn/OrderWarehouseInServiceImpl.java
View file @
3e7053ff
...
...
@@ -1416,41 +1416,43 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
orderConsigneeService
.
getOne
(
new
LambdaQueryWrapper
<
OrderConsigneeDO
>().
eq
(
OrderConsigneeDO:
:
getOrderId
,
orderDO
.
getOrderId
())
.
orderByDesc
(
OrderConsigneeDO:
:
getId
).
last
(
"limit 1"
));
if
(
orderConsignorDO2
!=
null
&&
orderConsignorDO2
.
getCustomerId
()
!=
null
&&
orderConsigneeDO2
!=
null
&&
orderConsigneeDO2
.
getCustomerId
()
!=
null
)
{
//获取发货人客户经理
CustomerDO
consignorCustomer
=
customerService
.
getById
(
orderConsignorDO2
.
getCustomerId
());
//获取收货人客户经理
CustomerDO
consigneeCustomer
=
customerService
.
getById
(
orderConsigneeDO2
.
getCustomerId
());
//订单的发货人、收货人同属一个客户经理,则两个客户经理都延期,
// 否则只延期订单中业绩归属方客户
if
(
consignorCustomer
!=
null
&&
consigneeCustomer
!=
null
&&
Objects
.
nonNull
(
consignorCustomer
.
getCustomerService
())
&&
Objects
.
nonNull
(
consigneeCustomer
.
getCustomerService
())
&&
(
consignorCustomer
.
getCustomerService
().
equals
(
consigneeCustomer
.
getCustomerService
())
||
consignorCustomer
.
getCustomerService
()
==
consigneeCustomer
.
getCustomerService
()))
{
if
(
orderConsignorDO2
!=
null
&&
orderConsignorDO2
.
getCustomerId
()
!=
null
)
{
idSet
.
add
(
orderConsignorDO2
.
getCustomerId
());
}
if
(
orderConsigneeDO2
!=
null
&&
orderConsigneeDO2
.
getCustomerId
()
!=
null
)
{
idSet
.
add
(
orderConsigneeDO2
.
getCustomerId
());
}
}
// if (orderConsignorDO2 != null &&
// orderConsignorDO2.getCustomerId() != null &&
// orderConsigneeDO2 != null &&
// orderConsigneeDO2.getCustomerId() != null) {
// //获取发货人客户经理
// CustomerDO consignorCustomer =
// customerService.getById(orderConsignorDO2.getCustomerId());
// //获取收货人客户经理
// CustomerDO consigneeCustomer =
// customerService.getById(orderConsigneeDO2.getCustomerId());
// //订单的发货人、收货人同属一个客户经理,则两个客户经理都延期,
// // 否则只延期订单中业绩归属方客户
// if (consignorCustomer != null && consigneeCustomer != null &&
// Objects.nonNull(consignorCustomer.getCustomerService()) &&
// Objects.nonNull(consigneeCustomer.getCustomerService()) &&
// (consignorCustomer.getCustomerService().equals(consigneeCustomer.getCustomerService()) || consignorCustomer.getCustomerService() == consigneeCustomer.getCustomerService())) {
//
// if (orderConsignorDO2 != null &&
// orderConsignorDO2.getCustomerId() != null) {
// idSet.add(orderConsignorDO2.getCustomerId());
// }
// if (orderConsigneeDO2 != null &&
// orderConsigneeDO2.getCustomerId() != null) {
// idSet.add(orderConsigneeDO2.getCustomerId());
// }
// }
// }
// 上面逻辑是2024-05-21修改的, 下面在2024-08-08又恢复成之前的这种业务。
// zendao #196 当订单入仓完成,订单收发方客户的客户状态均修改为成交
if
(
orderConsignorDO2
!=
null
&&
orderConsignorDO2
.
getCustomerId
()
!=
null
)
{
idSet
.
add
(
orderConsignorDO2
.
getCustomerId
());
}
if
(
orderConsigneeDO2
!=
null
&&
orderConsigneeDO2
.
getCustomerId
()
!=
null
)
{
idSet
.
add
(
orderConsigneeDO2
.
getCustomerId
());
}
// //旧逻辑 2024-05-21
// if (orderConsignorDO2 != null && orderConsignorDO2.getCustomerId() != null) {
// idSet.add(orderConsignorDO2.getCustomerId());
// }
//
// if (orderConsigneeDO2 != null && orderConsigneeDO2.getCustomerId() != null) {
// idSet.add(orderConsigneeDO2.getCustomerId());
// }
for
(
Long
id
:
idSet
)
{
customerService
.
updateCustomerByFinishWarehouseIn
(
id
,
orderId
,
orderDO
!=
null
?
orderDO
.
getOrderNo
()
:
""
,
...
...
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