Browse Source

[update] 取消数统计逻辑修改未拣货后取消

miajio 2 days ago
parent
commit
d6a6221f7c

+ 4 - 0
warehouse-admin-data/src/main/resources/mapper/statistics/BillingQuantityStatisticsMapper.xml

@@ -47,6 +47,7 @@
         where poi.modify_time between #{beginTime} and #{endTime}
         and pod.is_aggregation = 0
         and poi.picking_status = 3
+        and poi.picking_time is not null
         group by poi.area_staff_id, pod.goods_id
         union all
         select api.area_staff_id as areaStaffId,
@@ -56,6 +57,7 @@
         left join yr_aggregation_pick_info as api on apd.order_number = api.order_number
         where api.modify_time between #{beginTime} and #{endTime}
         and api.status = 'CANCEL'
+        and api.picking_time is not null
         group by api.area_staff_id, apd.goods_id
         )
         select areaStaffId, goodsId, sum(pickingNumber) as totalNum
@@ -78,6 +80,7 @@
         where poi.modify_time between #{beginTime} and #{endTime}
         and pod.is_aggregation = 0
         and poi.picking_status = 4
+        and poi.picking_time is not null
         group by poi.area_staff_id, pod.goods_id
         union all
         select api.area_staff_id as areaStaffId,
@@ -87,6 +90,7 @@
         left join yr_aggregation_pick_info as api on apd.order_number = api.order_number
         where api.modify_time between #{beginTime} and #{endTime}
         and api.status = 'OUT_CANCEL'
+        and api.picking_time is not null
         group by api.area_staff_id, apd.goods_id
         )
         select areaStaffId, goodsId, sum(pickingNumber) as totalNum