Преглед на файлове

优化 采购统计不正确的问题

wuxw преди 2 години
родител
ревизия
43af0be82e
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  1. 4 0
      java110-db/src/main/resources/mapper/report/ReportInoutStatisticsServiceDaoImplMapper.xml

+ 4 - 0
java110-db/src/main/resources/mapper/report/ReportInoutStatisticsServiceDaoImplMapper.xml

@@ -57,6 +57,7 @@
         inner join purchase_apply pa on t.apply_order_id = pa.apply_order_id and pa.res_order_type = '10000' and pa.status_cd = '0' and pa.state  in ('1003','1002')
         where 1=1
         and pa.store_id = #{storeId}
+        and pa.community_id = #{communityId}
         and t.create_time > #{startDate}
         and t.create_time < #{endDate}
         and t.status_cd = '0'
@@ -68,6 +69,7 @@
         inner join purchase_apply pa on t.apply_order_id = pa.apply_order_id and pa.res_order_type = '20000' and pa.status_cd = '0' and pa.state  in ('1003','1002')
         where 1=1
         and pa.store_id = #{storeId}
+        and pa.community_id = #{communityId}
         and t.create_time > #{startDate}
         and t.create_time < #{endDate}
         and t.status_cd = '0'
@@ -79,6 +81,7 @@
         inner join purchase_apply pa on t.apply_order_id = pa.apply_order_id and pa.res_order_type = '10000' and pa.status_cd = '0' and pa.state  in ('1003','1002')
         where 1=1
         and pa.store_id = #{storeId}
+        and pa.community_id = #{communityId}
         and t.create_time > #{startDate}
         and t.create_time < #{endDate}
         and t.status_cd = '0'
@@ -90,6 +93,7 @@
         inner join purchase_apply pa on t.apply_order_id = pa.apply_order_id and pa.res_order_type = '20000' and pa.status_cd = '0' and pa.state  in ('1003','1002')
         where 1=1
         and pa.store_id = #{storeId}
+        and pa.community_id = #{communityId}
         and t.create_time > #{startDate}
         and t.create_time < #{endDate}
         and t.status_cd = '0'