Esempio n. 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);
    }
  }
Esempio n. 2
0
  /**
   * 查询处理
   *
   * @param actionForm ActionForm 表单From
   * @param request HttpServletRequest Web请求
   * @param response HttpServletResponse Web结果
   * @throws CDealException 处理异常
   */
  public static void doQuery(
      QueryForm pQueryForm, HttpServletRequest request, HttpServletResponse response)
      throws CDealException {
    try {

      // 查询数据SQL语句
      String msSql =
          "select CHENGPIID,COMPLAINEDPERSON,COMPLAINPERSON,COMPLAINVERSION,to_char(a.CREATEDATE,'yyyy-mm-dd')CREATEDATE,COMPLAINUNIT,COMPLAINEDUNIT,SPARE1,SPARE2,SPARE3,SPARE4,t.abbrname,a.XZGCXYFL,a.SUBXZGCXYFL from T_YW_ZDSX_JCJ_TSCHENGPIBIAO a,t_Sys_Department t  WHERE a.STATUS = 1 and SUBMITSTATUS = 1 and t.id=COMPLAINEDUNIT "; // 主查询语句
      String msOrder = "ORDER BY CREATEDATE desc"; // 排序语句

      // 查询子条件
      String msSqlWhere = "";
      String msTemp = pQueryForm.getCHENGPIID(); // 呈批表编号
      if (msTemp != null && msTemp.length() > 0) {
        msSqlWhere += " and CHENGPIID like '%" + msTemp + "%'";
      }
      msTemp = pQueryForm.getCOMPLAINEDPERSON(); // 呈批表被投诉人姓名
      if (msTemp != null && msTemp.length() > 0) {
        msSqlWhere += " and COMPLAINEDPERSON like '%" + msTemp + "%'";
      }
      msTemp = pQueryForm.getCOMPLAINUNIT(); // 呈批表问题性质
      if (msTemp != null && msTemp.length() > 0) {
        msSqlWhere += " and COMPLAINUNIT like '%" + msTemp + "%'";
      }
      msTemp = pQueryForm.getCOMPLAINEDUNIT(); // 呈批表被投诉人单位
      if (msTemp != null && msTemp.length() > 0) {
        msSqlWhere += " and COMPLAINEDUNIT = '" + msTemp + "'";
      }
      msTemp = pQueryForm.getCOMPLAINPERSON(); // 呈批表投诉人姓名
      if (msTemp != null && msTemp.length() > 0) {
        msSqlWhere += " and COMPLAINPERSON like '%" + msTemp + "%'";
      }
      msTemp = pQueryForm.getCOMPLAINVERSION(); // 呈批表投诉形式
      if (msTemp != null && msTemp.length() > 0) {
        msSqlWhere += " and COMPLAINVERSION =" + msTemp;
      }
      msTemp = pQueryForm.getCREATEDATE1(); // 呈批表创建时间,起
      if (msTemp != null && msTemp.length() > 0) {
        msSqlWhere += " and CREATEDATE >= to_date('" + msTemp + "','yyyy-mm-dd')";
      }
      msTemp = pQueryForm.getCREATEDATE2(); // 呈批表创建时间,止
      if (msTemp != null && msTemp.length() > 0) {
        msSqlWhere += " and CREATEDATE <= to_date('" + msTemp + "','yyyy-mm-dd')";
      }

      msSql = msSql + msSqlWhere; // 主查询语句 加上 查询子条件

      CDataPage dataPage = new CDataPage(); // 翻页实现类
      dataPage.setQuerySql(msSql); // 设置查询语句
      dataPage.setOrderStr(msOrder); // 设置排序语句
      dataPage.setPageRowCount(CConstants.PAGE_ROW_COUNT); // 每页行数
      dataPage.init(request);
      request.setAttribute(CConstants.DATA_PAGE_OBJECT, dataPage);

      // 初始化页面,初始化投诉形式下拉菜单
      TreeMap COMPLAINVERSIONListName = new TreeMap(); // 取出aWebForm
      COMPLAINVERSIONListName = CCodeMap.getMapByType("行政效能投诉形式");
      pQueryForm.setCOMPLAINVERSIONList(COMPLAINVERSIONListName);
      TreeMap COMPLAINVERSIONListName1 = new TreeMap(); // 取出aWebForm
      COMPLAINVERSIONListName1 = CCodeMap.getMapByType("部门名称列表");
      pQueryForm.setDepartList(COMPLAINVERSIONListName1);

    } catch (Exception e) {
      throw new CDealException("根据输入条件进行查询时失败。", e);
    }
  }
Esempio n. 3
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) {
        }
        ;
      }
    }
  }