public String relatedRightForward() {
   this.logger.debug("enter relatedRight");
   Map<String, Object> map =
       EcsideUtil.getQurey(this.request, "", new Boolean(false).booleanValue());
   QueryConditions qc = getQueryConditions(map);
   String userId = this.request.getParameter("userId");
   User user = this.userService.loadUserById(userId, false, true, false);
   String logonIdString = AclCtrl.getLogonID(this.request);
   User logonUser = this.userService.loadUserById(logonIdString, false, true, false);
   boolean flag = false;
   for (Role role : logonUser.getRoleSet()) {
     if (role.getType().equals(ActionConstant.DEF_SUPERADMIN)) {
       flag = true;
     }
   }
   if (!flag) {
     this.request.setAttribute("roleList", logonUser.getOperateRoleSet());
   } else {
     qc.addCondition(
         "primary.memberNo",
         "=",
         this.request.getSession().getAttribute(ActionConstant.REGISTERID));
     List<Role> roleList = this.roleService.getList(qc, null);
     this.request.setAttribute("roleList", roleList);
   }
   this.request.setAttribute("user", user);
   this.request.setAttribute(
       "ISSUPTERADMIN", this.request.getSession().getAttribute("ISSUPERADMIN"));
   return getReturnValue();
 }
 public List<CustomerHoldQty> getList(QueryConditions conditions, PageInfo pageInfo) {
   String hql =
       "select new CustomerHoldQty(primary.commodityId,commodity.name,primary.customerNo,customer.memberNo,primary.oneMaxOrderQty,primary.oneMinOrderQty,primary.maxCleanQty,primary.maxHoldQty,customer.name) from CustomerHoldQty as primary,Commodity as commodity,Customer as customer where primary.commodityId=commodity.id and customer.customerNo=primary.customerNo";
   Object[] values = (Object[]) null;
   String[] names = (String[]) null;
   if ((conditions != null) && (conditions.getFieldsSqlClause() != null)) {
     values = conditions.getValueArray();
     names = conditions.getNameArray();
     hql = hql + " and " + conditions.getFieldsSqlClause();
   }
   return queryByHQL(hql, names, values, pageInfo, null);
 }
  public List<Margin> getList(QueryConditions conditions, PageInfo pageInfo) {
    String hql =
        "select new Margin(primary.commodityId,commodity.name,primary.firmId,customerinfo.firmId,primary.marginAlgr,primary.tradeMargin) from Margin as primary,Commodity as commodity,FirmVO as customerinfo where primary.commodityId=commodity.id and primary.firmId=customerinfo.firmId and customerinfo.firmType='C'";

    Object[] values = (Object[]) null;
    String[] names = (String[]) null;
    if ((conditions != null) && (conditions.getFieldsSqlClause() != null)) {
      values = conditions.getValueArray();
      names = conditions.getNameArray();
      hql = hql + " and " + conditions.getFieldsSqlClause();
    }
    return queryByHQL(hql, names, values, pageInfo, null);
  }
