Ejemplo n.º 1
0
    public void execute(String action, Obationable o, RunData data, Object arg) throws Exception {
      HttpServletRequest request = data.getRequest();
      initQueryItem(data.getRequest());
      QueryBasic queryBasic = fixedQuery;
      queryBasic.setSearchValue(data.getRequest());
      String SQL = ""; // queryBasic.getWhereQuery();
      dwdm = request.getParameter("dwdm");
      dwmc = request.getParameter("dwmc");
      cpbm = request.getParameter("cpbm");
      product = request.getParameter("product");

      String dwtxid = request.getParameter("dwtxid");
      String cpid = request.getParameter("cpid");
      String zk$a = request.getParameter("zk$a");
      String zk$b = request.getParameter("zk$b");

      if (dwtxid.length() > 0) SQL = SQL + " AND a.dwtxid=" + dwtxid;
      if (cpid.length() > 0) SQL = SQL + " AND a.cpid=" + cpid;
      if (zk$a.length() > 0) SQL = SQL + " AND a.zk>=" + zk$a;
      if (zk$b.length() > 0) SQL = SQL + " AND a.zk<=" + zk$b;
      SQL =
          combineSQL(
              CUSTOMER_PRODUCT_DISCOUNT_SQL,
              "?",
              new String[] {fgsid, user.getHandleDeptValue(), SQL});
      if (!dsxs_khcpzkTable.getQueryString().equals(SQL)) {
        dsxs_khcpzkTable.setQueryString(SQL);
        dsxs_khcpzkTable.setRowMax(null);
      }
    }
Ejemplo n.º 2
0
 /**
  * 得到固定查询的用户输入的值
  *
  * @param col 查询项名称
  * @return 用户输入的值
  */
 public final String getFixedQueryValue(String col) {
   return fixedQuery.getSearchRow().get(col);
 }
Ejemplo n.º 3
0
    public void execute(String action, Obationable o, RunData data, Object arg) throws Exception {
      HttpServletRequest request = data.getRequest();
      String nf = request.getParameter("nf");
      String yf = request.getParameter("yf");
      String dwtxid = request.getParameter("dwtxid");
      String dwmc = request.getParameter("dwmc");
      if (nf.equals("") || yf.equals("") || dwtxid.equals("")) {
        data.setMessage(showJavaScript("alert('缺少查询条件!')"));
        return;
      }
      Date stdate = new SimpleDateFormat("yyyy-MM-dd").parse(nf + "-" + yf + "-1"); // 当前月份第一天
      Calendar calendar = new GregorianCalendar();
      calendar.setTime(stdate);
      int days = calendar.getActualMaximum(Calendar.DATE); // 当前月份的天数
      engine.project.LookUp corpBean =
          engine.project.LookupBeanFacade.getInstance(
              request, engine.project.SysConstant.BEAN_CORP);
      // corpBean.regConditionData("dwtxid",new String[]{dwtxid});
      corpBean.regData(new String[] {dwtxid});
      RowMap corprow = corpBean.getLookupRow(dwtxid);
      String addr = corprow.get("addr");
      String tel = corprow.get("tel");
      String cz = corprow.get("cz");
      masterRow.put("nf", nf);
      masterRow.put("yf", yf);
      masterRow.put("dwmc", dwmc);
      masterRow.put("startday", "1");
      masterRow.put("endday", days + "");
      masterRow.put("addr", addr);
      masterRow.put("tel", tel);
      masterRow.put("cz", cz);
      initQueryItem(data.getRequest());
      QueryBasic queryBasic = fixedQuery;
      queryBasic.setSearchValue(data.getRequest());
      String SQL = queryBasic.getWhereQuery();
      if (SQL.length() > 0) SQL = " AND " + SQL;

      String sql = combineSQL(XSDZ_SQL, "?", new String[] {fgsID, SQL});
      sql = sql + " and djlx in(1,2,4,5)";
      System.out.print(sql);
      if (dsXsTable.isOpen()) dsXsTable.close();
      setDataSetProperty(dsXsTable, sql);
      dsXsTable.open();

      sql = combineSQL(XSDZ_SQL, "?", new String[] {fgsID, SQL});
      sql = sql + " and djlx=8";
      if (dsJsTable.isOpen()) dsJsTable.close();
      setDataSetProperty(dsJsTable, sql);
      dsJsTable.open();

      sql = combineSQL(XSDZ_SQL, "?", new String[] {fgsID, SQL});
      sql = sql + " and djlx=-1";
      if (dsThTable.isOpen()) dsThTable.close();
      setDataSetProperty(dsThTable, sql);
      dsThTable.open();

      sql = combineSQL(XSDZ_SQL, "?", new String[] {fgsID, SQL});
      sql = sql + " and djlx=7";
      if (dsQtTable.isOpen()) dsQtTable.close();
      setDataSetProperty(dsQtTable, sql);
      dsQtTable.open();

      initRowInfo(true);
      initRowInfo(false);
    }