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

修改-大屏统计数据出错

parent cd4008e9
...@@ -211,35 +211,38 @@ ...@@ -211,35 +211,38 @@
<!-- 获取展板总量 --> <!-- 获取展板总量 -->
<select id="getBoardTotal" resultType="java.lang.Integer"> <select id="getBoardTotal" resultType="java.lang.Integer">
SELECT count( a.id ) SELECT COUNT(1)
FROM FROM exhibition_board
( SELECT e.id WHERE is_deleted = 0
FROM exhibition_board e
left join t_board_statistic s on e.id = s.board_id <!--SELECT count( a.board_id )-->
left join t_organ o on o.id = s.organ_id <!--FROM-->
<where> <!--( SELECT s.board_id-->
<if test="statisticDate != null and statisticDate.length() == 4"> <!--FROM t_board_statistic s-->
left(s.play_date,4) = ${statisticDate} <!--left join t_organ o on o.id = s.organ_id-->
</if> <!--<where>-->
<if test="statisticDate != null and statisticDate.length() == 6"> <!--<if test="statisticDate != null and statisticDate.length() == 4">-->
left(s.play_date,6) = ${statisticDate} <!--left(s.play_date,4) = ${statisticDate}-->
</if> <!--</if>-->
<if test="statisticDate != null and statisticDate.length() == 8"> <!--<if test="statisticDate != null and statisticDate.length() == 6">-->
s.play_date = ${statisticDate} <!--left(s.play_date,6) = ${statisticDate}-->
</if> <!--</if>-->
<if test="organCode != null"> <!--<if test="statisticDate != null and statisticDate.length() == 8">-->
and o.code LIKE concat(#{organCode}, '%') <!--s.play_date = ${statisticDate}-->
</if> <!--</if>-->
<!--<if test="organCode != null">-->
<if test="areaIds !=null and areaIds.size() > 0"> <!--and o.code LIKE concat(#{organCode}, '%')-->
AND s.area_id IN <!--</if>-->
<foreach collection="areaIds" separator="," open="(" close=")" item="item">
#{item} <!--<if test="areaIds !=null and areaIds.size() > 0">-->
</foreach> <!--AND s.area_id IN-->
</if> <!--<foreach collection="areaIds" separator="," open="(" close=")" item="item">-->
<!--#{item}-->
</where> <!--</foreach>-->
GROUP BY s.board_id ) a <!--</if>-->
<!--</where>-->
<!--GROUP BY s.board_id ) a-->
</select> </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