...
|
...
|
@@ -100,13 +100,13 @@ import com.yoho.ufo.order.constant.OrderConfigConstant; |
|
|
import com.yoho.ufo.order.request.OrderOperateTask;
|
|
|
import com.yoho.ufo.order.request.SaveQualityCheckInfoRequest;
|
|
|
import com.yoho.ufo.order.service.IBuyerOrderService;
|
|
|
import com.yoho.ufo.order.service.event.DepotNumUpdateEvent;
|
|
|
import com.yoho.ufo.service.impl.UfoServiceCaller;
|
|
|
import com.yoho.ufo.service.impl.UserHelper;
|
|
|
import com.yoho.ufo.service.model.PageResponseBO;
|
|
|
import com.yoho.ufo.util.DateUtil;
|
|
|
import com.yoho.ufo.util.ImagesConstant;
|
|
|
import com.yoho.ufo.util.ImagesHelper;
|
|
|
import com.yoho.ufo.util.ListUtil;
|
|
|
import com.yoho.ufo.util.MobileHelper;
|
|
|
import com.yoho.ufo.util.OrderVideoUrlUtil;
|
|
|
import com.yohobuy.ufo.model.order.bo.AppraiseExpressInfoBo;
|
...
|
...
|
@@ -444,25 +444,44 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon |
|
|
resultMap.put("alreadyDeliverNum", alreadyDeliverNum);
|
|
|
resultMap.put("problemNum", problemNum);
|
|
|
//查询异常包裹
|
|
|
resultMap.put("exceptionNum", abnormalPackageMapper.selectValidCnt(queryStr, depotNo));
|
|
|
resultMap.put("exceptionNum", getExceptionNum(queryStr, depotNo));
|
|
|
|
|
|
return resultMap;
|
|
|
}
|
|
|
|
|
|
private int getExceptionNum(String queryStr, Integer depotNo) {
|
|
|
//先按订单号查对应的异常包裹
|
|
|
ExpressRecord expressRecord = expressRecordMapper.selectByOrderCodeAndType(queryStr, null, EXPRESS_TYPE_SELLER_TO_JUDGE);
|
|
|
if(null != expressRecord) {
|
|
|
return abnormalPackageMapper.selectValidCnt(expressRecord.getWaybillCode(), depotNo);
|
|
|
}
|
|
|
|
|
|
return abnormalPackageMapper.selectValidCnt(queryStr, depotNo);
|
|
|
}
|
|
|
|
|
|
private List<BuyerOrder> queryOrderByQueryStr(String queryStr, Integer depotNo, Byte status) {
|
|
|
//按卖家运单号来查
|
|
|
//先按订单号来查
|
|
|
BuyerOrderReq req = new BuyerOrderReq();
|
|
|
req = new BuyerOrderReq();
|
|
|
req.setSellerWaybillCode(queryStr);
|
|
|
req.setDepotNo(depotNo);
|
|
|
req.setStatus(status);
|
|
|
req.setSize(100);
|
|
|
List<BuyerOrder> list = buyerOrderMapper.selectByCondition(req);
|
|
|
if(CollectionUtils.isEmpty(list)){
|
|
|
return Lists.newArrayList();
|
|
|
}
|
|
|
req.setOrderCode(queryStr);
|
|
|
req.setDepotNo(depotNo);
|
|
|
req.setStatus(status);
|
|
|
req.setSize(100);
|
|
|
List<BuyerOrder> orderList = buyerOrderMapper.selectByCondition(req);
|
|
|
if(CollectionUtils.isEmpty(orderList)){//再按卖家运单号来查
|
|
|
req = new BuyerOrderReq();
|
|
|
req.setSellerWaybillCode(queryStr);
|
|
|
req.setDepotNo(depotNo);
|
|
|
req.setStatus(status);
|
|
|
req.setSize(100);
|
|
|
List<BuyerOrder> list = buyerOrderMapper.selectByCondition(req);
|
|
|
if(CollectionUtils.isEmpty(list)){
|
|
|
return Lists.newArrayList();
|
|
|
}
|
|
|
|
|
|
return list;
|
|
|
return list;
|
|
|
}else{
|
|
|
return orderList;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public Map<String, Integer> getCountByOrderStatus(){
|
...
|
...
|
|