...
|
...
|
@@ -147,8 +147,13 @@ func OrderList(header *protocol.RequestHeader, request *protocol.OrderListReques |
|
|
_, orders, _ = OrderResponsitory.Find(utils.ObjectJsonToMap(queryOption))
|
|
|
//统计数据
|
|
|
if request.PageIndex == 0 {
|
|
|
var (
|
|
|
partShipmentQuantity, allShipmentQuantity int
|
|
|
//cumulativeQuantity,
|
|
|
intentionQuantity int
|
|
|
)
|
|
|
//部分发货的订单数量
|
|
|
rsp.Statistics["partShipmentQuantity"], _, err = OrderDao.OrderStatics(&domain.OrderStaticQuery{
|
|
|
partShipmentQuantity, _, err = OrderDao.OrderStatics(&domain.OrderStaticQuery{
|
|
|
EndTime: request.EndTime,
|
|
|
BeginTime: request.StartTime,
|
|
|
OrderType: domain.OrderReal,
|
...
|
...
|
@@ -156,23 +161,20 @@ func OrderList(header *protocol.RequestHeader, request *protocol.OrderListReques |
|
|
OrderStatus: domain.OrderStatusDeliverSome,
|
|
|
})
|
|
|
//全部发货的订单数量
|
|
|
rsp.Statistics["allShipmentQuantity"], _, err = OrderDao.OrderStatics(&domain.OrderStaticQuery{
|
|
|
allShipmentQuantity, _, err = OrderDao.OrderStatics(&domain.OrderStaticQuery{
|
|
|
EndTime: request.EndTime,
|
|
|
BeginTime: request.StartTime,
|
|
|
OrderType: domain.OrderReal,
|
|
|
PartnerId: header.UserId,
|
|
|
OrderStatus: domain.OrderStatusDeliverAll,
|
|
|
})
|
|
|
var (
|
|
|
cumulativeQuantity, intentionQuantity int
|
|
|
)
|
|
|
//累计实发订单
|
|
|
cumulativeQuantity, _, err = OrderDao.OrderStatics(&domain.OrderStaticQuery{
|
|
|
EndTime: request.EndTime,
|
|
|
BeginTime: request.StartTime,
|
|
|
OrderType: domain.OrderReal,
|
|
|
PartnerId: header.UserId,
|
|
|
})
|
|
|
//cumulativeQuantity, _, err = OrderDao.OrderStatics(&domain.OrderStaticQuery{
|
|
|
// EndTime: request.EndTime,
|
|
|
// BeginTime: request.StartTime,
|
|
|
// OrderType: domain.OrderReal,
|
|
|
// PartnerId: header.UserId,
|
|
|
//})
|
|
|
//累计意向订单
|
|
|
intentionQuantity, _, err = OrderDao.OrderStatics(&domain.OrderStaticQuery{
|
|
|
EndTime: request.EndTime,
|
...
|
...
|
@@ -181,8 +183,10 @@ func OrderList(header *protocol.RequestHeader, request *protocol.OrderListReques |
|
|
PartnerId: header.UserId,
|
|
|
})
|
|
|
//订单数量
|
|
|
rsp.Statistics["orderQuantity"] = cumulativeQuantity + intentionQuantity
|
|
|
rsp.Statistics["cumulativeQuantity"] = cumulativeQuantity
|
|
|
rsp.Statistics["partShipmentQuantity"] = partShipmentQuantity
|
|
|
rsp.Statistics["allShipmentQuantity"] = allShipmentQuantity
|
|
|
rsp.Statistics["orderQuantity"] = partShipmentQuantity + allShipmentQuantity //所有订单 = 部分发货 + 已经发货
|
|
|
rsp.Statistics["cumulativeQuantity"] = partShipmentQuantity + allShipmentQuantity //实发订单 = 部分发货 + 全部发货
|
|
|
rsp.Statistics["intentionQuantity"] = intentionQuantity
|
|
|
|
|
|
}
|
...
|
...
|
|