<%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ page import="com.lightinit.hsdataplatform.dictionary.DicNotificationState" %>
<%@ 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 " id="tablesOrder"  >
        <thead id="themeTr">
        <tr>
            <th>序号</th>
            <th>部门</th>
            <th>数量</th>
        </tr>
        </thead>
        <tbody>
        <c:set var="total" value="0"/>
        <c:choose>
            <c:when test="${list!=null}">
                <c:forEach items="${list}" var="item" varStatus="status">
                    <tr>
                        <td>${status.count}</td>
                        <td>${item.name}</td>
                        <td>${item.value==null?'0':item.value}</td>
                        <c:set var="total" value="${total + item.value}" />
                    </tr>
                </c:forEach>
                <tr>
                    <td>总计</td>
                    <td></td>
                     <td>${total}</td>
                    <c:set var="total" value="${total +item.value}" />
                </tr>
            </c:when>
            <c:otherwise>
                <tr>
                    <td colspan="4">无数据</td>
                </tr>
            </c:otherwise>
        </c:choose>
        </tbody>
    </table>
</div>

