From b8cebfa38ff8cd2065431a8f18c79e480d64ff10 Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期一, 20 十月 2025 16:47:45 +0800
Subject: [PATCH] 修改

---
 ruoyi-system/src/main/resources/mapper/system/TSysOrderMapper.xml |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/ruoyi-system/src/main/resources/mapper/system/TSysOrderMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TSysOrderMapper.xml
index 2c3a41a..5d54654 100644
--- a/ruoyi-system/src/main/resources/mapper/system/TSysOrderMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/TSysOrderMapper.xml
@@ -50,7 +50,7 @@
         select count(1)
         from t_sys_order tso
                  left join t_sys_order_goods tsog on tso.id = tsog.order_id
-                 left join t_erp_goods teg on tepg.goods_id = teg.id
+                 left join t_erp_goods teg on tsog.goods_id = teg.id
         where tso.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
           and tso.clinic_id in <foreach collection="clinicIds" open="(" separator="," item="id" close=")">#{id}</foreach>
     </select>
@@ -58,7 +58,7 @@
         select count(1)
         from t_sys_order tso
                  left join t_sys_order_goods tsog on tso.id = tsog.order_id
-                 left join t_erp_goods teg on tepg.goods_id = teg.id
+                 left join t_erp_goods teg on tsog.goods_id = teg.id
         where tso.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
           and tso.clinic_id in <foreach collection="clinicIds" open="(" separator="," item="id" close=")">#{id}</foreach>
         group by teg.type_id
@@ -69,7 +69,7 @@
           and pay_time between #{startTime} and #{endTime}
           and clinic_id = #{clinicId}
     </select>
-    <select id="supplierSalesStatisticsGoodsType"
+    <select id="clinicSalesStatisticsGoodsType"
             resultType="com.ruoyi.system.vo.ClinicSalesStatisticsGoodsTypeVO">
         select count(1), tegt.type_name
         from t_sys_order tso
@@ -82,12 +82,12 @@
         group by teg.type_id
         order by count(1) desc
     </select>
-    <select id="supplierSalesStatisticsGoodsCount"
+    <select id="clinicSalesStatisticsGoodsCount"
             resultType="com.ruoyi.system.vo.ClinicSalesStatisticsGoodsCountVO">
         select
         date_format(t1.pay_time, '%m.%d') as `time`,
         date_format(t1.pay_time, '%Y-%m-%d') as payTime,
-        sum(t2.purchase_count) as goodsCount
+        sum(t2.sale_count) as goodsCount
         from t_sys_order t1
         left join t_sys_order_goods t2 on t1.id = t2.order_id
         where t1.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
@@ -98,11 +98,11 @@
         </if>
         group by date_format(t1.pay_time, '%m.%d')
     </select>
-    <select id="supplierSalesStatisticsGoodsCountMonth"
+    <select id="clinicSalesStatisticsGoodsCountMonth"
             resultType="com.ruoyi.system.vo.ClinicSalesStatisticsGoodsCountVO">
         select
         date_format(t1.pay_time, '%Y.%m') as `time`,
-        sum(t2.purchase_count) as goodsCount
+        sum(t2.sale_count) as goodsCount
         from t_sys_order t1
         left join t_sys_order_goods t2 on t1.id = t2.order_id
         where t1.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}

--
Gitblit v1.7.1