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

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. <title>用户档案查询</title>
  11. <link href="../common.css" rel="stylesheet" type="text/css">
  12. </head>
  13. <body>
  14. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  15. <%
  16. if (!privilege.isUserPrivValid(request, "archive.query")) {
  17. out.print(StrUtil.Alert_Back(SkinUtil.LoadString(request, "pvg_invalid")));
  18. return;
  19. }
  20. %>
  21.   <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0" class="tableframe">
  22.    <form name="form1" method="post" action="archive_query_conditionvalue.jsp">
  23.     <tr>
  24.       <td class="right-title">&nbsp;选择查询时使用的条件字段</td>
  25.     </tr>
  26.     <tr>
  27.       <td>
  28. <%
  29. String deptCodeStr = ParamUtil.get(request,"deptCodeStr");
  30. if(deptCodeStr.equals("")){
  31.    out.print(StrUtil.Alert_Back("请选择查询部门!"));
  32.    return;
  33. }
  34. String tableCodeStr = ParamUtil.get(request,"tableCodeStr");
  35. String tableFullCodeStr = ParamUtil.get(request,"tableFullCodeStr");
  36. String[] fieldFullCodeArr = ParamUtil.getParameters(request,"fieldFullCode");
  37. String[] tableCodeArr = tableCodeStr.split(",");
  38. String showFieldCodeStr = "",sql = "",fieldFullCode = "";
  39. //获得显示字段
  40. int i = 0;
  41. while(i < fieldFullCodeArr.length){
  42. showFieldCodeStr += fieldFullCodeArr[i];
  43. if(i < fieldFullCodeArr.length - 1){
  44.    showFieldCodeStr += ",";
  45. }
  46. i++;
  47. }
  48. int j = 0;
  49. TableInfoDb tid = new TableInfoDb();
  50. while(j < tableCodeArr.length){
  51.    tid = tid.getTableInfoDb(tableCodeArr[j]);
  52.    
  53. %>
  54. <br>
  55. <table class="tableframe" cellSpacing="0" cellPadding="2" width="95%" align="center" border="0" bgcolor="#FFFFFF">
  56.         <tbody>
  57.           <tr>
  58.             <td colspan="3" class="right-title"><%=tid.getTableDescription()%></td>
  59.           </tr>
  60. <%
  61.    TableFieldInfoDb tfid = new TableFieldInfoDb();
  62.    sql = ArchiveSQLBuilder.getArchiveTableField(tid.getTableShortCode());          
  63.    Vector vt = tfid.list(sql);
  64.    Iterator ir = null;
  65.    ir = vt.iterator();
  66.    while (ir!=null && ir.hasNext()) {
  67.    tfid = (TableFieldInfoDb)ir.next();
  68.    fieldFullCode =  tfid.getTableShortCode() + "." + tfid.getFieldCode();
  69. %>
  70.           <tr>
  71.             <td noWrap width="109"><%=tfid.getFieldName()%></td>
  72.             <td noWrap><input type="checkbox" name="fieldFullCode" value="<%=fieldFullCode%>">
  73.               选择该查询条件字段</td>
  74.           </tr>
  75. <%
  76.        }
  77. %>
  78.         </tbody>
  79.       </table>
  80. <%   
  81.    j++;
  82. }
  83. %>      </td>
  84.     </tr>  
  85.     <tr>
  86.       <td height="30" align="center"><input value="下一步 &#8594; 设置查询条件" type="submit">
  87.         <input type="hidden" name="tableFullCodeStr" value="<%=tableFullCodeStr%>">
  88.         <input type="hidden" name="tableCodeStr" value="<%=tableCodeStr%>"> 
  89.         <input type="hidden" name="showFieldCodeStr" value="<%=showFieldCodeStr%>">
  90. <input type="hidden" name="deptCodeStr" value="<%=deptCodeStr%>">
  91.  </td>
  92.     </tr>
  93. </form>  </table>
  94. </body>
  95. </html>