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
1219be5a
Commit
1219be5a
authored
Nov 27, 2024
by
Smile
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:取消未分配客户经理异常
parent
56a99e29
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
55 deletions
+10
-55
OrderServiceImpl.java
...dao/module/order/service/order/impl/OrderServiceImpl.java
+10
-55
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 @
1219be5a
...
...
@@ -1165,37 +1165,10 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
// 如果客户正在移交新客户经理,但是未接收,并且老客户经理不为null,
// 则不创建客户经理未分配异常
//web下单,业绩为收货人,不产生未分配客户经理异常
if
(
order
.
getUserId
()
!=
null
&&
order
.
getUserId
()
>
0
&&
customerType
==
2
)
{
order
.
setSalesmanId
(
0L
);
order
.
setDeptId
(
0L
);
log
.
info
(
"web下单,业绩为收货人,不产生未分配客户经理异常 orderNo={}"
,
order
.
getOrderNo
());
}
else
{
// 只有客户的客户经理为空时
String
descZh
=
"归属客户:%s 客户编号:%s"
;
String
descEn
=
"Customer: %s Customer No.: %s"
;
// 该客户没有客户经理, 需要生成异常,判断当前客户是发货人还是收货人
if
(
customerType
==
1
)
{
// 发货人
descZh
=
String
.
format
(
descZh
,
"发货人"
,
customerDO
.
getNumber
());
descEn
=
String
.
format
(
descEn
,
"consignor"
,
customerDO
.
getNumber
());
}
else
{
// 收货人
descZh
=
String
.
format
(
descZh
,
"收货人"
,
customerDO
.
getNumber
());
descEn
=
String
.
format
(
descEn
,
"consignee"
,
customerDO
.
getNumber
());
}
OrderExceptionCreateReqVO
orderExceptionCreateReqVO
=
this
.
genOrderException
(
order
.
getOrderId
(),
order
,
null
,
order
.
getCustomerId
(),
OrderExceptionEnum
.
NOT_CUSTOMER_SERVICE_EXCEPTION
,
descZh
,
descEn
);
orderExceptionService
.
createOrderException
(
orderExceptionCreateReqVO
);
}
//订单下单,业绩为收货人,不产生未分配客户经理异常
order
.
setSalesmanId
(
0L
);
order
.
setDeptId
(
0L
);
log
.
info
(
"订单下单,业绩为收货人,不产生未分配客户经理异常 orderNo={}"
,
order
.
getOrderNo
());
}
else
{
// 该订单存在该客户未分配客户经理异常,或者该客户的客户经理待接收,
// 则不再生成未分配客户经理异常,且该订单不产生业绩归属
...
...
@@ -1237,30 +1210,11 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
infoVO
.
setName
(
"订单业务经理变动/Change in Order Business Manager"
);
infoVO
.
setOrgValue
(
Objects
.
nonNull
(
orgAdminUserRespDTO
)
?
orgAdminUserRespDTO
.
getNickname
()
:
"无"
);
infoVO
.
setNewValue
(
"无"
);
//web下单,业绩为收货人,不产生未分配客户经理异常
if
(
vo
.
getUserId
()
!=
null
&&
customerType
==
2
)
{
vo
.
setSalesmanId
(
0L
);
vo
.
setDeptId
(
0L
);
vo
.
setIsCreateCustomerServiceException
(
Boolean
.
FALSE
);
log
.
info
(
"web下单,业绩为收货人,不产生未分配客户经理异常 orderNo={}"
,
vo
.
getOrderNo
());
}
else
{
vo
.
setIsCreateCustomerServiceException
(
Boolean
.
TRUE
);
// 只有客户的客户经理为空时
String
descZh
=
"归属客户:%s 客户编号:%s"
;
String
descEn
=
"Customer: %s Customer No.: %s"
;
// 该客户没有客户经理, 需要生成异常,判断当前客户是发货人还是收货人
if
(
customerType
==
1
)
{
// 发货人
descZh
=
String
.
format
(
descZh
,
"发货人"
,
customerDO
.
getNumber
());
descEn
=
String
.
format
(
descEn
,
"consignor"
,
customerDO
.
getNumber
());
}
else
{
// 收货人
descZh
=
String
.
format
(
descZh
,
"收货人"
,
customerDO
.
getNumber
());
descEn
=
String
.
format
(
descEn
,
"consignee"
,
customerDO
.
getNumber
());
}
vo
.
setDescZh
(
descZh
);
vo
.
setDescEn
(
descEn
);
}
//订单下单,业绩为收货人,不产生未分配客户经理异常
vo
.
setSalesmanId
(
0L
);
vo
.
setDeptId
(
0L
);
vo
.
setIsCreateCustomerServiceException
(
Boolean
.
FALSE
);
log
.
info
(
"订单下单,业绩为收货人,不产生未分配客户经理异常 orderNo={}"
,
vo
.
getOrderNo
());
}
else
{
// 该订单存在该客户未分配客户经理异常,或者该客户的客户经理待接收,则不再生成未分配客户经理异常,且该订单不产生业绩归属
vo
.
setSalesmanId
(
0L
);
...
...
@@ -5912,6 +5866,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if
(
Objects
.
isNull
(
warehouseInDO
))
{
throw
exception
(
ORDER_NOT_WAREHOUSE_IN
);
}
// 这里不会产生异常,因为不会有True的时候,只有在创建的时候产生客户经理异常的时候才会为True,但创建订单时产生客户经理异常取消了
if
(
orderBackVO
.
getIsCreateCustomerServiceException
())
{
// TODO 这里会有一个问题,当审批通过时,该客户分配了客户经理并接收了,或者未接收的客户经理被接收了是否还产生异常
String
descZh
=
orderBackVO
.
getDescZh
();
...
...
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