|
@@ -9,6 +9,7 @@ import com.yoho.error.exception.ServiceException; |
|
@@ -9,6 +9,7 @@ import com.yoho.error.exception.ServiceException; |
9
|
import com.yohobuy.ufo.model.order.common.*;
|
9
|
import com.yohobuy.ufo.model.order.common.*;
|
10
|
import com.yohobuy.ufo.model.order.resp.ExpressInfoDetail;
|
10
|
import com.yohobuy.ufo.model.order.resp.ExpressInfoDetail;
|
11
|
import com.yohobuy.ufo.model.order.resp.ExpressInfoRespBo;
|
11
|
import com.yohobuy.ufo.model.order.resp.ExpressInfoRespBo;
|
|
|
12
|
+import com.yohobuy.ufo.model.order.resp.MiniFaultConfirm;
|
12
|
import com.yohobuy.ufo.model.order.vo.AddressInfo;
|
13
|
import com.yohobuy.ufo.model.order.vo.AddressInfo;
|
13
|
import com.yohoufo.common.alarm.EventBusPublisher;
|
14
|
import com.yohoufo.common.alarm.EventBusPublisher;
|
14
|
import com.yohoufo.common.constant.ExpressInfoConstant;
|
15
|
import com.yohoufo.common.constant.ExpressInfoConstant;
|
|
@@ -90,6 +91,9 @@ public class ExpressInfoServiceImpl implements IExpressInfoService { |
|
@@ -90,6 +91,9 @@ public class ExpressInfoServiceImpl implements IExpressInfoService { |
90
|
@Autowired
|
91
|
@Autowired
|
91
|
private OrderStatusFlowService orderStatusFlowService;
|
92
|
private OrderStatusFlowService orderStatusFlowService;
|
92
|
|
93
|
|
|
|
94
|
+ @Autowired
|
|
|
95
|
+ private QualityCheckMapper qualityCheckMapper;
|
|
|
96
|
+
|
93
|
//private static String EXPRESS_MQ_SEND = "logistics.logistics_data";
|
97
|
//private static String EXPRESS_MQ_SEND = "logistics.logistics_data";
|
94
|
//private static String EXPRESS_MQ_SEND = "order.updateChangeRefundOrderExpressInfo";
|
98
|
//private static String EXPRESS_MQ_SEND = "order.updateChangeRefundOrderExpressInfo";
|
95
|
private static String EXPRESS_MQ_SEND = "third.logistics.logistics_data";
|
99
|
private static String EXPRESS_MQ_SEND = "third.logistics.logistics_data";
|
|
@@ -364,12 +368,12 @@ public class ExpressInfoServiceImpl implements IExpressInfoService { |
|
@@ -364,12 +368,12 @@ public class ExpressInfoServiceImpl implements IExpressInfoService { |
364
|
//2.设定最近一个阶段的物流
|
368
|
//2.设定最近一个阶段的物流
|
365
|
expressInfoRespBo.setExpressInfoDetailList(Lists.newArrayList());
|
369
|
expressInfoRespBo.setExpressInfoDetailList(Lists.newArrayList());
|
366
|
List<ExpressInfo> expressInfoList = getExpressInfoListByStage(actor, orderCode, expressType);
|
370
|
List<ExpressInfo> expressInfoList = getExpressInfoListByStage(actor, orderCode, expressType);
|
367
|
- constructExpressInfo(expressInfoList, expressInfoRespBo.getExpressInfoDetailList());
|
371
|
+ constructExpressInfo(actor,expressInfoList, expressInfoRespBo.getExpressInfoDetailList());
|
368
|
|
372
|
|
369
|
//3.设定鉴定的物流调拨信息
|
373
|
//3.设定鉴定的物流调拨信息
|
370
|
expressInfoRespBo.setJudgeExpressInfoDetailList(Lists.newArrayList());
|
374
|
expressInfoRespBo.setJudgeExpressInfoDetailList(Lists.newArrayList());
|
371
|
List<ExpressInfo> judgeExpressInfoList=getExpressInfoListByStage(actor, orderCode, EnumExpressType.EXPRESS_TYPE_JUDGE_CENTER.getCode());
|
375
|
List<ExpressInfo> judgeExpressInfoList=getExpressInfoListByStage(actor, orderCode, EnumExpressType.EXPRESS_TYPE_JUDGE_CENTER.getCode());
|
372
|
- constructExpressInfo(judgeExpressInfoList, expressInfoRespBo.getJudgeExpressInfoDetailList());
|
376
|
+ constructExpressInfo(actor,judgeExpressInfoList, expressInfoRespBo.getJudgeExpressInfoDetailList());
|
373
|
|
377
|
|
374
|
//4.获取上一阶段的辅助物流信息
|
378
|
//4.获取上一阶段的辅助物流信息
|
375
|
List<ExpressInfoDetail> supplementExpressInfoDetailList = Lists.newArrayList();
|
379
|
List<ExpressInfoDetail> supplementExpressInfoDetailList = Lists.newArrayList();
|
|
@@ -395,6 +399,7 @@ public class ExpressInfoServiceImpl implements IExpressInfoService { |
|
@@ -395,6 +399,7 @@ public class ExpressInfoServiceImpl implements IExpressInfoService { |
395
|
// 2 卖家发货 == 平台鉴定 -- 交易成功 ,其中卖家发货和平台鉴定点亮
|
399
|
// 2 卖家发货 == 平台鉴定 -- 交易成功 ,其中卖家发货和平台鉴定点亮
|
396
|
// 3 卖家发货 == 平台鉴定 == 交易成功 ,全部点亮
|
400
|
// 3 卖家发货 == 平台鉴定 == 交易成功 ,全部点亮
|
397
|
// 4 卖家发货 == 平台鉴定 == 交易失败 ,全部点亮
|
401
|
// 4 卖家发货 == 平台鉴定 == 交易失败 ,全部点亮
|
|
|
402
|
+ //5 卖家发货 == 交易关闭 ,全部点亮
|
398
|
expressInfoRespBo.setStage(1);
|
403
|
expressInfoRespBo.setStage(1);
|
399
|
if(OrderStatus.PLATFORM_RECEIVE.getCode()==status
|
404
|
if(OrderStatus.PLATFORM_RECEIVE.getCode()==status
|
400
|
||OrderStatus.PLATFORM_CHECKING.getCode()==status){
|
405
|
||OrderStatus.PLATFORM_CHECKING.getCode()==status){
|
|
@@ -403,6 +408,8 @@ public class ExpressInfoServiceImpl implements IExpressInfoService { |
|
@@ -403,6 +408,8 @@ public class ExpressInfoServiceImpl implements IExpressInfoService { |
403
|
expressInfoRespBo.setStage(3);
|
408
|
expressInfoRespBo.setStage(3);
|
404
|
}else if(OrderStatus.CHECKING_FAKE.getCode()==status){
|
409
|
}else if(OrderStatus.CHECKING_FAKE.getCode()==status){
|
405
|
expressInfoRespBo.setStage(4);
|
410
|
expressInfoRespBo.setStage(4);
|
|
|
411
|
+ }else if(OrderStatus.BUYER_CANCEL_BEFORE_DEPOT_RECEIVE.getCode()==status){
|
|
|
412
|
+ expressInfoRespBo.setStage(5);
|
406
|
}
|
413
|
}
|
407
|
}
|
414
|
}
|
408
|
|
415
|
|
|
@@ -415,7 +422,7 @@ public class ExpressInfoServiceImpl implements IExpressInfoService { |
|
@@ -415,7 +422,7 @@ public class ExpressInfoServiceImpl implements IExpressInfoService { |
415
|
}
|
422
|
}
|
416
|
//卖家物流详细
|
423
|
//卖家物流详细
|
417
|
List<ExpressInfo> previousExpressInfoList = getExpressInfoListByStage(actor, orderCode, EnumExpressType.EXPRESS_TYPE_1.getCode());
|
424
|
List<ExpressInfo> previousExpressInfoList = getExpressInfoListByStage(actor, orderCode, EnumExpressType.EXPRESS_TYPE_1.getCode());
|
418
|
- constructExpressInfo(previousExpressInfoList, expressInfoRespBo.getSupplementExpressInfoDetailList());
|
425
|
+ constructExpressInfo(actor,previousExpressInfoList, expressInfoRespBo.getSupplementExpressInfoDetailList());
|
419
|
}else if(EnumExpressType.EXPRESS_TYPE_3.getCode().intValue()==expressType.intValue()
|
426
|
}else if(EnumExpressType.EXPRESS_TYPE_3.getCode().intValue()==expressType.intValue()
|
420
|
||EnumExpressType.EXPRESS_TYPE_REBACK.getCode().intValue()==expressType.intValue()){
|
427
|
||EnumExpressType.EXPRESS_TYPE_REBACK.getCode().intValue()==expressType.intValue()){
|
421
|
//卖家这个时候看自己上一阶段的物流
|
428
|
//卖家这个时候看自己上一阶段的物流
|
|
@@ -425,7 +432,7 @@ public class ExpressInfoServiceImpl implements IExpressInfoService { |
|
@@ -425,7 +432,7 @@ public class ExpressInfoServiceImpl implements IExpressInfoService { |
425
|
constructWayBillInfo(orderCode,EnumExpressType.EXPRESS_TYPE_1.getCode(),expressInfoRespBo);
|
432
|
constructWayBillInfo(orderCode,EnumExpressType.EXPRESS_TYPE_1.getCode(),expressInfoRespBo);
|
426
|
}
|
433
|
}
|
427
|
List<ExpressInfo> previousExpressInfoList = getExpressInfoListByStage(actor,orderCode, EnumExpressType.EXPRESS_TYPE_1.getCode());
|
434
|
List<ExpressInfo> previousExpressInfoList = getExpressInfoListByStage(actor,orderCode, EnumExpressType.EXPRESS_TYPE_1.getCode());
|
428
|
- constructExpressInfo(previousExpressInfoList, expressInfoRespBo.getSupplementExpressInfoDetailList());
|
435
|
+ constructExpressInfo(actor,previousExpressInfoList, expressInfoRespBo.getSupplementExpressInfoDetailList());
|
429
|
}
|
436
|
}
|
430
|
|
437
|
|
431
|
}
|
438
|
}
|
|
@@ -505,20 +512,35 @@ public class ExpressInfoServiceImpl implements IExpressInfoService { |
|
@@ -505,20 +512,35 @@ public class ExpressInfoServiceImpl implements IExpressInfoService { |
505
|
if(EnumExpressType.EXPRESS_TYPE_JUDGE_CENTER.getCode().equals(expressType)){
|
512
|
if(EnumExpressType.EXPRESS_TYPE_JUDGE_CENTER.getCode().equals(expressType)){
|
506
|
LOGGER.info("getExpressInfoListByStage out because of expressType is judge center ,orderCode = {} ,expressType = {} ",orderCode,expressType);
|
513
|
LOGGER.info("getExpressInfoListByStage out because of expressType is judge center ,orderCode = {} ,expressType = {} ",orderCode,expressType);
|
507
|
List<ExpressInfo> ls = expressInfoMapper.selectByOrderCodeAndExpressType(orderCode,expressType);
|
514
|
List<ExpressInfo> ls = expressInfoMapper.selectByOrderCodeAndExpressType(orderCode,expressType);
|
508
|
- if(actor!=null&&TabType.BUY==actor&&CollectionUtils.isNotEmpty(ls)){
|
515
|
+ if(actor!=null&&CollectionUtils.isNotEmpty(ls)){
|
509
|
for(ExpressInfo info:ls){
|
516
|
for(ExpressInfo info:ls){
|
510
|
if(info.getOperateTransferCode()==null){
|
517
|
if(info.getOperateTransferCode()==null){
|
511
|
continue;
|
518
|
continue;
|
512
|
}
|
519
|
}
|
513
|
if(EnumExpressDataOperateTransferCode.mini_fault_create.getCode()==info.getOperateTransferCode()){
|
520
|
if(EnumExpressDataOperateTransferCode.mini_fault_create.getCode()==info.getOperateTransferCode()){
|
|
|
521
|
+ if(TabType.BUY==actor){
|
514
|
info.setAcceptRemark(EnumExpressDataOperateTransferCode.mini_fault_create_buyer.getOperateTransferDesc());
|
522
|
info.setAcceptRemark(EnumExpressDataOperateTransferCode.mini_fault_create_buyer.getOperateTransferDesc());
|
|
|
523
|
+ }
|
|
|
524
|
+
|
|
|
525
|
+ //存在需要瑕疵确认的信息
|
|
|
526
|
+ QualityCheck qualityCheck = qualityCheckMapper.selectByOrderCode(orderCode);
|
|
|
527
|
+ if(qualityCheck!=null
|
|
|
528
|
+ &&qualityCheck.getType()!=null
|
|
|
529
|
+ &&EnumQualityCheckType.MINI_FAULT.getCode()==qualityCheck.getType().intValue()){
|
|
|
530
|
+
|
|
|
531
|
+ info.setQualityCheck(qualityCheck);
|
|
|
532
|
+ }
|
515
|
}else if(EnumExpressDataOperateTransferCode.mini_fault_accept.getCode()==info.getOperateTransferCode()){
|
533
|
}else if(EnumExpressDataOperateTransferCode.mini_fault_accept.getCode()==info.getOperateTransferCode()){
|
|
|
534
|
+ if(TabType.BUY==actor){
|
516
|
info.setAcceptRemark(EnumExpressDataOperateTransferCode.mini_fault_accept_buyer.getOperateTransferDesc());
|
535
|
info.setAcceptRemark(EnumExpressDataOperateTransferCode.mini_fault_accept_buyer.getOperateTransferDesc());
|
|
|
536
|
+ }
|
517
|
}else if(EnumExpressDataOperateTransferCode.mini_fault_reject.getCode()==info.getOperateTransferCode()){
|
537
|
}else if(EnumExpressDataOperateTransferCode.mini_fault_reject.getCode()==info.getOperateTransferCode()){
|
|
|
538
|
+ if(TabType.BUY==actor){
|
518
|
info.setAcceptRemark(EnumExpressDataOperateTransferCode.mini_fault_reject_buyer.getOperateTransferDesc());
|
539
|
info.setAcceptRemark(EnumExpressDataOperateTransferCode.mini_fault_reject_buyer.getOperateTransferDesc());
|
519
|
}
|
540
|
}
|
520
|
}
|
541
|
}
|
521
|
}
|
542
|
}
|
|
|
543
|
+ }
|
522
|
return ls;
|
544
|
return ls;
|
523
|
}
|
545
|
}
|
524
|
ExpressRecord expressRecord = expressRecordMapper.selectByOrderCodeAndExpressType(orderCode,expressType);
|
546
|
ExpressRecord expressRecord = expressRecordMapper.selectByOrderCodeAndExpressType(orderCode,expressType);
|
|
@@ -562,7 +584,7 @@ public class ExpressInfoServiceImpl implements IExpressInfoService { |
|
@@ -562,7 +584,7 @@ public class ExpressInfoServiceImpl implements IExpressInfoService { |
562
|
ExpressInfo last=expressInfoList_All.get(0);
|
584
|
ExpressInfo last=expressInfoList_All.get(0);
|
563
|
List<ExpressInfo> expressInfoList = Arrays.asList(last);
|
585
|
List<ExpressInfo> expressInfoList = Arrays.asList(last);
|
564
|
List<ExpressInfoDetail> expressInfoDetailList= Lists.newArrayList();
|
586
|
List<ExpressInfoDetail> expressInfoDetailList= Lists.newArrayList();
|
565
|
- constructExpressInfo(expressInfoList,expressInfoDetailList);
|
587
|
+ constructExpressInfo(actor,expressInfoList,expressInfoDetailList);
|
566
|
|
588
|
|
567
|
LOGGER.info("queryLastExpressDetailInfo.queryExpressDetailInfo result = {}", JSON.toJSONString(expressInfoDetailList));
|
589
|
LOGGER.info("queryLastExpressDetailInfo.queryExpressDetailInfo result = {}", JSON.toJSONString(expressInfoDetailList));
|
568
|
return expressInfoDetailList;
|
590
|
return expressInfoDetailList;
|
|
@@ -634,7 +656,7 @@ public class ExpressInfoServiceImpl implements IExpressInfoService { |
|
@@ -634,7 +656,7 @@ public class ExpressInfoServiceImpl implements IExpressInfoService { |
634
|
}
|
656
|
}
|
635
|
|
657
|
|
636
|
|
658
|
|
637
|
- private void constructExpressInfo(List<ExpressInfo> expressInfoList, List<ExpressInfoDetail> detailList) {
|
659
|
+ private void constructExpressInfo(TabType actor,List<ExpressInfo> expressInfoList, List<ExpressInfoDetail> detailList) {
|
638
|
if (CollectionUtils.isNotEmpty(expressInfoList)) {
|
660
|
if (CollectionUtils.isNotEmpty(expressInfoList)) {
|
639
|
for (ExpressInfo expressInfo : expressInfoList) {
|
661
|
for (ExpressInfo expressInfo : expressInfoList) {
|
640
|
ExpressInfoDetail expressInfoDetail = new ExpressInfoDetail();
|
662
|
ExpressInfoDetail expressInfoDetail = new ExpressInfoDetail();
|
|
@@ -643,6 +665,22 @@ public class ExpressInfoServiceImpl implements IExpressInfoService { |
|
@@ -643,6 +665,22 @@ public class ExpressInfoServiceImpl implements IExpressInfoService { |
643
|
// 运单信息
|
665
|
// 运单信息
|
644
|
expressInfoDetail.setAcceptRemark(expressInfo.getAcceptRemark());
|
666
|
expressInfoDetail.setAcceptRemark(expressInfo.getAcceptRemark());
|
645
|
expressInfoDetail.setCreateTimeStr(DateUtil.formatDate(expressInfo.getCreateTime(), DateUtil.yyyy_MM_dd_HH_mm_SS));
|
667
|
expressInfoDetail.setCreateTimeStr(DateUtil.formatDate(expressInfo.getCreateTime(), DateUtil.yyyy_MM_dd_HH_mm_SS));
|
|
|
668
|
+
|
|
|
669
|
+ //瑕疵确认信息
|
|
|
670
|
+ if(expressInfo.getQualityCheck()!=null){
|
|
|
671
|
+ QualityCheck qualityCheck = expressInfo.getQualityCheck();
|
|
|
672
|
+ boolean showBtn=false;
|
|
|
673
|
+ if(TabType.BUY==actor&&qualityCheck.getStatus()!=null&&EnumQualityCheckStatus.WAIT_CONFIRM.getCode()==qualityCheck.getStatus().intValue()){
|
|
|
674
|
+ showBtn=true;
|
|
|
675
|
+ }
|
|
|
676
|
+ MiniFaultConfirm miniFaultConfirm=new MiniFaultConfirm();
|
|
|
677
|
+ miniFaultConfirm.setShowBtn(showBtn);
|
|
|
678
|
+ miniFaultConfirm.setCreateTime(qualityCheck.getCreateTime());
|
|
|
679
|
+ miniFaultConfirm.setText(qualityCheck.getCheckText());
|
|
|
680
|
+ miniFaultConfirm.setImageUrls(StringUtils.isEmpty(qualityCheck.getImageUrl())?new ArrayList<>():Arrays.asList(qualityCheck.getImageUrl().split(",")));
|
|
|
681
|
+ expressInfoDetail.setMiniFaultConfirm(miniFaultConfirm);
|
|
|
682
|
+ }
|
|
|
683
|
+
|
646
|
detailList.add(expressInfoDetail);
|
684
|
detailList.add(expressInfoDetail);
|
647
|
}
|
685
|
}
|
648
|
}
|
686
|
}
|