Fin_Result_One_Result.jsp
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:6k
源码类别:

电子政务应用

开发平台:

Java

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <%@ page language="java" %>
  3. <%@ page import="java.util.*" %>
  4. <%@ page import="java.lang.*" %>
  5. <%@ page import="com.vnex.intranet.util.*"%>
  6. <%@ page import="com.vnex.intranet.budget.value.*" %>
  7. <%@ page import="com.vnex.intranet.util.FieldUtil" %> 
  8. <%@ page import="java.text.DecimalFormat" %>
  9. <jsp:useBean id="BudgetListProxy" scope="application" class="com.vnex.intranet.budget.proxy.BudgetListProxyBean" />
  10.                         <%
  11.         String paraMonth = request.getParameter("year")+"-"+request.getParameter("month");
  12. int department = (new Integer(request.getParameter("id"))).intValue();
  13. int total=0;
  14. int allDiv = -1;
  15. double budgetTotal = 0.0d;
  16. double actualTotal = 0.0d;
  17. double balanceTotal = 0.0d;
  18. DecimalFormat dFormat = new DecimalFormat("##.##");
  19.                      String divisionName = BudgetListProxy.divisionName(department);
  20. allDiv = BudgetListProxy.findAMonth(paraMonth, department);
  21. if(allDiv != 3)
  22. {
  23.                             response.sendRedirect("/mainctrl/financial/resultOneResultFail");
  24. }
  25. %>
  26. <HTML><jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  27. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_person.js"></script>
  28. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  29. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  30. <DIV align=center>
  31. <form name="form1" method="post" action="">
  32.   <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  33.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  34.     <TR> 
  35.         <TD colSpan=3 align="center" class="iframestyle" valign="top"><br>
  36.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  37.             <tr valign="top"> 
  38.               <td > 
  39.                 
  40.                 <table width="100%" border="0" cellspacing="0" cellpadding="2">
  41.                   <tr> 
  42.                     <td bgcolor="#666666"><font class="strongw"><a href="/mainctrl/home/index"><font color="#FFFFFF">首页</font></a>&gt;&gt;<a href="/mainctrl/finance/main"><font color="#FFFFFF">财务</font></a>&gt;&gt;<a href="/mainctrl/financial/finIndex"><font color="#FFFFFF">统计查看</font></a>&gt;&gt;<a href="/mainctrl/financial/resultOne"><font color="#FFFFFF">单个部门一个月</font></a>&gt;&gt;统计结果</font></td>
  43.                   </tr>
  44.                 </table>
  45.                 <table class=title width="100%" border="0" cellpadding="2" cellspacing="0">
  46.                   <tr bgcolor="#fafafa"> 
  47.                     <td colspan="5"> 
  48. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  49.                         <tr>
  50.                           <td width="80%"><font class="strong">&nbsp;&nbsp;请查看<%=divisionName%> 
  51.                             <%=paraMonth%>预算执行情况:</font> </td>
  52.                           <td width="20%">
  53.                             <div align="right"><font class="strong">单位:元&nbsp;&nbsp;&nbsp;&nbsp;</font></div>
  54.                           </td>
  55.                         </tr>
  56.                       </table>
  57.                     </td>
  58.                   </tr>
  59.                 </table>
  60.                 <table width="600" border="0" cellspacing="1" cellpadding="2" class=title>
  61.                   <tr align="center"> 
  62.                     <td width="100"><font class="strong">项目</font></td>
  63.                     <td width="100"><font class="strong">预算额</font></td>
  64.                     <td width="100"><font class="strong">发生额</font></td>
  65.                     <td width="100"><font class="strong">差额</font></td>
  66.                     <td width="200"><font class="strong">备注</font></td>
  67.                   </tr>
  68.                   <%
  69.     String col = "";
  70. try
  71. {
  72. BudgetListValueBean valueBean = null;
  73. //Collection coll = BudgetListProxy.showOneBudget("2001-01", 2);
  74. Collection coll = BudgetListProxy.showOneBudget(paraMonth, department);
  75. Iterator iter = coll.iterator();
  76. while(iter.hasNext())
  77. {
  78.     valueBean = (BudgetListValueBean)iter.next();
  79. total++;
  80. col = ((total%2)==1)?"#fafafa":"#e0e0e0";
  81. %>
  82.                   <tr align="center" bgcolor=<%=col%>> 
  83.                     <td width="100"><%=valueBean.getComponentName()%></td>
  84.                     <td width="100"><%=valueBean.getBudget()%></td>
  85.                     <td width="100"><%=valueBean.getActual()%></td>
  86.                     <td width="100"> 
  87.                       <%
  88. double val = (double)(valueBean.getBudget()-valueBean.getActual());
  89. out.println(dFormat.format(val));
  90. budgetTotal += valueBean.getBudget();
  91. actualTotal += valueBean.getActual();
  92. balanceTotal += val;
  93. %>
  94.                     </td>
  95.                     <td width="200"><%=FieldUtil.filterScriptTag(FieldUtil.filterQuotTag(valueBean.getDescription()))%></td>
  96.                   </tr>
  97.                   <%
  98.     }
  99.     }
  100. catch(Exception e)
  101. {
  102.      out.println(e);
  103. }
  104. if(col.equals("#e0e0e0"))
  105. {
  106.     col="#fafafa";
  107. }
  108. else
  109. {
  110.     col="#e0e0e0";
  111. }
  112. %>
  113.                   <tr align="center" bgcolor=<%=col%>> 
  114.                     <td height="20" ><font class="strong">总计</font>:</td>
  115.                     <td height="20" ><%=dFormat.format(budgetTotal)%></td>
  116.                     <td height="20" ><%=dFormat.format(actualTotal)%></td>
  117.                     <td height="20" ><%=dFormat.format(balanceTotal)%></td>
  118.                     <td height="20" >&nbsp;</td>
  119.                   </tr>
  120.                   <tr align="center" bgcolor=#fafafa> 
  121.                     <td colspan="5" height="30" > 
  122.                       <input type="button"  onClick="history.back()"  value="返回" class="text">
  123.                     </td>
  124.                   </tr>
  125.                 </table>
  126.                 
  127.               </td>
  128.             </tr>
  129.           </table>          <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  130.        </TD>
  131.     </TR>
  132.      <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  133.     </TABLE>
  134.     <BR>
  135.     <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  136. </form>
  137.   </DIV>
  138.  </BODY>
  139. </HTML>