Authored by chenchao

add statistic 4 all sub order of one order

1 package com.yohoufo.order.service.seller.deposit; 1 package com.yohoufo.order.service.seller.deposit;
2 2
3 import com.google.common.collect.Lists; 3 import com.google.common.collect.Lists;
  4 +import com.yohobuy.ufo.model.order.bo.DepositOrderStatisticInfo;
4 import com.yohobuy.ufo.model.order.bo.TimeoutBo; 5 import com.yohobuy.ufo.model.order.bo.TimeoutBo;
5 import com.yohobuy.ufo.model.order.common.AppraiseOrderStatus; 6 import com.yohobuy.ufo.model.order.common.AppraiseOrderStatus;
6 import com.yohobuy.ufo.model.order.common.OrderAttributes; 7 import com.yohobuy.ufo.model.order.common.OrderAttributes;
@@ -63,6 +64,9 @@ public class SellerDepositOrderDetailService extends AbsOrderViewService { @@ -63,6 +64,9 @@ public class SellerDepositOrderDetailService extends AbsOrderViewService {
63 @Autowired 64 @Autowired
64 private IExpressInfoService expressInfoService; 65 private IExpressInfoService expressInfoService;
65 66
  67 + @Autowired
  68 + private SellerDepositOrderService sellerDepositOrderService;
  69 +
66 70
67 private static final List<Integer> showEXpressInfoStatusList = Lists.newArrayList(AppraiseOrderStatus.SELLER_SEND_OUT.getCode(), 71 private static final List<Integer> showEXpressInfoStatusList = Lists.newArrayList(AppraiseOrderStatus.SELLER_SEND_OUT.getCode(),
68 AppraiseOrderStatus.WAITING_RECEIVE.getCode(), 72 AppraiseOrderStatus.WAITING_RECEIVE.getCode(),
@@ -88,6 +92,10 @@ public class SellerDepositOrderDetailService extends AbsOrderViewService { @@ -88,6 +92,10 @@ public class SellerDepositOrderDetailService extends AbsOrderViewService {
88 AppraiseOrderStatus.PLATFORM_APPRAISE_UNSURE.getCode() 92 AppraiseOrderStatus.PLATFORM_APPRAISE_UNSURE.getCode()
89 ); 93 );
90 94
  95 + private static final List<Integer> showAppraiseProgress = Lists.newArrayList(AppraiseOrderStatus.PLATFORM_RECEIVE.getCode(),
  96 + AppraiseOrderStatus.FINISH.getCode()
  97 + );
  98 +
91 private static final List<Integer> addressUpgradableStatusList = Lists.newArrayList(AppraiseOrderStatus.HAS_PAYED.getCode()); 99 private static final List<Integer> addressUpgradableStatusList = Lists.newArrayList(AppraiseOrderStatus.HAS_PAYED.getCode());
92 100
93 101
@@ -119,6 +127,11 @@ public class SellerDepositOrderDetailService extends AbsOrderViewService { @@ -119,6 +127,11 @@ public class SellerDepositOrderDetailService extends AbsOrderViewService {
119 if (showUserAddressStatusList.contains(pao.getStatus())){ 127 if (showUserAddressStatusList.contains(pao.getStatus())){
120 userAddress = appraiseOrderMetaService.getHidderUserAddress(orderCode); 128 userAddress = appraiseOrderMetaService.getHidderUserAddress(orderCode);
121 } 129 }
  130 + DepositOrderStatisticInfo orderStatisticInfo = null;
  131 + if (showAppraiseProgress.contains(pao.getStatus())){
  132 + orderStatisticInfo = sellerDepositOrderService.getAppraiseProgress(uid, orderCode);
  133 + }
  134 +
122 boolean addressUpgradable = addressUpgradableStatusList.contains(pao.getStatus()); 135 boolean addressUpgradable = addressUpgradableStatusList.contains(pao.getStatus());
123 SellerDepositOrderPrdListReq sknListReq = SellerDepositOrderPrdListReq.builder() 136 SellerDepositOrderPrdListReq sknListReq = SellerDepositOrderPrdListReq.builder()
124 .orderCode(orderCode) 137 .orderCode(orderCode)
@@ -137,6 +150,7 @@ public class SellerDepositOrderDetailService extends AbsOrderViewService { @@ -137,6 +150,7 @@ public class SellerDepositOrderDetailService extends AbsOrderViewService {
137 .addressUpgradable(addressUpgradable) 150 .addressUpgradable(addressUpgradable)
138 .buttons(aos.detailButtons(oa)) 151 .buttons(aos.detailButtons(oa))
139 .lastExpressInfoDetail(expressInfoService.getLastExpressInfoDetail(pao)) 152 .lastExpressInfoDetail(expressInfoService.getLastExpressInfoDetail(pao))
  153 + .appraiseProgress(orderStatisticInfo)
140 .build() 154 .build()
141 ; 155 ;
142 } 156 }