Commit c1888a5c authored by nie'hong's avatar nie'hong

修改-大屏统计数据出错

parent cd4008e9
......@@ -211,35 +211,38 @@
<!-- 获取展板总量 -->
<select id="getBoardTotal" resultType="java.lang.Integer">
SELECT count( a.id )
FROM
( SELECT e.id
FROM exhibition_board e
left join t_board_statistic s on e.id = s.board_id
left join t_organ o on o.id = s.organ_id
<where>
<if test="statisticDate != null and statisticDate.length() == 4">
left(s.play_date,4) = ${statisticDate}
</if>
<if test="statisticDate != null and statisticDate.length() == 6">
left(s.play_date,6) = ${statisticDate}
</if>
<if test="statisticDate != null and statisticDate.length() == 8">
s.play_date = ${statisticDate}
</if>
<if test="organCode != null">
and o.code LIKE concat(#{organCode}, '%')
</if>
<if test="areaIds !=null and areaIds.size() > 0">
AND s.area_id IN
<foreach collection="areaIds" separator="," open="(" close=")" item="item">
#{item}
</foreach>
</if>
</where>
GROUP BY s.board_id ) a
SELECT COUNT(1)
FROM exhibition_board
WHERE is_deleted = 0
<!--SELECT count( a.board_id )-->
<!--FROM-->
<!--( SELECT s.board_id-->
<!--FROM t_board_statistic s-->
<!--left join t_organ o on o.id = s.organ_id-->
<!--<where>-->
<!--<if test="statisticDate != null and statisticDate.length() == 4">-->
<!--left(s.play_date,4) = ${statisticDate}-->
<!--</if>-->
<!--<if test="statisticDate != null and statisticDate.length() == 6">-->
<!--left(s.play_date,6) = ${statisticDate}-->
<!--</if>-->
<!--<if test="statisticDate != null and statisticDate.length() == 8">-->
<!--s.play_date = ${statisticDate}-->
<!--</if>-->
<!--<if test="organCode != null">-->
<!--and o.code LIKE concat(#{organCode}, '%')-->
<!--</if>-->
<!--<if test="areaIds !=null and areaIds.size() > 0">-->
<!--AND s.area_id IN-->
<!--<foreach collection="areaIds" separator="," open="(" close=")" item="item">-->
<!--#{item}-->
<!--</foreach>-->
<!--</if>-->
<!--</where>-->
<!--GROUP BY s.board_id ) a-->
</select>
<!-- 获取播放展板的机构总量 -->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment