efficiencyexcel.jsp 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <%@ page language="java" contentType="text/html; charset=gbk"%>
  2. <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
  3. <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
  4. <%@ page import="com.kpt.common.Util" %>
  5. <html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">
  6. <meta http-equiv="Content-Type" content="text/html; charset=GBK" />
  7. <%
  8. String str = Util.getHeaderType(request,"效率分析");
  9. response.setContentType("application/vnd.ms-excel;charset=gbk");response.setHeader("Content-disposition",str);
  10. %>
  11. <head>
  12. <style>
  13. .STYLE1 {color: #FFFFFF}
  14. </style>
  15. <!--[if gte mso 9]><xml>
  16. <x:ExcelWorkbook>
  17. <x:ExcelWorksheets>
  18. <x:ExcelWorksheet>
  19. <x:Name>readers</x:Name>
  20. <x:WorksheetOptions>
  21. <x:Print>
  22. <x:ValidPrinterInfo />
  23. </x:Print>
  24. </x:WorksheetOptions>
  25. </x:ExcelWorksheet>
  26. </x:ExcelWorksheets>
  27. </x:ExcelWorkbook>
  28. </xml><![endif]-->
  29. </head>
  30. <body style="margin:0";>
  31. <div class="content">
  32. <table cellspacing="1" cellpadding="0" border="0" style="width: 99%;" class="border">
  33. <tbody>
  34. <tr align="center" style="height: 25px;" class="gridtitle">
  35. <c:if test="${tjType == 0}">
  36. <th width="10%">舍栏</th>
  37. </c:if>
  38. <c:if test="${tjType == 1}">
  39. <th width="10%">日期</th>
  40. </c:if>
  41. <th width="12%">配方干物质(kg/头)</th>
  42. <th width="15%">实际采食干物质(kg/头)</th>
  43. <th width="12%">配方成本(元/头)</th>
  44. <th width="12%">实际成本(元/头)</th>
  45. <th width="10%">产量(kg)</th>
  46. <th width="10%">产奶效率</th>
  47. <th width="15%">公斤奶饲料成本(元)</th>
  48. </tr>
  49. <c:if test="${empty list}"><tr align="center" class="tdbgc"><td colspan="8">没有对应的结果</td></tr></c:if>
  50. <c:if test="${!empty list}">
  51. <c:forEach var="list" items="${list}">
  52. <tr align="center" class="tdbgc">
  53. <c:if test="${tjType == 0}">
  54. <td>[<c:out value="${list.bname}" />]</td>
  55. </c:if>
  56. <c:if test="${tjType == 1}">
  57. <td><c:out value="${list.bname}" /></td>
  58. </c:if>
  59. <td><c:if test="${list.ldry > 0}"><fmt:formatNumber value="${list.ldry }" pattern="#.##" minFractionDigits="2" /></c:if></td>
  60. <td><c:if test="${list.dry > 0}"><fmt:formatNumber value="${list.dry }" pattern="#.##" minFractionDigits="2" /></c:if></td>
  61. <td><c:if test="${list.lprice > 0}"><fmt:formatNumber value="${list.lprice }" pattern="#.##" minFractionDigits="2" /></c:if></td>
  62. <td><c:if test="${list.price > 0}"><fmt:formatNumber value="${list.price }" pattern="#.##" minFractionDigits="2" /></c:if></td>
  63. <td><c:if test="${list.product > 0}"><fmt:formatNumber value="${list.product }" pattern="#.##" minFractionDigits="2" /></c:if></td>
  64. <td><c:if test="${list.milkratio > 0}"><fmt:formatNumber value="${list.milkratio }" pattern="#.##" minFractionDigits="2" /></c:if></td>
  65. <td><c:if test="${list.FeedPriceMilk > 0}"><fmt:formatNumber value="${list.FeedPriceMilk }" pattern="#.##" minFractionDigits="2" /></c:if></td>
  66. </tr>
  67. </c:forEach>
  68. </c:if>
  69. </tbody>
  70. </table>
  71. </div>
  72. </body>
  73. </html>