...
|
...
|
@@ -135,6 +135,12 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
private StorageDepositMapper storageDepositMapper;
|
|
|
|
|
|
@Autowired
|
|
|
private AppraiseOrderMapper appraiseOrderMapper;
|
|
|
|
|
|
@Autowired
|
|
|
private BuyerOrderAssistant buyerOrderAssistant;
|
|
|
|
|
|
@Autowired
|
|
|
private BuyerOrderStateChangers buyerOrderStateChangers;
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -830,7 +836,9 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
|
|
|
OrderStatus expectStatus = OrderStatus.SELLER_SEND_OUT;
|
|
|
OrderStatus targetStatus = OrderStatus.PLATFORM_RECEIVE;
|
|
|
BuyerOrder buyerOrder = buyerOrderMapper.selectByOrderCode(orderCode);
|
|
|
|
|
|
BuyerOrderAssistant.PreparedData preparedData = buyerOrderAssistant.prepare(orderCode);
|
|
|
BuyerOrder buyerOrder = preparedData.getBuyerOrder();
|
|
|
|
|
|
if (buyerOrder != null && buyerOrder.getStatus() == expectStatus.getCode()){
|
|
|
int uid = buyerOrder.getUid();
|
...
|
...
|
@@ -844,6 +852,8 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
logger.info("in confirmReceive record status change, orderCode {},uid {} ,sellerUid {}", orderCode,uid,sellerUid);
|
|
|
buyerNoticeFacade.platformReceiveGoods(uid,orderCode);
|
|
|
orderStatusFlowService.addAsy(buyerOrder.getOrderCode(),targetStatus.getCode());
|
|
|
//
|
|
|
finishDepositGoodsIf(preparedData);
|
|
|
}else{
|
|
|
logger.warn("in confirmReceive not record status change cause of update empty num , orderCode {},uid {} ,sellerUid {}", orderCode,uid,sellerUid);
|
|
|
}
|
...
|
...
|
@@ -858,6 +868,30 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 现货寄存订单
|
|
|
* 卖家使用寄存商品发货
|
|
|
* @param preparedData
|
|
|
*/
|
|
|
private void finishDepositGoodsIf(BuyerOrderAssistant.PreparedData preparedData){
|
|
|
BuyerOrder buyerOrder = preparedData.getBuyerOrder();
|
|
|
int uid = buyerOrder.getUid();
|
|
|
Long orderCode = buyerOrder.getOrderCode();
|
|
|
SellerOrderGoods psog = preparedData.getSellerOrderGoods();
|
|
|
SkupType skupType = SkupType.getSkupType(psog.getAttributes());
|
|
|
boolean isInstockDepositOrder = BuyerOrderUtils.isInstockDeposit(skupType, buyerOrder.getAttributes());
|
|
|
logger.info("platform confirmReceive orderCode {} buyerUid {} isInstockDepositOrder {}", orderCode, uid, isInstockDepositOrder);
|
|
|
if(isInstockDepositOrder){
|
|
|
String depositCode = buyerOrderMetaService.getDepositCode(uid, orderCode);
|
|
|
logger.info("platform confirmReceive orderCode {} buyerUid {} isInstockDepositOrder {} depositCode {}",
|
|
|
orderCode, uid, isInstockDepositOrder, depositCode);
|
|
|
if (StringUtils.isNotBlank(depositCode)){
|
|
|
int depositUpdate = depositService.updateDelStatus(psog.getUid(), depositCode);
|
|
|
logger.info("platform confirmReceive update deposit DelStatus {} orderCode {} buyerUid {} depositCode {}",
|
|
|
depositUpdate, orderCode, uid, depositCode);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// 质检通过,不需要记录物流调拨信息
|
|
|
@Override
|
...
|
...
|
@@ -1108,6 +1142,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
|
|
|
//寄存商品 出库准备
|
|
|
int rows = 0;
|
|
|
/*
|
|
|
boolean isInstockDepositOrder = dscNode.isInstockDepositOrder();
|
|
|
if (isInstockDepositOrder){
|
|
|
//上架的寄存商品 || 未上架的寄存商品
|
...
|
...
|
@@ -1126,7 +1161,11 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
rows = depositService.updateDepositWaitToPick(ownerUid, depositCode, orderCode, Optional.ofNullable(preparedData.getBuyerOrderGoods())
|
|
|
.map(BuyerOrderGoods::getSkup).orElse(0));
|
|
|
logger.info("processOrderDeliverByDepositGoods orderCode {} depositCode {} updateDepositWaitToPick {}", orderCode, depositCode, rows);
|
|
|
}
|
|
|
}*/
|
|
|
rows = depositService.updateDepositWaitToPick(ownerUid, depositCode, orderCode, Optional.ofNullable(preparedData.getBuyerOrderGoods())
|
|
|
.map(BuyerOrderGoods::getSkup).orElse(0));
|
|
|
logger.info("processOrderDeliverByDepositGoods orderCode {} depositCode {} updateDepositWaitToPick {}", orderCode, depositCode, rows);
|
|
|
|
|
|
|
|
|
if (rows>0){
|
|
|
//bind deposit code 2 buyer order
|
...
|
...
|
|