Examples of BizResult


Examples of org.yfsoft.comm.util.BizResult

*/
public class WorkflowService extends TplService {

  @Override
  public BizResult form(Map<String,String> input){
    BizResult rst = super.form(input);
    List<Map<String,Object>> obs = this.dao.list("usr_obs", new String[]{"o_id","o_name"}, null, null, 100, 0).getData();
    this.setReqAttr("obs",obs );
    rst.setPage("workflow/form.jsp");
    return rst;
  }
View Full Code Here

Examples of org.yfsoft.comm.util.BizResult

   * 采用AJAX的方式来新建流程模板
   * @param input
   * @return
   */
  public BizResult addTpl(Map<String,String> input){
    BizResult rst = this.dao.insert(input, "wf_tpl");
    rst = this.dao.query("SELECT LAST_INSERT_ID() as id");
    Map<String,Object> data = rst.getData();
    rst.setType(String.valueOf(ResultType.ECHO));
    rst.setData("{\"code\":"+rst.getCode()+",\"msg\":\"" + data.get("id") + "\"}");
    return rst;
  }
View Full Code Here

Examples of org.yfsoft.comm.util.BizResult

   * 采用AJAX的方式来新建流程模板的节点
   * @param input
   * @return
   */
  public BizResult addNode(Map<String,String> input){
    BizResult rst = this.dao.insert(input, "wf_node");
    rst.setType(String.valueOf(ResultType.ECHO));
    rst.setData("{\"code\":"+rst.getCode()+",\"msg\":\"" + rst.getMsg() + "\"}");
    return rst;
  }
View Full Code Here

Examples of org.yfsoft.comm.util.BizResult

  }
 
  public BizResult deal(Map<String,String> input){
    Map<String,Object> process = this.dao.query("sys_model",new String[]{"m_id"},"m_view='wf_process'").getData();
    input.put("m_id", process.get("m_id").toString());
    BizResult rst = super.form(input);
    this.setReqAttr("e_id", input.get("e_id"));
    this.setReqAttr("t", input.get("t"));
    Map<String,Object> e = this.dao.query("wf_entry",new String[]{"e_tpl","e_model_id","e_ref_id"},"e_id = "+input.get("e_id")).getData();
   
    this.setReqAttr(GlobalKey.WF_CHECK, "c?s=tpl&o=detail&m_id="+e.get("e_model_id").toString()+"&key="+e.get("e_ref_id").toString());
    this.setReqAttr("logs",this.dao.injoin(new String[]{"wf_process p","usr_userinfo u"} , new String[]{"p.*","u.*"}, "p.p_deal_user = u.ui_id", "p.p_entry = "+input.get("e_id"), "p.p_deal_date desc", 10, 0).getData());
    this.setReqAttr("remarks",this.dao.list("wf_node",null, "n_tpl = "+e.get("e_tpl"), "n_code asc", 30, 0).getData());
    if("did".equals(input.get("t"))){
      input.put("m_id",e.get("e_model_id").toString());
      input.put("key", e.get("e_ref_id").toString());
      super.detail(input);
    }
    rst.setPage("workflow/process.jsp");
    return rst;
  }
View Full Code Here

Examples of org.yfsoft.comm.util.BizResult

      //待办事宜
      this.setReqAttr("list", this.dao.list("wf_entry", new String[]{"e_id","e_title","e_update_date","e_model_id","e_ref_id"},
          "e_status ='process'", "e_update_date desc", 100, 0).getData());
      this.setReqAttr("p", "all");
    }
    BizResult rst = new BizResult().setCode("0");
    rst.setType(String.valueOf(ResultType.REDIRECT));
    rst.setPage("workflow/list.jsp");
    return rst;
  }
View Full Code Here

Examples of org.yfsoft.comm.util.BizResult

  public void setDao( CommonDao dao) {
    this.dao = dao;
  }
 
  public BizResult list(Map<String,String> input){
    BizResult rst = new BizResult().setCode("0");
    this.setReqAttr("models", this.dao.list("sys_model",null,null,null,100,0).getData());
    rst.setType(String.valueOf(ResultType.REDIRECT));
    rst.setPage("model/model.jsp");
    return rst;
  }
View Full Code Here

Examples of org.yfsoft.comm.util.BizResult

    rst.setPage("model/model.jsp");
    return rst;
  }
 
  public BizResult field(Map<String,String> input){
    BizResult rst = new BizResult().setCode("0");
    rst.setType(String.valueOf(ResultType.REDIRECT));
    this.setReqAttr("fields", this.dao.desc(input.get("t")).getData());
    rst.setPage("model/field.jsp");
    return rst;
  }
View Full Code Here

Examples of org.yfsoft.comm.util.BizResult

    this.dao.update(e, "m_id = "+i, "sys_model");
    return list(input);
  }
 
  public BizResult control(Map<String,String> input){
    BizResult rst = this.dao.query("sys_model", new String[]{"m_id","m_name","m_title","m_view"}, "m_id = "+input.get("id"));
    Map<String,Object> model = rst.getData();
    this.setReqAttr("fields", this.dao.desc(model.get("m_view").toString()).getData());
    this.setReqAttr("model", model);
    //加载系统控件
    StringBuffer sb = new StringBuffer();
    List<Map<String,Object>> controls = this.dao.list("sys_control", null, " c_enable = 1",null, 100, 0).getData();
    for(Map<String,Object> c : controls){
      sb.append("<option value='").append(c.get("c_id")).append("' >").append(c.get("c_title")).append("</option>");
    }
    this.setReqAttr("options", sb.toString());
   
    sb = new StringBuffer("<option value='0'>选择</option>");
    //加载数据源
    List<Map<String,Object>> ds = this.dao.list("sys_ds", null, null,null, 100, 0).getData();
    for(Map<String,Object> d : ds){
      sb.append("<option value='").append(d.get("ds_id")).append("' >").append(d.get("ds_name")).append("</option>");
    }
    this.setReqAttr("ds", sb.toString());
   
    rst.setType(String.valueOf(ResultType.REDIRECT));
    rst.setPage("model/relation.jsp");
    return rst;
  }
View Full Code Here

Examples of org.yfsoft.comm.util.BizResult

    rst.setPage("model/relation.jsp");
    return rst;
  }
 
  public BizResult table(Map<String,String> input){
    BizResult rst = new BizResult().setCode("0");
    rst.setType(String.valueOf(ResultType.REDIRECT));
    this.setReqAttr("tables", this.dao.table().getData());
    rst.setPage("model/table.jsp");
    return rst;
  }
View Full Code Here

Examples of org.yfsoft.comm.util.BizResult

    this.dao.insert(input, "sys_model");
    return list(input);
  }

  public BizResult del(Map<String,String> input){
    BizResult rst = new BizResult().setCode("0");
    rst.setType(String.valueOf(ResultType.REDIRECT));
    rst.setPage("model/add.jsp");
    return rst;
  }
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.