|
@@ -6,9 +6,11 @@ import com.iamberry.rst.core.cm.SalesOrderItem;
|
|
import com.iamberry.rst.core.cm.StoreShip;
|
|
import com.iamberry.rst.core.cm.StoreShip;
|
|
import com.iamberry.rst.core.order.EOrderRequestData;
|
|
import com.iamberry.rst.core.order.EOrderRequestData;
|
|
import com.iamberry.rst.core.order.PostInfo;
|
|
import com.iamberry.rst.core.order.PostInfo;
|
|
|
|
+import com.iamberry.rst.core.order.PostOrderNum;
|
|
import com.iamberry.rst.core.order.ProductColor;
|
|
import com.iamberry.rst.core.order.ProductColor;
|
|
import com.iamberry.rst.core.page.PagedResult;
|
|
import com.iamberry.rst.core.page.PagedResult;
|
|
import com.iamberry.rst.core.tools.LogisticsInfo;
|
|
import com.iamberry.rst.core.tools.LogisticsInfo;
|
|
|
|
+import com.iamberry.rst.faces.cm.PostOrderNumService;
|
|
import com.iamberry.rst.faces.cm.SalesOrderService;
|
|
import com.iamberry.rst.faces.cm.SalesOrderService;
|
|
import com.iamberry.rst.faces.cm.StoreShipService;
|
|
import com.iamberry.rst.faces.cm.StoreShipService;
|
|
import com.iamberry.rst.faces.order.LogisticsInfoService;
|
|
import com.iamberry.rst.faces.order.LogisticsInfoService;
|
|
@@ -55,6 +57,8 @@ public class AwaitSendController {
|
|
private LogisticsInfoService logisticsInfoService;
|
|
private LogisticsInfoService logisticsInfoService;
|
|
@Autowired
|
|
@Autowired
|
|
private ProductService productService;
|
|
private ProductService productService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private PostOrderNumService postOrderNumService;
|
|
|
|
|
|
|
|
|
|
private static final Logger LOGGER = LoggerFactory.getLogger(AwaitSendController.class);
|
|
private static final Logger LOGGER = LoggerFactory.getLogger(AwaitSendController.class);
|
|
@@ -685,7 +689,6 @@ public class AwaitSendController {
|
|
rj.setResultMsg("出库成功");
|
|
rj.setResultMsg("出库成功");
|
|
}
|
|
}
|
|
return rj;
|
|
return rj;
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -701,6 +704,59 @@ public class AwaitSendController {
|
|
return mv;
|
|
return mv;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 快递统计
|
|
|
|
+ * @param request
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @ResponseBody
|
|
|
|
+ @RequiresPermissions("salesOrder:post_statistics:deliver")
|
|
|
|
+ @RequestMapping("/getPostStatistics")
|
|
|
|
+ public ResponseJson getPostStatistics(HttpServletRequest request) {
|
|
|
|
+ ResponseJson rj = ResponseJson.getSUCCESS();
|
|
|
|
+ SalesOrder salesOrder = new SalesOrder();
|
|
|
|
+ List<PostOrderNum> postOrderNumList = postOrderNumService.getAllNum(salesOrder);
|
|
|
|
+
|
|
|
|
+ List<PostOrderNum> postProductNumList = postOrderNumService.getProductNum(salesOrder);
|
|
|
|
+
|
|
|
|
+ salesOrder.setSalesShippingStatus(1);
|
|
|
|
+ List<PostOrderNum> postSendNumList = postOrderNumService.getAllNum(salesOrder);
|
|
|
|
+
|
|
|
|
+ salesOrder.setSalesDeliver(2);
|
|
|
|
+ List<PostOrderNum> postDeliverNumList = postOrderNumService.getAllNum(salesOrder);
|
|
|
|
+
|
|
|
|
+ postOrderNumList = this.margeList(postOrderNumList,postProductNumList);
|
|
|
|
+ postOrderNumList = this.margeList(postOrderNumList,postSendNumList);
|
|
|
|
+ postOrderNumList = this.margeList(postOrderNumList,postDeliverNumList);
|
|
|
|
+ rj.addResponseKeyValue("postOrderNumList",postOrderNumList);
|
|
|
|
+ return rj;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 合并集合
|
|
|
|
+ * @param oneList
|
|
|
|
+ * @param twoList
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ private List<PostOrderNum> margeList(List<PostOrderNum> oneList,List<PostOrderNum> twoList){
|
|
|
|
+ for (PostOrderNum onePostOrderNum : oneList) {
|
|
|
|
+ for (PostOrderNum twoPostOrderNum:twoList) {
|
|
|
|
+ if(onePostOrderNum.getLogisticsId().equals(twoPostOrderNum.getLogisticsId())){
|
|
|
|
+ if(twoPostOrderNum.getLogisticsProductNum() != null){
|
|
|
|
+ onePostOrderNum.setLogisticsProductNum(twoPostOrderNum.getLogisticsProductNum());
|
|
|
|
+ }
|
|
|
|
+ if(twoPostOrderNum.getLogisticsSendNum() != null){
|
|
|
|
+ onePostOrderNum.setLogisticsSendNum(twoPostOrderNum.getLogisticsSendNum());
|
|
|
|
+ }
|
|
|
|
+ if(twoPostOrderNum.getLogisticsDeliverNum() != null){
|
|
|
|
+ onePostOrderNum.setLogisticsDeliverNum(twoPostOrderNum.getLogisticsDeliverNum());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return oneList;
|
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
/**
|
|
* 跳转订单统计页面
|
|
* 跳转订单统计页面
|
|
@@ -714,10 +770,4 @@ public class AwaitSendController {
|
|
return mv;
|
|
return mv;
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
}
|
|
}
|