archive_query_ordercode.jsp
上传用户:jhtang88
上传日期:2014-01-27
资源大小:28528k
文件大小:4k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=utf-8"%>
  2. <%@ page import = "java.net.URLEncoder"%>
  3. <%@ page import = "java.util.*"%>
  4. <%@ page import = "cn.js.fan.util.*"%>
  5. <%@ page import = "cn.js.fan.web.*"%>
  6. <%@ page import = "com.redmoon.oa.archive.*"%>
  7. <html xmlns="http://www.w3.org/1999/xhtml">
  8. <head>
  9. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  10. <%@ include file="../inc/nocache.jsp"%>
  11. <title>选择查询结果中用来排序的字段</title>
  12. <link href="../common.css" rel="stylesheet" type="text/css">
  13. </head>
  14. <body>
  15. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  16. <%
  17. if (!privilege.isUserPrivValid(request, "archive.query")) {
  18. out.print(StrUtil.Alert_Back(SkinUtil.LoadString(request, "pvg_invalid")));
  19. return;
  20. }
  21. %>
  22.   <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0" class="tableframe">
  23. <form name="form1" method="post" action="archive_query_name.jsp">
  24.     <tr>
  25.       <td class="right-title">&nbsp;选择查询结果中用来排序的字段</td>
  26.     </tr>
  27.     <tr>
  28.       <td>
  29. <%
  30. String deptCodeStr = ParamUtil.get(request,"deptCodeStr");
  31. if(deptCodeStr.equals("")){
  32.    out.print(StrUtil.Alert_Back("请选择查询部门!"));
  33.    return;
  34. }
  35. String tableCodeStr = ParamUtil.get(request,"tableCodeStr");
  36.     String showFieldCodeStr = ParamUtil.get(request,"showFieldCodeStr");
  37. String tableFullCodeStr = ParamUtil.get(request,"tableFullCodeStr");
  38. String[] tableCodeArr = tableCodeStr.split(",");
  39. String fieldCode = "",conditionFieldCodeStr = "",sql = "";
  40. ArchiveQueryConditionMgr aqcm = new ArchiveQueryConditionMgr();
  41. try{
  42. conditionFieldCodeStr = aqcm.getQueryCondition(request);
  43. }catch(ErrMsgException e){
  44. out.print(StrUtil.Alert_Back("填写日期参数格式错误!"));
  45. }
  46. TableInfoDb tid = new TableInfoDb();
  47. TableFieldInfoDb tfid = new TableFieldInfoDb(); 
  48. int j = 0;
  49. while(j < tableCodeArr.length){
  50.    tid = tid.getTableInfoDb(tableCodeArr[j]);    
  51. %>
  52. <br>
  53. <table class="tableframe" cellSpacing="0" cellPadding="2" width="95%" align="center" border="0" bgcolor="#FFFFFF">
  54.         <tbody>
  55.           <tr>
  56.             <td colspan="3" class="right-title"><%=tid.getTableDescription()%></td>
  57.           </tr>
  58. <%
  59.    sql = ArchiveSQLBuilder.getArchiveTableField(tid.getTableShortCode());
  60.       
  61.    tfid = new TableFieldInfoDb();
  62.    Vector vt = tfid.list(sql);
  63.    Iterator ir = null;
  64.    ir = vt.iterator();
  65.    while (ir!=null && ir.hasNext()) {
  66.    tfid = (TableFieldInfoDb)ir.next();
  67.    fieldCode =  tfid.getTableShortCode() + "." + tfid.getFieldCode();
  68. %>
  69.           <tr>
  70.             <td noWrap width="109"><%=tfid.getFieldName()%></td>
  71.             <td noWrap>
  72.   <select name="fieldCode">
  73.     <option value="" selected></option>
  74.     <option value="<%=fieldCode%> ASC">升续</option>
  75.     <option value="<%=fieldCode%> DESC">降续</option>
  76.   </select> </td>
  77.           </tr>
  78. <%
  79.        }
  80. %>
  81.         </tbody>
  82.       </table>
  83. <%   
  84.    j++;
  85. }
  86. %>      </td>
  87.     </tr>  
  88.     <tr>
  89.       <td height="30" align="center"><input value="下一步 &#8594; 填写查询名称" type="submit">
  90.         <input type="hidden" name="showFieldCodeStr" value="<%=showFieldCodeStr%>">
  91. <input type="hidden" name="conditionFieldCodeStr" value="<%=conditionFieldCodeStr%>">
  92. <input type="hidden" name="tableCodeStr" value="<%=tableCodeStr%>"> 
  93. <input type="hidden" name="deptCodeStr" value="<%=deptCodeStr%>">
  94. <input type="hidden" name="tableFullCodeStr" value="<%=tableFullCodeStr%>">
  95.   &nbsp;&nbsp;    </td>
  96.     </tr>
  97. </form> 
  98. </table>
  99. </body>
  100. </html>