Esempio n. 1
0
        public string GetInfo(string strBSID, string strBOID)
        {
            strBSID = strBSID + "_" + System.Reflection.MethodBase.GetCurrentMethod().Name;
            string errMsg   = string.Empty;
            int    reqState = 1;
            string result   = string.Empty;

            try
            {
                MessageContext ctx = new MessageContext()
                {
                    strBOID = strBOID,
                    strBSID = strBSID
                };
                MessageHandlerBase handler = MessageHandlerFactory.GetMessageHandler(strBSID, ctx);
                result = handler.Execute().ToString();
            }
            catch (Exception ex)
            {
                errMsg   = ex.Message;
                reqState = 0;
            }
            finally
            {
                LogBLL.WriteLogInterface("strBSID:" + strBSID
                                         + "  strBOID:" + strBOID,
                                         result, " 获取表单数据",
                                         reqState, "BPM", "电商资金", errMsg, "WebService");
            }
            return(result);
        }
Esempio n. 2
0
        public void Close(string strBSID, string strBOID, int iProcInstID,
                          string strStepName, ProcessInstanceStatus eProcessInstanceResult,
                          string strApproverId, string strComment, DateTime dtTime)
        {
            strBSID = strBSID + "_" + System.Reflection.MethodBase.GetCurrentMethod().Name;
            string errMsg   = string.Empty;
            int    reqState = 1;

            try
            {
                var _approveStatus = (int)ApproveStatus.approved;
                if (eProcessInstanceResult == ProcessInstanceStatus.Approved)
                {
                    _approveStatus = (int)ApproveStatus.approved;
                }
                else if (eProcessInstanceResult == ProcessInstanceStatus.Denied)
                {
                    _approveStatus = (int)ApproveStatus.unapproved;
                }
                MessageContext ctx = new MessageContext()
                {
                    iProcInstID            = iProcInstID,
                    strBOID                = strBOID,
                    strBSID                = strBSID,
                    strComment             = strComment,
                    dtTime                 = dtTime,
                    strStepName            = strStepName,
                    eProcessInstanceResult = (int)eProcessInstanceResult,
                    ApproveStatus          = _approveStatus,
                    strApproverId          = strApproverId
                };
                MessageHandlerBase handler = MessageHandlerFactory.GetMessageHandler(strBSID, ctx);
                handler.Execute();
            }
            catch (Exception ex)
            {
                errMsg   = ex.Message;
                reqState = 0;
            }
            finally
            {
                LogBLL.WriteLogInterface("strBSID:" + strBSID
                                         + "  strBOID:" + strBOID
                                         + "  iProcInstID:" + iProcInstID
                                         + "  strStepName:" + strStepName
                                         + "  strApproverId:" + strApproverId
                                         + "  eProcessInstanceResult:" + eProcessInstanceResult.ToString()
                                         + "  strComment:" + strComment
                                         + "  dtTime:" + dtTime.ToString(),
                                         "", " 流程审批结束",
                                         reqState, "BPM", "电商资金", errMsg, "WebService");
            }
        }
Esempio n. 3
0
        public void Rework(string strBSID, string strBOID, int iProcInstID,
                           string strStepName, string strApproverId,
                           UserAction eAction,
                           string strComment,
                           DateTime dtTime)
        {
            strBSID = strBSID + "_" + System.Reflection.MethodBase.GetCurrentMethod().Name;
            string errMsg   = string.Empty;
            int    reqState = 1;

            try
            {
                MessageContext ctx = new MessageContext()
                {
                    iProcInstID   = iProcInstID,
                    strBOID       = strBOID,
                    strBSID       = strBSID,
                    strComment    = strComment,
                    dtTime        = dtTime,
                    strStepName   = strStepName,
                    eAction       = (int)eAction,
                    ApproveStatus = (int)ApproveStatus.draft,
                    strApproverId = strApproverId
                };
                MessageHandlerBase handler = MessageHandlerFactory.GetMessageHandler(strBSID, ctx);
                handler.Execute();
            }
            catch (Exception ex)
            {
                errMsg   = ex.Message;
                reqState = 0;
            }
            finally
            {
                LogBLL.WriteLogInterface("strBSID:" + strBSID
                                         + "  strBOID:" + strBOID
                                         + "  iProcInstID:" + iProcInstID
                                         + "  strStepName:" + strStepName
                                         + "  strApproverId:" + strApproverId
                                         + "  eAction:" + eAction.ToString()
                                         + "  strComment:" + strComment
                                         + "  dtTime:" + dtTime.ToString(),
                                         "", " 流程审批(撤回,退回)",
                                         reqState, "BPM", "电商资金", errMsg, "WebService");
            }
        }
Esempio n. 4
0
        public void CreateResult(string strBSID, string strBOID, bool bSuccess, int iProcInstID, string strMessage)
        {
            strBSID = strBSID + "_" + System.Reflection.MethodBase.GetCurrentMethod().Name;
            string errMsg   = string.Empty;
            int    reqState = 1;

            try
            {
                if (!bSuccess)
                {
                    reqState = 0;
                    errMsg   = "创建流程实例未成功!";
                    return;
                }
                MessageContext ctx = new MessageContext()
                {
                    bSuccess      = bSuccess,
                    iProcInstID   = iProcInstID,
                    strBOID       = strBOID,
                    strBSID       = strBSID,
                    strMessage    = strMessage,
                    dtTime        = DateTime.Now,
                    ApproveStatus = (int)ApproveStatus.in_approval
                };
                MessageHandlerBase handler = MessageHandlerFactory.GetMessageHandler(strBSID, ctx);
                handler.Execute();
            }
            catch (Exception ex)
            {
                errMsg   = ex.Message;
                reqState = 0;
            }
            finally
            {
                LogBLL.WriteLogInterface("strBSID:" + strBSID
                                         + "  strBOID:" + strBOID
                                         + "  bSuccess:" + bSuccess
                                         + "  iProcInstID:" + iProcInstID
                                         + "  strMessage:" + strMessage,
                                         "", "创建流程结束接口",
                                         reqState, "BPM", "电商资金", errMsg, "WebService");
            }
        }