综合销售情况表 sql 调整

This commit is contained in:
king
2026-03-26 08:34:43 +08:00
parent 7d627b7f35
commit cd89f7cfa8

View File

@@ -391,7 +391,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
new_gr_bi_sa_agg_month_count
<where>
<if test="saAggParam.useYear != null and saAggParam.useYear != ''"> and use_year = #{saAggParam.useYear}</if>
<if test="saAggParam.useMonth != null "> and use_month = #{saAggParam.useMonth}</if>
<if test="saAggParam.useMonth != null and saAggParam.useMonth != ''"> and use_month = #{saAggParam.useMonth}</if>
<if test="saAggParam.zoneName != null and saAggParam.zoneName != ''"> and zone_name in
<foreach collection="saAggParam.zoneName" item="name" open="(" separator="," close=")">
#{name}
@@ -573,8 +573,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
FROM new_gr_bi_sa_agg_month_count
<where>
<if test="saAggParam.useYear != null and saAggParam.useYear != ''"> and use_year = #{saAggParam.useYear }- 1</if>
<if test="saAggParam.useMonth != null "> and use_month = #{saAggParam.useMonth}</if>
<if test="saAggParam.zoneName != null and zoneName != ''"> and zone_name in
<if test="saAggParam.useMonth != null and saAggParam.useMonth != ''"> and use_month = #{saAggParam.useMonth}</if>
<if test="saAggParam.zoneName != null and saAggParam.zoneName != ''"> and zone_name in
<foreach collection="saAggParam.zoneName" item="name" open="(" separator="," close=")">
#{name}
</foreach>
@@ -679,7 +679,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
) total_month_data ON total_month_data.use_year = current_month.use_year
<where>
<if test="saAggParam.useYear != null and saAggParam.useYear != ''"> and current_month.use_year = #{saAggParam.useYear}</if>
<if test="saAggParam.useMonth != null "> and current_month.use_month = #{saAggParam.useMonth}</if>
<if test="saAggParam.useMonth != null and saAggParam.useMonth != ''"> and current_month.use_month = #{saAggParam.useMonth}</if>
<if test="saAggParam.zoneName != null and saAggParam.zoneName != ''"> and current_month.zone_name in
<foreach collection="saAggParam.zoneName" item="name" open="(" separator="," close=")">
#{name}