Пример #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
                {
                    TargetPlanProcessController TPPC = new TargetPlanProcessController();
                    TPPC.BusinessID = _businessID;
                    TPPC.DisposeBusinessData(currentUser.UserLoginID);
                    TPPC.OnProcessExecute("", 6);

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

            return(strResult);
        }
Пример #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        = "TargetApprovalService.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
                {
                    TargetPlanProcessController TPPC = new TargetPlanProcessController();
                    TPPC.BusinessID = _businessID;
                    TPPC.OnProecssCompleted();
                    TPPC.DisposeBusinessData(currentUser.UserLoginID);


                    #region 日志
                    B_MonthlyReportAction BRA = new B_MonthlyReportAction();
                    BRA.Action          = "业务数据提交审批:businessID:" + _businessID;
                    BRA.Description     = strResult;
                    BRA.Operator        = "TargetApprovalService.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        = "TargetApprovalService.SubmitProcess";
                    BRA.OperatorTime    = DateTime.Now;
                    BRA.IsDeleted       = true;
                    BRA.MonthlyReportID = _businessID.ToGuid();
                    B_MonthlyReportActionOperator.Instance.AddMonthlyReportAction(BRA);
                    #endregion
                }
            }
            else
            {
                TargetPlanProcessController TPPC = new TargetPlanProcessController();
                TPPC.BusinessID = _businessID;

                TPPC.DisposeBusinessData(currentUser.UserLoginID);
            }


            return(strResult);
        }