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
cdedca66
Commit
cdedca66
authored
Jun 25, 2024
by
lanbaoming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-06-25-1提交
parent
2e6cb8fd
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
27 deletions
+50
-27
ProductPriceExceptionHandleListener.java
...e/order/listener/ProductPriceExceptionHandleListener.java
+3
-3
OrderBusinessServiceImpl.java
...le/order/service/order/impl/OrderBusinessServiceImpl.java
+34
-16
OrderWarehouseInServiceImpl.java
...service/orderWarehouseIn/OrderWarehouseInServiceImpl.java
+11
-6
OrderWarehouseInController.java
...er/admin/orderWarehouseIn/OrderWarehouseInController.java
+1
-1
ProductPriceServiceImpl.java
...product/service/product/impl/ProductPriceServiceImpl.java
+1
-1
No files found.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/listener/ProductPriceExceptionHandleListener.java
View file @
cdedca66
...
@@ -118,7 +118,7 @@ public class ProductPriceExceptionHandleListener {
...
@@ -118,7 +118,7 @@ public class ProductPriceExceptionHandleListener {
Constant.SYSTEM_USER_ADMIN_ID);
Constant.SYSTEM_USER_ADMIN_ID);
orderExceptionResultHandlerVo.setOrderExceptionHandlerRemark("系统自动处理");
orderExceptionResultHandlerVo.setOrderExceptionHandlerRemark("系统自动处理");
orderExceptionService.handlerExceptionByExceptionId(orderExceptionResultHandlerVo);
orderExceptionService.handlerExceptionByExceptionId(orderExceptionResultHandlerVo);
//end lanbm 2024-06-06 把以前的注释开启
}*/
}*/
}
}
...
@@ -152,7 +152,7 @@ public class ProductPriceExceptionHandleListener {
...
@@ -152,7 +152,7 @@ public class ProductPriceExceptionHandleListener {
//修改这些订单的未报价异常为已处理
//修改这些订单的未报价异常为已处理
/*
/*
if (productPriceDO.getNeedOrderInquiry() == 1) {
if (productPriceDO.getNeedOrderInquiry() == 1) {
//lanbm 2024-06-06 把以前的注释开启
OrderExceptionResultHandlerVo orderExceptionResultHandlerVo =
OrderExceptionResultHandlerVo orderExceptionResultHandlerVo =
new OrderExceptionResultHandlerVo();
new OrderExceptionResultHandlerVo();
orderExceptionResultHandlerVo.setOrderExceptionId(orderExceptionDO.getId());
orderExceptionResultHandlerVo.setOrderExceptionId(orderExceptionDO.getId());
...
@@ -160,7 +160,7 @@ public class ProductPriceExceptionHandleListener {
...
@@ -160,7 +160,7 @@ public class ProductPriceExceptionHandleListener {
orderExceptionResultHandlerVo.setHandlerId(Constant.SYSTEM_USER_ADMIN_ID); //admin
orderExceptionResultHandlerVo.setHandlerId(Constant.SYSTEM_USER_ADMIN_ID); //admin
orderExceptionResultHandlerVo.setOrderExceptionHandlerRemark("系统自动处理");
orderExceptionResultHandlerVo.setOrderExceptionHandlerRemark("系统自动处理");
orderExceptionService.handlerExceptionByExceptionId(orderExceptionResultHandlerVo);
orderExceptionService.handlerExceptionByExceptionId(orderExceptionResultHandlerVo);
//end lanbm 2024-06-06 把以前的注释开启
}*/
}*/
}
}
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderBusinessServiceImpl.java
View file @
cdedca66
...
@@ -312,7 +312,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
...
@@ -312,7 +312,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
}
}
/*
/*
lanbm 2024-06-06
重载的函数
重载的函数
*/
*/
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
...
@@ -477,7 +477,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
...
@@ -477,7 +477,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
orderItemMapper
.
selectList
(
new
LambdaQueryWrapper
<
OrderItemDO
>().
orderItemMapper
.
selectList
(
new
LambdaQueryWrapper
<
OrderItemDO
>().
eq
(
OrderItemDO:
:
getOrderId
,
orderId
));
eq
(
OrderItemDO:
:
getOrderId
,
orderId
));
//lanbm 2024-06-06 添加的逻辑点
for
(
OrderItemDO
oItem
:
orderItemDOList
for
(
OrderItemDO
oItem
:
orderItemDOList
)
{
)
{
if
(
productPriceDO
.
getNeedOrderInquiry
()
==
null
)
{
if
(
productPriceDO
.
getNeedOrderInquiry
()
==
null
)
{
...
@@ -487,7 +487,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
...
@@ -487,7 +487,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
oItem
.
setNeedOrderInquiry
(
productPriceDO
.
getNeedOrderInquiry
());
oItem
.
setNeedOrderInquiry
(
productPriceDO
.
getNeedOrderInquiry
());
}
}
}
}
//end lanbm 2024-06-06 添加的逻辑点
LoginUser
loginUser
=
SecurityFrameworkUtils
.
getLoginUser
();
LoginUser
loginUser
=
SecurityFrameworkUtils
.
getLoginUser
();
...
@@ -2173,6 +2173,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
...
@@ -2173,6 +2173,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
//14 是批量加价
//14 是批量加价
//15 是费用计算
//15 是费用计算
//10 入仓更新
public
void
costCalculation
(
String
userId
,
public
void
costCalculation
(
String
userId
,
OrderDO
orderDO
,
OrderDO
orderDO
,
Long
consignorCustomerId
,
Long
consignorCustomerId
,
...
@@ -2182,7 +2183,6 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
...
@@ -2182,7 +2183,6 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
List
<
OrderItemDO
>
orderItemDOList
,
List
<
OrderItemDO
>
orderItemDOList
,
Integer
type
)
{
Integer
type
)
{
//2023-7月之前应收金额没有按四舍五入取整,之后都是按四舍五入取整处理的
//2023-7月之前应收金额没有按四舍五入取整,之后都是按四舍五入取整处理的
//lanbm 2024-06-20 添加注释说明逻辑
LogisticsInfoDto
logisticsInfoDto
=
LogisticsInfoDto
logisticsInfoDto
=
warehouseLineMapper
.
getStartInfoAndDestInfoByLineId
(
warehouseLineMapper
.
getStartInfoAndDestInfoByLineId
(
...
@@ -2252,7 +2252,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
...
@@ -2252,7 +2252,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
orderDO
.
getOrgVolumeUnit
().
compareTo
(
BigDecimal
.
ZERO
)
==
0
)
{
orderDO
.
getOrgVolumeUnit
().
compareTo
(
BigDecimal
.
ZERO
)
==
0
)
{
orderDO
.
setOrgVolumeUnit
(
orgZhongPaoBestVO
.
getPaoEdge
());
orderDO
.
setOrgVolumeUnit
(
orgZhongPaoBestVO
.
getPaoEdge
());
}
}
//
保存当前计价使用的
//保存当前计价使用的
orderDO
.
setUseWeightUnit
(
zhongPaoBestVO
.
getZhongEdge
());
orderDO
.
setUseWeightUnit
(
zhongPaoBestVO
.
getZhongEdge
());
orderDO
.
setUseVolumeUnit
(
zhongPaoBestVO
.
getPaoEdge
());
orderDO
.
setUseVolumeUnit
(
zhongPaoBestVO
.
getPaoEdge
());
this
.
calculationOrderItem
(
orderDO
,
orderItemDOList
,
zhongPaoBestVO
,
event
.
getBubbleWeightRatio
());
this
.
calculationOrderItem
(
orderDO
,
orderItemDOList
,
zhongPaoBestVO
,
event
.
getBubbleWeightRatio
());
...
@@ -2266,6 +2266,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
...
@@ -2266,6 +2266,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
consignorCustomerContactsId
,
consignorCustomerContactsId
,
consigneeCustomerContactsId
,
consigneeCustomerContactsId
,
type
);
type
);
//订单中的商品列表
List
<
OrderItemDO
>
newOrderItemDOList
=
dto
.
getOrderItemDOList
();
List
<
OrderItemDO
>
newOrderItemDOList
=
dto
.
getOrderItemDOList
();
// 统计订单项品牌属性
// 统计订单项品牌属性
Set
<
Integer
>
typeSet
=
new
HashSet
<>();
Set
<
Integer
>
typeSet
=
new
HashSet
<>();
...
@@ -2455,13 +2456,13 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
...
@@ -2455,13 +2456,13 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
WarehouseInInfoVO
warehouseInInfoVO
=
WarehouseInInfoVO
warehouseInInfoVO
=
orderItemDO
.
getWarehouseInInfoVO
();
orderItemDO
.
getWarehouseInInfoVO
();
//生成未报价异常 (草稿订单除外)
//生成未报价异常 (草稿订单除外)
//创建未报价异常
lanbm 2024-06-06 添加参数
type=6,是处理价格异常
//创建未报价异常
type=6,是处理价格异常
noQuoteOrAutomaticNoQuote
=
noQuoteOrAutomaticNoQuote
=
this
.
createOrderNoQuoteException
(
orderDO
,
this
.
createOrderNoQuoteException
(
orderDO
,
noQuoteOrAutomaticNoQuote
,
noQuoteOrAutomaticNoQuote
,
orderItemDO
,
type
);
orderItemDO
,
type
);
//专线空运,海空联运
2024-06-06 添加注释
//专线空运,海空联运
if
(
Objects
.
equals
(
TransportTypeShortEnum
.
AIR_FREIGHT_LINE
.
getValue
(),
if
(
Objects
.
equals
(
TransportTypeShortEnum
.
AIR_FREIGHT_LINE
.
getValue
(),
orderDO
.
getTransportId
())
orderDO
.
getTransportId
())
||
Objects
.
equals
(
TransportTypeShortEnum
.
AIR_SEA_COMBINED_TRANSPORT
.
getValue
(),
||
Objects
.
equals
(
TransportTypeShortEnum
.
AIR_SEA_COMBINED_TRANSPORT
.
getValue
(),
...
@@ -2489,7 +2490,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
...
@@ -2489,7 +2490,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
Objects
.
nonNull
(
warehouseInInfoVO
)
&&
Objects
.
nonNull
(
warehouseInInfoVO
)
&&
warehouseInInfoVO
.
getCartonsNum
()
>
0
)
{
warehouseInInfoVO
.
getCartonsNum
()
>
0
)
{
//
不可出渠道异常
//不可出渠道异常
this
.
createNoCanShipmentChannelException
(
orderDO
,
this
.
createNoCanShipmentChannelException
(
orderDO
,
event
,
item
,
warehouseInInfoVO
,
event
,
item
,
warehouseInInfoVO
,
type
,
orderNoCanShipmentChannelExceptionDOList
);
type
,
orderNoCanShipmentChannelExceptionDOList
);
...
@@ -2684,7 +2685,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
...
@@ -2684,7 +2685,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
String
sNo
=
""
;
String
sNo
=
""
;
if
(
orderDO
.
getOrderNo
()
!=
null
)
sNo
=
orderDO
.
getOrderNo
();
if
(
orderDO
.
getOrderNo
()
!=
null
)
sNo
=
orderDO
.
getOrderNo
();
String
s
=
sNo
+
"未报价日志,type="
+
type
.
toString
()
+
String
s
=
sNo
+
"未报价日志
24
,type="
+
type
.
toString
()
+
"getTransportId="
+
orderDO
.
getTransportId
().
toString
()
+
"getTransportId="
+
orderDO
.
getTransportId
().
toString
()
+
"getNeedOrderInquiry="
+
orderItemDO
.
getNeedOrderInquiry
();
"getNeedOrderInquiry="
+
orderItemDO
.
getNeedOrderInquiry
();
...
@@ -2708,6 +2709,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
...
@@ -2708,6 +2709,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
noQuoteOrAutomaticNoQuote
=
2
;
noQuoteOrAutomaticNoQuote
=
2
;
return
noQuoteOrAutomaticNoQuote
;
return
noQuoteOrAutomaticNoQuote
;
}
else
{
}
else
{
zTest
z
=
new
zTest
();
zTest
z
=
new
zTest
();
z
.
setTestname
(
s
);
z
.
setTestname
(
s
);
z
.
setCreatedate
(
new
Date
());
z
.
setCreatedate
(
new
Date
());
...
@@ -2720,7 +2722,12 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
...
@@ -2720,7 +2722,12 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
zTestMapper
.
insert
(
z
);
zTestMapper
.
insert
(
z
);
}
}
//lanbm 2024-06-06 添加的逻辑点
//lanbm 2024-06-06 添加的逻辑点
zTest
z2
=
new
zTest
();
z2
.
setTestname
(
"处理24"
);
z2
.
setCreatedate
(
new
Date
());
zTestMapper
.
insert
(
z2
);
//
if
(
orderItemDO
.
getItemStatus
()
==
-
1
&&
!
orderItemDO
.
getIsProd
())
{
if
(
orderItemDO
.
getItemStatus
()
==
-
1
&&
!
orderItemDO
.
getIsProd
())
{
if
(
CollectionUtil
.
isEmpty
(
orderNoQuoteExceptionDOList
))
{
if
(
CollectionUtil
.
isEmpty
(
orderNoQuoteExceptionDOList
))
{
OrderExceptionCreateReqVO
orderExceptionCreateReqVO
=
OrderExceptionCreateReqVO
orderExceptionCreateReqVO
=
...
@@ -3216,9 +3223,15 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
...
@@ -3216,9 +3223,15 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
* @param consigneeCustomerId 收货客户ID
* @param consigneeCustomerId 收货客户ID
* @param consignorCustomerContactsId 发货客户联系人ID
* @param consignorCustomerContactsId 发货客户联系人ID
* @param consigneeCustomerContactsId 收货客户联系人ID
* @param consigneeCustomerContactsId 收货客户联系人ID
* @param type 类型 : 1 新增 2 修改 3 实测入仓信息 4 合单 5 拆单 6 处理未报价异常 7 特价申请 8 订单货值修改
* @param type 类型 : 1 新增 2 修改 3 实测入仓信息 4 合单
* 9 处理重泡货异常 10 已入仓订单修改重订价 11 处理渠道异常 12 处理单询异常 13 处理超重异常 14 批量加价 15 完成入仓
* 5 拆单 6 处理未报价异常 7 特价申请 8 订单货值修改
* 16 分拣完成锁定价格 17 分拣反审解除锁定价格 20 强制重订价格 30 空运订单每日定时更新价格 40 订单异常处理完成更新计价 50 更新订单优惠信息
* 9 处理重泡货异常 10 已入仓订单修改重订价 11
* 处理渠道异常 12 处理单询异常 13 处理超重异常
* 14 批量加价 15 完成入仓
* 16 分拣完成锁定价格 17 分拣反审解除锁定价格
* 20 强制重订价格 30 空运订单每日定时更新价格
* 40 订单异常处理完成更新计价
* 50 更新订单优惠信息
* @return 该运输方式下的报价商品列表信息
* @return 该运输方式下的报价商品列表信息
*/
*/
private
CalculationItemFeeDto
insertOrderItemDOList
(
String
userId
,
List
<
OrderItemDO
>
orderItemDOList
,
OrderDO
orderDO
,
private
CalculationItemFeeDto
insertOrderItemDOList
(
String
userId
,
List
<
OrderItemDO
>
orderItemDOList
,
OrderDO
orderDO
,
...
@@ -3263,7 +3276,8 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
...
@@ -3263,7 +3276,8 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
// 如果订单项id不存在,则先保存获得订单项id
// 如果订单项id不存在,则先保存获得订单项id
orderItemMapper
.
insert
(
orderItemDO
);
orderItemMapper
.
insert
(
orderItemDO
);
}
}
WarehouseInInfoVO
warehouseInInfoVO
=
orderItemDO
.
getWarehouseInInfoVO
();
WarehouseInInfoVO
warehouseInInfoVO
=
orderItemDO
.
getWarehouseInInfoVO
();
// if (type == 30 || type == 10) {
// if (type == 30 || type == 10) {
// // 空运自动刷新价格和订单修改价格变动,需要将之前的特价、渠道/单询/超限自定义价格、拆单自定义价格等全部重置
// // 空运自动刷新价格和订单修改价格变动,需要将之前的特价、渠道/单询/超限自定义价格、拆单自定义价格等全部重置
// orderItemDO.setSpecialPriceType(false);
// orderItemDO.setSpecialPriceType(false);
...
@@ -3303,7 +3317,8 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
...
@@ -3303,7 +3317,8 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
param
.
setSplitCustomPriceType
(
Objects
.
nonNull
(
orderItemDO
.
getSplitCustomPriceType
())
&&
orderItemDO
.
getSplitCustomPriceType
());
param
.
setSplitCustomPriceType
(
Objects
.
nonNull
(
orderItemDO
.
getSplitCustomPriceType
())
&&
orderItemDO
.
getSplitCustomPriceType
());
param
.
setChannelManualPricing
(
Objects
.
nonNull
(
orderItemDO
.
getChannelManualPricing
())
&&
orderItemDO
.
getChannelManualPricing
());
param
.
setChannelManualPricing
(
Objects
.
nonNull
(
orderItemDO
.
getChannelManualPricing
())
&&
orderItemDO
.
getChannelManualPricing
());
// 空运订单自动刷新价格时,需要忽略这里,一律重新定价,当type等于30时是空运每日定时刷新价格,只针对待入仓、入仓中、已入仓-待出空运订单
// 空运订单自动刷新价格时,需要忽略这里,一律重新定价,当type等于30时是空运每日定时刷新价格,只针对待入仓、入仓中、已入仓-待出空运订单
if
((
Objects
.
nonNull
(
orderItemDO
.
getSpecialPriceType
())
&&
orderItemDO
.
getSpecialPriceType
()
&&
!
orderItemDO
.
getIsPriced
())
if
((
Objects
.
nonNull
(
orderItemDO
.
getSpecialPriceType
())
&&
orderItemDO
.
getSpecialPriceType
()
&&
!
orderItemDO
.
getIsPriced
())
||
(
Objects
.
nonNull
(
orderItemDO
.
getSplitCustomPriceType
())
&&
orderItemDO
.
getSplitCustomPriceType
())
||
(
Objects
.
nonNull
(
orderItemDO
.
getSplitCustomPriceType
())
&&
orderItemDO
.
getSplitCustomPriceType
())
||
(
Objects
.
nonNull
(
orderItemDO
.
getChannelManualPricing
())
&&
orderItemDO
.
getChannelManualPricing
()))
{
||
(
Objects
.
nonNull
(
orderItemDO
.
getChannelManualPricing
())
&&
orderItemDO
.
getChannelManualPricing
()))
{
orderItemDO
.
setIsPriced
(
Boolean
.
TRUE
);
orderItemDO
.
setIsPriced
(
Boolean
.
TRUE
);
...
@@ -3314,8 +3329,11 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
...
@@ -3314,8 +3329,11 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
//类型 :1 新增 2 修改 3 实测入仓信息 4 合单 5 拆单 6 处理未报价异常 7 特价申请 8 订单货值修改
//类型 :1 新增 2 修改 3 实测入仓信息 4 合单 5 拆单 6 处理未报价异常 7 特价申请 8 订单货值修改
// 9 处理重泡货异常 10 已入仓订单修改重订价 11 处理渠道异常 12 处理单询异常 13 处理超重异常 14 批量加价 15 完成入仓
// 9 处理重泡货异常 10 已入仓订单修改重订价 11 处理渠道异常 12 处理单询异常 13 处理超重异常 14 批量加价 15 完成入仓
// 20 强制重订价格 30 空运订单每日定时更新价格 40 订单异常处理完成更新计价 50 更新订单优惠信息
// 20 强制重订价格 30 空运订单每日定时更新价格 40 订单异常处理完成更新计价 50 更新订单优惠信息
if
(
type
==
2
||
(
type
==
4
&&
orderDO
.
getTransportId
()
==
3
)
||
type
==
6
||
type
==
10
||
type
==
20
||
type
==
30
if
(
type
==
2
||
(
type
==
4
&&
orderDO
.
getTransportId
()
==
3
)
||
||
(
type
==
15
&&
(
Objects
.
isNull
(
orderDO
.
getParentOrderId
())
||
orderDO
.
getParentOrderId
()
==
0L
||
orderDO
.
getSplitSeparateOrder
())))
{
type
==
6
||
type
==
10
||
type
==
20
||
type
==
30
||
(
type
==
15
&&
(
Objects
.
isNull
(
orderDO
.
getParentOrderId
())
||
orderDO
.
getParentOrderId
()
==
0L
||
orderDO
.
getSplitSeparateOrder
())))
{
// 拆单后的子订单入仓不需要重新定价,但涉及了空运拆单的会标记为独立订单,走一样的逻辑
// 拆单后的子订单入仓不需要重新定价,但涉及了空运拆单的会标记为独立订单,走一样的逻辑
// 第一次入仓或后面的重新入仓都需要更新基础单价,特价需要在计价时单独判断,不去更新成交单价
// 第一次入仓或后面的重新入仓都需要更新基础单价,特价需要在计价时单独判断,不去更新成交单价
// 未报价异常处理需要重新定价
// 未报价异常处理需要重新定价
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/orderWarehouseIn/OrderWarehouseInServiceImpl.java
View file @
cdedca66
...
@@ -1078,10 +1078,12 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
...
@@ -1078,10 +1078,12 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
Long
orderId
=
finishReqVO
.
getOrderId
();
Long
orderId
=
finishReqVO
.
getOrderId
();
OrderDO
orderDO
=
orderService
.
getById
(
orderId
);
OrderDO
orderDO
=
orderService
.
getById
(
orderId
);
if
(
orderDO
==
null
)
{
if
(
orderDO
==
null
)
{
throw
ServiceExceptionUtil
.
exception
(
ErrorCodeConstants
.
ORDER_NOT_EXISTS
);
throw
ServiceExceptionUtil
.
exception
(
ErrorCodeConstants
.
ORDER_NOT_EXISTS
);
}
}
if
(
OrderStatusEnum
.
WAREHOUSE_ADJUSTMENT
.
getValue
().
equals
(
orderDO
.
getStatus
()))
{
if
(
OrderStatusEnum
.
WAREHOUSE_ADJUSTMENT
.
getValue
().
equals
(
orderDO
.
getStatus
()))
{
throw
ServiceExceptionUtil
.
exception
(
ErrorCodeConstants
.
ORDER_WAREHOUSE_ADJUSTMENT_STATUS_NOT_ALLOWED_WAREHOUSE_IN
);
throw
ServiceExceptionUtil
.
exception
(
ErrorCodeConstants
.
ORDER_WAREHOUSE_ADJUSTMENT_STATUS_NOT_ALLOWED_WAREHOUSE_IN
);
}
}
// 判断是否有未处理的审核单
// 判断是否有未处理的审核单
throwProcessingApproval
(
orderDO
);
throwProcessingApproval
(
orderDO
);
...
@@ -1187,7 +1189,8 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
...
@@ -1187,7 +1189,8 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
orderWarehouseInMapper
.
selectList
(
OrderWarehouseInDO:
:
getOrderId
,
orderWarehouseInMapper
.
selectList
(
OrderWarehouseInDO:
:
getOrderId
,
orderDO
.
getOrderId
());
orderDO
.
getOrderId
());
//入仓修改或完成备货,入仓重量、备货重量变化后,按最新入仓或备货重量,重新计算泡重,按最新入仓重量与订单泡货标准重新计算泡重。
//入仓修改或完成备货,入仓重量、备货重量变化后,按最新入仓或备货重量,
// 重新计算泡重,按最新入仓重量与订单泡货标准重新计算泡重。
// 清空之前申请的固定泡重优惠,之前申请泡货标准还原到初始泡货标准。
// 清空之前申请的固定泡重优惠,之前申请泡货标准还原到初始泡货标准。
resetSpecialVWeightAndWeightUnit
(
orderId
,
orderDO
,
resetSpecialVWeightAndWeightUnit
(
orderId
,
orderDO
,
finishReqVO
.
getIsSumWeightNoChange
(),
finishReqVO
.
getIsSumWeightNoChange
(),
...
@@ -1281,7 +1284,7 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
...
@@ -1281,7 +1284,7 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
boolean
firstRucang
=
orderDO
.
getRucangTime
()
==
null
;
boolean
firstRucang
=
orderDO
.
getRucangTime
()
==
null
;
if
(
firstRucang
)
{
if
(
firstRucang
)
{
//在下面的函数中完成费用计算
lanbm 2024-06-20 添加注释
//在下面的函数中完成费用计算
orderService
.
finishOrderWarehouseIn
(
orderDO
.
getOrderId
());
orderService
.
finishOrderWarehouseIn
(
orderDO
.
getOrderId
());
}
else
{
}
else
{
orderService
.
finishOrderWarehouseInUpdate
(
orderDO
.
getOrderId
());
orderService
.
finishOrderWarehouseInUpdate
(
orderDO
.
getOrderId
());
...
@@ -1331,7 +1334,9 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
...
@@ -1331,7 +1334,9 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
}
}
}
}
// 针对未处理的异常,判断异常的orderItemId不在订单的orderItemList中的,需要删除异常。(说明此订单项已被删除,场景:pda的新品入仓后会生成未报价异常,又删除入仓时未删除异常)
// 针对未处理的异常,判断异常的orderItemId不在订单的orderItemList中的,
// 需要删除异常。(说明此订单项已被删除,场景:
// pda的新品入仓后会生成未报价异常,又删除入仓时未删除异常)
List
<
OrderExceptionDO
>
orderUnProcessExceptionList
=
List
<
OrderExceptionDO
>
orderUnProcessExceptionList
=
orderExceptionService
.
getPendingOrderExceptionByOrderIdAndOrderItemIdAndExceptionKey
(
orderId
,
null
,
null
);
orderExceptionService
.
getPendingOrderExceptionByOrderIdAndOrderItemIdAndExceptionKey
(
orderId
,
null
,
null
);
if
(
CollectionUtil
.
isNotEmpty
(
orderUnProcessExceptionList
))
{
if
(
CollectionUtil
.
isNotEmpty
(
orderUnProcessExceptionList
))
{
...
@@ -1443,7 +1448,7 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
...
@@ -1443,7 +1448,7 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
"仓库操作"
,
msg
,
""
);
"仓库操作"
,
msg
,
""
);
}
}
//入仓完成,计算V值
lanbm 2024-05-13 add
//入仓完成,计算V值
/*27号注释掉
/*27号注释掉
CalculateOrderVValueEvent event=new CalculateOrderVValueEvent();
CalculateOrderVValueEvent event=new CalculateOrderVValueEvent();
event.setOrderId(orderId);
event.setOrderId(orderId);
...
...
yudao-module-order/yudao-module-order-rest/src/main/java/cn/iocoder/yudao/module/order/controller/admin/orderWarehouseIn/OrderWarehouseInController.java
View file @
cdedca66
...
@@ -136,7 +136,7 @@ public class OrderWarehouseInController {
...
@@ -136,7 +136,7 @@ public class OrderWarehouseInController {
public
CommonResult
<
Boolean
>
finishWarehouseIn
(
public
CommonResult
<
Boolean
>
finishWarehouseIn
(
@Valid
@RequestBody
OrderWarehouseInFinishReqVO
finishReqVO
)
{
@Valid
@RequestBody
OrderWarehouseInFinishReqVO
finishReqVO
)
{
//
lanbm 2024-05-26 在此处添加注释
//
完成入仓
String
redisKey
=
MessageFormat
.
format
(
ORDER_FINISH_WAREHOUSE_IN_KEY
,
String
redisKey
=
MessageFormat
.
format
(
ORDER_FINISH_WAREHOUSE_IN_KEY
,
finishReqVO
.
getOrderId
().
toString
());
finishReqVO
.
getOrderId
().
toString
());
Long
count
=
redisHelper
.
incrBy
(
redisKey
,
1
);
Long
count
=
redisHelper
.
incrBy
(
redisKey
,
1
);
...
...
yudao-module-product/yudao-module-product-core/src/main/java/cn/iocoder/yudao/module/product/service/product/impl/ProductPriceServiceImpl.java
View file @
cdedca66
...
@@ -3092,7 +3092,7 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
...
@@ -3092,7 +3092,7 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
List
<
ProductPriceStepDO
>
allStepList
=
buildAllStepList
(
updateReqVO
);
List
<
ProductPriceStepDO
>
allStepList
=
buildAllStepList
(
updateReqVO
);
clearAndSavePriceStepList
(
Collections
.
singletonList
(
updateReqVO
.
getId
()),
allStepList
,
priceTransportTypeMap
,
false
);
clearAndSavePriceStepList
(
Collections
.
singletonList
(
updateReqVO
.
getId
()),
allStepList
,
priceTransportTypeMap
,
false
);
//根据价格id获取和此价格关联的订单
lanbm 2024-05-31 添加注释
//根据价格id获取和此价格关联的订单
handleOrderException
(
Collections
.
singletonList
(
priceId
),
true
);
handleOrderException
(
Collections
.
singletonList
(
priceId
),
true
);
}
}
...
...
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