Beispiel #1
0
        /// <summary>
        /// 退回操作
        /// </summary>
        /// <param name="businessID"></param>
        /// <param name="currentUser"></param>
        /// <param name="approvalContent"></param>
        /// <param name="uids"></param>
        /// <returns></returns>
        public override string RejectProcessToStartNode(string businessID, UserInfo currentUser, string approvalContent, string[] uids)
        {
            string _businessID = businessID.Split(',')[0];
            string ProType     = businessID.Split(',')[1]; // 参数2

            string strResult = base.RejectProcessToStartNode(_businessID, currentUser, approvalContent, uids);

            if (string.IsNullOrEmpty(strResult))
            {
                try
                {
                    if (!string.IsNullOrEmpty(ProType)) //合并的流程
                    {
                        //项目公司的
                        ProProcessController ProMonthRptController = new ProProcessController();
                        ProMonthRptController.BusinessID   = _businessID;
                        ProMonthRptController.ProType      = businessID.Split(',')[1];
                        ProMonthRptController.ExecType     = "afterAction";
                        ProMonthRptController.OperaionType = 6;
                        ProMonthRptController.DisposeBusinessData();//  处理业务数据,保存工作流审批Json
                        ProMonthRptController.ExecutionBusinessData(currentUser.UserLoginID);
                    }
                    else
                    {
                        var monthRpt = B_MonthlyreportOperator.Instance.GetMonthlyreport(_businessID.ToGuid());
                        //这里判断系统的类型
                        int SysType = StaticResource.Instance[monthRpt.SystemID, monthRpt.CreateTime].Category;

                        if (SysType == 2)
                        {
                            //项目公司的
                            ProProcessController ProMonthRptController = new ProProcessController();
                            ProMonthRptController.BusinessID   = _businessID;
                            ProMonthRptController.ProType      = businessID.Split(',')[1];
                            ProMonthRptController.ExecType     = "afterAction";
                            ProMonthRptController.OperaionType = 6;
                            ProMonthRptController.DisposeBusinessData();//  处理业务数据,保存工作流审批Json
                            ProMonthRptController.ExecutionBusinessData(currentUser.UserLoginID);
                        }
                        else
                        {
                            ProcessController MonthRptController = new ProcessController();
                            MonthRptController.BusinessID = _businessID;
                            MonthRptController.OnProcessExecuteBusinessData("", 6);
                            MonthRptController.DisposeBusinessData(currentUser.UserLoginID); //  处理业务数据,保存工作流审批Json
                        }
                    }

                    #region 日志
                    B_MonthlyReportAction BRA = new B_MonthlyReportAction();
                    BRA.Action          = "业务数据退回审批:businessID:" + _businessID;
                    BRA.Description     = strResult;
                    BRA.Operator        = "MonthlyApprovalService.RejectProcessToStartNode";
                    BRA.OperatorTime    = DateTime.Now;
                    BRA.IsDeleted       = true;
                    BRA.MonthlyReportID = _businessID.ToGuid();
                    B_MonthlyReportActionOperator.Instance.AddMonthlyReportAction(BRA);
                    #endregion
                }
                catch (Exception ex)
                {
                    strResult = "业务数据异常:" + ex.ToString();

                    #region 日志
                    B_MonthlyReportAction BRA = new B_MonthlyReportAction();
                    BRA.Action          = "业务数据退回审批:businessID:" + _businessID;
                    BRA.Description     = strResult;
                    BRA.Operator        = "MonthlyApprovalService.RejectProcessToStartNode";
                    BRA.OperatorTime    = DateTime.Now;
                    BRA.IsDeleted       = true;
                    BRA.MonthlyReportID = _businessID.ToGuid();
                    B_MonthlyReportActionOperator.Instance.AddMonthlyReportAction(BRA);
                    #endregion
                }
            }

            return(strResult);
        }
