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
b525c1de
Commit
b525c1de
authored
Jun 18, 2024
by
lanbaoming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-06-18提交
parent
e4bbddcc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
13 deletions
+22
-13
OrderServiceImpl.java
...dao/module/order/service/order/impl/OrderServiceImpl.java
+22
-13
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 @
b525c1de
...
@@ -1275,10 +1275,10 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -1275,10 +1275,10 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if
(
Objects
.
nonNull
(
oldCustomerService
))
{
if
(
Objects
.
nonNull
(
oldCustomerService
))
{
// 如果这里的旧客户经理id不为null,说明此客户属于移交新客户经理,但是新客户经理还未接收,业绩算老客户经理的
// 如果这里的旧客户经理id不为null,说明此客户属于移交新客户经理,但是新客户经理还未接收,业绩算老客户经理的
order
.
setSalesmanId
(
oldCustomerService
);
order
.
setSalesmanId
(
oldCustomerService
);
}
else
if
((
customerDO
.
getIsInOpenSea
()
&&
Objects
.
nonNull
(
customerDO
.
getEnterOpenSeaTime
()))
||
!
customerDO
.
getIsCustomerServiceConfirmed
())
{
//客户还在公海上,和待接收的,不做业绩归属分配,归公司
}
else
if
((
customerDO
.
getIsInOpenSea
()
&&
Objects
.
nonNull
(
customerDO
.
getEnterOpenSeaTime
()))
||
!
customerDO
.
getIsCustomerServiceConfirmed
())
{
//客户还在公海上,和待接收的,不做业绩归属分配,归公司
order
.
setSalesmanId
(
0L
);
order
.
setSalesmanId
(
0L
);
order
.
setCustomerId
(
0L
);
order
.
setCustomerId
(
0L
);
}
else
{
}
else
{
addOrderSalesmanCustomerService
(
createReqVO
,
order
);
addOrderSalesmanCustomerService
(
createReqVO
,
order
);
}
}
AdminUserRespDTO
adminUserRespDTO
=
adminUserApi
.
getUser
(
order
.
getSalesmanId
());
AdminUserRespDTO
adminUserRespDTO
=
adminUserApi
.
getUser
(
order
.
getSalesmanId
());
...
@@ -2112,7 +2112,8 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -2112,7 +2112,8 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if
(
Objects
.
nonNull
(
orderApprovalDO
)
&&
orderApprovalDO
.
getStatus
()
==
1
)
{
if
(
Objects
.
nonNull
(
orderApprovalDO
)
&&
orderApprovalDO
.
getStatus
()
==
1
)
{
throw
exception
(
YOUR_APPLY_PENDING
);
throw
exception
(
YOUR_APPLY_PENDING
);
}
}
if
(
Objects
.
equals
(
vo
.
getStatus
(),
OrderStatusEnum
.
DRAFT
.
getValue
())
||
Objects
.
equals
(
vo
.
getStatus
(),
OrderStatusEnum
.
ORDER_PLACED
.
getValue
())
||
Objects
.
equals
(
vo
.
getStatus
(),
OrderStatusEnum
.
WAREHOUSING
.
getValue
()))
{
if
(
Objects
.
equals
(
vo
.
getStatus
(),
OrderStatusEnum
.
DRAFT
.
getValue
())
||
Objects
.
equals
(
vo
.
getStatus
(),
OrderStatusEnum
.
ORDER_PLACED
.
getValue
())
||
Objects
.
equals
(
vo
.
getStatus
(),
OrderStatusEnum
.
WAREHOUSING
.
getValue
()))
{
// 是草稿、已下单、入仓中状态 直接修改
// 是草稿、已下单、入仓中状态 直接修改
this
.
updateOrder
(
updateReqVO
,
memberUserDO
);
this
.
updateOrder
(
updateReqVO
,
memberUserDO
);
...
@@ -2220,8 +2221,10 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -2220,8 +2221,10 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if
(
Objects
.
nonNull
(
consigneeContactsDO
))
{
if
(
Objects
.
nonNull
(
consigneeContactsDO
))
{
this
.
compareConsigneeInfo
(
updateReqVO
,
consigneeContactsDO
,
orderConsigneeBackVO
,
applyInfoList
,
vo
,
dictDataRespDTO
);
this
.
compareConsigneeInfo
(
updateReqVO
,
consigneeContactsDO
,
orderConsigneeBackVO
,
applyInfoList
,
vo
,
dictDataRespDTO
);
}
}
if
(
vo
.
getIsCharge
()
||
orderConsignorBackVO
.
getIsCharge
()
||
orderConsigneeBackVO
.
getIsCharge
())
{
if
(
vo
.
getIsCharge
()
||
orderConsignorBackVO
.
getIsCharge
()
||
// TODO 收发货人有变动,则可能业绩归属有变动, 此变动不放入审批详情,是根据收发货人的变动来实时调整业绩归属
orderConsigneeBackVO
.
getIsCharge
())
{
// TODO 收发货人有变动,则可能业绩归属有变动, 此变动不放入审批详情,
// 是根据收发货人的变动来实时调整业绩归属
// 获取最早入仓时间,当入仓时间大于三天,则不允许再修改当前客户归属
// 获取最早入仓时间,当入仓时间大于三天,则不允许再修改当前客户归属
OrderWarehouseInDO
warehouseInDO
=
orderWarehouseInMapper
.
selectOne
(
new
LambdaQueryWrapper
<
OrderWarehouseInDO
>()
OrderWarehouseInDO
warehouseInDO
=
orderWarehouseInMapper
.
selectOne
(
new
LambdaQueryWrapper
<
OrderWarehouseInDO
>()
.
eq
(
OrderWarehouseInDO:
:
getOrderId
,
vo
.
getOrderId
())
.
eq
(
OrderWarehouseInDO:
:
getOrderId
,
vo
.
getOrderId
())
...
@@ -2852,8 +2855,9 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -2852,8 +2855,9 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
}
}
private
void
comparePerformanceAttribution
(
OrderBackVO
private
void
comparePerformanceAttribution
(
OrderBackVO
vo
,
vo
,
List
<
ApplyInfoVO
>
applyInfoList
,
OrderConsignorBackVO
orderConsignorBackVO
,
List
<
ApplyInfoVO
>
applyInfoList
,
OrderConsignorBackVO
orderConsignorBackVO
,
OrderConsigneeBackVO
orderConsigneeBackVO
)
{
OrderConsigneeBackVO
orderConsigneeBackVO
)
{
// TODO 客户归属变动时记录日志
// TODO 客户归属变动时记录日志
if
(!
Objects
.
equals
(
vo
.
getStatus
(),
OrderStatusEnum
.
DRAFT
.
getValue
()))
{
if
(!
Objects
.
equals
(
vo
.
getStatus
(),
OrderStatusEnum
.
DRAFT
.
getValue
()))
{
...
@@ -2873,16 +2877,19 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -2873,16 +2877,19 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
}
}
}
else
{
}
else
{
if
(
vo
.
getIsCargoControl
())
{
if
(
vo
.
getIsCargoControl
())
{
if
(!
Objects
.
equals
(
vo
.
getCustomerId
(),
orderConsignorBackVO
.
getCustomerId
()))
{
if
(!
Objects
.
equals
(
vo
.
getCustomerId
(),
orderConsignorBackVO
.
getCustomerId
()))
{
// 控货订单归属发货人
// 控货订单归属发货人
customerType
=
1
;
customerType
=
1
;
CustomerDO
orgCustomerDO
=
customerService
.
getCustomer
(
vo
.
getCustomerId
());
CustomerDO
orgCustomerDO
=
customerService
.
getCustomer
(
vo
.
getCustomerId
());
CustomerDO
newCustomerDO
=
customerService
.
getCustomer
(
orderConsignorBackVO
.
getCustomerId
());
CustomerDO
newCustomerDO
=
customerService
.
getCustomer
(
orderConsignorBackVO
.
getCustomerId
());
infoVO
=
new
ApplyInfoVO
();
infoVO
=
new
ApplyInfoVO
();
infoVO
.
setName
(
"订单客户归属变动/Change in customer ownership for orders"
);
infoVO
.
setName
(
"新规则,控货订单客户归属不变动/Change in customer ownership for orders"
);
infoVO
.
setOrgValue
(
Objects
.
nonNull
(
orgCustomerDO
)
?
((
StringUtils
.
isNotBlank
(
orgCustomerDO
.
getName
())
?
orgCustomerDO
.
getName
()
:
"无"
)
+
"/"
+
(
StringUtils
.
isNotBlank
(
orgCustomerDO
.
getNameEn
())
?
orgCustomerDO
.
getNameEn
()
:
"empty"
))
:
"无/not have"
);
//lanbm 2024-06-18 出掉控货改变业绩归属的逻辑点
infoVO
.
setNewValue
(
Objects
.
nonNull
(
newCustomerDO
)
?
((
StringUtils
.
isNotBlank
(
newCustomerDO
.
getName
())
?
newCustomerDO
.
getName
()
:
"无"
)
+
"/"
+
(
StringUtils
.
isNotBlank
(
newCustomerDO
.
getNameEn
())
?
newCustomerDO
.
getNameEn
()
:
"empty"
))
:
"无/not have"
);
//infoVO.setOrgValue(Objects.nonNull(orgCustomerDO) ? ((StringUtils.isNotBlank(orgCustomerDO.getName()) ? orgCustomerDO.getName() : "无") + "/" + (StringUtils.isNotBlank(orgCustomerDO.getNameEn()) ? orgCustomerDO.getNameEn() : "empty")) : "无/not have");
vo
.
setCustomerId
(
orderConsignorBackVO
.
getCustomerId
());
//infoVO.setNewValue(Objects.nonNull(newCustomerDO) ? ((StringUtils.isNotBlank(newCustomerDO.getName()) ? newCustomerDO.getName() : "无") + "/" + (StringUtils.isNotBlank(newCustomerDO.getNameEn()) ? newCustomerDO.getNameEn() : "empty")) : "无/not have");
//vo.setCustomerId(orderConsignorBackVO.getCustomerId());
return
;
}
}
}
else
{
}
else
{
// 非控货订单 + 付款人为发货人 归属发货人, 其他归属收货人
// 非控货订单 + 付款人为发货人 归属发货人, 其他归属收货人
...
@@ -3465,7 +3472,9 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -3465,7 +3472,9 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
//
//
// }
// }
// 更新所属客户经理(业务员)
// 更新所属客户经理(业务员)
if
(!
OrderStatusEnum
.
DRAFT
.
getValue
().
equals
(
updateObj
.
getStatus
())
&&
Objects
.
nonNull
(
updateObj
.
getCustomerId
())
&&
updateObj
.
getCustomerId
()
>
0
)
{
if
(!
OrderStatusEnum
.
DRAFT
.
getValue
().
equals
(
updateObj
.
getStatus
())
&&
Objects
.
nonNull
(
updateObj
.
getCustomerId
())
&&
updateObj
.
getCustomerId
()
>
0
)
{
addOrderCustomerService
(
updateObj
,
customerType
);
addOrderCustomerService
(
updateObj
,
customerType
);
}
}
}
}
...
...
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