综合销售情况表 sql 调整
This commit is contained in:
@@ -391,7 +391,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
new_gr_bi_sa_agg_month_count
|
new_gr_bi_sa_agg_month_count
|
||||||
<where>
|
<where>
|
||||||
<if test="saAggParam.useYear != null and saAggParam.useYear != ''"> and use_year = #{saAggParam.useYear}</if>
|
<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
|
<if test="saAggParam.zoneName != null and saAggParam.zoneName != ''"> and zone_name in
|
||||||
<foreach collection="saAggParam.zoneName" item="name" open="(" separator="," close=")">
|
<foreach collection="saAggParam.zoneName" item="name" open="(" separator="," close=")">
|
||||||
#{name}
|
#{name}
|
||||||
@@ -573,8 +573,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
FROM new_gr_bi_sa_agg_month_count
|
FROM new_gr_bi_sa_agg_month_count
|
||||||
<where>
|
<where>
|
||||||
<if test="saAggParam.useYear != null and saAggParam.useYear != ''"> and use_year = #{saAggParam.useYear }- 1</if>
|
<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.useMonth != null and saAggParam.useMonth != ''"> and use_month = #{saAggParam.useMonth}</if>
|
||||||
<if test="saAggParam.zoneName != null and zoneName != ''"> and zone_name in
|
<if test="saAggParam.zoneName != null and saAggParam.zoneName != ''"> and zone_name in
|
||||||
<foreach collection="saAggParam.zoneName" item="name" open="(" separator="," close=")">
|
<foreach collection="saAggParam.zoneName" item="name" open="(" separator="," close=")">
|
||||||
#{name}
|
#{name}
|
||||||
</foreach>
|
</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
|
) total_month_data ON total_month_data.use_year = current_month.use_year
|
||||||
<where>
|
<where>
|
||||||
<if test="saAggParam.useYear != null and saAggParam.useYear != ''"> and current_month.use_year = #{saAggParam.useYear}</if>
|
<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
|
<if test="saAggParam.zoneName != null and saAggParam.zoneName != ''"> and current_month.zone_name in
|
||||||
<foreach collection="saAggParam.zoneName" item="name" open="(" separator="," close=")">
|
<foreach collection="saAggParam.zoneName" item="name" open="(" separator="," close=")">
|
||||||
#{name}
|
#{name}
|
||||||
|
|||||||
Reference in New Issue
Block a user