Пример #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);
        }