Esempio n. 1
0
        // 오픈 마켓들은 바로 사용처리를 해줬기 때문에 DB 에 AR, UR 이 있으면 그냥 A, U 로 변경한다.
        public override bool OpenMarketChangeState()
        {
            try
            {
                foreach (var pData in DBSelected_List_)
                {
                    if (pData.Value.State_ == DealStateManager.Instance.StateString_[(Int32)DealStateEnum.FINISH_RESERVED])
                    {
                        pData.Value.State_ = DealStateManager.Instance.StateString_[(Int32)DealStateEnum.USED];
                        if (DBProccess_List_.ContainsKey(pData.Value.channelOrderCode_) == false)
                        {
                            DBProccess_List_.Add(pData.Value.channelOrderCode_, pData.Value);
                        }
                    }
                    else if (pData.Value.State_ == DealStateManager.Instance.StateString_[(Int32)DealStateEnum.AR])
                    {
                        pData.Value.State_ = DealStateManager.Instance.StateString_[(Int32)DealStateEnum.A];
                        if (DBProccess_List_.ContainsKey(pData.Value.channelOrderCode_) == false)
                        {
                            DBProccess_List_.Add(pData.Value.channelOrderCode_, pData.Value);
                        }
                    }
                }
            }
            catch (System.Exception ex)
            {
                NewLogManager2.Instance.Log(string.Format("Error bool OpenMarketChangeState - {0}", ex.Message));
                return(false);
            }

            return(true);
        }
Esempio n. 2
0
        public override bool CheckNeedFixUp()
        {
            foreach (var pData in Excel_List_)
            {
                if (DBSelected_List_.ContainsKey(pData.Key) == true)
                {
                    COrderData pDBData = DBSelected_List_[pData.Value.channelOrderCode_];

                    if (pDBData.State_ == DealStateManager.Instance.StateString_[(Int32)DealStateEnum.USED])
                    {
                        if (pData.Value.ExData_Use_.IndexOf(LQCrawlerInfo_.ExData_UseCheck_) < 0)
                        {
                            pDBData.State_ = DealStateManager.Instance.StateString_[(Int32)DealStateEnum.FINISH_RESERVED];
                            DBProccess_List_.Add(pDBData.channelOrderCode_, pDBData);
                        }
                    }
                    else if (pDBData.State_ == DealStateManager.Instance.StateString_[(Int32)DealStateEnum.A])
                    {
                        if (pData.Value.ExData_Use_.IndexOf(LQCrawlerInfo_.ExData_UseCheck_) < 0)
                        {
                            pDBData.State_ = DealStateManager.Instance.StateString_[(Int32)DealStateEnum.AR];
                            DBProccess_List_.Add(pDBData.channelOrderCode_, pDBData);
                        }
                    }
                }
            }

            return(true);
        }
Esempio n. 3
0
        // 웹에서 사용처리
        public override bool Web_Use()
        {
            try
            {
                ProcessStateManager.Instance.NeedWebProcessCount_ = WebProcess_List_.Count;

                foreach (var pData in WebProcess_List_)
                {
                    // 원데이맘은 사용처리 할때 개수가 필요함
                    string tempOrderCode = pData.Value.channelOrderCode_;
                    Int32  n             = tempOrderCode.LastIndexOf("_");
                    tempOrderCode = tempOrderCode.Substring(0, n);

                    if (pData.Value.State_ == DealStateManager.Instance.StateString_[(Int32)DealStateEnum.FINISH_RESERVED])
                    {
                        if (Use_Deal(pData.Value.goodsSeq_, tempOrderCode, pData.Value.goodsCode_) == true)
                        {
                            CrawlerManager.Instance.GetResultData().TotalUseDeal_++;
                            pData.Value.State_ = DealStateManager.Instance.StateString_[(Int32)DealStateEnum.USED];
                            DBProccess_List_.Add(pData.Value.channelOrderCode_, pData.Value);
                            ProcessStateManager.Instance.CurWebProcessCount_++;
                        }
                        else
                        {
                            ProcessStateManager.Instance.FailedWebProcessCount_++;
                        }
                    }
                    else if (pData.Value.State_ == DealStateManager.Instance.StateString_[(Int32)DealStateEnum.AR])
                    {
                        if (Use_Deal(pData.Value.goodsSeq_, tempOrderCode, pData.Value.goodsCode_) == true)
                        {
                            CrawlerManager.Instance.GetResultData().TotalUseDeal_++;
                            pData.Value.State_ = DealStateManager.Instance.StateString_[(Int32)DealStateEnum.A];
                            DBProccess_List_.Add(pData.Value.channelOrderCode_, pData.Value);
                            ProcessStateManager.Instance.CurWebProcessCount_++;
                        }
                        else
                        {
                            ProcessStateManager.Instance.FailedWebProcessCount_++;
                        }
                    }
                }
            }
            catch (System.Exception ex)
            {
                NewLogManager2.Instance.Log(string.Format("Error bool Web_Use - {0}", ex.Message));
                return(false);
            }

            return(true);
        }
Esempio n. 4
0
        // 웹에서 사용처리
        public override bool Web_Use()
        {
            ProcessStateManager.Instance.NeedWebProcessCount_ = WebProcess_List_.Count;
            foreach (var pData in WebProcess_List_)
            {
                if (pData.Value.State_ == DealStateManager.Instance.StateString_[(Int32)DealStateEnum.FINISH_RESERVED])
                {
                    if (Use_Deal(pData.Value.goodsSeq_, pData.Value.channelOrderCode_, pData.Value.goodsCode_) == true)
                    {
                        CrawlerManager.Instance.GetResultData().TotalUseDeal_++;
                        pData.Value.State_ = DealStateManager.Instance.StateString_[(Int32)DealStateEnum.USED];
                        DBProccess_List_.Add(pData.Value.channelOrderCode_, pData.Value);
                        ProcessStateManager.Instance.CurWebProcessCount_++;
                    }
                    else
                    {
                        ProcessStateManager.Instance.FailedWebProcessCount_++;
                    }
                }
                else if (pData.Value.State_ == DealStateManager.Instance.StateString_[(Int32)DealStateEnum.AR])
                {
                    if (Use_Deal(pData.Value.goodsSeq_, pData.Value.channelOrderCode_, pData.Value.goodsCode_) == true)
                    {
                        CrawlerManager.Instance.GetResultData().TotalUseDeal_++;
                        pData.Value.State_ = DealStateManager.Instance.StateString_[(Int32)DealStateEnum.A];
                        DBProccess_List_.Add(pData.Value.channelOrderCode_, pData.Value);
                        ProcessStateManager.Instance.CurWebProcessCount_++;
                    }
                    else
                    {
                        ProcessStateManager.Instance.FailedWebProcessCount_++;
                    }
                }
            }

            return(true);
        }