Forráskód Böngészése

fix(statistics):优化统计查询条件过滤逻辑

- 在收益统计中增加支付状态过滤条件- 在机构收益明细中增加类型过滤条件
- 确保统计数据准确性避免重复计算- 提高查询性能减少不必要的数据加载
- 完善动态条件判断防止空值异常
- 统一SQL查询参数命名规范
SheepHy 1 hete
szülő
commit
7e6ea99a87

+ 2 - 2
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/xml/StatisticsMapper.xml

@@ -302,7 +302,7 @@
                     nm_order o
                         LEFT JOIN nm_profit_sharing_info b ON o.org_code = b.org_code
                 WHERE
-                    o.profit_sharing_status IN (0, 1, 2)
+                    o.profit_sharing_status IN (0, 1, 2) AND o.pay_status = 1
                 GROUP BY
                     o.org_code
             ) settled ON a.org_code = settled.org_code
@@ -386,7 +386,7 @@
         a.price > 0
         AND a.type NOT IN (3, 4, 6)
         AND b.pre_amount > 0
-        AND c.org_code = #{orgCode}
+        AND c.org_code = #{orgCode} AND b.type = 1
         <!-- 动态条件 -->
         <if test="incomeExpenseType != null and incomeExpenseType != '' and incomeExpenseType != '全部'">
             AND (