...
|
...
|
@@ -1015,6 +1015,9 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
&& Constant.BUYER_ORDER_STATUS_MINI_FAULT_ACCEPT.getByteVal()!=buyerOrder.getStatus().byteValue()){
|
|
|
throw new ServiceException(400,"错误:订单状态变化,不允许平台发货");
|
|
|
}
|
|
|
//设订单的归属仓库
|
|
|
req.setDepotNo(resetDepot(buyerOrder.getOrderCode()));
|
|
|
|
|
|
//重新设置mobile
|
|
|
restMobileFromBuyer(req,buyerOrder.getOrderCode());
|
|
|
|
...
|
...
|
@@ -1031,8 +1034,6 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
public JSONObject sendBackGoodsToSeller(BuyerOrderReq req){
|
|
|
LOGGER.info("sendBackGoodsToSeller enter, req is {}", req);
|
|
|
BuyerOrder buyerOrder = checkForPlatformExpress(req);
|
|
|
//重新设置mobile
|
|
|
resetMobileFromSeller(req,buyerOrder.getOrderCode());
|
|
|
|
|
|
//调用前台接口
|
|
|
String args ;
|
...
|
...
|
@@ -1047,6 +1048,13 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
throw new ServiceException(400,"错误:订单状态不合法,不允许平台寄回");
|
|
|
}
|
|
|
|
|
|
|
|
|
//设订单的归属仓库
|
|
|
req.setDepotNo(resetDepot(buyerOrder.getOrderCode()));
|
|
|
|
|
|
//重新设置mobile
|
|
|
resetMobileFromSeller(req,buyerOrder.getOrderCode());
|
|
|
|
|
|
//记录操作日志
|
|
|
int operateType =OperateTypeEnum.OPERATE_TYPE_DELIVERY_GOODS.getCode();
|
|
|
UserHelper userHelper = new UserHelper();
|
...
|
...
|
@@ -1131,6 +1139,25 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
return jsonObject;
|
|
|
}
|
|
|
*/
|
|
|
|
|
|
|
|
|
private Integer resetDepot(String orderCode){
|
|
|
Integer depotNum=null ;
|
|
|
List<BuyerOrderGoods> buyerGoodsList = buyerOrderGoodsMapper.selectByOrderCode(Arrays.asList(orderCode));
|
|
|
if(CollectionUtils.isNotEmpty(buyerGoodsList)){
|
|
|
List<SellerOrderGoods> sellerGoodsList = sellerOrderGoodsMapper.selectByIds(Lists.newArrayList(buyerGoodsList.get(0).getSkup()));
|
|
|
if(CollectionUtils.isNotEmpty(sellerGoodsList)){
|
|
|
depotNum = sellerGoodsList.get(0).getDepotNo();
|
|
|
}
|
|
|
}
|
|
|
LOGGER.info("resetDepot enter, orderCode {} ,depotNum is {}",orderCode, depotNum);
|
|
|
if(depotNum==null){
|
|
|
LOGGER.warn("resetDepot enter,orderCode {} , depotNum is null", orderCode);
|
|
|
throw new ServiceException(400,"错误:订单仓库编号获取为空");
|
|
|
}
|
|
|
return depotNum;
|
|
|
}
|
|
|
|
|
|
//如果前台传的手机号码为空,则重设
|
|
|
private void restMobileFromBuyer(BuyerOrderReq req,String orderCode){
|
|
|
LOGGER.info("restMobileFromBuyer enter req = {} ,orderCode = {} ",req,orderCode);
|
...
|
...
|
|