WorkItemManager.cs
资源名称:H3_OA.rar [点击查看]
上传用户:li2971742
上传日期:2021-11-18
资源大小:39096k
文件大小:6k
源码类别:
OA系统
开发平台:
C#
- using System;
- using System.Web;
- using System.Collections;
- using System.Web.Services;
- using System.Web.Services.Protocols;
- /// <summary>
- /// Summary description for WorkItemManager
- /// </summary>
- [WebService(Namespace = "http://tempuri.org/")]
- [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
- public class WorkItemManager : System.Web.Services.WebService
- {
- public WorkItemManager()
- {
- //Uncomment the following line if using designed components
- //InitializeComponent();
- }
- [WebMethod]
- public string AddWorkItem(OThinker.H3.WorkItem.WorkItem WorkItem)
- {
- return OThinker.H3.Server.Engine.WorkItemManager.AddWorkItem(WorkItem);
- }
- [WebMethod]
- public OThinker.H3.WorkItem.WorkItem GetWorkItem(string WorkItemID)
- {
- return OThinker.H3.Server.Engine.WorkItemManager.GetWorkItem(WorkItemID);
- }
- /// <summary>
- /// 查询用户任务
- /// </summary>
- /// <param name="InstanceId">实例的ID,如果为UnspecifiedID,则忽略</param>
- /// <param name="Receiver">接收者,如果为null,则忽略</param>
- /// <param name="From">最小接收时间,如果为System.DateTime.MinValue,则忽略</param>
- /// <param name="To">最大接收时间,如果为System.DateTime.MaxValue,则忽略</param>
- /// <param name="State">状态,如果为Unfinished,则查询出等待或者处理中的,如果为Unspecified,则忽略</param>
- /// <returns></returns>
- [WebMethod]
- public string[] Query(
- string ActivityName,
- string[] Instances,
- string[] Participants,
- System.DateTime From,
- System.DateTime To,
- OThinker.H3.WorkItem.WorkItemState State)
- {
- return OThinker.H3.Server.Engine.WorkItemManager.Query(
- ActivityName,
- Instances,
- Participants,
- From,
- To,
- State);
- }
- [WebMethod]
- public long CancelWorkItem(string WorkItemID, bool Force)
- {
- return OThinker.H3.Server.Engine.WorkItemManager.CancelWorkItem(WorkItemID, Force);
- }
- [WebMethod]
- public long ForwardWorkItem(string WorkItemID, string UserID)
- {
- return OThinker.H3.Server.Engine.WorkItemManager.ForwardWorkItem(WorkItemID, UserID);
- }
- [WebMethod]
- public void DoWorkItem(string WorkItemID)
- {
- OThinker.H3.Server.Engine.WorkItemManager.DoWorkItem(WorkItemID);
- }
- [WebMethod]
- public void FinishWorkItem(string WorkItemID, string Finisher, string ParticipateGroup, OThinker.Data.BoolMatchValue Approval, string Comment)
- {
- OThinker.H3.Server.Engine.WorkItemManager.FinishWorkItem(WorkItemID, Finisher, ParticipateGroup, Approval, Comment);
- }
- [WebMethod]
- public void Urge(string InstanceId, string Urgency)
- {
- OThinker.H3.Server.Engine.WorkItemManager.Urge(InstanceId, Urgency);
- }
- /// <summary>
- /// 征询意见
- /// </summary>
- /// <param name="JobID"></param>
- /// <param name="Receivers"></param>
- /// <returns></returns>
- [WebMethod]
- public long Consult(string WorkItemID, string[] Receivers)
- {
- return OThinker.H3.Server.Engine.WorkItemManager.Consult(
- WorkItemID,
- Receivers);
- }
- [WebMethod]
- public string[] GetAllConsultants(string ConsultedWorkItemID)
- {
- return OThinker.H3.Server.Engine.WorkItemManager.GetAllConsultants(ConsultedWorkItemID);
- }
- /// <summary>
- /// 获得某个用户工作效率
- /// </summary>
- /// <param name="WorkflowPackage">流程的类型</param>
- /// <param name="WorkflowName">流程的名称</param>
- /// <param name="WorkflowVersion">流程的版本</param>
- /// <param name="ActivityName">任务的名称</param>
- /// <param name="From">最小接收时间</param>
- /// <param name="To">最大接收时间</param>
- /// <returns>用户效率</returns>
- [WebMethod]
- public OThinker.H3.WorkItem.UserPerformance GetUserPerformance(
- string WorkflowPackage,
- string WorkflowName,
- int WorkflowVersion,
- string ActivityName,
- string Receiver,
- System.DateTime From,
- System.DateTime To)
- {
- return OThinker.H3.Server.Engine.WorkItemManager.GetUserPerformance(
- WorkflowPackage,
- WorkflowName,
- WorkflowVersion,
- ActivityName,
- Receiver,
- From,
- To);
- }
- /// <summary>
- /// 获得某个流程的参与者,即参加过这个流程的某个实例的某个任务的人员
- /// </summary>
- /// <param name="WorkflowPackage"></param>
- /// <param name="WorkflowName"></param>
- /// <param name="WorkflowVersion"></param>
- /// <param name="From"></param>
- /// <param name="To"></param>
- /// <returns></returns>
- [WebMethod]
- public string[] GetWorkflowParticipants(
- string WorkflowPackage,
- string WorkflowName,
- int WorkflowVersion,
- string ActivityName,
- System.DateTime From,
- System.DateTime To)
- {
- return OThinker.H3.Server.Engine.WorkItemManager.GetWorkflowParticipants(
- WorkflowPackage,
- WorkflowName,
- WorkflowVersion,
- ActivityName,
- From,
- To);
- }
- [WebMethod]
- public string[] QueryHandledInstances(string[] Instances, string Participant, OThinker.H3.WorkItem.WorkItemState State)
- {
- return OThinker.H3.Server.Engine.WorkItemManager.QueryHandledInstances(
- Instances,
- Participant,
- State);
- }
- [WebMethod]
- public string[] GetLastWorkItems(string InstanceId, long TokenID, int TopNum, OThinker.H3.WorkItem.WorkItemType ItemType, OThinker.H3.WorkItem.WorkItemState State)
- {
- return OThinker.H3.Server.Engine.WorkItemManager.GetLastWorkItems(InstanceId, TokenID, TopNum, ItemType, State);
- }
- }