Authored by tanling

付费鉴定and付费寄存

... ... @@ -582,14 +582,10 @@ public class ExpressInfoServiceImpl implements IExpressInfoService {
throwServiceExceptionIf(appraiseOrder.getStatus() != AppraiseOrderStatus.SELLER_SEND_OUT.getCode()
&& appraiseOrder.getStatus() != AppraiseOrderStatus.WAITING_RECEIVE.getCode(), "不展示物流信息");
List<Integer> expressTypeList = Lists.newArrayList();
// 用户发货
if(appraiseOrder.getStatus() == AppraiseOrderStatus.SELLER_SEND_OUT.getCode()){
expressTypeList = Arrays.asList(EnumExpressType.EXPRESS_TYPE_1.getCode());
}else if(appraiseOrder.getStatus() == AppraiseOrderStatus.WAITING_RECEIVE.getCode()){
expressTypeList = Arrays.asList(EnumExpressType.EXPRESS_TYPE_2.getCode(),
EnumExpressType.EXPRESS_TYPE_3.getCode(),
EnumExpressType.EXPRESS_TYPE_REBACK.getCode());
List<Integer> expressTypeList = getAppraiseExpressType(appraiseOrder);
if (CollectionUtils.isEmpty(expressTypeList)) {
LOGGER.info("{}, appraise expressTypeList is empty", orderCode);
return expressInfoRespBo;
}
// 物流单号信息
... ... @@ -615,10 +611,11 @@ public class ExpressInfoServiceImpl implements IExpressInfoService {
// 子订单
if (isSubOrder){
// 寄回物流
List<Integer> expressTypeList = Arrays.asList(EnumExpressType.EXPRESS_TYPE_2.getCode(),
EnumExpressType.EXPRESS_TYPE_3.getCode(),
EnumExpressType.EXPRESS_TYPE_REBACK.getCode());
List<Integer> expressTypeList = getAppraiseExpressType(appraiseOrder);
if (CollectionUtils.isEmpty(expressTypeList)) {
LOGGER.info("{}, appraise expressTypeList is empty", orderCode);
return expressInfoRespBo;
}
// 物流单号信息
constructWayBillInfo(orderCode, expressTypeList, expressInfoRespBo);
... ... @@ -635,7 +632,7 @@ public class ExpressInfoServiceImpl implements IExpressInfoService {
// 父订单
else{
List<Integer> expressTypeList = getAppraiseExpressType(appraiseOrder.getStatus());
List<Integer> expressTypeList = getAppraiseExpressType(appraiseOrder);
if (CollectionUtils.isEmpty(expressTypeList)) {
LOGGER.info("{}, appraise expressTypeList is empty", orderCode);
return expressInfoRespBo;
... ... @@ -766,20 +763,45 @@ public class ExpressInfoServiceImpl implements IExpressInfoService {
* @param status
* @return
*/
private List<Integer> getAppraiseExpressType(Integer status) {
if (AppraiseOrderStatus.SELLER_SEND_OUT.getCode() == status) {
return Arrays.asList(EnumExpressType.EXPRESS_TYPE_1.getCode());
}
// 这些状态需要展示 平台鉴定
else if (AppraiseOrderStatus.PLATFORM_RECEIVE.getCode() == status
|| AppraiseOrderStatus.PLATFORM_CHECKING.getCode() == status
|| AppraiseOrderStatus.JUDGE_PASS.getCode() == status
|| AppraiseOrderStatus.WAITING_RECEIVE.getCode() == status
|| AppraiseOrderStatus.CHECKING_FAKE.getCode() == status
|| AppraiseOrderStatus.QUALITY_CHECK_FAKE.getCode() == status
|| AppraiseOrderStatus.PLATFORM_APPRAISE_UNSURE.getCode() == status) {
return Arrays.asList(EnumExpressType.EXPRESS_TYPE_JUDGE_CENTER.getCode(), EnumExpressType.EXPRESS_TYPE_1.getCode());
private List<Integer> getAppraiseExpressType(AppraiseOrder appraiseOrder) {
Integer attribute = appraiseOrder.getAttributes();
Integer status = appraiseOrder.getStatus();
if (attribute == AppraiseOrderAttributes.PAID_APPRAISE.getCode()){
// 用户发货
if(status == AppraiseOrderStatus.SELLER_SEND_OUT.getCode()){
return Arrays.asList(EnumExpressType.EXPRESS_TYPE_1.getCode());
}else if(status == AppraiseOrderStatus.WAITING_RECEIVE.getCode()){
return Arrays.asList(EnumExpressType.EXPRESS_TYPE_2.getCode(),
EnumExpressType.EXPRESS_TYPE_3.getCode(),
EnumExpressType.EXPRESS_TYPE_REBACK.getCode());
}
} else if(attribute == AppraiseOrderAttributes.PAID_DEPOSIT.getCode()){
boolean isSubOrder = Objects.nonNull(appraiseOrder.getParentOrderCode()) ? true : false;
if (isSubOrder){
return Arrays.asList(EnumExpressType.EXPRESS_TYPE_2.getCode(),
EnumExpressType.EXPRESS_TYPE_3.getCode(),
EnumExpressType.EXPRESS_TYPE_REBACK.getCode());
}else{
if (AppraiseOrderStatus.SELLER_SEND_OUT.getCode() == status) {
return Arrays.asList(EnumExpressType.EXPRESS_TYPE_1.getCode());
}
// 这些状态需要展示 平台鉴定
else if (AppraiseOrderStatus.PLATFORM_RECEIVE.getCode() == status
|| AppraiseOrderStatus.JUDGE_PASS.getCode() == status
|| AppraiseOrderStatus.WAITING_RECEIVE.getCode() == status
|| AppraiseOrderStatus.CHECKING_FAKE.getCode() == status
|| AppraiseOrderStatus.QUALITY_CHECK_FAKE.getCode() == status
|| AppraiseOrderStatus.PLATFORM_APPRAISE_UNSURE.getCode() == status) {
return Arrays.asList(EnumExpressType.EXPRESS_TYPE_JUDGE_CENTER.getCode(), EnumExpressType.EXPRESS_TYPE_1.getCode());
}
}
}
return null;
}
... ...