Package com.founder.fix.fixflow.core.impl.db

Examples of com.founder.fix.fixflow.core.impl.db.SqlCommand.queryForList()


      engine = this.getProcessEngine(agentId);
      SqlCommand sqlCommand = new SqlCommand(connection);
      String sqlStr = "select * from fixflow_agent_agentinfo where agent_id = ?";
      List<Object> data = new ArrayList<Object>();
      data.add(agentId);
      List<Map<String, Object>> listData = sqlCommand.queryForList(
          sqlStr, data);
      if (listData.size() > 0) {
        Map<String, Object> eachAgentInfo = listData.get(0);
        agentInfo.put("agentId", agentId);
        agentInfo.put("agentName", this.getUserName(agentId));
View Full Code Here


        sqlStr = "select * from fixflow_agent_agentdetails where agent_id = ?";
       
     
        data.clear();
        data.add(agentId);
        listData = sqlCommand.queryForList(sqlStr, data);
        for (Map<String, Object> rowDataMap : listData) {
          // if (resultData.size() > 0) {
          eachResultData.put("agentId", rowDataMap.get("AGENT_ID"));
          String auser = StringUtil
              .getString(rowDataMap.get("AUSER"));
View Full Code Here

      StringBuffer sb = new StringBuffer();
      sb.append("SELECT USERID,USERNAME FROM AU_USERINFO WHERE LOGINID=? AND PASSWORD=?");
      connection = dbcf.createConnection();
      //这里是自带的数据库操作方式。
      SqlCommand sqlcommand = new SqlCommand(connection);
      List<Map<String, Object>> list2 = sqlcommand.queryForList(sb.toString(),list);
      if(list2!=null && list2.size()>0){
        //这里约定了一个参数,流程引擎在运行时会默认从session里按照这两个key来获取参数,如果替换了登录的方式,请保证这两个key依然可以获取到正确的数据
        request.getSession().setAttribute(FlowCenterService.LOGIN_USER_ID, list2.get(0).get("USERID"));
        request.getSession().setAttribute(FlowCenterService.LOGIN_USER_NAME, list2.get(0).get("USERNAME"));
       
View Full Code Here

                .getConnection(ConnectionManagement.defaultDataBaseId);
         
            SqlCommand sc = new SqlCommand(connection);
            List params = new ArrayList();
            params.add(key);
            List<Map<String, Object>> res = sc.queryForList(
                "select * from DEMOTABLE where COL1=?", params);
            if(res!=null && res.size()>0)
              filter.put("demoObject", res.get(0));
            request.setAttribute("result", filter);
          }
View Full Code Here

        try {
          SqlCommand sc = new SqlCommand(connection);
          List params = new ArrayList();
          params.add(filter.get("bizKey"));
          List<Map<String, Object>> res = sc.queryForList(
              "select * from DEMOTABLE where COL1=?", params);
         
          if(res!=null && res.size()>0)
            filter.put("demoObject", res.get(0));

View Full Code Here

   
   
   
    String sqlText=pagination.getPaginationSql("SELECT * FROM FIXFLOW_MAIL WHERE MAIL_STATUS=?", 1, 10, "*", null);
   
    List<Map<String, Object>> dataList = sqlCommand.queryForList(sqlText, pObjects);
   
    for (Map<String, Object> mapData : dataList) {

      try {
        FixMailTo fixMailTo = new FixMailTo();
View Full Code Here

    this.seconds = seconds;
   
    //搜索出工作日
    String sql = "select commom_date from FIXFLOW_WORKDATE_DETAIL" +
        " group by commom_date order by commom_date";
    List<Map<String, Object>> workDays = sqlCommand.queryForList(sql);
    if(workDays == null || workDays.size() == 0) {
      return newDate;
    }
   
    //计算日期
View Full Code Here

        String groupNameField = getGroupInfo().getGroupNameField();
        String sqlText = getGroupInfo().getSqlText();
        SqlCommand sqlCommand = getSqlCommand();
        List<Object> objectParamWhere = new ArrayList<Object>();
        objectParamWhere.add(groupId);
        List<Map<String, Object>> dataObj = sqlCommand.queryForList("SELECT USERTABLE.* FROM (" + sqlText + ") USERTABLE where USERTABLE."
            + groupIdField + "=?", objectParamWhere);
        if (dataObj.size() == 0) {
          return null;
        }
        if (dataObj.get(0).get(groupIdField) == null) {
View Full Code Here

     
      if (page != null) {
        Pagination pagination = Context.getProcessEngineConfiguration().getDbConfig().getPagination();
        sql = pagination.getPaginationSql(sql, page.getFirstResult(), page.getMaxResults(), "*",null);
      }
      List<Map<String, Object>> dataObj = sqlCommand.queryForList(sql, null);
      int count = Integer.parseInt(sqlCommand.queryForValue(countSql).toString());
      for(int i = 0;i<dataObj.size();i++){
        if (dataObj.get(0).get(groupIdField) != null) {
          GroupTo groupTo = new GroupTo(StringUtil.getString(dataObj.get(i).get(groupIdField)), StringUtil.getString(dataObj.get(i).get(groupNameField)), getId(), dataObj.get(i));
          resultList.add(groupTo);
View Full Code Here

        String userIdField = userInfo.getUserIdField();
        @SuppressWarnings("unused")
        String userNameField = userInfo.getUserNameField();
        String groupIdField = userInfo.getGroupIdField();
        String sqlText = userInfo.getSqlText();
        List<Map<String, Object>> dataObj = sqlCommand.queryForList("SELECT USERTABLE.* FROM (" + sqlText + ") USERTABLE where USERTABLE."
            + userIdField + "=? AND USERTABLE."+groupIdField+" IS NOT NULL", objectParamWhere);
        if(dataObj.size()==0){
          return groupTos;
        }
        for (Map<String, Object> roleTo : dataObj) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.