Example #1
0
 public GmarketVerifyData ViewVerifyResult(string gepId)
 {
     GepItemsData data = new GepItemsDac().View(Query.EQ("_id", Util.GetSafeLong(gepId)));
     string errorMessage = string.Empty;
     string[] arrError = data.ver_code.Split(',');
     foreach (var err in arrError)
     {
         errorMessage += new CommonBiz().ErrorCase(err);
     }
     GmarketVerifyData verData = new GmarketVerifyData();
     verData.GepItemsDataClass = data;
     verData.Message = errorMessage;
     return verData;
 }
Example #2
0
        public List<GmarketVerifyData> GmarketVerify(List<string> gepId)
        {
            List<QueryComplete> param = new List<QueryComplete>();
            foreach (var arrIdx in gepId)
            {
                param.Add(Query.EQ("_id", Util.GetSafeLong(arrIdx)));
            }
            QueryComplete query = Query.Or(param.ToArray());

            List<GmarketVerifyData> resultVerify = new List<GmarketVerifyData>();
            foreach (var data in new GepItemsDac().List(query).ToList())
            {
                GmarketVerifyData datas = new GmarketVerifyData();

                string statusResult = ItemCompareStatus(data.src_info.no);
                string selResult = "S";
                if (data.src_info.sel_no != null)
                {
                    selResult = ItemCompareSelItem(data.src_info.sel_no, data.src_info.sel_qty, data.src_info.sel_price);
                }
                string itemResult = ItemCompareGepItem(data.src_info.no, data.src_info.qty, data.src_info.price);
                string itemSettleResult = ItemCompareSettleMoney(data.src_info.no, data.src_info.settle_price);
                string itemDeliveryCondition = ItemCompareDeliveryCondition(data.src_info.no, data.src_info.dlv.dlv_fee_cond);

                //GEP ITEM에 저장
                UpdateGmarketVerifyGepItemDb(data, statusResult, selResult, itemResult, itemDeliveryCondition);

                if (statusResult != "S" || selResult != "S" || itemResult != "S" || itemSettleResult != "S" || itemDeliveryCondition != "S")
                {
                    string errorMessage = string.Empty;
                    errorMessage = ErrorCase(statusResult);
                    errorMessage += ErrorCase(selResult);
                    errorMessage += ErrorCase(itemResult);
                    errorMessage += ErrorCase(itemDeliveryCondition);

                    datas.Result = false;
                    datas.Message = errorMessage;
                }
                else
                {
                    datas.Result = true;
                    datas.Message = "";
                }
                resultVerify.Add(datas);
            }
            return resultVerify;
        }