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
b5fb9bab
Commit
b5fb9bab
authored
Sep 29, 2024
by
332784038@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对重量超限异常判断修正
parent
b6f8060d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
21 deletions
+28
-21
OrderBusinessServiceImpl.java
...le/order/service/order/impl/OrderBusinessServiceImpl.java
+28
-21
No files found.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderBusinessServiceImpl.java
View file @
b5fb9bab
...
@@ -2614,18 +2614,38 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
...
@@ -2614,18 +2614,38 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
orderExceptionService
.
getPendingOrderExceptionByOrderIdAndOrderItemIdAndExceptionKey
(
orderDO
.
getOrderId
(),
orderExceptionService
.
getPendingOrderExceptionByOrderIdAndOrderItemIdAndExceptionKey
(
orderDO
.
getOrderId
(),
null
,
null
,
OrderExceptionEnum
.
NOT_SHIPPING_CHANNEL_EXCEPTION
.
getKey
());
OrderExceptionEnum
.
NOT_SHIPPING_CHANNEL_EXCEPTION
.
getKey
());
List
<
OrderExceptionDO
>
overweightExceptionDOList
=
new
ArrayList
<>();
List
<
OrderExceptionDO
>
lineOverweightExceptionDOList
=
orderExceptionService
.
getPendingOrderExceptionByOrderIdAndOrderItemIdAndProdIdAndExceptionKeys
(
orderDO
.
getOrderId
(),
null
,
null
,
CollectionUtil
.
newArrayList
(
OrderExceptionEnum
.
LINE_WEIGHT_EXCEPTION
.
getKey
()));
if
(
CollectionUtil
.
isNotEmpty
(
lineOverweightExceptionDOList
)
||
lineOverweightExceptionDOList
.
isEmpty
()){
overweightExceptionDOList
.
addAll
(
lineOverweightExceptionDOList
);
}
orderDO
.
setIsAutomaticHandleNoCanShipmentChannelException
(
false
);
orderDO
.
setIsAutomaticHandleNoCanShipmentChannelException
(
false
);
// 拆单子订单如果被标记为独立订单,则与非拆单订单一样的处理逻辑
// 拆单子订单如果被标记为独立订单,则与非拆单订单一样的处理逻辑
if
(
orderDO
.
getStatus
()
>
OrderStatusEnum
.
DRAFT
.
getValue
())
{
if
(
orderDO
.
getStatus
()
>
OrderStatusEnum
.
DRAFT
.
getValue
())
{
for
(
OrderItemDO
orderItemDO
:
newOrderItemDOList
)
{
for
(
OrderItemDO
orderItemDO
:
newOrderItemDOList
)
{
WarehouseInInfoVO
warehouseInInfoVO
=
WarehouseInInfoVO
warehouseInInfoVO
=
orderItemDO
.
getWarehouseInInfoVO
();
orderItemDO
.
getWarehouseInInfoVO
();
List
<
OrderExceptionDO
>
goodsOverweightExceptionDOList
=
orderExceptionService
.
getPendingOrderExceptionByOrderIdAndOrderItemIdAndProdIdAndExceptionKeys
(
orderDO
.
getOrderId
(),
null
,
orderItemDO
.
getProdId
(),
CollectionUtil
.
newArrayList
(
OrderExceptionEnum
.
GOODS_OVERWEIGHT_EXCEPTION
.
getKey
()));
if
(
CollectionUtil
.
isNotEmpty
(
goodsOverweightExceptionDOList
)
||
goodsOverweightExceptionDOList
.
isEmpty
()){
overweightExceptionDOList
.
addAll
(
goodsOverweightExceptionDOList
);
}
//生成未报价异常 (草稿订单除外)
//生成未报价异常 (草稿订单除外)
//创建未报价异常 type=6,是处理价格异常
//创建未报价异常 type=6,是处理价格异常
noQuoteOrAutomaticNoQuote
=
noQuoteOrAutomaticNoQuote
=
this
.
createOrderNoQuoteException
(
orderDO
,
this
.
createOrderNoQuoteException
(
orderDO
,
noQuoteOrAutomaticNoQuote
,
noQuoteOrAutomaticNoQuote
,
orderItemDO
,
type
);
orderItemDO
,
type
,
overweightExceptionDOList
);
//专线空运,海空联运
//专线空运,海空联运
if
(
Objects
.
equals
(
TransportTypeShortEnum
.
AIR_FREIGHT_LINE
.
getValue
(),
if
(
Objects
.
equals
(
TransportTypeShortEnum
.
AIR_FREIGHT_LINE
.
getValue
(),
...
@@ -2638,7 +2658,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
...
@@ -2638,7 +2658,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
noQuoteOrAutomaticNoQuote
=
noQuoteOrAutomaticNoQuote
=
this
.
createClearanceFeeNoQuiteException
(
orderDO
,
this
.
createClearanceFeeNoQuiteException
(
orderDO
,
noQuoteOrAutomaticNoQuote
,
noQuoteOrAutomaticNoQuote
,
orderItemDO
,
type
);
orderItemDO
,
type
,
overweightExceptionDOList
);
// 这里可能因为自动处理未报价异常(包括未报价清关费异常)时,
// 这里可能因为自动处理未报价异常(包括未报价清关费异常)时,
// 已经对此业务进行过校验更新,所以需要对品名进行数据再查询,以保证获取的是最新状态
// 已经对此业务进行过校验更新,所以需要对品名进行数据再查询,以保证获取的是最新状态
OrderItemDO
item
=
OrderItemDO
item
=
...
@@ -2829,7 +2849,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
...
@@ -2829,7 +2849,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
private
int
createOrderNoQuoteException
(
OrderDO
orderDO
,
private
int
createOrderNoQuoteException
(
OrderDO
orderDO
,
int
noQuoteOrAutomaticNoQuote
,
int
noQuoteOrAutomaticNoQuote
,
OrderItemDO
orderItemDO
,
OrderItemDO
orderItemDO
,
Integer
type
)
{
Integer
type
,
List
<
OrderExceptionDO
>
overweightExceptionDOList
)
{
if
(
orderDO
==
null
)
{
if
(
orderDO
==
null
)
{
return
noQuoteOrAutomaticNoQuote
;
return
noQuoteOrAutomaticNoQuote
;
}
}
...
@@ -2844,13 +2864,6 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
...
@@ -2844,13 +2864,6 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
null
,
null
,
orderItemDO
.
getProdId
(),
orderItemDO
.
getProdId
(),
OrderExceptionEnum
.
ORDER_NO_QUOTE_EXCEPTION
.
getKey
());
OrderExceptionEnum
.
ORDER_NO_QUOTE_EXCEPTION
.
getKey
());
// TODO 查询是否有重量超限异常和渠道包装重量超限异常,如果有则不生成清关费异常
List
<
OrderExceptionDO
>
goodsOverweightExceptionDOList
=
orderExceptionService
.
getPendingOrderExceptionByOrderIdAndOrderItemIdAndProdIdAndExceptionKeys
(
orderDO
.
getOrderId
(),
null
,
orderItemDO
.
getProdId
(),
CollectionUtil
.
newArrayList
(
OrderExceptionEnum
.
GOODS_OVERWEIGHT_EXCEPTION
.
getKey
(),
OrderExceptionEnum
.
LINE_WEIGHT_EXCEPTION
.
getKey
()));
if
(
orderItemDO
.
getNeedOrderInquiry
()
!=
null
)
{
if
(
orderItemDO
.
getNeedOrderInquiry
()
!=
null
)
{
// 添加的逻辑点 海运和空运只要是单询价都按同一套逻辑来处理
// 添加的逻辑点 海运和空运只要是单询价都按同一套逻辑来处理
if
(
orderItemDO
.
getNeedOrderInquiry
()
==
1
)
{
if
(
orderItemDO
.
getNeedOrderInquiry
()
==
1
)
{
...
@@ -2871,7 +2884,8 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
...
@@ -2871,7 +2884,8 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
//
//
if
(
orderItemDO
.
getItemStatus
()
==
-
1
&&
!
orderItemDO
.
getIsProd
())
{
if
(
orderItemDO
.
getItemStatus
()
==
-
1
&&
!
orderItemDO
.
getIsProd
())
{
if
(
CollectionUtil
.
isEmpty
(
goodsOverweightExceptionDOList
))
{
if
(
CollectionUtil
.
isEmpty
(
overweightExceptionDOList
)
||
overweightExceptionDOList
.
isEmpty
())
{
if
(
CollectionUtil
.
isEmpty
(
orderNoQuoteExceptionDOList
))
{
if
(
CollectionUtil
.
isEmpty
(
orderNoQuoteExceptionDOList
))
{
OrderExceptionCreateReqVO
orderExceptionCreateReqVO
=
OrderExceptionCreateReqVO
orderExceptionCreateReqVO
=
this
.
genOrderException
(
orderDO
.
getOrderId
(),
this
.
genOrderException
(
orderDO
.
getOrderId
(),
...
@@ -2958,7 +2972,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
...
@@ -2958,7 +2972,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
private
int
createClearanceFeeNoQuiteException
(
OrderDO
orderDO
,
private
int
createClearanceFeeNoQuiteException
(
OrderDO
orderDO
,
int
noQuoteOrAutomaticNoQuote
,
int
noQuoteOrAutomaticNoQuote
,
OrderItemDO
orderItemDO
,
OrderItemDO
orderItemDO
,
Integer
type
)
{
Integer
type
,
List
<
OrderExceptionDO
>
overweightExceptionDOList
)
{
// 添加的是否为空判断逻辑
// 添加的是否为空判断逻辑
if
(
orderDO
==
null
)
{
if
(
orderDO
==
null
)
{
...
@@ -2969,13 +2983,6 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
...
@@ -2969,13 +2983,6 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
}
}
// 查询是否有重量超限异常,如果有则不生成清关费异常
// 查询是否有重量超限异常,如果有则不生成清关费异常
// TODO 查询是否有重量超限异常和渠道包装重量超限异常,如果有则不生成清关费异常
List
<
OrderExceptionDO
>
goodsOverweightExceptionDOList
=
orderExceptionService
.
getPendingOrderExceptionByOrderIdAndOrderItemIdAndProdIdAndExceptionKeys
(
orderDO
.
getOrderId
(),
null
,
orderItemDO
.
getProdId
(),
CollectionUtil
.
newArrayList
(
OrderExceptionEnum
.
GOODS_OVERWEIGHT_EXCEPTION
.
getKey
(),
OrderExceptionEnum
.
LINE_WEIGHT_EXCEPTION
.
getKey
()));
if
(
orderItemDO
.
getNeedOrderInquiry
()
!=
null
)
{
if
(
orderItemDO
.
getNeedOrderInquiry
()
!=
null
)
{
String
sNo
=
""
;
String
sNo
=
""
;
if
(
orderDO
.
getOrderNo
()
!=
null
)
sNo
=
orderDO
.
getOrderNo
();
if
(
orderDO
.
getOrderNo
()
!=
null
)
sNo
=
orderDO
.
getOrderNo
();
...
@@ -3018,8 +3025,8 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
...
@@ -3018,8 +3025,8 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
// 渠道重量超限异常 channel_packaging_overweight_exception
// 渠道重量超限异常 channel_packaging_overweight_exception
// List<OrderExceptionDO> channelPackagingOverweightExceptionDOList = orderExceptionService.getPendingOrderExceptionByOrderIdAndOrderItemIdAndExceptionKey(orderDO.getOrderId(), orderItemDO.getOrderItemId(), OrderExceptionEnum.CHANNEL_PACKAGING_OVERWEIGHT_EXCEPTION.getKey());
// List<OrderExceptionDO> channelPackagingOverweightExceptionDOList = orderExceptionService.getPendingOrderExceptionByOrderIdAndOrderItemIdAndExceptionKey(orderDO.getOrderId(), orderItemDO.getOrderItemId(), OrderExceptionEnum.CHANNEL_PACKAGING_OVERWEIGHT_EXCEPTION.getKey());
// if (CollectionUtil.isEmpty(goodsOverweightExceptionDOList) && CollectionUtil.isEmpty(channelPackagingOverweightExceptionDOList)) {
// if (CollectionUtil.isEmpty(goodsOverweightExceptionDOList) && CollectionUtil.isEmpty(channelPackagingOverweightExceptionDOList)) {
if
(
CollectionUtil
.
isEmpty
(
goodsO
verweightExceptionDOList
)
||
if
(
CollectionUtil
.
isEmpty
(
o
verweightExceptionDOList
)
||
goodsOverweightExceptionDOList
.
size
()
==
0
)
{
overweightExceptionDOList
.
isEmpty
()
)
{
List
<
OrderExceptionDO
>
orderClearanceFeeNoQuoteExceptionDOList
=
List
<
OrderExceptionDO
>
orderClearanceFeeNoQuoteExceptionDOList
=
orderExceptionService
.
getPendingOrderExceptionByOrderIdAndOrderItemIdAndExceptionKey
(
orderDO
.
getOrderId
(),
orderExceptionService
.
getPendingOrderExceptionByOrderIdAndOrderItemIdAndExceptionKey
(
orderDO
.
getOrderId
(),
...
...
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