|
@@ -147,8 +147,13 @@ func OrderList(header *protocol.RequestHeader, request *protocol.OrderListReques |
|
@@ -147,8 +147,13 @@ func OrderList(header *protocol.RequestHeader, request *protocol.OrderListReques |
147
|
_, orders, _ = OrderResponsitory.Find(utils.ObjectJsonToMap(queryOption))
|
147
|
_, orders, _ = OrderResponsitory.Find(utils.ObjectJsonToMap(queryOption))
|
148
|
//统计数据
|
148
|
//统计数据
|
149
|
if request.PageIndex == 0 {
|
149
|
if request.PageIndex == 0 {
|
|
|
150
|
+ var (
|
|
|
151
|
+ partShipmentQuantity, allShipmentQuantity int
|
|
|
152
|
+ //cumulativeQuantity,
|
|
|
153
|
+ intentionQuantity int
|
|
|
154
|
+ )
|
150
|
//部分发货的订单数量
|
155
|
//部分发货的订单数量
|
151
|
- rsp.Statistics["partShipmentQuantity"], _, err = OrderDao.OrderStatics(&domain.OrderStaticQuery{
|
156
|
+ partShipmentQuantity, _, err = OrderDao.OrderStatics(&domain.OrderStaticQuery{
|
152
|
EndTime: request.EndTime,
|
157
|
EndTime: request.EndTime,
|
153
|
BeginTime: request.StartTime,
|
158
|
BeginTime: request.StartTime,
|
154
|
OrderType: domain.OrderReal,
|
159
|
OrderType: domain.OrderReal,
|
|
@@ -156,23 +161,20 @@ func OrderList(header *protocol.RequestHeader, request *protocol.OrderListReques |
|
@@ -156,23 +161,20 @@ func OrderList(header *protocol.RequestHeader, request *protocol.OrderListReques |
156
|
OrderStatus: domain.OrderStatusDeliverSome,
|
161
|
OrderStatus: domain.OrderStatusDeliverSome,
|
157
|
})
|
162
|
})
|
158
|
//全部发货的订单数量
|
163
|
//全部发货的订单数量
|
159
|
- rsp.Statistics["allShipmentQuantity"], _, err = OrderDao.OrderStatics(&domain.OrderStaticQuery{
|
164
|
+ allShipmentQuantity, _, err = OrderDao.OrderStatics(&domain.OrderStaticQuery{
|
160
|
EndTime: request.EndTime,
|
165
|
EndTime: request.EndTime,
|
161
|
BeginTime: request.StartTime,
|
166
|
BeginTime: request.StartTime,
|
162
|
OrderType: domain.OrderReal,
|
167
|
OrderType: domain.OrderReal,
|
163
|
PartnerId: header.UserId,
|
168
|
PartnerId: header.UserId,
|
164
|
OrderStatus: domain.OrderStatusDeliverAll,
|
169
|
OrderStatus: domain.OrderStatusDeliverAll,
|
165
|
})
|
170
|
})
|
166
|
- var (
|
|
|
167
|
- cumulativeQuantity, intentionQuantity int
|
|
|
168
|
- )
|
|
|
169
|
//累计实发订单
|
171
|
//累计实发订单
|
170
|
- cumulativeQuantity, _, err = OrderDao.OrderStatics(&domain.OrderStaticQuery{
|
|
|
171
|
- EndTime: request.EndTime,
|
|
|
172
|
- BeginTime: request.StartTime,
|
|
|
173
|
- OrderType: domain.OrderReal,
|
|
|
174
|
- PartnerId: header.UserId,
|
|
|
175
|
- })
|
172
|
+ //cumulativeQuantity, _, err = OrderDao.OrderStatics(&domain.OrderStaticQuery{
|
|
|
173
|
+ // EndTime: request.EndTime,
|
|
|
174
|
+ // BeginTime: request.StartTime,
|
|
|
175
|
+ // OrderType: domain.OrderReal,
|
|
|
176
|
+ // PartnerId: header.UserId,
|
|
|
177
|
+ //})
|
176
|
//累计意向订单
|
178
|
//累计意向订单
|
177
|
intentionQuantity, _, err = OrderDao.OrderStatics(&domain.OrderStaticQuery{
|
179
|
intentionQuantity, _, err = OrderDao.OrderStatics(&domain.OrderStaticQuery{
|
178
|
EndTime: request.EndTime,
|
180
|
EndTime: request.EndTime,
|
|
@@ -181,8 +183,10 @@ func OrderList(header *protocol.RequestHeader, request *protocol.OrderListReques |
|
@@ -181,8 +183,10 @@ func OrderList(header *protocol.RequestHeader, request *protocol.OrderListReques |
181
|
PartnerId: header.UserId,
|
183
|
PartnerId: header.UserId,
|
182
|
})
|
184
|
})
|
183
|
//订单数量
|
185
|
//订单数量
|
184
|
- rsp.Statistics["orderQuantity"] = cumulativeQuantity + intentionQuantity
|
|
|
185
|
- rsp.Statistics["cumulativeQuantity"] = cumulativeQuantity
|
186
|
+ rsp.Statistics["partShipmentQuantity"] = partShipmentQuantity
|
|
|
187
|
+ rsp.Statistics["allShipmentQuantity"] = allShipmentQuantity
|
|
|
188
|
+ rsp.Statistics["orderQuantity"] = partShipmentQuantity + allShipmentQuantity //所有订单 = 部分发货 + 已经发货
|
|
|
189
|
+ rsp.Statistics["cumulativeQuantity"] = partShipmentQuantity + allShipmentQuantity //实发订单 = 部分发货 + 全部发货
|
186
|
rsp.Statistics["intentionQuantity"] = intentionQuantity
|
190
|
rsp.Statistics["intentionQuantity"] = intentionQuantity
|
187
|
|
191
|
|
188
|
}
|
192
|
}
|