|
@@ -115,9 +115,15 @@ public class ChannelGoodsSettleMgrController extends BaseApiController {
|
|
|
channelGoodsOrderSettleVO.setTotalSettleQty(channelGoodsList.stream().mapToInt(ChannelGoods::getSettleQty).sum());
|
|
|
channelGoodsOrderSettleVO.setTotalVerifyQty(channelGoodsList.stream().mapToInt(ChannelGoods::getVerifyQty).sum());
|
|
|
channelGoodsOrderSettleVO.setStatus(channelGoodsList.get(0).getStatus());
|
|
|
-
|
|
|
+ Integer totalPurchaseCost = 0;
|
|
|
+ for (ChannelGoods channelGoods : channelGoodsList) {
|
|
|
+ totalPurchaseCost += channelGoods.getPurchaseCost() * channelGoods.getRemainQty();
|
|
|
+ }
|
|
|
+ // 未结算
|
|
|
+ channelGoodsOrderSettleVO.setTotalPurchaseCost(totalPurchaseCost);
|
|
|
ChannelGoodsSettleOrderItem settleOrderItem = settleOrderItemService.getOne(new LambdaQueryWrapper<ChannelGoodsSettleOrderItem>().eq(ChannelGoodsSettleOrderItem::getChannelGoodsId, channelGoodsList.get(0).getId()));
|
|
|
if (settleOrderItem != null) {
|
|
|
+ // 已结算
|
|
|
ChannelGoodsSettleOrder settleOrder = settleOrderService.getOne(new LambdaQueryWrapper<ChannelGoodsSettleOrder>().eq(ChannelGoodsSettleOrder::getOrderId, settleOrderItem.getOrderId()));
|
|
|
channelGoodsOrderSettleVO.setTotalPurchaseCost(settleOrder.getOrderAmt());
|
|
|
channelGoodsOrderSettleVO.setPayAmount(settleOrder.getSettleAmt());
|