/// <summary>
/// 取得所有参与流程人员(ID,姓名)
/// </summary>
/// <param name="strFlowInstID">流程实例编号</param>
/// <returns></returns>
public static IList GetAllInvoledPerson(string strFlowInstID)
{
IList arrList = new ArrayList();
string strSql = "select tft.do_user_no,tft.do_user_nm staff_name, tft.dept_id,s.staff_name_py from tf_flow_task tft left outer join staff s on tft.do_user_no=s.staff_no where tft.flow_inst_no = '"+strFlowInstID+"' and tft.do_user_no is not null";
strSql = strSql + " union select tft.entruster_no, tft.entruster_nm staff_Name ,tft.en_dept_id,s.staff_name_py from tf_flow_task tft left outer join staff s on tft.do_user_no=s.staff_no where tft.flow_inst_no = '"+strFlowInstID+"' and tft.entruster_no is not null";
DataTable dt = new DataTable();
using(OraHelper oraHelper = new OraHelper())
{
dt = oraHelper.RunQuerySql(strSql,"DTAllPerson");
}
if(dt.Rows.Count>0)
{
for(int i=0;i<dt.Rows.Count;i++)
{
DBUser user = new DBUser();
user.StrUserNO = dt.Rows[i]["do_user_no"]!=null?dt.Rows[i]["do_user_no"].ToString():"";
user.StrUserName = dt.Rows[i]["staff_name"]!=null?dt.Rows[i]["staff_name"].ToString():"";
user.StrSelectedDeptNO = dt.Rows[i]["dept_id"]!=null?dt.Rows[i]["dept_id"].ToString():"";
user.StrUserNamePy = dt.Rows[i]["staff_name_py"]!=null?dt.Rows[i]["staff_name_py"].ToString():"";
arrList.Add(user);
}
}
return arrList;
}
调用方法为
IList arrList = new ArrayList();
FlowNodeInfo flowNodeInfo = new FlowNodeInfo();
//如果是尾节点,则取得流程以前环节所有处理人员
if(sendParameter.IsLastNode==true &&sendParameter.StrFlowInstNO!=null)
{
arrList.Add(GetAllInvoledPerson(sendParameter.StrFlowInstNO));
FlowInstInfo info = new FlowInstInfo();
info.StrFlowInstName = sendParameter.StrSubjectName;
arrList.Add(info);
return arrList;
}