Пример #1
0
        /// <summary>
        /// 调用业务系统接口 推送状态处理
        /// </summary>
        /// <param name="msgItem"></param>
        /// <returns></returns>
        private ResponseResultInfo CallBusinessService(ProcessEventMessage msgItem)
        {
            PushBusInterfaceModel pushInfo = new PushBusInterfaceModel();

            if (msgItem.EventType == ProcessEventEnum.ProcessStarted.ToString())       //流程开始
            {
                pushInfo.actionResult = ActionType.Submit.ToString();                  //已提交
            }
            else if (msgItem.EventType == ProcessEventEnum.ActivityStarted.ToString()) //节点开始
            {
                pushInfo.actionResult = ActionType.Approve.ToString();                 //同意
                if (msgItem.ActivityName == SystemSettings.ReActivity)
                {
                    //000重新发起环节开始 审批结果为驳回
                    pushInfo.actionResult = ActionType.Reject.ToString();//驳回
                }
            }
            else if (msgItem.EventType == ProcessEventEnum.ActivityCompleted.ToString()) //节点结束
            {
                pushInfo.actionResult = ActionType.Approve.ToString();                   //同意
                if (msgItem.ActivityName == SystemSettings.ReActivity)
                {
                    pushInfo.actionResult = ActionType.ReSubmit.ToString();//重新提交
                }
            }
            else if (msgItem.EventType == ProcessEventEnum.ProcessCompleted.ToString()) //流程结束
            {
                pushInfo.actionResult = ActionType.AdminFinalPass.ToString();           //审批通过
                if (_formInstanceSevice.IsProcessDelete(msgItem.FormId))                //单据有作废 则 审批结果为作废
                {
                    pushInfo.actionResult = ActionType.Cancel.ToString();               //作废
                }
            }
            else if (msgItem.EventType == ProcessEventEnum.ActivityRejected.ToString()) //节点驳回
            {
                pushInfo.actionResult = ActionType.Reject.ToString();                   //驳回
            }

            return(_requestBusinessService.RequestBusInterface(msgItem, pushInfo));
        }