<%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ page isELIgnored="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%
    String basePath = request.getContextPath();
%>
<div class="table-responsive">
    <table class="table table-striped table-bordered table-hover " >
        <thead>
        <tr>
            <th colspan="6" >数据</th>
            <th colspan="5">API</th>
            <th colspan="5">微应用</th>
        </tr>
        <tr>
            <th>主题</th>
            <th>浏览量</th>
            <th>关注量</th>
            <th>申请用户量</th>
            <th>申请量</th>
            <th>调用次数</th>
            <th>浏览量</th>
            <th>关注量</th>
            <th>申请用户量</th>
            <th>申请量</th>
            <th>调用次数</th>
            <th>浏览量</th>
            <th>关注量</th>
            <th>申请用户量</th>
            <th>申请量</th>
            <th>调用次数</th>


        </tr>
        </thead>
        <tbody>
        <c:set var="viewTimesData" value="0"></c:set>
        <c:set var="followData" value="0"></c:set>
        <c:set var="followData" value="0"></c:set>
        <c:set var="applyCountdata" value="0"></c:set>
        <c:set var="followData" value="0"></c:set>
        <c:set var="viewTimesApi" value="0"></c:set>
        <c:set var="followApi" value="0"></c:set>
        <c:set var="followData" value="0"></c:set>
        <c:set var="applyCountApi" value="0"></c:set>
        <c:set var="followData" value="0"></c:set>
        <c:set var="viewTimesMicroapp" value="0"></c:set>
        <c:set var="followMicroapp" value="0"></c:set>
        <c:set var="viewTimesMicroapp" value="0"></c:set>
        <c:set var="applyCountMicroapp " value="0"></c:set>
        <c:set var="viewTimesMicroapp" value="0"></c:set>

        <c:choose>
            <c:when test="${list!=null}">
                <c:forEach items="${list}" var="item" >
                    <tr>
                        <td>${item.sectorName}</td>
                        <td>${item.viewTimesData}</td>
                        <c:set var="viewTimesData" value="${viewTimesData +(item.viewTimesData) }" />
                        <td>${item.followData}</td>
                        <c:set var="followData" value="${followData +(item.followData) }" />
                        <td></td>
                        <td>${item.applyCountdata}</td>
                        <c:set var="applyCountdata" value="${applyCountdata +(item.applyCountdata) }" />
                        <td></td>

                        <td>${item.viewTimesApi}</td>
                        <c:set var="viewTimesApi" value="${viewTimesApi +(item.viewTimesApi) }" />
                        <td>${item.followApi}</td>
                        <c:set var="followApi" value="${followApi +(item.followApi) }" />
                        <td></td>
                        <td>${item.applyCountApi}</td>
                        <c:set var="applyCountApi" value="${applyCountApi +(item.applyCountApi) }" />
                        <td></td>

                        <td>${item.viewTimesMicroapp}</td>
                        <c:set var="viewTimesMicroapp" value="${viewTimesMicroapp +(item.viewTimesMicroapp) }" />
                        <td>${item.followMicroapp}</td>
                        <c:set var="followMicroapp" value="${followMicroapp +(item.followMicroapp) }" />
                        <td></td>
                        <td>${item.applyCountMicroapp}</td>
                        <c:set var="applyCountMicroapp" value="${applyCountMicroapp +(item.applyCountMicroapp) }" />
                        <td></td>
                    </tr>
                </c:forEach>
            </c:when>
            <c:otherwise>
                <tr>
                    <td colspan="4">无数据</td>
                </tr>
            </c:otherwise>
        </c:choose>
        <tr>
            <td>统计</td>
            <td>${viewTimesData}</td>
            <td>${followData}</td>
            <td></td>
            <td>${applyCountdata}</td>
            <td></td>
            <td>${viewTimesApi}</td>
            <td>${followApi}</td>
            <td></td>
            <td>${applyCountApi}</td>
            <td></td>
            <td>${viewTimesMicroapp}</td>
            <td>${followMicroapp}</td>
            <td></td>
            <td>${applyCountMicroapp}</td>
            <td></td>
        </tr>
        </tbody>
    </table>
</div>

<script type="text/javascript">

</script>