Beispiel #2
0
        /// <summary>
        /// 审批事件,审批到最后一个人走业务数据
        /// </summary>
        /// <param name="businessID"></param>
        /// <param name="currentUser"></param>
        /// <param name="approvalContent"></param>
        /// <returns></returns>
        public override string SubmitProcess(string businessID, UserInfo currentUser, string approvalContent)
        {
            string _businessID = businessID.Split(',')[0];
            string ProType     = businessID.Split(',')[1]; // 参数2

            string strResult = string.Empty;
            bool   blResult  = base.SubmitProcess(_businessID, currentUser, approvalContent, out strResult);

            #region 日志
            B_MonthlyReportAction BRA1 = new B_MonthlyReportAction();
            BRA1.Action          = "业务数据提交审批判断:businessID:" + _businessID;
            BRA1.Description     = "strResult : " + strResult + "; blResult :" + blResult.ToString();
            BRA1.Operator        = "MonthlyApprovalService.SubmitProcess";
            BRA1.OperatorTime    = DateTime.Now;
            BRA1.CreatorName     = currentUser.UserLoginID;
            BRA1.IsDeleted       = true;
            BRA1.MonthlyReportID = _businessID.ToGuid();
            B_MonthlyReportActionOperator.Instance.AddMonthlyReportAction(BRA1);
            #endregion

            if (string.IsNullOrEmpty(strResult) && blResult)
            {
                try
                {
                    if (!string.IsNullOrEmpty(ProType)) //合并的流程
                    {
                        //项目公司的
                        ProProcessController ProMonthRptController = new ProProcessController();
                        ProMonthRptController.BusinessID = _businessID;
                        ProMonthRptController.ProType    = businessID.Split(',')[1];
                        ProMonthRptController.ExecType   = "afterAction";

                        ProMonthRptController.DisposeBusinessData();//  处理业务数据,保存工作流审批Json
                        ProMonthRptController.ExecutionBusinessData(currentUser.UserLoginID);
                    }
                    else
                    {
                        var monthRpt = B_MonthlyreportOperator.Instance.GetMonthlyreport(_businessID.ToGuid());
                        //这里判断系统的类型
                        int SysType = StaticResource.Instance[monthRpt.SystemID, monthRpt.CreateTime].Category;

                        if (SysType == 2) //项目公司的分支流程
                        {
                            //项目公司的
                            ProProcessController ProMonthRptController = new ProProcessController();
                            ProMonthRptController.BusinessID = _businessID;
                            ProMonthRptController.ProType    = businessID.Split(',')[1];
                            ProMonthRptController.ExecType   = "afterAction";

                            ProMonthRptController.DisposeBusinessData();//  处理业务数据,保存工作流审批Json
                            ProMonthRptController.ExecutionBusinessData(currentUser.UserLoginID);
                        }
                        else
                        {
                            // 这是经营的 直管, 总部的
                            ProcessController MonthRptController = new ProcessController();
                            MonthRptController.BusinessID = _businessID;

                            MonthRptController.OnProcessCompletedBusinessData();
                            MonthRptController.DisposeBusinessData(currentUser.UserLoginID); //  处理业务数据,保存工作流审批Json
                        }
                    }

                    #region 日志
                    B_MonthlyReportAction BRA = new B_MonthlyReportAction();
                    BRA.Action          = "业务数据提交审批:businessID:" + _businessID;
                    BRA.Description     = strResult;
                    BRA.Operator        = "MonthlyApprovalService.SubmitProcess";
                    BRA.OperatorTime    = DateTime.Now;
                    BRA.IsDeleted       = true;
                    BRA.MonthlyReportID = _businessID.ToGuid();

                    B_MonthlyReportActionOperator.Instance.AddMonthlyReportAction(BRA);

                    #endregion
                }

                catch (Exception ex)
                {
                    strResult = "业务数据异常:" + ex.ToString();

                    #region 日志
                    B_MonthlyReportAction BRA = new B_MonthlyReportAction();
                    BRA.Action          = "业务数据提交审批:businessID:" + _businessID;
                    BRA.Description     = strResult;
                    BRA.Operator        = "MonthlyApprovalService.SubmitProcess";
                    BRA.OperatorTime    = DateTime.Now;
                    BRA.IsDeleted       = true;
                    BRA.MonthlyReportID = _businessID.ToGuid();
                    B_MonthlyReportActionOperator.Instance.AddMonthlyReportAction(BRA);
                    #endregion
                }
            }
            else
            {
                if (!string.IsNullOrEmpty(ProType))
                {
                    //项目公司的
                    ProProcessController ProMonthRptController = new ProProcessController();
                    ProMonthRptController.BusinessID = _businessID;
                    ProMonthRptController.ProType    = businessID.Split(',')[1];
                    ProMonthRptController.ExecType   = "afterAction";

                    ProMonthRptController.DisposeBusinessData();//  处理业务数据,保存工作流审批Json
                    ProMonthRptController.ExecutionBusinessData(currentUser.UserLoginID);
                }
                else
                {
                    //每个审批人都要做的操作
                    var monthRpt = B_MonthlyreportOperator.Instance.GetMonthlyreport(_businessID.ToGuid());
                    //这里判断系统的类型
                    int SysType = StaticResource.Instance[monthRpt.SystemID, monthRpt.CreateTime].Category;

                    if (SysType == 2)
                    {
                        //项目公司的
                        ProProcessController ProMonthRptController = new ProProcessController();
                        ProMonthRptController.BusinessID = _businessID;
                        ProMonthRptController.ProType    = businessID.Split(',')[1];
                        ProMonthRptController.ExecType   = "afterAction";

                        ProMonthRptController.DisposeBusinessData();//  处理业务数据,保存工作流审批Json
                        ProMonthRptController.ExecutionBusinessData(currentUser.UserLoginID);
                    }
                    else
                    {
                        // 这是经营的 直管, 总部的
                        ProcessController MonthRptController = new ProcessController();
                        MonthRptController.BusinessID = _businessID;

                        MonthRptController.DisposeBusinessData(currentUser.UserLoginID); //  处理业务数据,保存工作流审批Json
                    }
                }
            }


            return(strResult);
        }