From 8c35f89b35488a27739024febbaf1bd55cc275a8 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期一, 29 五月 2023 12:54:27 +0800
Subject: [PATCH] optmize
---
java110-db/src/main/resources/mapper/report/ReportInoutStatisticsServiceDaoImplMapper.xml | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/java110-db/src/main/resources/mapper/report/ReportInoutStatisticsServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/report/ReportInoutStatisticsServiceDaoImplMapper.xml
index ff008ce..6e7196e 100644
--- a/java110-db/src/main/resources/mapper/report/ReportInoutStatisticsServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/report/ReportInoutStatisticsServiceDaoImplMapper.xml
@@ -56,7 +56,7 @@
select IFNULL(sum(t.quantity),0) count from purchase_apply_detail t
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 t.community_id = #{communityId}
+ and pa.store_id = #{storeId}
and t.create_time > #{startDate}
and t.create_time < #{endDate}
and t.status_cd = '0'
@@ -67,7 +67,7 @@
select IFNULL(sum(t.quantity),0) count from purchase_apply_detail t
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 t.community_id = #{communityId}
+ and pa.store_id = #{storeId}
and t.create_time > #{startDate}
and t.create_time < #{endDate}
and t.status_cd = '0'
@@ -78,7 +78,7 @@
select IFNULL(sum(t.quantity*t.price),0) amount from purchase_apply_detail t
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 t.community_id = #{communityId}
+ and pa.store_id = #{storeId}
and t.create_time > #{startDate}
and t.create_time < #{endDate}
and t.status_cd = '0'
@@ -89,7 +89,7 @@
select IFNULL(sum(t.quantity*t.price),0) amount from purchase_apply_detail t
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 t.store_id = #{storeId}
+ and pa.store_id = #{storeId}
and t.create_time > #{startDate}
and t.create_time < #{endDate}
and t.status_cd = '0'
--
Gitblit v1.8.0