Example #4
0
  public List<NetCustomer> getList(QueryConditions conditions, PageInfo pageInfo) {
    String hql =
        "select new NetCustomer(primary.customerNo,primary.name,primary.memberNo,memberInfo.name,primary.papersType,primary.papersName,primary.address,primary.phone,primary.fax,primary.postCode,primary.email,primary.extendData,primary.phonePWD,primary.customerStatus.status,primary.brokerageNo,primary.brokerageName,primary.managerNo,primary.managerName,primary.organizationNo,primary.organizationName,primary.createTime,primary.signTime,primary.activateTime,primary.freezeTime,primary.demiseTime,primary.useFunds) from NetCustomer as primary,MemberInfo as memberInfo,NetCount netCount where primary.memberNo=memberInfo.id and primary.customerNo=netCount.monicustomno";

    Object[] values = (Object[]) null;
    String[] names = (String[]) null;
    if ((conditions != null) && (conditions.getFieldsSqlClause() != null)) {
      values = conditions.getValueArray();
      names = conditions.getNameArray();
      hql = hql + " and " + conditions.getFieldsSqlClause();
    }
    return queryByHQL(hql, names, values, pageInfo, null);
  }
  public List<DelayTrade> getList(QueryConditions conditions, PageInfo pageInfo) {
    String hql =
        "select new DelayTrade(primary.commodityId,primary.f_FirmId,commodity.name,customer.name,primary.delayTradeType,primary.delayTradeTime,primary.isslipPoint ) from DelayTrade as primary,Customer as customer,Commodity as commodity where primary.commodityId=commodity.id and primary.f_FirmId=customer.customerNo";

    Object[] values = (Object[]) null;
    String[] names = (String[]) null;
    if ((conditions != null) && (conditions.getFieldsSqlClause() != null)) {
      values = conditions.getValueArray();
      names = conditions.getNameArray();
      hql = hql + " and " + conditions.getFieldsSqlClause();
    }
    this.logger.debug("hql:" + hql);
    return queryByHQL(hql, names, values, pageInfo, null);
  }
 public TradeAuth get(TradeAuth tradeAuth) {
   this.logger.debug("tradeAuth");
   QueryConditions qc = new QueryConditions();
   qc.addCondition("primary.firmId", "=", tradeAuth.getFirmId());
   qc.addCondition("primary.commodityId", "=", tradeAuth.getCommodityId());
   List<TradeAuth> list = this.memberTradeAuthDao.getList(qc, null);
   TradeAuth returnMargin = null;
   if ((list != null) && (list.size() > 0)) {
     returnMargin = new TradeAuth();
     returnMargin = (TradeAuth) list.get(0);
   } else {
     returnMargin = null;
   }
   return returnMargin;
 }
Example #7
0
  public List<Trade> getList(QueryConditions conditions, PageInfo pageInfo) {
    String hql =
        "select new Trade(primary.tradeNo, primary.orderNo, primary.holdNo, primary.bs_flag, primary.firmId, primary.commodityId, primary.o_firmId, commodity.name, firm.firmName, primary.o_bs_flag, primary.oc_flag, primary.quantity) from Trade as primary, Commodity as commodity, Firm as firm where primary.firmId = firm.firmId and primary.commodityId = commodity.id ";

    Object[] values = (Object[]) null;
    String[] names = (String[]) null;
    if ((conditions != null)
        && (conditions.getFieldsSqlClause() != null)
        && (!"".equals(conditions.getFieldsSqlClause()))) {
      values = conditions.getValueArray();
      names = conditions.getNameArray();
      hql = hql + " and " + conditions.getFieldsSqlClause();
    }
    CacheSet cacheSet = new CacheSet();
    cacheSet.setRegion("queryCache");
    List<Trade> list = queryByHQL(hql, names, values, pageInfo, cacheSet);
    return list;
  }
 public String relatedRight() {
   this.logger.debug("enter relatedRight");
   String userId = this.request.getParameter("userId");
   Map<String, Object> map =
       EcsideUtil.getQurey(this.request, "", new Boolean(false).booleanValue());
   QueryConditions qc = getQueryConditions(map);
   String[] cksString = this.request.getParameterValues("ck");
   String[] operateCks = this.request.getParameterValues("operateCk");
   qc.addCondition(
       "primary.memberNo", "=", this.request.getSession().getAttribute(ActionConstant.REGISTERID));
   List<List<String>> inStrings =
       this.userService.getRelatedIds(
           userId, AclCtrl.getLogonID(this.request), cksString, qc, operateCks);
   int value =
       this.userService.relatedRight(
           userId,
           AclCtrl.getLogonID(this.request),
           inStrings,
           (String) this.request.getSession().getAttribute(ActionConstant.REGISTERID));
   addResultMsg(this.request, value);
   return getReturnValue();
 }