提交 39115448 authored 作者: liruixin's avatar liruixin

Merge branch 'v4.9_create_goods_child_20230918' into test

...@@ -21,7 +21,7 @@ public class PageOrderGoodsListParam extends PageParam { ...@@ -21,7 +21,7 @@ public class PageOrderGoodsListParam extends PageParam {
@ApiModelProperty(value = "货单编号") @ApiModelProperty(value = "货单编号")
private String orderGoodsNo; private String orderGoodsNo;
@ApiModelProperty(value = "货单状态: 10:已挂单 20:挂单中 30:运输中 40:已完成 50:已取消") @ApiModelProperty(value = "货单状态: 10:已挂单 20:挂单中 30:运输中 40:已完成 50:已取消 60:已完结")
private Integer orderGoodsStatus; private Integer orderGoodsStatus;
@ApiModelProperty(value = "开始时间", example = "2023-09-09 12:00:01") @ApiModelProperty(value = "开始时间", example = "2023-09-09 12:00:01")
......
package com.clx.performance.service.impl; package com.clx.performance.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.clx.order.enums.OrderEnum;
import com.clx.order.feign.OrderFeign;
import com.clx.order.param.feign.UpdateOrderInfoParam;
import com.clx.order.vo.feign.FeignAddressVO; import com.clx.order.vo.feign.FeignAddressVO;
import com.clx.order.vo.feign.FeignOrderInfoVO; import com.clx.order.vo.feign.FeignOrderInfoVO;
import com.clx.performance.dao.*; import com.clx.performance.dao.*;
...@@ -83,6 +86,7 @@ public class OrderChildServiceImpl implements OrderChildService { ...@@ -83,6 +86,7 @@ public class OrderChildServiceImpl implements OrderChildService {
private final OrderChildLogStruct orderChildLogStruct; private final OrderChildLogStruct orderChildLogStruct;
private final UniqueOrderNumService uniqueOrderNumService; private final UniqueOrderNumService uniqueOrderNumService;
private final OrderFeign orderFeign;
@Autowired @Autowired
...@@ -931,6 +935,7 @@ public class OrderChildServiceImpl implements OrderChildService { ...@@ -931,6 +935,7 @@ public class OrderChildServiceImpl implements OrderChildService {
Integer status = OrderGoodsStatusEnum.Status.GO_TO_SEND.getCode(); Integer status = OrderGoodsStatusEnum.Status.GO_TO_SEND.getCode();
orderGoodsService.updateOrderGoodsReduceWeightAndStatus(orderGoods.getId(), weight, status); orderGoodsService.updateOrderGoodsReduceWeightAndStatus(orderGoods.getId(), weight, status);
orderFeign.updateOrderStatusByOrderNo(orderGoods.getOrderNo(), OrderEnum.Status.IN_TRANSIT.getCode());
} }
/** /**
...@@ -1121,14 +1126,18 @@ public class OrderChildServiceImpl implements OrderChildService { ...@@ -1121,14 +1126,18 @@ public class OrderChildServiceImpl implements OrderChildService {
//应付运费 //应付运费
BigDecimal payableFreight=BigDecimal.ZERO; BigDecimal payableFreight=BigDecimal.ZERO;
if(Objects.nonNull(orderChild.getLoadNet())){ if(Objects.nonNull(orderChild.getLoadNet())){
payableFreight = orderChild.getLoadNet().multiply(orderChild.getFreightPrice().movePointLeft(2)); payableFreight = orderChild.getLoadNet()
.multiply(orderChild.getFreightPrice().movePointLeft(2))
.setScale(2,BigDecimal.ROUND_HALF_UP);
} }
//亏吨扣款(元) //亏吨扣款(元)
BigDecimal lossDeduction=BigDecimal.ZERO; BigDecimal lossDeduction=BigDecimal.ZERO;
if(Objects.nonNull(orderChild.getLoadNet()) && Objects.nonNull(orderChild.getUnloadNet())){ if(Objects.nonNull(orderChild.getLoadNet()) && Objects.nonNull(orderChild.getUnloadNet())){
if(orderChild.getLoadNet().compareTo(orderChild.getUnloadNet()) >0){ if(orderChild.getLoadNet().compareTo(orderChild.getUnloadNet()) >0){
lossDeduction = carrierOrderChildDetailVO.getLossPrice().movePointLeft(2).multiply(orderChild.getLoadNet().subtract(orderChild.getUnloadNet())); lossDeduction = carrierOrderChildDetailVO.getLossPrice().movePointLeft(2)
.multiply(orderChild.getLoadNet().subtract(orderChild.getUnloadNet()))
.setScale(2,BigDecimal.ROUND_HALF_UP);
} }
} }
......
...@@ -60,6 +60,8 @@ public class OrderGoodsSqlProvider { ...@@ -60,6 +60,8 @@ public class OrderGoodsSqlProvider {
WHERE("a.order_goods_status = #{param.orderGoodsStatus}"); WHERE("a.order_goods_status = #{param.orderGoodsStatus}");
} else if (OrderGoodsStatusEnum.Status.CANCEL.getCode().equals(param.getOrderGoodsStatus())) { } else if (OrderGoodsStatusEnum.Status.CANCEL.getCode().equals(param.getOrderGoodsStatus())) {
WHERE("a.order_goods_status = #{param.orderGoodsStatus}"); WHERE("a.order_goods_status = #{param.orderGoodsStatus}");
}else if (OrderGoodsStatusEnum.Status.COMPLETED.getCode().equals(param.getOrderGoodsStatus())) {
WHERE("a.order_goods_status = #{param.orderGoodsStatus}");
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论