public static String getOperUser(String params, HttpServletRequest request) throws Exception {
    String[] p = params.split("\\|");
    String opertyp = p[0];
    String operidx = p[1];
    String objectno = p[2];
    String userid = p[3];

    String sql =
        "select PRKEY,DICTTBL_ID from WFTESTMST where CLIENTIP = '" + request.getRemoteAddr() + "'";
    Rowset rs = WorkFlowExecSql.wf_getRs(sql);
    String prkey = "";
    String dicttblid = "";
    if (rs.next()) {
      prkey = rs.getString(1);
      dicttblid = rs.getString(2);
    }
    sql =
        "select instance_no,model_no from wfinstrn where dicttbl_id = '"
            + dicttblid
            + "' and prkey='"
            + prkey
            + "'";
    rs = WorkFlowExecSql.wf_getRs(sql);
    String instanceno = "";
    String mdltypno = "";
    if (rs.next()) {
      instanceno = rs.getString(1);
      mdltypno = WorkFlowUnification.wf_getwftyp(rs.getString(2));
    }
    String rtn =
        WorkflowUtil.WorkFlowGetNextUserGoOn(
            instanceno, objectno, opertyp, operidx, userid, prkey, mdltypno, dicttblid);
    return rtn;
  }
  public static void Wf_createFstNode(String params, HttpServletRequest request) throws Exception {
    String[] p = params.split("\\;");
    String userid = p[0];
    String progid = p[1];
    String dicttblid = p[2];
    String seq = p[3];
    String mdltypno = p[4];
    String org_no = p[5];

    Database db = null;
    Rowset rs = null;
    String sql = null;
    try {
      sql = "select WFAPP_ID from WFMDLTYPMST where MDLTYP_NO = " + mdltypno;
      rs = WorkFlowExecSql.wf_getRs(sql);
      String appid = "";
      if (rs.next()) {
        appid = rs.getString(1);
      }
      WorkflowUtil.creatFstNode(
          dicttblid, progid, appid, seq, mdltypno, userid, "0", "2", null, "", org_no);
    } catch (Exception se) {
      se.printStackTrace();
    } finally {
      if (db != null) {
        db.cleanup();
      }
    }
  }
  public static void Wf_createFstNodeS(String params, HttpServletRequest request) throws Exception {
    String[] p = params.split("\\;");
    String userid = p[0];
    String progid = p[1];
    String dicttblid = p[2];
    String seq = p[3];
    String mdltypno = p[4];
    String org_no = p[5];
    Database db = null;
    Rowset rs = null;
    Rowset rsin = null;
    Rowset obrs = null;
    Rowset currrs = null;
    String sql = null;
    String startobj = null;
    StringBuffer rtn = new StringBuffer();
    sql = "SELECT user_id  FROM WFSTRIGMST WHERE MDLTYP_NO='" + mdltypno + "' and USER_FLG='1'";
    try {
      rs = WorkFlowExecSql.wf_getRs(sql);
      int i = 0;
      while (rs.next()) {
        if (i < rs.getRowCount()) {
          rtn.append(rs.getString(1) + ";");
        } else {
          rtn.append(rs.getString(1));
        }
        i++;
      }
      String version = WorkFlowUtilExt.getWorkFlowCurrVerison(mdltypno);
      sql =
          "select object_no from wfobjmst t where t.model_no='"
              + version
              + "' and t.object_typ='01'";
      obrs = WorkFlowExecSql.wf_getRs(sql);
      if (obrs.next()) {
        startobj = obrs.getString(1);
      }
      sql = "select object_no from vw_wfobjrelmst where head='" + startobj + "'";

      currrs = WorkFlowExecSql.wf_getRs(sql);
      if (currrs.next()) {
        rtn = new StringBuffer(currrs.getString(1) + "|").append(rtn);
      }
      sql = "select WFAPP_ID from WFMDLTYPMST where MDLTYP_NO = " + mdltypno;
      rsin = WorkFlowExecSql.wf_getRs(sql);
      String appid = "";
      if (rs.next()) {
        appid = rsin.getString(1);
      }
      WorkflowUtil.creatFstNode(
          dicttblid, progid, appid, seq, mdltypno, userid, "0", "1", rtn.toString(), "", org_no);
    } catch (Exception se) {
      se.printStackTrace();
    } finally {
      if (db != null) {
        db.cleanup();
      }
    }
  }
  public static String postObj(String params, HttpServletRequest request) throws Exception {
    String[] p = params.split("\\@");
    String opertyp = p[0];
    String operidx = p[1];
    String objectno = p[2];
    String dicttblid = p[3];
    String progid = p[4];
    String userid = p[5];
    String usrdoc = p[6];
    // String mdltypno = p[7];
    String prkey = p[8];
    String comment = JspWfOaTool.getBytesPar(p[9]);
    String backObjectNo = "";
    String collaborationManList = p[10];
    String workflowrapid = p[11];
    String avisouser = p[12];
    if (!"".equalsIgnoreCase(collaborationManList)) {
      collaborationManList = collaborationManList.replaceAll(",", ";");
    }
    String instanceno = "";
    String actobjno = "";
    if ("04".equals(opertyp)) {
      backObjectNo = p[15];
    }
    actobjno = p[13];
    instanceno = p[14];

    if (usrdoc.equalsIgnoreCase("none")) {
      WorkflowUtil.postNodeObj(
          instanceno,
          actobjno,
          objectno,
          opertyp,
          operidx,
          userid,
          workflowrapid,
          comment,
          prkey,
          progid,
          dicttblid,
          "1",
          "2",
          backObjectNo,
          "",
          collaborationManList,
          usrdoc,
          avisouser);
    } else {
      WorkflowUtil.postNodeObj(
          instanceno,
          actobjno,
          objectno,
          opertyp,
          operidx,
          userid,
          workflowrapid,
          comment,
          prkey,
          progid,
          dicttblid,
          "1",
          "1",
          backObjectNo,
          "",
          collaborationManList,
          usrdoc,
          avisouser);
    }
    // 将工作流中的处理人组织关系反填到临时表。
    OAWFRewrite tf = new OAWFRewrite();
    tf.OADOCRECVMST_WFrewrite(dicttblid, prkey, userid, instanceno, objectno);
    return usrdoc;
  }