...
|
...
|
@@ -680,6 +680,23 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
return jsonObject;
|
|
|
}
|
|
|
|
|
|
//计算附加信息
|
|
|
buildExtraInfo(jsonObject, orderList, sellerWaybillCode);
|
|
|
|
|
|
List<BuyerOrderResp> respList = buildBuyerOrderRespForQc(orderList);
|
|
|
if(CollectionUtils.isEmpty(respList)) {
|
|
|
return jsonObject;
|
|
|
}
|
|
|
|
|
|
result.setPage(1);
|
|
|
result.setList(respList);
|
|
|
result.setSize(respList.size());
|
|
|
result.setTotal(respList.size());
|
|
|
|
|
|
return jsonObject;
|
|
|
}
|
|
|
|
|
|
private void buildExtraInfo(JSONObject jsonObject, List<BuyerOrder> orderList, String sellerWaybillCode){
|
|
|
jsonObject.replace("orderNum", orderList.size());
|
|
|
|
|
|
//是否是异常包裹
|
...
|
...
|
@@ -693,7 +710,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
int receivedNum = 0;
|
|
|
for(BuyerOrder order : orderList) {
|
|
|
if(order.getStatus().equals(Constant.BUYER_ORDER_STATUS_BUYER_CANCEL_AFTER_SELLER_DELIVERY.getByteVal())
|
|
|
|| order.getStatus().equals(Constant.CS_CANCEL_AUTO_BEFORE_DEPOT_RECEIVE.getByteVal())) {
|
|
|
|| order.getStatus().equals(Constant.CS_CANCEL_BEFORE_DEPOT_RECEIVE.getByteVal())) {
|
|
|
canceledNum += 1;
|
|
|
}else if(!order.getStatus().equals(Constant.BUYER_ORDER_STATUS_ALLOCATING.getByteVal())){
|
|
|
receivedNum +=1;
|
...
|
...
|
@@ -703,25 +720,14 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
if(canceledNum > 0) {
|
|
|
jsonObject.replace("exceptionBtn", jsonObject.getIntValue("isExceptionPackage") == 1 ? 0: 1);//0:按钮不展示 1:按钮展示
|
|
|
jsonObject.replace("canceledNum", canceledNum);
|
|
|
jsonObject.replace("receiveBtn", 0);
|
|
|
}
|
|
|
|
|
|
jsonObject.replace("receivedNum", receivedNum);
|
|
|
if(receivedNum != orderList.size()){
|
|
|
if(orderList.size() - receivedNum - canceledNum > 0 && canceledNum == 0){
|
|
|
jsonObject.replace("receiveBtn", jsonObject.getIntValue("isExceptionPackage") == 1 ? 0: 1);//0:按钮不展示 1:按钮展示
|
|
|
}
|
|
|
|
|
|
List<BuyerOrderResp> respList = buildBuyerOrderRespForQc(orderList);
|
|
|
if(CollectionUtils.isEmpty(respList)) {
|
|
|
return jsonObject;
|
|
|
}
|
|
|
|
|
|
result.setPage(1);
|
|
|
result.setList(respList);
|
|
|
result.setSize(respList.size());
|
|
|
result.setTotal(respList.size());
|
|
|
|
|
|
return jsonObject;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
private void buildIsSignForPackage(List<BuyerOrderResp> respList, String sellerWaybillCode) {
|
|
|
BuyerOrderReq buyerOrderReq = new BuyerOrderReq();
|
...
|
...
|
|