Exemple #1
0
 void OnWarned(string sender, string requester)
 {
     _sender      = sender;
     _requester   = requester;
     _description = _sender + "向门店发出预警, 接收人:" + _requester;
     WorkFlowServiceBusiness.Send(_sender, new { answerMsg = _description, answerTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
     WorkFlowServiceBusiness.Send(_requester, new { answerMsg = _description, answerTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
 }
Exemple #2
0
 public void Request(string handler, int count)
 {
     if (_machine.CanFire(StockTrigger.Request))
     {
         _machine.Fire(_setRequestTrigger, handler, (int)count);
     }
     else
     {
         _description = "不能重复申请";
         WorkFlowServiceBusiness.Send(_requester, new { answerMsg = _description, answerTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
     }
 }
Exemple #3
0
        void OnRequested(string handler, int count)
        {
            _handler     = handler;
            _count       = (int)count;
            _description = "检查入库限额, 当前申请数:" + _count;
            WorkFlowServiceBusiness.Send(_requester, new { answerMsg = _description, answerTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });

            if (_count > _upper)
            {
                _machine.Fire(StockTrigger.Abort);
            }
            else
            {
                _description = _requester + "向商户提交申请, 处理人:" + _handler + ", 请求数:" + _count;
                WorkFlowServiceBusiness.Send(_requester, new { answerMsg = _description, answerTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
            }
        }
Exemple #4
0
 void OnStored()
 {
     _description = "入库成功, 处理人:" + _handler + ", 处理数:" + _count;
     WorkFlowServiceBusiness.Send(_requester, new { answerMsg = _description, answerTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
     WorkFlowServiceBusiness.Send(_handler, new { answerMsg = _description, answerTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
 }
Exemple #5
0
 void OnRefused(string description)
 {
     _description = description;
     WorkFlowServiceBusiness.Send(_requester, new { answerMsg = _description, answerTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
     WorkFlowServiceBusiness.Send(_handler, new { answerMsg = _description, answerTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
 }
Exemple #6
0
 void OnDeferred()
 {
     _description = "延期处理";
     WorkFlowServiceBusiness.Send(_requester, new { answerMsg = _description, answerTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
     WorkFlowServiceBusiness.Send(_handler, new { answerMsg = _description, answerTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
 }
Exemple #7
0
 void OnAborted()
 {
     _description = "超过入库限额数:" + _upper;
     WorkFlowServiceBusiness.Send(_requester, new { answerMsg = _description, answerTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
 }