提交 413d34e2 authored 作者: aiqingguo's avatar aiqingguo

更新货单状态

上级 2f7f9a0d
...@@ -926,15 +926,9 @@ public class OrderChildServiceImpl implements OrderChildService { ...@@ -926,15 +926,9 @@ public class OrderChildServiceImpl implements OrderChildService {
* 更新货单数据 * 更新货单数据
*/ */
private void updateOrderGoodsAmount(OrderGoods orderGoods, BigDecimal weight){ private void updateOrderGoodsAmount(OrderGoods orderGoods, BigDecimal weight){
int count = orderChildDao.countValidByOrderGoodsNo(orderGoods.getOrderGoodsNo())-1; int count = orderChildDao.countValidByOrderGoodsNo(orderGoods.getOrderGoodsNo());
Integer status = orderGoods.getOrderGoodsStatus(); Integer status = OrderGoodsStatusEnum.Status.GO_TO_SEND.getCode();
if (count == 0){
status = OrderGoodsStatusEnum.Status.PAYING.getCode();
}
else {
status = OrderGoodsStatusEnum.Status.GO_TO_SEND.getCode();
}
orderGoodsService.updateOrderGoodsReduceWeightAndStatus(orderGoods.getId(), weight, status); orderGoodsService.updateOrderGoodsReduceWeightAndStatus(orderGoods.getId(), weight, status);
} }
...@@ -962,15 +956,9 @@ public class OrderChildServiceImpl implements OrderChildService { ...@@ -962,15 +956,9 @@ public class OrderChildServiceImpl implements OrderChildService {
private void updateOrderGoodsAmountLoad(OrderGoods orderGoods, BigDecimal dif){ private void updateOrderGoodsAmountLoad(OrderGoods orderGoods, BigDecimal dif){
if (dif.compareTo(BigDecimal.ZERO) == 0){return;} if (dif.compareTo(BigDecimal.ZERO) == 0){return;}
int count = orderChildDao.countValidByOrderGoodsNo(orderGoods.getOrderGoodsNo())-1; int count = orderChildDao.countValidByOrderGoodsNo(orderGoods.getOrderGoodsNo());
Integer status = orderGoods.getOrderGoodsStatus(); Integer status = OrderGoodsStatusEnum.Status.GO_TO_SEND.getCode();
if (count == 0){
status = OrderGoodsStatusEnum.Status.PAYING.getCode();
}
else {
status = OrderGoodsStatusEnum.Status.GO_TO_SEND.getCode();
}
orderGoodsService.updateOrderGoodsReduceWeightAndStatus(orderGoods.getId(), dif, status); orderGoodsService.updateOrderGoodsReduceWeightAndStatus(orderGoods.getId(), dif, status);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论