예제 #1
0
  /**
   * ]
   *
   * @param aWebForm AddForm
   * @param request HttpServletRequest
   * @param response HttpServletResponse
   * @throws CDealException
   * @throws Exception
   */
  public static void setEdit1(
      EditForm aWebForm, HttpServletRequest request, HttpServletResponse response)
      throws CDealException, Exception {
    EditForm aWebForm1 = (EditForm) aWebForm;
    Connection mConn = null;
    PreparedStatement pstmt = null;
    String str = ""; // 要返回的 string
    String sKey = ""; // 取出的TREEMAP的KEY
    String sValue = ""; // 取出的TREEMAP的value
    TreeMap itemtype;

    // 初始化页面,初始化事项类别下拉菜单
    // 初始化页面,初始化投诉形式下拉菜单

    TreeMap COMPLAINVERSIONListName2 = new TreeMap(); // 取出aWebForm
    COMPLAINVERSIONListName2 = CCodeMap.getMapByType("行政过错职级");
    aWebForm.setCOMPLAINEDGRADELIST(COMPLAINVERSIONListName2);
    TreeMap COMPLAINVERSIONListName3 = new TreeMap(); // 取出aWebForm
    COMPLAINVERSIONListName3 = CCodeMap.getMapByType("行政管理分类");
    aWebForm.setXZGLFLList(COMPLAINVERSIONListName3);
    TreeMap COMPLAINVERSIONListName4 = new TreeMap(); // 取出aWebForm
    COMPLAINVERSIONListName4 = CCodeMap.getMapByType("行政过错表现形式");
    aWebForm.setXZGCBXXSList(COMPLAINVERSIONListName4);

    try {
      // 从CODEMAP表里取 来源分类 菜单
      ArrayList comeList = CCodeMap.getSortedMap("行政过错行为分类");
      // 从CODEMAP表里取 本级政府任务督办 菜单
      ArrayList localList = CCodeMap.getSortedMap("违反规定履行社会管理职责");
      // 从CODEMAP表里取 上级任务督办 菜单
      ArrayList upList = CCodeMap.getSortedMap("违反内部管理制度");
      // 从CODEMAP表里取 上级任务督办 菜单
      ArrayList lbList = CCodeMap.getSortedMap("其他贻误行政管理工作");
      // 添加 来源分类 到一个数组里面去.然后统一输出到页面
      str = "var XZGCXYFL=new Array('','全部'";
      int k = 0;
      for (; k < comeList.size(); k++) {
        LabelValueBean aLabelValueBean = (LabelValueBean) comeList.get(k);
        sKey = aLabelValueBean.getValue(); // 名字
        str += ",'" + sKey + "',"; // 取出的TREEMAP的KEY
        sValue = aLabelValueBean.getLabel(); // 值
        str += "'" + sValue + "'\n"; // 取出的TREEMAP的value
      }
      // CLog.println(str);
      str += ");\n";
      str += " var permissionitem = new Array (" + k + ");\n";
      str += "permissionitem[0]=new Array('','全部');\n";

      // 添加 违反规定履行社会管理职责
      int j = 1;
      str += "permissionitem[" + j + "]=new Array('','全部'";
      for (int i = 0; i < localList.size(); i++) {
        LabelValueBean aLabelValueBean = (LabelValueBean) localList.get(i);
        sKey = aLabelValueBean.getValue(); // 值
        // 添加每个部门对应的事项类别列表
        str += ",'" + sKey + "',"; // 取出的TREEMAP的KEY
        sValue = aLabelValueBean.getLabel(); // 名字
        str += "'" + sValue + "'\n"; // 取出的TREEMAP的value
      }
      str += ");\n";

      // 添加 违反内部管理制度
      j = 2;
      str += "permissionitem[" + j + "]=new Array('','全部'";
      for (int i = 0; i < upList.size(); i++) {
        LabelValueBean aLabelValueBean = (LabelValueBean) upList.get(i);
        sKey = aLabelValueBean.getValue(); // 值
        // 添加每个部门对应的事项类别列表
        str += ",'" + sKey + "',"; // 取出的TREEMAP的KEY
        sValue = aLabelValueBean.getLabel(); // 名字
        str += "'" + sValue + "'\n"; // 取出的TREEMAP的value
      }
      str += ");\n";
      // 添加 其他贻误行政管理工作
      j = 3;
      str += "permissionitem[" + j + "]=new Array('','全部'";
      for (int i = 0; i < lbList.size(); i++) {
        LabelValueBean aLabelValueBean = (LabelValueBean) lbList.get(i);
        sKey = aLabelValueBean.getValue(); // 值
        // 添加每个部门对应的事项类别列表
        str += ",'" + sKey + "',"; // 取出的TREEMAP的KEY
        sValue = aLabelValueBean.getLabel(); // 名字
        str += "'" + sValue + "'\n"; // 取出的TREEMAP的value
      }
      str += ");\n";

      // 把部门数组和许可事项输出到页面上
      aWebForm1.setPrintSql(str);
    } catch (Exception e) {
      throw new CDealException("设置进入时限监察查询处理的初始值时失败。", e);
    } finally {
      if (pstmt != null) {
        try {
          pstmt.close();
        } catch (Exception e) {
        }
        ;
      }
      if (mConn != null) {
        try {
          mConn.close();
        } catch (Exception e) {
        }
        ;
      }
    }
  }