|
@@ -400,6 +400,10 @@
|
|
|
</if>
|
|
|
<!-- 数据权限 -->
|
|
|
<if test="param.siteId != null and param.siteId != 0 "> and site_id = #{param.siteId} </if>
|
|
|
+ <if test="param.customerIds != null and param.customerIds.size() != 0">
|
|
|
+ and customer_id in <foreach collection="param.customerIds" item="item" open="(" separator="," close=")">#{item}</foreach>
|
|
|
+ </if>
|
|
|
+ <!--
|
|
|
<if test='param.programItems != null and param.programItems.size() != 0' >
|
|
|
and concentrator_id IN (
|
|
|
SELECT DISTINCT
|
|
@@ -422,6 +426,7 @@
|
|
|
)
|
|
|
)
|
|
|
</if>
|
|
|
+ -->
|
|
|
<if test = "param.statDay != null and param.statDay != 0"> and stat_day = #{param.statDay}</if>
|
|
|
GROUP BY
|
|
|
customer_id,
|
|
@@ -486,6 +491,10 @@
|
|
|
</if>
|
|
|
<!-- 数据权限 -->
|
|
|
<if test="param.siteId != null and param.siteId != 0 "> and site_id = #{param.siteId} </if>
|
|
|
+ <if test="param.customerIds != null and param.customerIds.size() != 0">
|
|
|
+ and customer_id in <foreach collection="param.customerIds" item="item" open="(" separator="," close=")">#{item}</foreach>
|
|
|
+ </if>
|
|
|
+ <!--
|
|
|
<if test='param.programItems != null and param.programItems.size() != 0' >
|
|
|
and concentrator_id IN (
|
|
|
SELECT DISTINCT
|
|
@@ -508,6 +517,7 @@
|
|
|
)
|
|
|
)
|
|
|
</if>
|
|
|
+ -->
|
|
|
<if test = "param.statDay != null and param.statDay != 0"> and stat_day = #{param.statDay}</if>
|
|
|
GROUP BY
|
|
|
customer_id,
|
|
@@ -572,6 +582,10 @@
|
|
|
</if>
|
|
|
<!-- 数据权限 -->
|
|
|
<if test="param.siteId != null and param.siteId != 0 "> and site_id = #{param.siteId} </if>
|
|
|
+ <if test="param.customerIds != null and param.customerIds.size() != 0">
|
|
|
+ and customer_id in <foreach collection="param.customerIds" item="item" open="(" separator="," close=")">#{item}</foreach>
|
|
|
+ </if>
|
|
|
+ <!--
|
|
|
<if test='param.programItems != null and param.programItems.size() != 0' >
|
|
|
and concentrator_id IN (
|
|
|
SELECT DISTINCT
|
|
@@ -594,6 +608,7 @@
|
|
|
)
|
|
|
)
|
|
|
</if>
|
|
|
+ -->
|
|
|
<if test = "param.statDay != null and param.statDay != 0"> and stat_day = #{param.statDay}</if>
|
|
|
GROUP BY
|
|
|
customer_id,
|
|
@@ -659,6 +674,10 @@
|
|
|
</if>
|
|
|
<!-- 数据权限 -->
|
|
|
<if test="param.siteId != null and param.siteId != 0 "> and site_id = #{param.siteId} </if>
|
|
|
+ <if test="param.customerIds != null and param.customerIds.size() != 0">
|
|
|
+ and customer_id in <foreach collection="param.customerIds" item="item" open="(" separator="," close=")">#{item}</foreach>
|
|
|
+ </if>
|
|
|
+ <!--
|
|
|
<if test='param.programItems != null and param.programItems.size() != 0' >
|
|
|
and concentrator_id IN (
|
|
|
SELECT DISTINCT
|
|
@@ -681,6 +700,7 @@
|
|
|
)
|
|
|
)
|
|
|
</if>
|
|
|
+ -->
|
|
|
<if test = "param.statDay != null and param.statDay != 0"> and read_date = #{param.statDay}</if>
|
|
|
GROUP BY
|
|
|
customer_id,
|
|
@@ -716,6 +736,10 @@
|
|
|
</if>
|
|
|
<!-- 数据权限 -->
|
|
|
<if test="param.siteId != null and param.siteId != 0 "> and site_id = #{param.siteId} </if>
|
|
|
+ <if test="param.customerIds != null and param.customerIds.size() != 0">
|
|
|
+ and customer_id in <foreach collection="param.customerIds" item="item" open="(" separator="," close=")">#{item}</foreach>
|
|
|
+ </if>
|
|
|
+ <!--
|
|
|
<if test='param.programItems != null and param.programItems.size() != 0' >
|
|
|
and concentrator_id IN (
|
|
|
SELECT DISTINCT
|
|
@@ -738,6 +762,7 @@
|
|
|
)
|
|
|
)
|
|
|
</if>
|
|
|
+ -->
|
|
|
<if test = "param.statDay != null and param.statDay != 0"> and read_date = #{param.statDay}</if>
|
|
|
GROUP BY
|
|
|
customer_id,
|
|
@@ -805,6 +830,10 @@
|
|
|
</if>
|
|
|
<!-- 数据权限 -->
|
|
|
<if test="param.siteId != null and param.siteId != 0 "> and site_id = #{param.siteId} </if>
|
|
|
+ <if test="param.customerIds != null and param.customerIds.size() != 0">
|
|
|
+ and customer_id in <foreach collection="param.customerIds" item="item" open="(" separator="," close=")">#{item}</foreach>
|
|
|
+ </if>
|
|
|
+ <!--
|
|
|
<if test='param.programItems != null and param.programItems.size() != 0' >
|
|
|
and concentrator_id IN (
|
|
|
SELECT DISTINCT
|
|
@@ -827,6 +856,7 @@
|
|
|
)
|
|
|
)
|
|
|
</if>
|
|
|
+ -->
|
|
|
<if test = "param.statDay != null and param.statDay != 0"> and stat_month = #{param.statDay}</if>
|
|
|
GROUP BY
|
|
|
customer_id,
|