Authored by tanling

召回确认收货 点亮展示交易完成

@@ -2,7 +2,9 @@ package com.yohoufo.order.service.impl; @@ -2,7 +2,9 @@ package com.yohoufo.order.service.impl;
2 2
3 import com.yohobuy.ufo.model.order.common.AppraiseOrderStatus; 3 import com.yohobuy.ufo.model.order.common.AppraiseOrderStatus;
4 import com.yohobuy.ufo.model.order.common.OrderAttributes; 4 import com.yohobuy.ufo.model.order.common.OrderAttributes;
  5 +import com.yohobuy.ufo.model.order.constants.StorageDepositStatusEnum;
5 import com.yohoufo.dal.order.model.AppraiseOrder; 6 import com.yohoufo.dal.order.model.AppraiseOrder;
  7 +import com.yohoufo.dal.order.model.StorageDeposit;
6 import lombok.Setter; 8 import lombok.Setter;
7 import lombok.experimental.Accessors; 9 import lombok.experimental.Accessors;
8 10
@@ -41,12 +43,19 @@ public class AppraiseExpressStageBuilder { @@ -41,12 +43,19 @@ public class AppraiseExpressStageBuilder {
41 private static final int AUTO_CONFIRM_RECEIPT = 13; 43 private static final int AUTO_CONFIRM_RECEIPT = 13;
42 44
43 45
44 - final AppraiseOrder appraiseOrder; 46 + AppraiseOrder appraiseOrder;
  47 +
  48 + StorageDeposit storageDeposit = null;
45 49
46 public AppraiseExpressStageBuilder(AppraiseOrder appraiseOrder) { 50 public AppraiseExpressStageBuilder(AppraiseOrder appraiseOrder) {
47 this.appraiseOrder = appraiseOrder; 51 this.appraiseOrder = appraiseOrder;
48 } 52 }
49 53
  54 + public AppraiseExpressStageBuilder(AppraiseOrder appraiseOrder, StorageDeposit storageDeposit) {
  55 + this.appraiseOrder = appraiseOrder;
  56 + this.storageDeposit = storageDeposit;
  57 + }
  58 +
50 public int build() { 59 public int build() {
51 60
52 int status = appraiseOrder.getStatus(); 61 int status = appraiseOrder.getStatus();
@@ -72,8 +81,13 @@ public class AppraiseExpressStageBuilder { @@ -72,8 +81,13 @@ public class AppraiseExpressStageBuilder {
72 || status == AppraiseOrderStatus.PLATFORM_APPRAISE_UNSURE.getCode() 81 || status == AppraiseOrderStatus.PLATFORM_APPRAISE_UNSURE.getCode()
73 // 鉴定通过召回 82 // 鉴定通过召回
74 || status == AppraiseOrderStatus.JUDGE_PASS_WAIT_WAREHOUSE.getCode()){ 83 || status == AppraiseOrderStatus.JUDGE_PASS_WAIT_WAREHOUSE.getCode()){
  84 +
  85 + if (storageDeposit!=null && Objects.nonNull(storageDeposit.getStatus()) && storageDeposit.getStatus()== StorageDepositStatusEnum.HAS_END.getCode()){
  86 + return AUTO_CONFIRM_RECEIPT;
  87 + }else{
75 return DEPOSIT_PLATFORM_DELIVER; 88 return DEPOSIT_PLATFORM_DELIVER;
76 } 89 }
  90 + }
77 91
78 } 92 }
79 93
@@ -620,12 +620,16 @@ public class ExpressInfoServiceImpl implements IExpressInfoService { @@ -620,12 +620,16 @@ public class ExpressInfoServiceImpl implements IExpressInfoService {
620 // 父订单的场合,点亮信息 + 物流信息(区分阶段) 620 // 父订单的场合,点亮信息 + 物流信息(区分阶段)
621 boolean isSubOrder = Objects.nonNull(appraiseOrder.getParentOrderCode()) ? true : false; 621 boolean isSubOrder = Objects.nonNull(appraiseOrder.getParentOrderCode()) ? true : false;
622 622
623 - // 点亮信息设置  
624 - expressInfoRespBo.setStage(new AppraiseExpressStageBuilder(appraiseOrder).build()); 623 +
625 624
626 // 子订单 625 // 子订单
627 if (isSubOrder){ 626 if (isSubOrder){
628 627
  628 + StorageDeposit storageDeposit = storageDepositMapper.selectByOrderCode(appraiseOrder.getOrderCode());
  629 +
  630 + // 点亮信息设置
  631 + expressInfoRespBo.setStage(new AppraiseExpressStageBuilder(appraiseOrder, storageDeposit).build());
  632 +
629 List<Integer> expressTypeList = getAppraiseExpressType(appraiseOrder); 633 List<Integer> expressTypeList = getAppraiseExpressType(appraiseOrder);
630 if (CollectionUtils.isEmpty(expressTypeList)) { 634 if (CollectionUtils.isEmpty(expressTypeList)) {
631 LOGGER.info("{}, appraise expressTypeList is empty", orderCode); 635 LOGGER.info("{}, appraise expressTypeList is empty", orderCode);
@@ -647,6 +651,9 @@ public class ExpressInfoServiceImpl implements IExpressInfoService { @@ -647,6 +651,9 @@ public class ExpressInfoServiceImpl implements IExpressInfoService {
647 // 父订单 651 // 父订单
648 else{ 652 else{
649 653
  654 + // 点亮信息设置
  655 + expressInfoRespBo.setStage(new AppraiseExpressStageBuilder(appraiseOrder).build());
  656 +
650 List<Integer> expressTypeList = getAppraiseExpressType(appraiseOrder); 657 List<Integer> expressTypeList = getAppraiseExpressType(appraiseOrder);
651 if (CollectionUtils.isEmpty(expressTypeList)) { 658 if (CollectionUtils.isEmpty(expressTypeList)) {
652 LOGGER.info("{}, appraise expressTypeList is empty", orderCode); 659 LOGGER.info("{}, appraise expressTypeList is empty", orderCode);