Beispiel #1
0
  /**
   * 设置进入查看详细信息页面的初始值 setEditDefault
   *
   * @param aWebForm EditForm
   * @param request HttpServletRequest
   * @param response HttpServletResponse
   */
  public static void setEditDefault(
      EditForm pWebForm, HttpServletRequest request, HttpServletResponse response)
      throws CDealException {
    try {
      // 初始化页面,初始化投诉形式下拉菜单
      int type = 0;
      Connection mConn = null;
      PreparedStatement pstmt = null;

      try {
        mConn = CDBManager.getConn(); // 创建数据库连接
        // 设置进入修改页面的初始值SQL
        String mSQL =
            "select A.CHENGPIID,A.COMPLAINEDPERSON,A.COMPLAINPERSON, A.COMPLAINEDUNIT, A.COMPLAINUNIT, A.COMPLAINEDDUTY, A.COMPLAINDUTY, A.QUESTIONKIND, A.COMPLAINVERSION, "
                + "  A.CONTENTABSTRACT,   A.SUGGESTION,   A.SIGN1,  to_char(A.DATE1, 'yyyy-mm-dd') DATE1,A.LEADERCONFIRM, A.SIGN2,   to_char(A.DATE2, 'yyyy-mm-dd') DATE2, A.REMARK,   A.BUSINESSID, "
                + " decode(A.BUSINESSTYPE,'1','建设工程','2','行政许可','3','政府采购','4','重大事项','5','行政执法','6','财政预算','7','信访','8','应急预案') BUSINESSTYPE,"
                + "   t.abbrname,A.COMPLAINEDGRADE,A.XZGCXYFL,A.SUBXZGCXYFL,A.XZGLFL,A.XZGCBXXS from T_YW_ZDSX_JCJ_TSCHENGPIBIAO A,t_Sys_Department t where  A.COMPLAINEDUNIT = t.id  and A.CHENGPIID = ?";
        pstmt = mConn.prepareStatement(mSQL);
        pstmt.setString(1, pWebForm.getCHENGPIID()); // 主键
        ResultSet rs = pstmt.executeQuery();
        if (rs.next()) {
          pWebForm.getTTsChengpibiao().setCHENGPIID(rs.getString(1)); // 呈批表编号
          pWebForm.getTTsChengpibiao().setCOMPLAINEDPERSON(rs.getString(2)); // 呈批表被投诉人姓名
          pWebForm.getTTsChengpibiao().setCOMPLAINPERSON(rs.getString(3)); // 呈批表投诉人姓名
          pWebForm.getTTsChengpibiao().setCOMPLAINEDUNIT(rs.getString(4)); // 呈批表被投诉人单位
          pWebForm.getTTsChengpibiao().setCOMPLAINUNIT(rs.getString(5)); // 呈批表投诉人单位
          pWebForm.getTTsChengpibiao().setCOMPLAINEDDUTY(rs.getString(6)); // 呈批表被投诉人职务
          pWebForm.getTTsChengpibiao().setCOMPLAINDUTY(rs.getString(7)); // 呈批表投诉人职务
          pWebForm.getTTsChengpibiao().setQUESTIONKIND(rs.getString(8)); // 呈批表问题性质
          pWebForm.getTTsChengpibiao().setCOMPLAINVERSION(rs.getInt(9)); // 呈批表投诉形式
          type = rs.getInt(9);
          pWebForm.getTTsChengpibiao().setCONTENTABSTRACT(rs.getString(10)); // 呈批表内容摘要
          pWebForm.getTTsChengpibiao().setSUGGESTION(rs.getString(11)); // 呈批表拟办意见
          pWebForm.getTTsChengpibiao().setSIGN1(rs.getString(12)); // 呈批表拟办人签字
          pWebForm.getTTsChengpibiao().setDATE1_STR(rs.getString(13)); // 呈批表拟办人签字日期
          pWebForm.getTTsChengpibiao().setLEADERCONFIRM(rs.getString(14)); // 呈批表局领导批示
          pWebForm.getTTsChengpibiao().setSIGN2(rs.getString(15)); // 呈批表局领导签字
          pWebForm.getTTsChengpibiao().setDATE2_STR(rs.getString(16)); // 呈批表局领导签字日期
          pWebForm.getTTsChengpibiao().setREMARK(rs.getString(17)); // 呈批表备注
          pWebForm.getTTsChengpibiao().setBUSINESSID(rs.getString(18));
          pWebForm.setTypename(rs.getString(19));
          pWebForm.setDepartmentname(rs.getString(20));
          pWebForm.getTTsChengpibiao().setCOMPLAINEDGRADE(rs.getInt(21));
          pWebForm.getTTsChengpibiao().setXZGCXYFL(rs.getInt(22));
          pWebForm.getTTsChengpibiao().setSUBXZGCXYFL(rs.getInt(23));
          pWebForm.getTTsChengpibiao().setXZGLFL(rs.getInt(24));
          pWebForm.getTTsChengpibiao().setXZGCBXXS(rs.getInt(25));

        } else {
          throw new CDealException(
              "使用编号 " + pWebForm.getCHENGPIID() + "未能找到数据。", new Exception("查询数据失败。"));
        }
        TreeMap COMPLAINVERSIONList = new TreeMap();
        CCodeMap aCodeMap = new CCodeMap();
        COMPLAINVERSIONList = aCodeMap.getMapByType("行政效能投诉形式");
        String busitypename = (String) COMPLAINVERSIONList.get("" + type);
        pWebForm.setTsxingshu(busitypename);
        // 处理附件
        UploadForm aUploadForm = new UploadForm();
        aUploadForm.setType("行政效能");
        aUploadForm.setBid2("办理呈批表");
        aUploadForm.setBid(Long.parseLong(pWebForm.getTTsChengpibiao().getCHENGPIID()));
        com.tjsoft.system.upload.CDeal.setUploadDefault(aUploadForm, request, response);
        pWebForm.setUploadedFile(aUploadForm.getUploadedFile());
      } catch (Exception e) {
        throw e;
      } finally {
        if (pstmt != null)
          try {
            pstmt.close();
          } catch (Exception e) {
          }
        ;
        if (mConn != null)
          try {
            mConn.close();
          } catch (Exception e) {
          }
        ;
      }
    } catch (Exception e) {
      throw new CDealException("进入修改" + mModuleName + "时失败。", e);
    }
  }
Beispiel #2
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) {
        }
        ;
      }
    }
  }