public String queryCondition(String json) {

    User user = ActionContext.getCurrentUserInThread();

    Connection conn = DBUtil.getConnection();
    String domresult = "";
    try {

      // 组织查询条件
      PageManager page = RequestUtil.getPageManager(json);
      String condition = RequestUtil.getConditionList(json).getConditionWhere();
      String orderFilter = RequestUtil.getOrderFilter(json);
      condition += orderFilter;
      if (page == null) page = new PageManager();
      page.setFilter(condition);

      String sql = "SELECT * FROM " + "BU_SPYW_CBFASP_GCJSXMZJFBHTBAB t";
      BaseResultSet bs = DBUtil.query(conn, sql, page);

      domresult = bs.getJson();

    } catch (Exception e) {
      DaoException.handleMessageException("*********查询出错!*********");
    } finally {
      DBUtil.closeConnetion(conn);
    }
    return domresult;
  }
Exemplo n.º 2
0
  public String queryCondition(String json, JxsbDsjjVO vo, Map map) {

    User user = ActionContext.getCurrentUserInThread();

    Connection conn = DBUtil.getConnection();
    String domresult = "";
    try {

      // 组织查询条件
      PageManager page = RequestUtil.getPageManager(json);
      String condition = RequestUtil.getConditionList(json).getConditionWhere();
      String orderFilter = RequestUtil.getOrderFilter(json);
      condition += BusinessUtil.getCommonCondition(user, null);
      condition += orderFilter;
      if (page == null) page = new PageManager();
      page.setFilter(condition);

      String sql =
          "select * from jxsb_dsjj d "
              + "left join JXSB_SYGL s on d.jxsb_sygl_uid=s.jxsb_sygl_uid "
              + "left join JXSB_SYDJ j on s.jxsb_sygl_uid=j.jxsb_sygl_uid "
              + "left join JXSB_JCYS c on s.jxsb_sygl_uid=c.jxsb_sygl_uid "
              + "left join JXSB_AZGC g on s.jxsb_sygl_uid=g.jxsb_sygl_uid "
              + "left join az_company a on d.BY_COMPANY_DL_UID=a.AZ_COMPANY_UID "
              + "left join jxsb b on b.jxsb_uid=s.jxsb_uid  ";
      BaseResultSet bs = DBUtil.query(conn, sql, page);
      // 合同表
      // bs.setFieldTranslater("HTID", "合同表", "ID", "NAME");
      // 项目下达库
      // bs.setFieldTranslater("XDKID", "GC_TCJH_XMXDK", "ID", "XMMC");
      // 标段表
      // bs.setFieldTranslater("BDID", "GC_XMBD", "GC_XMBD_ID", "BDMC");

      // 设置字典

      // 设置查询条件
      // bs.setFieldDateFormat("JLRQ", "yyyy-MM");// 计量月份
      // bs.setFieldThousand("DYJLSDZ");

      domresult = bs.getJson();

    } catch (Exception e) {
      DaoException.handleMessageException("*********查询出错!*********");
    } finally {
      DBUtil.closeConnetion(conn);
    }
    return domresult;
  }