foreach控制循环if判断

<c:forEach items="${resultMap}" var="daily" varStatus="n">
                        <tr class="<c:choose><c:when test="${n.index % 2==0 }">row-even</c:when><c:otherwise>row-odd</c:otherwise></c:choose>">
                            <td>
                                ${chMap[daily.key]}
                            </td>
                            <c:forEach items="${headData}" var="hdata">
                                <c:set var="endFlag" value="1"/>
                                <c:forEach items="${daily.value}" var="order" varStatus="st">
                                    <c:if test="${hdata==order.productName}">
                                        <td>
                                            ${order.orderNum}
                                        </td>
                                        <td>
                                            <fmt:formatNumber value="${order.allPayAmount/100 }" pattern="0.00"/>
                                        </td>
                                        <c:set var="endFlag" value="2"></c:set>
                                    </c:if>
                                    <c:if test="${(st.index+1)==fn:length(daily.value) && endFlag!=2}">
                                        <td>
                                            0
                                        </td>
                                        <td>
                                            0.00
                                        </td>
                                    </c:if>
                                </c:forEach>
                   </c:forEach>                            
</c:forEach>

  

posted @ 2019-04-18 10:11  乖怪丶  阅读(1460)  评论(0编辑  收藏  举报
……