소스 검색

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

miajio 3 일 전
부모
커밋
34ed190e9b
1개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제
  1. 6 2
      warehouse-admin-data/src/main/resources/mapper/statistics/BillingQuantityStatisticsMapper.xml

+ 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