Commit b1820ac9 authored by 332784038@qq.com's avatar 332784038@qq.com

订单产品项运费单价和清关费单价最后变更时间补充

parent f3b81e39
-- 增加订单产品项最后单价变更时间 -- 增加订单产品项最后单价变更时间
alter table ecw_order_item alter table ecw_order_item
add COLUMN `last_charge_price_time` datetime DEFAULT NULL COMMENT '最后单价变更时间'; add COLUMN `last_freight_charge_price_time` datetime DEFAULT NULL COMMENT '运费最后单价变更时间';
alter table ecw_order_item
add COLUMN `last_clearance_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; update ecw_order_item set `last_freight_charge_price_time` = update_time where last_freight_charge_price_time is null;
\ No newline at end of file update ecw_order_item set `last_clearance_charge_price_time` = update_time where last_clearance_charge_price_time is null;
\ No newline at end of file
...@@ -442,8 +442,11 @@ public class OrderItemDO extends BaseDO { ...@@ -442,8 +442,11 @@ public class OrderItemDO extends BaseDO {
@ApiModelProperty(value = "到仓:0 无牌 1 有牌 2 中性") @ApiModelProperty(value = "到仓:0 无牌 1 有牌 2 中性")
private Integer checkBrandType; private Integer checkBrandType;
@ApiModelProperty(value = "最后单价变更时间") @ApiModelProperty(value = "最后运费单价变更时间")
private Date lastChargePriceTime; private Date lastFreightChargePriceTime;
@ApiModelProperty(value = "最后清关费单价变更时间")
private Date lastClearanceChargePriceTime;
/** /**
* 到仓信息json * 到仓信息json
*/ */
......
...@@ -3673,12 +3673,12 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order ...@@ -3673,12 +3673,12 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
for (OrderItemDO orderItemDO : orderItemDOList) { for (OrderItemDO orderItemDO : orderItemDOList) {
for (ProdCostDto prodCostDto : resultDto.getProdCostDtoList()) { for (ProdCostDto prodCostDto : resultDto.getProdCostDtoList()) {
if (Objects.equals(prodCostDto.getItemId(), orderItemDO.getOrderItemId())) { if (Objects.equals(prodCostDto.getItemId(), orderItemDO.getOrderItemId())) {
boolean isChargePrice = false; boolean isFreightChargePrice = false;
orderItemDO.setOriginalSeaFreight(prodCostDto.getOrgFreightPrice()); orderItemDO.setOriginalSeaFreight(prodCostDto.getOrgFreightPrice());
if ((Objects.isNull(prodCostDto.getOneFreight()) && Objects.nonNull(orderItemDO.getOneSeaFreight())) || if ((Objects.isNull(prodCostDto.getOneFreight()) && Objects.nonNull(orderItemDO.getOneSeaFreight())) ||
(Objects.nonNull(prodCostDto.getOneFreight()) && Objects.isNull(orderItemDO.getOneSeaFreight())) || (Objects.nonNull(prodCostDto.getOneFreight()) && Objects.isNull(orderItemDO.getOneSeaFreight())) ||
(Objects.nonNull(prodCostDto.getOneFreight()) && Objects.nonNull(orderItemDO.getOneSeaFreight()) && orderItemDO.getOneSeaFreight().compareTo(prodCostDto.getOneFreight()) != 0)){ (Objects.nonNull(prodCostDto.getOneFreight()) && Objects.nonNull(orderItemDO.getOneSeaFreight()) && orderItemDO.getOneSeaFreight().compareTo(prodCostDto.getOneFreight()) != 0)){
isChargePrice = true; isFreightChargePrice = true;
} }
orderItemDO.setOneSeaFreight(prodCostDto.getOneFreight()); orderItemDO.setOneSeaFreight(prodCostDto.getOneFreight());
orderItemDO.setDiscountFreightPrice(prodCostDto.getDiscountFreightPrice()); orderItemDO.setDiscountFreightPrice(prodCostDto.getDiscountFreightPrice());
...@@ -3726,10 +3726,11 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order ...@@ -3726,10 +3726,11 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
orderItemDO.setMinMeteringWeight(prodCostDto.getMinMeteringWeight()); orderItemDO.setMinMeteringWeight(prodCostDto.getMinMeteringWeight());
orderItemDO.setOriginalClearanceFreight(prodCostDto.getOrgClearanceFeePrice()); orderItemDO.setOriginalClearanceFreight(prodCostDto.getOrgClearanceFeePrice());
boolean isClearanceChargePrice = false;
if ((Objects.isNull(prodCostDto.getOneClearanceFee()) && Objects.nonNull(orderItemDO.getOneClearanceFreight())) || if ((Objects.isNull(prodCostDto.getOneClearanceFee()) && Objects.nonNull(orderItemDO.getOneClearanceFreight())) ||
(Objects.nonNull(prodCostDto.getOneClearanceFee()) && Objects.isNull(orderItemDO.getOneClearanceFreight())) || (Objects.nonNull(prodCostDto.getOneClearanceFee()) && Objects.isNull(orderItemDO.getOneClearanceFreight())) ||
(Objects.nonNull(prodCostDto.getOneClearanceFee()) && Objects.nonNull(orderItemDO.getOneClearanceFreight()) && orderItemDO.getOneClearanceFreight().compareTo(prodCostDto.getOneClearanceFee()) != 0)){ (Objects.nonNull(prodCostDto.getOneClearanceFee()) && Objects.nonNull(orderItemDO.getOneClearanceFreight()) && orderItemDO.getOneClearanceFreight().compareTo(prodCostDto.getOneClearanceFee()) != 0)){
isChargePrice = true; isClearanceChargePrice = true;
} }
orderItemDO.setOneClearanceFreight(prodCostDto.getOneClearanceFee()); orderItemDO.setOneClearanceFreight(prodCostDto.getOneClearanceFee());
orderItemDO.setDiscountClearanceFeePrice(prodCostDto.getDiscountClearanceFeePrice()); orderItemDO.setDiscountClearanceFeePrice(prodCostDto.getDiscountClearanceFeePrice());
...@@ -3767,8 +3768,11 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order ...@@ -3767,8 +3768,11 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
} }
orderItemDO.setCharging(prodCostDto.getCharging()); orderItemDO.setCharging(prodCostDto.getCharging());
orderItemDO.setIsPayAdvance(prodCostDto.getIsPayAdvance()); orderItemDO.setIsPayAdvance(prodCostDto.getIsPayAdvance());
if (isChargePrice){ if (isFreightChargePrice){
orderItemDO.setLastChargePriceTime(new Date()); orderItemDO.setLastFreightChargePriceTime(new Date());
}
if (isClearanceChargePrice){
orderItemDO.setLastClearanceChargePriceTime(new Date());
} }
} }
} }
......
...@@ -464,8 +464,11 @@ public class OrderItemBackVO { ...@@ -464,8 +464,11 @@ public class OrderItemBackVO {
@ApiModelProperty(value = "到仓:0 无牌 1 有牌 2 中性") @ApiModelProperty(value = "到仓:0 无牌 1 有牌 2 中性")
private Integer checkBrandType; private Integer checkBrandType;
@ApiModelProperty(value = "最后单价变更时间") @ApiModelProperty(value = "最后运费单价变更时间")
private Date lastChargePriceTime; private Date lastFreightChargePriceTime;
@ApiModelProperty(value = "最后清关费单价变更时间")
private Date lastClearanceChargePriceTime;
/** /**
* 到仓信息json * 到仓信息json
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment