Browse Source

[update] 整件单取消数计算错误问题修复

miajio 3 days ago
parent
commit
34ed190e9b

+ 6 - 2
warehouse-admin-data/src/main/resources/mapper/statistics/BillingQuantityStatisticsMapper.xml

@@ -55,7 +55,9 @@
         from yr_aggregation_pick_detail as apd
         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.status = 'CANCEL'
+        group by api.area_staff_id, apd.goods_id
+        )
         select areaStaffId, goodsId, sum(pickingNumber) as totalNum
         from cancel_data
         where areaStaffId IS NOT NULL
@@ -84,7 +86,9 @@
         from yr_aggregation_pick_detail as apd
         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.status = 'OUT_CANCEL'
+        group by api.area_staff_id, apd.goods_id
+        )
         select areaStaffId, goodsId, sum(pickingNumber) as totalNum
         from cancel_data
         where areaStaffId IS NOT NULL