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
95fb8931
Commit
95fb8931
authored
Jan 02, 2025
by
332784038@qq.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-fix' into release
parents
cd0abf69
f3b81e39
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
94 additions
and
2 deletions
+94
-2
20250102.sql
sql/v2.1/20250102.sql
+5
-0
BoxCheckOrderRemoveLadingBillEvent.java
...lo/core/event/box/BoxCheckOrderRemoveLadingBillEvent.java
+22
-0
OrderItemDO.java
...ao/module/order/dal/dataobject/orderItem/OrderItemDO.java
+4
-0
OrderBusinessServiceImpl.java
...le/order/service/order/impl/OrderBusinessServiceImpl.java
+14
-1
OrderServiceImpl.java
...dao/module/order/service/order/impl/OrderServiceImpl.java
+6
-1
OrderItemBackVO.java
...oder/yudao/module/order/vo/orderItem/OrderItemBackVO.java
+3
-0
BoxOrderUpdateRemoveLadingBillListener.java
...ment/listener/BoxOrderUpdateRemoveLadingBillListener.java
+40
-0
No files found.
sql/v2.1/20250102.sql
0 → 100644
View file @
95fb8931
-- 增加订单产品项最后单价变更时间
alter
table
ecw_order_item
add
COLUMN
`last_charge_price_time`
datetime
DEFAULT
NULL
COMMENT
'最后单价变更时间'
;
-- 批量更新订单产品项的最后单价变更时间
update
ecw_order_item
set
`last_charge_price_time`
=
update_time
where
last_charge_price_time
is
null
;
\ No newline at end of file
yudao-framework/yudao-spring-boot-starter-config/src/main/java/cn/iocoder/yudao/framework/apollo/core/event/box/BoxCheckOrderRemoveLadingBillEvent.java
0 → 100644
View file @
95fb8931
package
cn
.
iocoder
.
yudao
.
framework
.
apollo
.
core
.
event
.
box
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
/**
* 重置订单的提单 Event
*
* @author zhengYi
*/
@Data
@AllArgsConstructor
public
class
BoxCheckOrderRemoveLadingBillEvent
{
/**
* 订单ID
*/
private
Long
orderId
;
}
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/dal/dataobject/orderItem/OrderItemDO.java
View file @
95fb8931
...
...
@@ -15,6 +15,7 @@ import org.apache.commons.lang3.StringUtils;
import
java.lang.reflect.Field
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Objects
;
...
...
@@ -447,6 +448,9 @@ public class OrderItemDO extends BaseDO {
@ApiModelProperty
(
value
=
"到仓:0 无牌 1 有牌 2 中性"
)
private
Integer
checkBrandType
;
@ApiModelProperty
(
value
=
"最后单价变更时间"
)
private
Date
lastChargePriceTime
;
/**
* 到仓信息json
*/
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderBusinessServiceImpl.java
View file @
95fb8931
...
...
@@ -3723,8 +3723,13 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
for
(
OrderItemDO
orderItemDO
:
orderItemDOList
)
{
for
(
ProdCostDto
prodCostDto
:
resultDto
.
getProdCostDtoList
())
{
if
(
Objects
.
equals
(
prodCostDto
.
getItemId
(),
orderItemDO
.
getOrderItemId
()))
{
boolean
isChargePrice
=
false
;
orderItemDO
.
setOriginalSeaFreight
(
prodCostDto
.
getOrgFreightPrice
());
if
((
Objects
.
isNull
(
prodCostDto
.
getOneFreight
())
&&
Objects
.
nonNull
(
orderItemDO
.
getOneSeaFreight
()))
||
(
Objects
.
nonNull
(
prodCostDto
.
getOneFreight
())
&&
Objects
.
isNull
(
orderItemDO
.
getOneSeaFreight
()))
||
(
Objects
.
nonNull
(
prodCostDto
.
getOneFreight
())
&&
Objects
.
nonNull
(
orderItemDO
.
getOneSeaFreight
())
&&
orderItemDO
.
getOneSeaFreight
().
compareTo
(
prodCostDto
.
getOneFreight
())
!=
0
)){
isChargePrice
=
true
;
}
orderItemDO
.
setOneSeaFreight
(
prodCostDto
.
getOneFreight
());
orderItemDO
.
setDiscountFreightPrice
(
prodCostDto
.
getDiscountFreightPrice
());
orderItemDO
.
setDiscountFreightTotalPrice
(
prodCostDto
.
getDiscountFreightTotalPrice
());
...
...
@@ -3771,6 +3776,11 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
orderItemDO
.
setMinMeteringWeight
(
prodCostDto
.
getMinMeteringWeight
());
orderItemDO
.
setOriginalClearanceFreight
(
prodCostDto
.
getOrgClearanceFeePrice
());
if
((
Objects
.
isNull
(
prodCostDto
.
getOneClearanceFee
())
&&
Objects
.
nonNull
(
orderItemDO
.
getOneClearanceFreight
()))
||
(
Objects
.
nonNull
(
prodCostDto
.
getOneClearanceFee
())
&&
Objects
.
isNull
(
orderItemDO
.
getOneClearanceFreight
()))
||
(
Objects
.
nonNull
(
prodCostDto
.
getOneClearanceFee
())
&&
Objects
.
nonNull
(
orderItemDO
.
getOneClearanceFreight
())
&&
orderItemDO
.
getOneClearanceFreight
().
compareTo
(
prodCostDto
.
getOneClearanceFee
())
!=
0
)){
isChargePrice
=
true
;
}
orderItemDO
.
setOneClearanceFreight
(
prodCostDto
.
getOneClearanceFee
());
orderItemDO
.
setDiscountClearanceFeePrice
(
prodCostDto
.
getDiscountClearanceFeePrice
());
orderItemDO
.
setDiscountClearanceFeeTotalPrice
(
prodCostDto
.
getDiscountClearanceFeeTotalPrice
());
...
...
@@ -3807,6 +3817,9 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
}
orderItemDO
.
setCharging
(
prodCostDto
.
getCharging
());
orderItemDO
.
setIsPayAdvance
(
prodCostDto
.
getIsPayAdvance
());
if
(
isChargePrice
){
orderItemDO
.
setLastChargePriceTime
(
new
Date
());
}
}
}
if
(
Objects
.
isNull
(
orderItemDO
.
getItemStatus
())
||
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderServiceImpl.java
View file @
95fb8931
...
...
@@ -9,6 +9,7 @@ import cn.iocoder.yudao.framework.apollo.core.event.Order.CalculateOrderYeJiType
import
cn.iocoder.yudao.framework.apollo.core.event.Order.OrderApprovalTypeCheckEvent
;
import
cn.iocoder.yudao.framework.apollo.core.event.Order.OrderAssociationOfferInfoEvent
;
import
cn.iocoder.yudao.framework.apollo.core.event.box.BoxCheckOrderApprovalEvent
;
import
cn.iocoder.yudao.framework.apollo.core.event.box.BoxCheckOrderRemoveLadingBillEvent
;
import
cn.iocoder.yudao.framework.apollo.core.event.box.BoxOrderDynamicEstTimeEvent
;
import
cn.iocoder.yudao.framework.apollo.core.event.warehouseIn.WarehouseInOrderChangeChannelEvent
;
import
cn.iocoder.yudao.framework.apollo.core.event.warehouseIn.WarehouseInOrderChangeTransportEvent
;
...
...
@@ -6015,6 +6016,8 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
orderDO
.
setContainerNumber
(
null
);
orderDO
.
setTidanNo
(
null
);
orderMapper
.
updateById
(
orderDO
);
// TODO 这里修改完订单后需要对订单当前待处理的相关异常进行判断,是否需要重置
// TODO 注意:重泡货异常如果需要重置,需要调用计价接口,重新计算价格(这里计算的价格是应收总额价格)
// 处理控货信息
handleOrderCargoControl
(
consignorDO
,
orderDO
);
// 重新计价
...
...
@@ -6120,11 +6123,13 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if
(
isDisassociation
)
{
orderGuanlianService
.
deleteRelationByOrderId
(
orderDO
.
getOrderId
());
}
//
TODO
当运输方式出现变更时需要重置入仓业务
// 当运输方式出现变更时需要重置入仓业务
if
(
orderBackVO
.
getIsTransport
())
{
applicationContext
.
publishEvent
(
new
WarehouseInOrderChangeTransportEvent
(
orderDO
.
getOrderId
()));
}
// 订单信息修改后需要重置提单信息
applicationContext
.
publishEvent
(
new
BoxCheckOrderRemoveLadingBillEvent
(
orderDO
.
getOrderId
()));
}
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/vo/orderItem/OrderItemBackVO.java
View file @
95fb8931
...
...
@@ -470,6 +470,9 @@ public class OrderItemBackVO {
@ApiModelProperty
(
value
=
"到仓:0 无牌 1 有牌 2 中性"
)
private
Integer
checkBrandType
;
@ApiModelProperty
(
value
=
"最后单价变更时间"
)
private
Date
lastChargePriceTime
;
/**
* 到仓信息json
*/
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/listener/BoxOrderUpdateRemoveLadingBillListener.java
0 → 100644
View file @
95fb8931
package
cn
.
iocoder
.
yudao
.
module
.
shipment
.
listener
;
import
cn.iocoder.yudao.framework.apollo.core.event.box.BoxCheckOrderRemoveLadingBillEvent
;
import
cn.iocoder.yudao.framework.apollo.core.event.box.BoxCheckOrderSchedulingEvent
;
import
cn.iocoder.yudao.module.shipment.dal.dataobject.BoxDO
;
import
cn.iocoder.yudao.module.shipment.service.box.BoxService
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.context.event.EventListener
;
import
org.springframework.stereotype.Component
;
import
java.util.Collections
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
exception
.
util
.
ServiceExceptionUtil
.
exception
;
import
static
cn
.
iocoder
.
yudao
.
module
.
order
.
enums
.
ErrorCodeConstants
.
WAREHOUSE_IN_BOX_EXCEPTION
;
/**
* 当订单修改审批通过后,需要对已制作的提单进行重置
*
* @author zhengYi
*/
@Component
(
"BoxOrderUpdateRemoveLadingBillListener"
)
@AllArgsConstructor
@Slf4j
public
class
BoxOrderUpdateRemoveLadingBillListener
{
private
final
BoxService
boxService
;
/**
* 当订单修改审批通过后,需要对已制作的提单进行重置
*
* @param event 订单id
*/
@EventListener
(
BoxCheckOrderRemoveLadingBillEvent
.
class
)
public
void
removeLadingBill
(
BoxCheckOrderRemoveLadingBillEvent
event
)
{
Long
orderId
=
event
.
getOrderId
();
log
.
info
(
"重置提单订单 orderId={}"
,
orderId
);
boxService
.
removeLadingBill
(
Collections
.
singleton
(
orderId
));
}
}
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