/// <summary>
        /// 查询最终订单状态(供应商)
        /// </summary>
        /// <returns></returns>
        public static OrderInfoEntity orderQueryByOrderNum(OrderInfoEntity OrderInfoEntity)
        {
            OrderInfoDBEntity dbParm = (OrderInfoEntity.OrderInfoDBEntity.Count > 0) ? OrderInfoEntity.OrderInfoDBEntity[0] : new OrderInfoDBEntity();

            string DataString = "{\"orderNum\":\"" + dbParm.FOG_ORDER_NUM + "\"}";

            string HotelPrRoomPlanUrl = JsonRequestURLBuilder.orderQueryByOrderNumV2();
            CallWebPage callWebPage = new CallWebPage();
            string strHotelPrRoomPlan = callWebPage.CallWebByURL(HotelPrRoomPlanUrl, DataString);
            JObject oHotelPrRoomPlan = JObject.Parse(strHotelPrRoomPlan);

            if ("success".Equals(JsonRequestURLBuilder.GetJsonStringValue(oHotelPrRoomPlan, "message").Trim('"')))
            {

                OrderInfoEntity.ErrorMSG = oHotelPrRoomPlan.SelectToken("result").SelectToken("statusDesc").ToString().Trim('"') + "(" + oHotelPrRoomPlan.SelectToken("result").SelectToken("statusOriginal").ToString().Trim('"') + ")";//最终状态(状态描述)
                OrderInfoEntity.Result = 1;
            }
            else
            {
                OrderInfoEntity.ErrorMSG = "";
                OrderInfoEntity.Result = 2;
            }

            return OrderInfoEntity;
        }
        public static APPContentEntity CommonSelect(APPContentEntity appcontentEntity)
        {
            DataSet dsResult = new DataSet();
            dsResult.Tables.Add(new DataTable());
            dsResult.Tables[0].Columns.Add(new DataColumn("cityid"));
            dsResult.Tables[0].Columns.Add(new DataColumn("cityNM"));
            try
            {
                string url = JsonRequestURLBuilder.getSearchCityUrl();
                CallWebPage callWebPage = new CallWebPage();
                string strJson = callWebPage.CallWebByURL(url, "");

                //解析json数据
                JObject o = JObject.Parse(strJson);
                //JArray jsa = (JArray)o.SelectToken("result");
                string oCityList = o.SelectToken("result").ToString();
                JArray jsa = (JArray)JsonConvert.DeserializeObject(oCityList);

                for (int i = 0; i < jsa.Count; i++)
                {
                    JObject jso = (JObject)jsa[i];
                    DataRow drRow = dsResult.Tables[0].NewRow();
                    drRow["cityid"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "cityid").Trim('"');
                    drRow["cityNM"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "namecn").Trim('"') + "[" + JsonRequestURLBuilder.GetJsonStringValue(jso, "nameen").Trim('"') + "]";
                    dsResult.Tables[0].Rows.Add(drRow);
                }
            }
            catch
            {

            }
            appcontentEntity.QueryResult = dsResult;
            return appcontentEntity;
        }
        public static UserEntity getSignByPhoneForCC(UserEntity userEntity)
        {
            string DataString = string.Empty;
            UserDBEntity dbParm = (userEntity.UserDBEntity.Count > 0) ? userEntity.UserDBEntity[0] : new UserDBEntity();

            DataString = "{\"mobile\":\"" + dbParm.LoginMobile + "\"," + "\"isUpdate\":\"" + "1" + "\"}";

            string SaveCashBackRequestUrl = JsonRequestURLBuilder.getSignByPhoneForCCV2();// +PostSignKey(DataString);
            CallWebPage callWebPage = new CallWebPage();
            string strSaveCashBack = callWebPage.CallWebByURL(SaveCashBackRequestUrl, DataString);
            JObject oSaveCashBack = JObject.Parse(strSaveCashBack);

            if ("success".Equals(JsonRequestURLBuilder.GetJsonStringValue(oSaveCashBack, "message").Trim('"')))
            {
                userEntity.Result = 1;
                userEntity.UserDBEntity[0].SignKey = JsonRequestURLBuilder.GetJsonStringValue(oSaveCashBack, "result").Trim('"');
                //string oIDs = oSaveCashBack.SelectToken("result").ToString();
                //JObject oID = JObject.Parse(oIDs);
                //userEntity.UserDBEntity[0].SignKey = oID.SelectToken("sn").ToString().Trim('"');
            }
            else
            {
                string ErrorMSG = JsonRequestURLBuilder.GetJsonStringValue(oSaveCashBack, "message").Trim('"');
                userEntity.ErrorMSG = ErrorMSG;
                userEntity.Result = 2;
            }
            return userEntity;
        }
        public static LmSystemLogEntity OrderConfirmSendMsgToLMSales(LmSystemLogEntity dbParm, string strHotelID, string strSendMSG)
        {
            DataSet dsSales = LmSystemLogDA.GetSalesLMHotelInfo(strHotelID);

            if (dsSales.Tables.Count == 0 || dsSales.Tables[0].Rows.Count == 0 || String.IsNullOrEmpty(dsSales.Tables[0].Rows[0]["User_Tel"].ToString()))
            {
                return dbParm;
            }

            string DataString = "";
            DataString = DataString + "{\"method\":\"save\",\"data\":{\"syscode\":\"" + "CMS" + "\",\"reqid\":\"" + dsSales.Tables[0].Rows[0]["User_Tel"].ToString() + "\",\"bizcode\":\"" + "CMS-订单确认短信通知" + "\",";
            DataString = DataString + "\"cnfnum\":\"" + dbParm.FogOrderID + "\",\"mobiles\":\"" + dsSales.Tables[0].Rows[0]["User_Tel"].ToString() + "\",\"msg\":\"" + strSendMSG + "\",";
            DataString = DataString + "\"sign\":\"" + PostSignKey("CMS" + dsSales.Tables[0].Rows[0]["User_Tel"].ToString()) + "\"},\"version\":\"v1.0\"}";

            string HotelFullRoomUrl = JsonRequestURLBuilder.applySendMsgV2();
            CallWebPage callWebPage = new CallWebPage();
            string strHotelFullRoom = callWebPage.CallWebByURL(HotelFullRoomUrl, DataString);
            JObject oHotelFullRoom = JObject.Parse(strHotelFullRoom);
            if ("success".Equals(JsonRequestURLBuilder.GetJsonStringValue(oHotelFullRoom, "message").Trim('"')))
            {
                dbParm.Result = 1;
                dbParm.ErrorMSG = "发送成功!";
            }
            else
            {
                dbParm.Result = 2;
                dbParm.ErrorMSG = "发送失败!" + JsonRequestURLBuilder.GetJsonStringValue(oHotelFullRoom, "message").Trim('"');
            }

            return dbParm;
        }
        /// <summary>
        /// 支付宝充值接口
        /// </summary>
        /// <returns></returns>
        public static CashBackEntity autoPay(CashBackEntity cashBackEntity)
        {
            string DataString = string.Empty;
            CashBackDBEntity dbParm = (cashBackEntity.CashBackDBEntity.Count > 0) ? cashBackEntity.CashBackDBEntity[0] : new CashBackDBEntity();
            if (dbParm.BackCashType == "3")//手机充值
            {
                DataString = "{\"loginMobile\":\"" + dbParm.LoginMobile + "\",\"amount\":" + dbParm.BackCashAmount + ",\"applyType\":\"" + dbParm.BackCashType + "\",\"rechargePhoneNumber\":\"" + dbParm.Phone + "\",\"sn\":\"" + dbParm.Sn + "\",\"Remark\":\"" + dbParm.Remark + "\",\"operater\":\"" + dbParm.CreateUser + "\"}";
            }
            else if (dbParm.BackCashType == "2")//支付宝返还
            {
                DataString = "{\"loginMobile\":\"" + dbParm.LoginMobile + "\",\"amount\":" + dbParm.BackCashAmount + ",\"applyType\":\"" + dbParm.BackCashType + "\",\"alipayAccount\":\"" + dbParm.AlipayAccount + "\",\"userName\":\"" + dbParm.AlipayName + "\",\"sn\":\"" + dbParm.Sn + "\",\"Remark\":\"" + dbParm.Remark + "\",\"operater\":\"" + dbParm.CreateUser + "\"}";
            }
            string SaveCashBackRequestUrl = JsonRequestURLBuilder.autoPay();
            CallWebPage callWebPage = new CallWebPage();
            string strSaveCashBack = callWebPage.CallWebByURL(SaveCashBackRequestUrl, DataString);
            JObject oSaveCashBack = JObject.Parse(strSaveCashBack);

            if ("200".Equals(JsonRequestURLBuilder.GetJsonStringValue(oSaveCashBack, "code").Trim('"')))
            {
                //成功
                cashBackEntity.Result = 1;
                cashBackEntity.ErrorMSG = JsonRequestURLBuilder.GetJsonStringValue(oSaveCashBack, "message").Trim('"');
            }
            else
            {
                cashBackEntity.Result = 2;
                cashBackEntity.ErrorMSG = JsonRequestURLBuilder.GetJsonStringValue(oSaveCashBack, "message").Trim('"');

            }
            return cashBackEntity;
        }
        public static string CommonCallWebUrl(string strUrl)
        {
            string strJson = string.Empty;
            try
            {
                CallWebPage callWebPage = new CallWebPage();
                strJson = callWebPage.CallWebByURL(strUrl, "");
            }
            catch
            {

            }
            return strJson;
        }
        /// <summary>
        /// 房态控制 --  批量更新计划的接口  type:1 满房、2 关房、3 开房
        /// </summary>
        /// <param name="appcontentEntity"></param>
        /// <returns></returns>
        public static APPContentEntity BatchUpdatePlan(APPContentEntity appcontentEntity)
        {
            APPContentDBEntity dbParm = (appcontentEntity.APPContentDBEntity.Count > 0) ? appcontentEntity.APPContentDBEntity[0] : new APPContentDBEntity();
            string DataString = "{\"hotelId\":\"" + dbParm.HotelID + "\",\"whatDay\":\"1,2,3,4,5,6,7\",\"beginDate\":\"" + dbParm.StartDTime + "\",\"endDate\":\"" + dbParm.EndDTime + "\",\"operator\":\"" + dbParm.UpdateUser + "\",\"type\":\"" + dbParm.TypeID + "\",\"priceCodeRoom\":[{\"priceCode\":\"LMBAR\",\"roomCode\":\"" + dbParm.LmbarRoomCode + "\"},{\"priceCode\":\"LMBAR2\",\"roomCode\":\"" + dbParm.Lmbar2RoomCode + "\"}]}";

            string HotelFullRoomUrl = JsonRequestURLBuilder.BatchUpdatePlan();

            CallWebPage callWebPage = new CallWebPage();
            string strHotelFullRoom = callWebPage.CallWebByURL(HotelFullRoomUrl, DataString);

            JObject oHotelFullRoom = JObject.Parse(strHotelFullRoom);

            if ("200".Equals(JsonRequestURLBuilder.GetJsonStringValue(oHotelFullRoom, "code").Trim('"')))
            {
                appcontentEntity.Result = 1;
            }
            else
            {
                appcontentEntity.Result = 2;
            }

            return appcontentEntity;
        }
        /// <summary>
        /// 获取计划接口   不区分价格代码  直接返回Json格式数据(只返回Result的部分数据)
        /// </summary>
        /// <param name="appcontentEntity"></param>
        /// <returns></returns>
        public static HotelInfoEntity GetPlanListByResult(HotelInfoEntity hotelInfoEntity)
        {
            HotelInfoDBEntity dbParm = (hotelInfoEntity.HotelInfoDBEntity.Count > 0) ? hotelInfoEntity.HotelInfoDBEntity[0] : new HotelInfoDBEntity();
            try
            {
                string url = JsonRequestURLBuilder.queryHotelFullRoomV2();

                string DataString = "{\"hotelId\":\"" + dbParm.HotelID + "\"," + "\"beginDate\":\"" + dbParm.SalesStartDT + "\"," + "\"endDate\":\"" + dbParm.SalesEndDT + "\"," + "\"platformCode\":\"" + "CMS" + "\"}";
                CallWebPage callWebPage = new CallWebPage();
                string strJson = callWebPage.CallWebByURL(url + DataString, "");
                ArrayList alRoom = new ArrayList();
                //解析json数据
                JObject o = JObject.Parse(strJson);
                string oCityList = o.SelectToken("result").ToString();
                hotelInfoEntity.ErrorMSG = oCityList;
            }
            catch
            {
                hotelInfoEntity.ErrorMSG = "";
            }
            return hotelInfoEntity;
        }
        public static Hashtable QueryFullRoomList(APPContentEntity appcontentEntity)
        {
            APPContentDBEntity dbParm = (appcontentEntity.APPContentDBEntity.Count > 0) ? appcontentEntity.APPContentDBEntity[0] : new APPContentDBEntity();
            Hashtable alRoom = new Hashtable();
            try
            {
                string url = JsonRequestURLBuilder.queryHotelFullRoomV2();
                string HotelID = dbParm.HotelID.Substring((dbParm.HotelID.IndexOf('[') + 1), (dbParm.HotelID.IndexOf(']') - 1));
                string DataString = "{\"hotelId\":\"" + HotelID + "\"," + "\"rateCode\":\"" + dbParm.PriceCode + "\"," + "\"beginDate\":\"" + dbParm.StartDTime + "\"," + "\"endDate\":\"" + dbParm.EndDTime +"\"," + "\"platformCode\":\"" + "CMS" + "\"}";
                CallWebPage callWebPage = new CallWebPage();
                string strJson = callWebPage.CallWebByURL(url + DataString, "");

                //解析json数据
                JObject o = JObject.Parse(strJson);
                //JArray jsa = (JArray)o.SelectToken("result");
                string oCityList = o.SelectToken("result").ToString();
                JArray jsa = (JArray)JsonConvert.DeserializeObject(oCityList);
                string roomtypecode = string.Empty;
                string roomtypename = string.Empty;
                for (int i = 0; i < jsa.Count; i++)
                {
                    JObject jso = (JObject)jsa[i];
                    roomtypecode = JsonRequestURLBuilder.GetJsonStringValue(jso, "roomtypecode").Trim('"');
                    roomtypename = JsonRequestURLBuilder.GetJsonStringValue(jso, "roomtypename").Trim('"');

                    if (String.IsNullOrEmpty(roomtypecode) || alRoom.ContainsKey(roomtypecode))
                    {
                        continue;
                    }

                    alRoom.Add(roomtypecode, roomtypename);
                }
            }
            catch
            {

            }
            return alRoom;
        }
示例#10
0
        public static HotelInfoEntity SaveHotelPrRoomsList(HotelInfoEntity hotelInfoEntity)
        {
            HotelInfoDBEntity dbParm = (hotelInfoEntity.HotelInfoDBEntity.Count > 0) ? hotelInfoEntity.HotelInfoDBEntity[0] : new HotelInfoDBEntity();

            string DataString = "{\"hotelId\":\"" + dbParm.HotelID + "\"," + "\"priceCode\":\"" + dbParm.PriceCode + "\"," + "\"roomCode\":\"" + dbParm.PRRoomS + "\"," + "\"status\":\"" + dbParm.PRStatus + "\"," + "\"isUpdatePlan\":\"" + dbParm.UPPlan + "\"," + "\"operateType\":\"" + dbParm.PRRoomACT + "\"," + "\"operator\":\"" + hotelInfoEntity.LogMessages.Username + "\"}";

            string HotelPrRoomPlanUrl = JsonRequestURLBuilder.applyHotelPrRoomPlanV2();
            CallWebPage callWebPage = new CallWebPage();
            string strHotelPrRoomPlan = callWebPage.CallWebByURL(HotelPrRoomPlanUrl, DataString);
            JObject oHotelPrRoomPlan = JObject.Parse(strHotelPrRoomPlan);

            if ("success".Equals(JsonRequestURLBuilder.GetJsonStringValue(oHotelPrRoomPlan, "message").Trim('"')))
            {
                hotelInfoEntity.Result = 1;
            }
            else
            {
                string ErrorMSG = JsonRequestURLBuilder.GetJsonStringValue(oHotelPrRoomPlan, "message").Trim('"');
                hotelInfoEntity.ErrorMSG = ErrorMSG;
                hotelInfoEntity.Result = 2;
            }

            return hotelInfoEntity;
        }
        public static APPContentEntity HotelListSelect(APPContentEntity appcontentEntity)
        {
            DataSet dsResult = new DataSet();
            dsResult.Tables.Add(new DataTable());
            dsResult.Tables[0].Columns.Add(new DataColumn("HOTELID"));
            dsResult.Tables[0].Columns.Add(new DataColumn("HOTELNM"));
            dsResult.Tables[0].Columns.Add(new DataColumn("TRADEAREA"));
            try
            {
                APPContentDBEntity dbParm = (appcontentEntity.APPContentDBEntity.Count > 0) ? appcontentEntity.APPContentDBEntity[0] : new APPContentDBEntity();
                string url = JsonRequestURLBuilder.getSearchHotelListUrlV3(dbParm.CityID, dbParm.PlatForm, dbParm.TypeID); //JsonRequestURLBuilder.getSearchHotelListUrlV2(dbParm.CityID, dbParm.PlatForm, dbParm.TypeID);

                CallWebPage callWebPage = new CallWebPage();
                string DataString = "{\"cityId\":\"" + dbParm.CityID + "\"," + "\"type\":\"" + "1" + "\"}";
                url = url + "&signKey=" + PostSignKey(DataString);
                string strJson = callWebPage.CallWebByURL(url, DataString);

                //解析json数据
                JObject o = JObject.Parse(strJson);
                //JObject oHotelBase = (JObject)o.SelectToken("result");
                string oHotells = o.SelectToken("result").ToString();

                JObject oh = JObject.Parse(oHotells);
                string oHotelDetail = oh.SelectToken("hotellist").ToString();

                //酒店列表信息
                int index = oHotelDetail.IndexOf("[");

                string strHotelid = string.Empty;
                string strHotelname = string.Empty;
                string strTradearea = string.Empty;

                if (index == 0)
                {
                    //Array
                    JArray jsa = (JArray)JsonConvert.DeserializeObject(oHotelDetail);

                    for (int i = 0; i < jsa.Count; i++)
                    {
                        JObject jso = (JObject)jsa[i];

                        strHotelid = JsonRequestURLBuilder.GetJsonStringValue(jso, "hotelid").Trim('"');
                        strHotelname = JsonRequestURLBuilder.GetJsonStringValue(jso, "hotelname").Trim('"');
                        strTradearea = JsonRequestURLBuilder.GetJsonStringValue(jso, "tradearea").Trim('"');

                        DataRow drRow = dsResult.Tables[0].NewRow();
                        drRow["HOTELID"] = strHotelid;
                        drRow["HOTELNM"] = strHotelname;
                        drRow["TRADEAREA"] = strTradearea;
                        dsResult.Tables[0].Rows.Add(drRow);
                    }
                }
                else
                {
                    JObject jsoObj = (JObject)JsonConvert.DeserializeObject(oHotelDetail);

                    strHotelid = JsonRequestURLBuilder.GetJsonStringValue(jsoObj, "hotelid").Trim('"');
                    strHotelname = JsonRequestURLBuilder.GetJsonStringValue(jsoObj, "hotelname").Trim('"');
                    strTradearea = JsonRequestURLBuilder.GetJsonStringValue(jsoObj, "tradearea").Trim('"');
                    DataRow drRow = dsResult.Tables[0].NewRow();
                    drRow["HOTELID"] = strHotelid;
                    drRow["HOTELNM"] = strHotelname;
                    drRow["TRADEAREA"] = strTradearea;
                    dsResult.Tables[0].Rows.Add(drRow);
                }
            }
            catch (Exception ex)
            {
            }

            appcontentEntity.QueryResult = dsResult;

            return appcontentEntity;
        }
        public static APPContentEntity QueryFullRoom(APPContentEntity appcontentEntity)
        {
            APPContentDBEntity dbParm = (appcontentEntity.APPContentDBEntity.Count > 0) ? appcontentEntity.APPContentDBEntity[0] : new APPContentDBEntity();

            DataSet dsResult = new DataSet();
            dsResult.Tables.Add(new DataTable());
            dsResult.Tables[0].Columns.Add(new DataColumn("HOTELROOMCODE"));
            dsResult.Tables[0].Columns.Add(new DataColumn("HOTELROOMNM"));
            try
            {
                string url = JsonRequestURLBuilder.queryHotelFullRoomV2();

                string DataString = "{\"hotelId\":\"" + dbParm.HotelID + "\"," + "\"rateCode\":\"" + dbParm.PriceCode + "\"," + "\"beginDate\":\"" + dbParm.StartDTime + "\"," + "\"endDate\":\"" + dbParm.EndDTime + "\"," + "\"platformCode\":\"" + "CMS" + "\"}";
                CallWebPage callWebPage = new CallWebPage();
                string strJson = callWebPage.CallWebByURL(url + DataString, "");
                ArrayList alRoom = new ArrayList();
                //解析json数据
                JObject o = JObject.Parse(strJson);
                //JArray jsa = (JArray)o.SelectToken("result");
                string oCityList = o.SelectToken("result").ToString();
                JArray jsa = (JArray)JsonConvert.DeserializeObject(oCityList);
                string roomtypecode = string.Empty;
                string roomtypename = string.Empty;
                for (int i = 0; i < jsa.Count; i++)
                {
                    JObject jso = (JObject)jsa[i];
                    roomtypecode= JsonRequestURLBuilder.GetJsonStringValue(jso, "roomtypecode").Trim('"');
                    roomtypename = JsonRequestURLBuilder.GetJsonStringValue(jso, "roomtypename").Trim('"');

                    if (String.IsNullOrEmpty(roomtypecode) || alRoom.Contains(roomtypecode))
                    {
                        continue;
                    }

                    alRoom.Add(roomtypecode);
                    DataRow drRow = dsResult.Tables[0].NewRow();
                    drRow["HOTELROOMCODE"] = roomtypecode;
                    drRow["HOTELROOMNM"] = roomtypename;
                    dsResult.Tables[0].Rows.Add(drRow);
                }
            }
            catch
            {

            }
            appcontentEntity.QueryResult = dsResult;
            return appcontentEntity;
        }
示例#13
0
        public static CashBackEntity SetBalanceRoomList(CashBackEntity cashBackEntity)
        {
            CashBackDBEntity dbParm = (cashBackEntity.CashBackDBEntity.Count > 0) ? cashBackEntity.CashBackDBEntity[0] : new CashBackDBEntity();
            string[] strRoomList = dbParm.HRoomList.Split(',');
            string HotelID = dbParm.HotelID;
            string RoomCode = "";

            string msg = string.Empty;
            foreach (string strRoomCode in strRoomList)
            {
                if (String.IsNullOrEmpty(strRoomCode))
                {
                    continue;
                }

                RoomCode = RoomCode + strRoomCode + "-" + dbParm.PriceCode + ",";
            }
            RoomCode = RoomCode.Trim(',');

            string DataString = "{\"dateType\":\"" + "1" + "\"," + "\"beginDate\":\"" + dbParm.InDateFrom + "\"," + "\"endDate\":\"" + dbParm.InDateTo + "\"," + "\"hotelIds\":\"" + dbParm.HotelID + "\"," + "\"roomCodes\":\"" + RoomCode + "\"," + "\"commisionMode\":\"" + dbParm.BalType + "\"," + "\"commision\":\"" + dbParm.BalValue + "\"}";

            string HotelBalRoomUrl = JsonRequestURLBuilder.applyHotelBalRoomV2();
            CallWebPage callWebPage = new CallWebPage();
            string strHotelBalRoom = callWebPage.CallWebByURL(HotelBalRoomUrl, DataString);
            JObject oHotelBalRoom = JObject.Parse(strHotelBalRoom);

            if ("success".Equals(JsonRequestURLBuilder.GetJsonStringValue(oHotelBalRoom, "message").Trim('"')))
            {
                cashBackEntity.Result = 1;
            }
            else
            {
                string ErrorMSG = JsonRequestURLBuilder.GetJsonStringValue(oHotelBalRoom, "message").Trim('"');
                cashBackEntity.ErrorMSG = ErrorMSG;
                cashBackEntity.Result = 2;
            }
            return cashBackEntity;
        }
示例#14
0
        /// <summary>
        /// 预付退款接口
        /// </summary>
        /// <param name="OrderRefundEntity"></param>
        /// <returns></returns>
        public static OrderRefundEntity saveRefund(OrderRefundEntity OrderRefundEntity)
        {
            OrderRefundDBEntity dbParm = (OrderRefundEntity.OrderRefundDBEntity.Count > 0) ? OrderRefundEntity.OrderRefundDBEntity[0] : new OrderRefundDBEntity();

            string DataString = "{\"OrderNum\":\"" + dbParm.Obj_id + "\",\"amount\":" + dbParm.Amount + ",\"operator\":\"" + dbParm.Operators + "\",\"remark\":\"" + dbParm.Remark + "\",\"sn\":\"" + dbParm.Sn + "\",\"refundAccount\":\"" + dbParm.Refund_account + "\",\"refundTime\":\"" + dbParm.Refund_time + "\",\"type\":\"" + dbParm.Type + "\"}";

            string HotelPrRoomPlanUrl = JsonRequestURLBuilder.saveRefund();
            CallWebPage callWebPage = new CallWebPage();
            string strHotelPrRoomPlan = callWebPage.CallWebByURL(HotelPrRoomPlanUrl, DataString);
            JObject oHotelPrRoomPlan = JObject.Parse(strHotelPrRoomPlan);

            if ("success".Equals(JsonRequestURLBuilder.GetJsonStringValue(oHotelPrRoomPlan, "message").Trim('"')) && "200".Equals(JsonRequestURLBuilder.GetJsonStringValue(oHotelPrRoomPlan, "code").Trim('"')))
            {
                OrderRefundEntity.ErrorMSG = JsonRequestURLBuilder.GetJsonStringValue(oHotelPrRoomPlan, "message").Trim('"');
                OrderRefundEntity.Result = 1;
            }
            else
            {
                OrderRefundEntity.ErrorMSG = JsonRequestURLBuilder.GetJsonStringValue(oHotelPrRoomPlan, "message").Trim('"') + JsonRequestURLBuilder.GetJsonStringValue(oHotelPrRoomPlan, "code").Trim('"');
                OrderRefundEntity.Result = -1;
            }

            return OrderRefundEntity;
        }
示例#15
0
        public static int SaveOrderConfirmPlanMail(LmSystemLogEntity dbParm, DataSet dsOrderInfo)
        {
            string iCType = "";
            if ("LMBAR".Equals(dsOrderInfo.Tables[0].Rows[0]["price_code"].ToString().Trim().ToUpper()))
            {
                if ("4".Equals(dbParm.OrderBookStatus))
                {
                    iCType = dbParm.CanelReson;
                }
            }
            else
            {
                if ("9".Equals(dbParm.OrderBookStatus))
                {
                    iCType = dbParm.CanelReson;
                }
            }

            if (String.IsNullOrEmpty(iCType))
            {
                return 0;
            }

            //订单操作备注必填, 如果用户选择了‘取消订单’ 且取消原因是‘满房’ 则自动调用房控的更新计划接口, 更新该房型当天的计划, 标记为满房, 备注信息同本页面上的‘操作备注’
            //如果订单取消原因 in (‘变价’),则自动调用房控的更新计划接口, 更新该房型最近7天的计划, 当天包括未来7天标记为下线, 备注信息同本页面上的‘操作备注’,同时调用短信发送接口, 给酒店对应的销售人员发送短信, 内容为‘xxx酒店xxx房型由于’变价‘原因,销售计划已被订单确认员xxx标记下线一周,请及时处理’并发送邮件给sales.all, 标题为’xxx酒店xxx房型由于‘变价’原因下线’,正文为‘‘xxx酒店xxx房型由于’变价‘原因,今日销售计划已被订单确认员xxx标记下线一周,请及时处理’  BR KFC’
            //如果订单取消原因 in (‘终止合作’,‘无协议’),则自动调用房控的更新计划接口, 更新该酒店最近7天的计划, 当天包括未来7天标记为下线, 备注信息同本页面上的‘操作备注’,同时调用短信发送接口, 给酒店对应的销售人员发送短信, 内容为‘xxx酒店由于’无协议‘原因,销售计划已被订单确认员xxx标记下线一周,请及时处理’并发送邮件给sales.all, 标题为’xxx酒店由于‘无协议’原因下线一周’,正文为‘‘xxx酒店由于’变价‘原因,今日销售计划已被订单确认员xxx标记下线一周,请及时处理’  BR KFC’
            string DataString = "";
            string SaveOrderOperationUrlPlan = "";
            string strMailTo = ConfigurationManager.AppSettings["mailOrderConfirm"].ToString();
            string strMailSubject = "";
            string strMailBody = "";
            string strMsg = "";
            DateTime dtNow = (DateTime.Now.Hour >= 0 && DateTime.Now.Hour < 4) ? DateTime.Now.AddDays(-1) : DateTime.Now;

            if ("CRC01".Equals(iCType)) // 满房 //type:1 满房、2 关房、3 开房
            {
                DataString = "{\"hotelId\":\"" + dsOrderInfo.Tables[0].Rows[0]["hotel_id"].ToString().Trim() + "\",\"whatDay\":\"1,2,3,4,5,6,7\",\"beginDate\":\"" + dtNow.ToShortDateString().Replace("/", "-") + "\",\"endDate\":\"" + dtNow.ToShortDateString().Replace("/", "-") + "\",\"operator\":\"" + dbParm.LogMessages.Userid + "\",\"type\":\"" + "1" + "\"}";
                SaveOrderOperationUrlPlan = JsonRequestURLBuilder.BatchUpdatePlan();
                //DataString = DataString + "{\"orderNum\":\"" + dbParm.FogOrderID + "\",\"operator\":\"" + dbParm.LogMessages.Username + "\",\"opeSource\":\"" + "CMS" + "\"}";
                //SaveOrderOperationUrlPlan = JsonRequestURLBuilder.saveOrderOperationV2();
            }
            else if ("CRC06".Equals(iCType)) // 酒店变价
            {
                //DataString = DataString + "{\"orderNum\":\"" + dbParm.FogOrderID + "\",\"operator\":\"" + dbParm.LogMessages.Username + "\",\"opeSource\":\"" + "CMS" + "\"}";
                //SaveOrderOperationUrlPlan = JsonRequestURLBuilder.saveOrderOperationV2();

                DataString = "{\"hotelId\":\"" + dsOrderInfo.Tables[0].Rows[0]["hotel_id"].ToString().Trim() + "\",\"whatDay\":\"1,2,3,4,5,6,7\",\"beginDate\":\"" + dtNow.ToShortDateString().Replace("/", "-") + "\",\"endDate\":\"" + dtNow.AddDays(7).ToShortDateString().Replace("/", "-") + "\",\"operator\":\"" + dbParm.LogMessages.Userid + "\",\"type\":\"" + "2" + "\",\"priceCodeRoom\":[{\"priceCode\":\"LMBAR2\",\"roomCode\":\"" + dsOrderInfo.Tables[0].Rows[0]["room_type_code"].ToString().Trim() + "\"}]}";
                SaveOrderOperationUrlPlan = JsonRequestURLBuilder.BatchUpdatePlan();

                strMsg = String.Format("{0} {1} 由于‘酒店变价’原因,销售计划已被订单确认员{2}标记下线一周,请及时处理!", "[" + dsOrderInfo.Tables[0].Rows[0]["hotel_id"].ToString().Trim() + "]" + dsOrderInfo.Tables[0].Rows[0]["hotel_name"].ToString().Trim(), "[" + dsOrderInfo.Tables[0].Rows[0]["room_type_code"].ToString().Trim() + "]" + dsOrderInfo.Tables[0].Rows[0]["room_type_name"].ToString().Trim(), dbParm.LogMessages.Username);
                OrderConfirmSendMsgToLMSales(dbParm, dsOrderInfo.Tables[0].Rows[0]["hotel_id"].ToString().Trim(), strMsg);
                strMailSubject = String.Format("{0} {1} 由于‘{2}’原因下线一周", "[" + dsOrderInfo.Tables[0].Rows[0]["hotel_id"].ToString().Trim() + "]" + dsOrderInfo.Tables[0].Rows[0]["hotel_name"].ToString().Trim(), "[" + dsOrderInfo.Tables[0].Rows[0]["room_type_code"].ToString().Trim() + "]" + dsOrderInfo.Tables[0].Rows[0]["room_type_name"].ToString().Trim(), "酒店变价");
                strMailBody = "<div style='font-size:16;font-family:Microsoft YaHei;'>Hi ALL <br/><br/>" + strMsg + "<br/><br/>BR KFC</div>";
                SendMailProcess(strMailTo, strMailSubject, strMailBody);
            }
            else if ("CRH10".Equals(iCType) || "CRH07".Equals(iCType)) // 终止合作  无协议
            {
                //DataString = DataString + "{\"orderNum\":\"" + dbParm.FogOrderID + "\",\"operator\":\"" + dbParm.LogMessages.Username + "\",\"opeSource\":\"" + "CMS" + "\"}";
                //SaveOrderOperationUrlPlan = JsonRequestURLBuilder.saveOrderOperationV2();
                DataString = "{\"hotelId\":\"" + dsOrderInfo.Tables[0].Rows[0]["hotel_id"].ToString().Trim() + "\",\"whatDay\":\"1,2,3,4,5,6,7\",\"beginDate\":\"" + dtNow.ToShortDateString().Replace("/", "-") + "\",\"endDate\":\"" + dtNow.AddDays(7).ToShortDateString().Replace("/", "-") + "\",\"operator\":\"" + dbParm.LogMessages.Userid + "\",\"type\":\"" + "2" + "\"}";
                SaveOrderOperationUrlPlan = JsonRequestURLBuilder.BatchUpdatePlan();

                strMsg = String.Format("{0} 由于‘{1}’原因,销售计划已被订单确认员{2}标记下线一周,请及时处理!", "[" + dsOrderInfo.Tables[0].Rows[0]["hotel_id"].ToString().Trim() + "]" + dsOrderInfo.Tables[0].Rows[0]["hotel_name"].ToString().Trim(), ("CRH10".Equals(iCType) ? "终止合作" : "无协议"), dbParm.LogMessages.Username);
                OrderConfirmSendMsgToLMSales(dbParm, dsOrderInfo.Tables[0].Rows[0]["hotel_id"].ToString().Trim(), strMsg);
                strMailSubject = String.Format("{0} 由于‘{1}’原因下线一周", "[" + dsOrderInfo.Tables[0].Rows[0]["hotel_id"].ToString().Trim() + "]" + dsOrderInfo.Tables[0].Rows[0]["hotel_name"].ToString().Trim(), ("CRH10".Equals(iCType) ? "终止合作" : "无协议"));
                strMailBody = "<div style='font-size:16;font-family:Microsoft YaHei;'>Hi ALL <br/><br/>" + strMsg + "<br/><br/>BR KFC</div>";
                SendMailProcess(strMailTo, strMailSubject, strMailBody);
            }
            else
            {
                return 0;
            }

            CallWebPage callWebPage = new CallWebPage();
            string strSaveOrderOperation = callWebPage.CallWebByURL(SaveOrderOperationUrlPlan, DataString);
            return 1;
        }
示例#16
0
        public static int SaveHotelRoomsPlanList(HotelInfoEntity hotelInfoEntity)
        {
            HotelInfoDBEntity dbParm = (hotelInfoEntity.HotelInfoDBEntity.Count > 0) ? hotelInfoEntity.HotelInfoDBEntity[0] : new HotelInfoDBEntity();
            string HotelID = dbParm.HotelID;
            string RoomCode = dbParm.RoomCode;
            string RoomStatus = dbParm.RoomStatus;
            string RoomNM = "";
            if ("1".Equals(dbParm.RoomNMCG))
            {
                RoomNM = dbParm.RoomNM;
            }

            string DataString = "{\"hotelId\":\"" + HotelID + "\"," + "\"roomCode\":\"" + RoomCode + "\"," + "\"status\":\"" + RoomStatus + "\",";

            if ("1".Equals(dbParm.RoomNMCG))
            {
                DataString = DataString + "\"roomName\":\"" + dbParm.RoomNM + "\",";
            }

            DataString = DataString + "\"operator\":\"" + hotelInfoEntity.LogMessages.Username + "\"}";

            string HotelRoomPlanUrl = JsonRequestURLBuilder.applyHotelRoomPlanV2();
            CallWebPage callWebPage = new CallWebPage();
            string strHotelRoomPlan = callWebPage.CallWebByURL(HotelRoomPlanUrl, DataString);
            JObject oHotelRoomPlan = JObject.Parse(strHotelRoomPlan);

            if ("success".Equals(JsonRequestURLBuilder.GetJsonStringValue(oHotelRoomPlan, "message").Trim('"')))
            {
                return 1;
            }
            else
            {
                return 4;
            }
        }
示例#17
0
        public static string SynOrderOperationList(LmSystemLogEntity dbParm)
        {
            string DataString = "";
            DataString = DataString + "{\"orderNum\":\"" + dbParm.FogOrderID + "\",\"operator\":\"" + dbParm.LogMessages.Username + "\",\"opeSource\":\"" + "CMS" + "\"}";

            string SaveOrderOperationUrl = JsonRequestURLBuilder.saveOrderOperationV2();

            CallWebPage callWebPage = new CallWebPage();
            string strSaveOrderOperation = callWebPage.CallWebByURL(SaveOrderOperationUrl, DataString);

            JObject oSaveOrderOperation = JObject.Parse(strSaveOrderOperation);
            if ("200".Equals(JsonRequestURLBuilder.GetJsonStringValue(oSaveOrderOperation, "code").Trim('"')))
            {
                return "";
            }
            else
            {
                return JsonRequestURLBuilder.GetJsonStringValue(oSaveOrderOperation, "message").Trim('"');
            }
        }
示例#18
0
        /// <summary>
        /// 获取计划接口   不区分价格代码
        /// </summary>
        /// <param name="appcontentEntity"></param>
        /// <returns></returns>
        public static HotelInfoEntity GetPlanListByIndiscriminatelyRateCode(HotelInfoEntity hotelInfoEntity)
        {
            HotelInfoDBEntity dbParm = (hotelInfoEntity.HotelInfoDBEntity.Count > 0) ? hotelInfoEntity.HotelInfoDBEntity[0] : new HotelInfoDBEntity();
            #region
            DataSet dsResult = new DataSet();
            dsResult.Tables.Add(new DataTable());
            dsResult.Tables[0].Columns.Add(new DataColumn("GMTMODIFIED"));
            dsResult.Tables[0].Columns.Add(new DataColumn("ROOMTYPECODE"));
            dsResult.Tables[0].Columns.Add(new DataColumn("GUAID"));
            dsResult.Tables[0].Columns.Add(new DataColumn("ONEPRICE"));
            dsResult.Tables[0].Columns.Add(new DataColumn("TWOPRICE"));
            dsResult.Tables[0].Columns.Add(new DataColumn("HOTELID"));
            dsResult.Tables[0].Columns.Add(new DataColumn("RATECODE"));
            dsResult.Tables[0].Columns.Add(new DataColumn("CREATOR"));
            dsResult.Tables[0].Columns.Add(new DataColumn("ID"));
            dsResult.Tables[0].Columns.Add(new DataColumn("GMTCREATED"));
            dsResult.Tables[0].Columns.Add(new DataColumn("CXLID"));
            dsResult.Tables[0].Columns.Add(new DataColumn("LMPRICE"));
            dsResult.Tables[0].Columns.Add(new DataColumn("BREAKFASTNUM"));
            dsResult.Tables[0].Columns.Add(new DataColumn("ROOMNUM"));
            dsResult.Tables[0].Columns.Add(new DataColumn("HOLDROOMNUM"));
            dsResult.Tables[0].Columns.Add(new DataColumn("ISNETWORK"));
            dsResult.Tables[0].Columns.Add(new DataColumn("ATTNPRICE"));
            dsResult.Tables[0].Columns.Add(new DataColumn("OFFSETUNIT"));
            dsResult.Tables[0].Columns.Add(new DataColumn("OFFSETVAL"));
            dsResult.Tables[0].Columns.Add(new DataColumn("THIRDPRICE"));
            dsResult.Tables[0].Columns.Add(new DataColumn("STATUS"));
            dsResult.Tables[0].Columns.Add(new DataColumn("EFFECTDATE"));
            dsResult.Tables[0].Columns.Add(new DataColumn("EACHBREAKFASTPRICE"));
            dsResult.Tables[0].Columns.Add(new DataColumn("GMTMODIFIEDSTRING"));
            dsResult.Tables[0].Columns.Add(new DataColumn("CREATORSTR"));
            dsResult.Tables[0].Columns.Add(new DataColumn("GMTCREATEDSTRING"));
            dsResult.Tables[0].Columns.Add(new DataColumn("ISDELETED"));
            dsResult.Tables[0].Columns.Add(new DataColumn("HOTELVPSTATUS"));
            dsResult.Tables[0].Columns.Add(new DataColumn("MODIFIERSTR"));
            dsResult.Tables[0].Columns.Add(new DataColumn("MODIFIER"));
            dsResult.Tables[0].Columns.Add(new DataColumn("ISRESERVE"));
            dsResult.Tables[0].Columns.Add(new DataColumn("SEASON"));
            dsResult.Tables[0].Columns.Add(new DataColumn("THREEPRICE"));
            dsResult.Tables[0].Columns.Add(new DataColumn("EFFECTDATESTRING"));
            dsResult.Tables[0].Columns.Add(new DataColumn("ROOMTYPENAME"));
            dsResult.Tables[0].Columns.Add(new DataColumn("MONEYTYPE"));
            dsResult.Tables[0].Columns.Add(new DataColumn("FOURPRICE"));
            dsResult.Tables[0].Columns.Add(new DataColumn("ISROOMFUL"));
            #endregion
            try
            {
                string url = JsonRequestURLBuilder.queryHotelFullRoomV2();

                string DataString = "{\"hotelId\":\"" + dbParm.HotelID + "\"," + "\"beginDate\":\"" + dbParm.SalesStartDT + "\"," + "\"endDate\":\"" + dbParm.SalesEndDT + "\"," + "\"platformCode\":\"" + "CMS" + "\"}";
                CallWebPage callWebPage = new CallWebPage();
                string strJson = callWebPage.CallWebByURL(url + DataString, "");
                ArrayList alRoom = new ArrayList();
                //解析json数据
                JObject o = JObject.Parse(strJson);
                string oCityList = o.SelectToken("result").ToString();
                JArray jsa = (JArray)JsonConvert.DeserializeObject(oCityList);
                string roomtypecode = string.Empty;
                string roomtypename = string.Empty;
                for (int i = 0; i < jsa.Count; i++)
                {
                    JObject jso = (JObject)jsa[i];
                    DataRow drRow = dsResult.Tables[0].NewRow();
                    #region
                    drRow["GMTMODIFIED"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "gmtmodified").Trim('"');
                    drRow["ROOMTYPECODE"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "roomtypecode").Trim('"');
                    drRow["GUAID"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "guaid").Trim('"');
                    drRow["ONEPRICE"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "oneprice").Trim('"');
                    drRow["TWOPRICE"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "twoprice").Trim('"');
                    drRow["HOTELID"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "hotelid").Trim('"');
                    drRow["RATECODE"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "ratecode").Trim('"');
                    drRow["CREATOR"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "creator").Trim('"');
                    drRow["ID"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "id").Trim('"');
                    drRow["GMTCREATED"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "gmtcreated").Trim('"');
                    drRow["CXLID"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "cxlid").Trim('"');
                    drRow["LMPRICE"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "lmprice").Trim('"');
                    drRow["BREAKFASTNUM"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "breakfastnum").Trim('"');
                    drRow["ROOMNUM"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "roomnum").Trim('"');
                    drRow["HOLDROOMNUM"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "holdroomnum").Trim('"');
                    drRow["ISNETWORK"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "isnetwork").Trim('"');
                    drRow["ATTNPRICE"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "attnprice").Trim('"');
                    drRow["OFFSETUNIT"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "offsetunit").Trim('"');
                    drRow["OFFSETVAL"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "offsetval").Trim('"');
                    drRow["THIRDPRICE"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "thirdprice").Trim('"');
                    drRow["STATUS"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "status").Trim('"');
                    drRow["EFFECTDATE"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "effectdate").Trim('"');
                    drRow["EACHBREAKFASTPRICE"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "eachbreakfastprice").Trim('"');
                    drRow["GMTMODIFIEDSTRING"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "gmtmodifiedstring").Trim('"');
                    drRow["CREATORSTR"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "creatorstr").Trim('"');
                    drRow["GMTCREATEDSTRING"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "gmtcreatedstring").Trim('"');
                    drRow["ISDELETED"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "isdeleted").Trim('"');
                    drRow["HOTELVPSTATUS"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "hotelvpstatus").Trim('"');
                    drRow["MODIFIERSTR"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "modifierstr").Trim('"');
                    drRow["MODIFIER"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "modifier").Trim('"');
                    drRow["ISRESERVE"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "isreserve").Trim('"');
                    drRow["SEASON"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "season").Trim('"');
                    drRow["THREEPRICE"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "threeprice").Trim('"');
                    drRow["EFFECTDATESTRING"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "effectdatestring").Trim('"');
                    drRow["ROOMTYPENAME"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "roomtypename").Trim('"');
                    drRow["MONEYTYPE"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "moneytype").Trim('"');
                    drRow["FOURPRICE"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "fourprice").Trim('"');
                    drRow["ISROOMFUL"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "isroomful").Trim('"');
                    #endregion
                    dsResult.Tables[0].Rows.Add(drRow);
                }
            }
            catch
            {

            }
            hotelInfoEntity.QueryResult = dsResult;

            return hotelInfoEntity;
        }
示例#19
0
        public static int SaveOrderOperation(LmSystemLogEntity dbParm)
        {
            string DataString = "";
            DataString = DataString + "{\"orderNum\":\"" + dbParm.FogOrderID + "\",\"operator\":\"" + dbParm.LogMessages.Username + "\",\"opeSource\":\"" + "CMS" + "\"}";

            string SaveOrderOperationUrl = JsonRequestURLBuilder.saveOrderOperationV2();

            if ("5".Equals(dbParm.OrderBookStatus) || "7".Equals(dbParm.OrderBookStatus) || "8".Equals(dbParm.OrderBookStatus))
            {
                SaveOrderOperationUrl = JsonRequestURLBuilder.saveAuditOrderOperationV2();
            }

            CallWebPage callWebPage = new CallWebPage();
            string strSaveOrderOperation = callWebPage.CallWebByURL(SaveOrderOperationUrl, DataString);
            return 1;
        }
示例#20
0
        public static LmSystemLogEntity SendMsgToLMSales(LmSystemLogEntity dbParm)
        {
            string DataString = "";
            DataString = DataString + "{\"method\":\"save\",\"data\":{\"syscode\":\"" + "CMS" + "\",\"reqid\":\"" + dbParm.SalesTel + "\",\"bizcode\":\"" + "CMS-LM联系人短信通知" + "\",";
            DataString = DataString + "\"cnfnum\":\"" + dbParm.EventID + "\",\"mobiles\":\"" + dbParm.SalesTel + "\",\"msg\":\"" + dbParm.SendMSG + "\",";
            DataString = DataString + "\"sign\":\"" + PostSignKey("CMS" + dbParm.SalesTel) + "\"},\"version\":\"v1.0\"}";

            string HotelFullRoomUrl = JsonRequestURLBuilder.applySendMsgV2();
            CallWebPage callWebPage = new CallWebPage();
            string strHotelFullRoom = callWebPage.CallWebByURL(HotelFullRoomUrl, DataString);
            JObject oHotelFullRoom = JObject.Parse(strHotelFullRoom);
            if ("success".Equals(JsonRequestURLBuilder.GetJsonStringValue(oHotelFullRoom, "message").Trim('"')))
            {
                dbParm.Result = 1;
                dbParm.ErrorMSG = "发送成功!";
            }
            else
            {
                dbParm.Result = 2;
                dbParm.ErrorMSG = "发送失败!" + JsonRequestURLBuilder.GetJsonStringValue(oHotelFullRoom, "message").Trim('"');
            }

            return dbParm;
        }
示例#21
0
        public static LmSystemLogEntity SendFaxService(LmSystemLogEntity dbParm)
        {
            string DataString = "";

            //{"faxType":"","objectId":"","operator":"","remark":"","faxContent":"","hotelList":[{"hotelId":"fasdfasfas","orderList":["0010023","12312312"]}]}
            DataString = DataString + "{\"faxType\":\"" + dbParm.SendFaxType + "\",\"objectId\":\"" + dbParm.ObjectID + "\",\"operator\":\"" + dbParm.LogMessages.Username + "\",\"remark\":\"" + dbParm.BookRemark + "\",\"hotelList\":[{\"hotelId\":\"" + dbParm.HotelID + "\",\"orderList\":[" + dbParm.FogOrderID + "]}]}";
            string SendFaxSeviceUrl = JsonRequestURLBuilder.sendFaxSeviceV2();

            CallWebPage callWebPage = new CallWebPage();
            string strSendFaxSevice = callWebPage.CallWebByURL(SendFaxSeviceUrl, DataString);
            //JObject oSaveOrderOperation = JObject.Parse(strSaveOrderOperation);
            //if ("success".Equals(JsonRequestURLBuilder.GetJsonStringValue(oSaveOrderOperation, "message").Trim('"')))
            //{
            //    return 1;
            //}
            //else
            //{
            //    return 0;
            //}

            dbParm.Result = 1;
            return dbParm;
        }
示例#22
0
        public static CashBackEntity GetBalanceRoomList(CashBackEntity cashBackEntity)
        {
            CashBackDBEntity dbParm = (cashBackEntity.CashBackDBEntity.Count > 0) ? cashBackEntity.CashBackDBEntity[0] : new CashBackDBEntity();
            DataSet dsResult = new DataSet();
            dsResult.Tables.Add(new DataTable());
            dsResult.Tables[0].Columns.Add(new DataColumn("ROOMCODE"));
            dsResult.Tables[0].Columns.Add(new DataColumn("ROOMNM"));
            try
            {
                string url = JsonRequestURLBuilder.queryHotelBalRoomV2();
                url = url + dbParm.HotelID;
                CallWebPage callWebPage = new CallWebPage();
                string strJson = callWebPage.CallWebByURL(url, "roomcode");
                //解析json数据
                JObject o = JObject.Parse(strJson);
                //JArray jsa = (JArray)o.SelectToken("result");
                string oRoomList = o.SelectToken("result").ToString();
                JArray jsa = (JArray)JsonConvert.DeserializeObject(oRoomList);
                string roomtypecode = string.Empty;
                string roomtypename = string.Empty;
                for (int i = 0; i < jsa.Count; i++)
                {
                    JObject jso = (JObject)jsa[i];
                    roomtypecode = JsonRequestURLBuilder.GetJsonStringValue(jso, "roomcode").Trim('"');
                    roomtypename = JsonRequestURLBuilder.GetJsonStringValue(jso, "roomname").Trim('"');

                    DataRow drRow = dsResult.Tables[0].NewRow();
                    drRow["ROOMCODE"] = roomtypecode;
                    drRow["ROOMNM"] = roomtypename;
                    dsResult.Tables[0].Rows.Add(drRow);
                }
            }
            catch
            {

            }

            cashBackEntity.QueryResult = dsResult;
            return cashBackEntity;
        }
示例#23
0
        public static string SendMsgToIssue(string TelList, string Type, string Content)
        {
            string strErrResult = "";
            string[] strTelList = { };
            TelList = TelList.Replace(",", ",");
            if (TelList.Contains(","))
            {
                strTelList = TelList.Split(',');
            }
            else
            {
                strTelList = new string[]{ TelList };
            }

            string DataString = "";

            foreach (string strTel in strTelList)
            {
                DataString = DataString + "{\"method\":\"save\",\"data\":{\"syscode\":\"" + "CMS" + "\",\"reqid\":\"" + strTel + "\",\"bizcode\":\"" + ("1".Equals(Type) ? "CMS-Issue单指派人短信通知" : "CMS-Issue单用户短信通知") + "\",";
                //DataString = DataString + "\"cnfnum\":\"" + strTel + "\",\"mobiles\":\"" + strTel + "\",\"msg\":\"" + Content + "\",";
                DataString = DataString + "\"mobiles\":\"" + strTel + "\",\"msg\":\"" + Content + "\",";
                DataString = DataString + "\"sign\":\"" + PostSignKey("CMS" + strTel) + "\"},\"version\":\"v1.0\"}";

                string HotelFullRoomUrl = JsonRequestURLBuilder.applySendMsgV2();
                CallWebPage callWebPage = new CallWebPage();
                string strHotelFullRoom = callWebPage.CallWebByURL(HotelFullRoomUrl, DataString);
                JObject oHotelFullRoom = JObject.Parse(strHotelFullRoom);
                if ("success".Equals(JsonRequestURLBuilder.GetJsonStringValue(oHotelFullRoom, "message").Trim('"')))
                {
                    //return "发送成功!";
                }
                else
                {
                    strErrResult = strErrResult + "Tel: " + strTel + "发送失败!" + JsonRequestURLBuilder.GetJsonStringValue(oHotelFullRoom, "message").Trim('"');
                }
            }
            return strErrResult;
        }
示例#24
0
        public static CashBackEntity SaveCashBackRequest(CashBackEntity cashBackEntity)
        {
            string DataString = string.Empty;
            CashBackDBEntity dbParm = (cashBackEntity.CashBackDBEntity.Count > 0) ? cashBackEntity.CashBackDBEntity[0] : new CashBackDBEntity();

            //if ("0".Equals(dbParm.BackCashType))
            //{
            //    DataString = "{\"loginMobile\":\"" + dbParm.UserID + "\"," + "\"amount\":" + dbParm.BackCashAmount + "," + "\"bankBranch\":\"" + dbParm.BankBranch + "\"," + "\"bankCardNumber\":\"" + dbParm.BankCardNumber + "\"," + "\"bankCardOwner\":\"" + dbParm.BankOwner + "\"}";
            //}
            //else
            //{
            //    DataString = "{\"loginMobile\":\"" + dbParm.UserID + "\"," + "\"amount\":" + dbParm.BackCashAmount + "," + "\"bankBranch\":\"" + "999999" + "\"," + "\"bankCardNumber\":\"" + "999999" + "\"," + "\"bankCardOwner\":\"" + "999999" + "\"}";
            //}

            if ("0".Equals(dbParm.BackCashType))
            {
                DataString = "{\"loginMobile\":\"" + dbParm.UserID + "\"," + "\"amount\":" + dbParm.BackCashAmount + "," + "\"applyType\":" + "1" + "," + "\"bankBranch\":\"" + dbParm.BankBranch + "\"," + "\"bankCardNumber\":\"" + dbParm.BankCardNumber + "\"," + "\"bankCardOwner\":\"" + dbParm.BankOwner + "\"}";
            }
            else if ("1".Equals(dbParm.BackCashType))
            {
                DataString = "{\"loginMobile\":\"" + dbParm.UserID + "\"," + "\"amount\":" + dbParm.BackCashAmount + "," + "\"applyType\":" + "3" + "," + "\"rechargePhoneNumber\":\"" + dbParm.BackTel + "\"}";
            }
            else
            {
                DataString = "{\"loginMobile\":\"" + dbParm.UserID + "\"," + "\"amount\":" + dbParm.BackCashAmount + "," + "\"applyType\":" + "2" + "," + "\"alipayAccount\":\"" + dbParm.BackBao + "\"}";
            }

            string SaveCashBackRequestUrl = JsonRequestURLBuilder.SaveCashBackRequestV2() + PostSignKey(DataString);
            CallWebPage callWebPage = new CallWebPage();
            string strSaveCashBack = callWebPage.CallWebByURL(SaveCashBackRequestUrl, DataString);
            JObject oSaveCashBack = JObject.Parse(strSaveCashBack);

            if ("success".Equals(JsonRequestURLBuilder.GetJsonStringValue(oSaveCashBack, "message").Trim('"')))
            {
                cashBackEntity.Result = 1;
                string oIDs = oSaveCashBack.SelectToken("result").ToString();
                JObject oID = JObject.Parse(oIDs);
                cashBackEntity.CashBackDBEntity[0].ID = oID.SelectToken("sn").ToString().Trim('"');
            }
            else
            {
                string ErrorMSG = JsonRequestURLBuilder.GetJsonStringValue(oSaveCashBack, "message").Trim('"');
                cashBackEntity.ErrorMSG = ErrorMSG;
                cashBackEntity.Result = 2;
            }
            return cashBackEntity;
        }
        public static APPContentEntity Select(APPContentEntity appcontentEntity)
        {
            DataSet dsResult = new DataSet();
            dsResult.Tables.Add(new DataTable());
            dsResult.Tables[0].Columns.Add(new DataColumn("HOTELID"));
            dsResult.Tables[0].Columns.Add(new DataColumn("HOTELNM"));
            dsResult.Tables[0].Columns.Add(new DataColumn("PICTURE"));
            dsResult.Tables[0].Columns.Add(new DataColumn("TAGNM"));
            dsResult.Tables[0].Columns.Add(new DataColumn("STARRATE"));
            dsResult.Tables[0].Columns.Add(new DataColumn("LOWPRICE"));
            dsResult.Tables[0].Columns.Add(new DataColumn("LONGITUDE"));
            dsResult.Tables[0].Columns.Add(new DataColumn("LATITUDE"));

            try
            {
                APPContentDBEntity dbParm = (appcontentEntity.APPContentDBEntity.Count > 0) ? appcontentEntity.APPContentDBEntity[0] : new APPContentDBEntity();
                //string url = JsonRequestURLBuilder.getSearchHotelListUrlV2(dbParm.CityID, dbParm.PlatForm, dbParm.TypeID);

                //CallWebPage callWebPage = new CallWebPage();
                //string strJson = callWebPage.CallWebByURL(url, "");

                string url = JsonRequestURLBuilder.getSearchHotelListUrlV3(dbParm.CityID, dbParm.PlatForm, dbParm.TypeID);

                CallWebPage callWebPage = new CallWebPage();
                string DataString = "{\"cityId\":\"" + dbParm.CityID + "\"," + "\"type\":\"" + "1" + "\"}";
                url = url + "&signKey=" + PostSignKey(DataString);
                string strJson = callWebPage.CallWebByURL(url, DataString);

                //解析json数据
                JObject o = JObject.Parse(strJson);
                //JObject oHotelBase = (JObject)o.SelectToken("result");
                string oHotells = o.SelectToken("result").ToString();

                JObject oh = JObject.Parse(oHotells);
                string oHotelDetail = oh.SelectToken("hotellist").ToString();

                //酒店列表信息
                int index = oHotelDetail.IndexOf("[");

                string strHotelid = string.Empty;
                string strHotelname = string.Empty;
                string strPicture = string.Empty;
                string strTradearea = string.Empty;
                string strStarcode = string.Empty;
                string strTwoprice = string.Empty;
                string strLongitude = string.Empty;
                string strLatitude = string.Empty;
                string strLowestprice = string.Empty;
                //decimal decTwoprice = 0;
                //decimal decPriceTemp = 0;

                if (index == 0)
                {
                    //Array
                    JArray jsa = (JArray)JsonConvert.DeserializeObject(oHotelDetail);

                    for (int i = 0; i < jsa.Count; i++)
                    {
                        JObject jso = (JObject)jsa[i];

                        strHotelid = JsonRequestURLBuilder.GetJsonStringValue(jso, "hotelid").Trim('"');
                        strHotelname = JsonRequestURLBuilder.GetJsonStringValue(jso, "hotelnamezh").Trim('"');
                        strPicture = JsonRequestURLBuilder.GetJsonStringValue(jso, "picture").Trim('"');
                        strTradearea = JsonRequestURLBuilder.GetJsonStringValue(jso, "tradearea").Trim('"');
                        strStarcode = JsonRequestURLBuilder.GetJsonStringValue(jso, "starcode").Trim('"') + "[" + JsonRequestURLBuilder.GetJsonStringValue(jso, "stardesc").Trim('"') + "]";
                        strLongitude = JsonRequestURLBuilder.GetJsonStringValue(jso, "hotellongitude").Trim('"');
                        strLatitude = JsonRequestURLBuilder.GetJsonStringValue(jso, "hotellatitude").Trim('"');
                        strLowestprice = JsonRequestURLBuilder.GetJsonStringValue(jso, "lowestprice").Trim('"');
                        //string oRoomTypeCode = jso.SelectToken("planpromotionlist").ToString();

                        //int index0 = oRoomTypeCode.IndexOf("[");
                        ////List<HotelRoomTypeCode> liRoomType = new List<HotelRoomTypeCode>();

                        //decTwoprice = 0;
                        //decPriceTemp = 0;
                        //if (index0 == 0)
                        //{
                        //    JArray jsaRoomType = (JArray)JsonConvert.DeserializeObject(oRoomTypeCode);
                        //    for (int j = 0; j < jsaRoomType.Count; j++)
                        //    {
                        //        JObject jsoRoomType = (JObject)jsaRoomType[j];
                        //        decPriceTemp = (!String.IsNullOrEmpty(JsonRequestURLBuilder.GetJsonStringValue(jsoRoomType, "twoprice").Trim('"'))) ? decimal.Parse(JsonRequestURLBuilder.GetJsonStringValue(jsoRoomType, "twoprice").Trim('"')) : 0;

                        //        if (j == 0)
                        //        {
                        //            decTwoprice = decPriceTemp;
                        //        }
                        //        else if (j > 0 && decPriceTemp < decTwoprice)
                        //        {
                        //            decTwoprice = decPriceTemp;
                        //        }

                        //        //HotelRoomTypeCode saRoomType = new HotelRoomTypeCode(JsonRequestURLBuilder.GetJsonStringValue(jsoRoomType, "hotelid"), JsonRequestURLBuilder.GetJsonStringValue(jsoRoomType, "ratecode"), JsonRequestURLBuilder.GetJsonStringValue(jsoRoomType, "roomcode"), JsonRequestURLBuilder.GetJsonStringValue(jsoRoomType, "roomname"), JsonRequestURLBuilder.GetJsonStringValue(jsoRoomType, "roomnum"), JsonRequestURLBuilder.GetJsonStringValue(jsoRoomType, "thirdpartprice"), JsonRequestURLBuilder.GetJsonStringValue(jsoRoomType, "twoprice"));
                        //        //liRoomType.Add(saRoomType);
                        //    }
                        //}
                        //else
                        //{
                        //    JObject jsoObjRoomType = (JObject)JsonConvert.DeserializeObject(oRoomTypeCode);
                        //    decTwoprice = (!String.IsNullOrEmpty(JsonRequestURLBuilder.GetJsonStringValue(jsoObjRoomType, "twoprice").Trim('"'))) ? decimal.Parse(JsonRequestURLBuilder.GetJsonStringValue(jsoObjRoomType, "twoprice").Trim('"')) : 0;
                        //    //HotelRoomTypeCode saRoomType = new HotelRoomTypeCode(JsonRequestURLBuilder.GetJsonStringValue(jsoObjRoomType, "hotelid"), JsonRequestURLBuilder.GetJsonStringValue(jsoObjRoomType, "ratecode"), JsonRequestURLBuilder.GetJsonStringValue(jsoObjRoomType, "roomcode"), JsonRequestURLBuilder.GetJsonStringValue(jsoObjRoomType, "roomname"), JsonRequestURLBuilder.GetJsonStringValue(jsoObjRoomType, "roomnum"), JsonRequestURLBuilder.GetJsonStringValue(jsoObjRoomType, "thirdpartprice"), JsonRequestURLBuilder.GetJsonStringValue(jsoObjRoomType, "twoprice"));
                        //    //liRoomType.Add(saRoomType);
                        //}

                        DataRow drRow = dsResult.Tables[0].NewRow();
                        drRow["HOTELID"] = strHotelid;
                        drRow["HOTELNM"] = strHotelname;
                        drRow["PICTURE"] = strPicture;
                        drRow["TAGNM"] = strTradearea;
                        drRow["STARRATE"] = strStarcode;
                        drRow["LOWPRICE"] = strLowestprice;
                        drRow["LONGITUDE"] = strLongitude;
                        drRow["LATITUDE"] = strLatitude;
                        dsResult.Tables[0].Rows.Add(drRow);
                    }
                }
                else
                {
                    JObject jsoObj = (JObject)JsonConvert.DeserializeObject(oHotelDetail);

                    strHotelid = JsonRequestURLBuilder.GetJsonStringValue(jsoObj, "hotelid").Trim('"');
                    strHotelname = JsonRequestURLBuilder.GetJsonStringValue(jsoObj, "hotelname").Trim('"');
                    strPicture = JsonRequestURLBuilder.GetJsonStringValue(jsoObj, "picture").Trim('"');
                    strTradearea = JsonRequestURLBuilder.GetJsonStringValue(jsoObj, "tradearea").Trim('"');
                    strStarcode = JsonRequestURLBuilder.GetJsonStringValue(jsoObj, "starcode").Trim('"') + "[" + JsonRequestURLBuilder.GetJsonStringValue(jsoObj, "stardesc").Trim('"') + "]";
                    strLongitude = JsonRequestURLBuilder.GetJsonStringValue(jsoObj, "hotellongitude").Trim('"');
                    strLatitude = JsonRequestURLBuilder.GetJsonStringValue(jsoObj, "hotellatitude").Trim('"');
                    strLowestprice = JsonRequestURLBuilder.GetJsonStringValue(jsoObj, "lowestprice").Trim('"');
                    //string oRoomTypeCode = jsoObj.SelectToken("planpromotionlist").ToString();
                    //int index0 = oRoomTypeCode.IndexOf("[");
                    ////List<HotelRoomTypeCode> liRoomType = new List<HotelRoomTypeCode>();

                    //decTwoprice = 0;
                    //decPriceTemp = 0;
                    //if (index0 == 0)
                    //{
                    //    JArray jsaRoomType = (JArray)JsonConvert.DeserializeObject(oRoomTypeCode);
                    //    for (int j = 0; j < jsaRoomType.Count; j++)
                    //    {
                    //        JObject jsoRoomType = (JObject)jsaRoomType[j];
                    //        decPriceTemp = (!String.IsNullOrEmpty(JsonRequestURLBuilder.GetJsonStringValue(jsoRoomType, "twoprice").Trim('"'))) ? decimal.Parse(JsonRequestURLBuilder.GetJsonStringValue(jsoRoomType, "twoprice").Trim('"')) : 0;

                    //        if (j == 0)
                    //        {
                    //            decTwoprice = decPriceTemp;
                    //        }
                    //        else if (j > 0 && decPriceTemp < decTwoprice)
                    //        {
                    //            decTwoprice = decPriceTemp;
                    //        }
                    //        //HotelRoomTypeCode saRoomType = new HotelRoomTypeCode(JsonRequestURLBuilder.GetJsonStringValue(jsoRoomType, "hotelid"), JsonRequestURLBuilder.GetJsonStringValue(jsoRoomType, "ratecode"), JsonRequestURLBuilder.GetJsonStringValue(jsoRoomType, "roomcode"), JsonRequestURLBuilder.GetJsonStringValue(jsoRoomType, "roomname"), JsonRequestURLBuilder.GetJsonStringValue(jsoRoomType, "roomnum"), JsonRequestURLBuilder.GetJsonStringValue(jsoRoomType, "thirdpartprice"), JsonRequestURLBuilder.GetJsonStringValue(jsoRoomType, "twoprice"));
                    //        //liRoomType.Add(saRoomType);
                    //    }
                    //}
                    //else
                    //{
                    //    JObject jsoObjRoomType = (JObject)JsonConvert.DeserializeObject(oRoomTypeCode);
                    //    decTwoprice = (!String.IsNullOrEmpty(JsonRequestURLBuilder.GetJsonStringValue(jsoObjRoomType, "twoprice").Trim('"'))) ? decimal.Parse(JsonRequestURLBuilder.GetJsonStringValue(jsoObjRoomType, "twoprice").Trim('"')) : 0;
                    //    //HotelRoomTypeCode saRoomType = new HotelRoomTypeCode(JsonRequestURLBuilder.GetJsonStringValue(jsoObjRoomType, "hotelid"), JsonRequestURLBuilder.GetJsonStringValue(jsoObjRoomType, "ratecode"), JsonRequestURLBuilder.GetJsonStringValue(jsoObjRoomType, "roomcode"), JsonRequestURLBuilder.GetJsonStringValue(jsoObjRoomType, "roomname"), JsonRequestURLBuilder.GetJsonStringValue(jsoObjRoomType, "roomnum"), JsonRequestURLBuilder.GetJsonStringValue(jsoObjRoomType, "thirdpartprice"), JsonRequestURLBuilder.GetJsonStringValue(jsoObjRoomType, "twoprice"));
                    //    //liRoomType.Add(saRoomType);
                    //}

                    DataRow drRow = dsResult.Tables[0].NewRow();
                    drRow["HOTELID"] = strHotelid;
                    drRow["HOTELNM"] = strHotelname;
                    drRow["PICTURE"] = strPicture;
                    drRow["TAGNM"] = strTradearea;
                    drRow["STARRATE"] = strStarcode;
                    drRow["LOWPRICE"] = strLowestprice;
                    drRow["LONGITUDE"] = strLongitude;
                    drRow["LATITUDE"] = strLatitude;
                    dsResult.Tables[0].Rows.Add(drRow);
                }
            }
            catch (Exception ex)
            {
            }

            appcontentEntity.QueryResult = dsResult;

            return appcontentEntity;
        }
示例#26
0
        /// <summary>
        /// 更新订单最终状态接口
        /// </summary>
        /// <returns></returns>
        public static OrderInfoEntity updateIssueOrder(OrderInfoEntity OrderInfoEntity)
        {
            OrderInfoDBEntity dbParm = (OrderInfoEntity.OrderInfoDBEntity.Count > 0) ? OrderInfoEntity.OrderInfoDBEntity[0] : new OrderInfoDBEntity();
            string DataString = "";
            if (dbParm.BOOK_STATUS_OTHER == "9")
            {
                DataString = "{\"orderNum\":\"" + dbParm.FOG_ORDER_NUM + "\",\"status\":\"" + dbParm.BOOK_STATUS_OTHER + "\",\"operator\":\"" + dbParm.USER_ID + "\",\"remark\":\"" + dbParm.REMARK + "\",\"cancelReason\":\"" + dbParm.CanelReson + "\",\"isCoupon\":\"" + dbParm.TICKET_AMOUNT + "\"}";
            }
            else
            {
                DataString = "{\"orderNum\":\"" + dbParm.FOG_ORDER_NUM + "\",\"status\":\"" + dbParm.BOOK_STATUS_OTHER + "\",\"operator\":\"" + dbParm.USER_ID + "\",\"remark\":\"" + dbParm.REMARK + "\",\"isCoupon\":\"" + dbParm.TICKET_AMOUNT + "\"}";
            }
            string HotelPrRoomPlanUrl = JsonRequestURLBuilder.IssueOrderV2();
            CallWebPage callWebPage = new CallWebPage();
            string strHotelPrRoomPlan = callWebPage.CallWebByURL(HotelPrRoomPlanUrl, DataString);
            JObject oHotelPrRoomPlan = JObject.Parse(strHotelPrRoomPlan);

            if ("success".Equals(JsonRequestURLBuilder.GetJsonStringValue(oHotelPrRoomPlan, "message").Trim('"')) && "200".Equals(JsonRequestURLBuilder.GetJsonStringValue(oHotelPrRoomPlan, "code").Trim('"')))
            {

                OrderInfoEntity.ErrorMSG = JsonRequestURLBuilder.GetJsonStringValue(oHotelPrRoomPlan, "message").Trim('"');
                OrderInfoEntity.Result = 1;
            }
            else
            {
                OrderInfoEntity.ErrorMSG = JsonRequestURLBuilder.GetJsonStringValue(oHotelPrRoomPlan, "message").Trim('"') + JsonRequestURLBuilder.GetJsonStringValue(oHotelPrRoomPlan, "code").Trim('"');
                OrderInfoEntity.Result = 2;
            }

            return OrderInfoEntity;
        }
示例#27
0
        public static string SaveOrderOperationDoubleApprove(LmSystemLogEntity dbParm)
        {
            string DataString = "";
            if (dbParm.OrderBookStatus == "5")
            {
                DataString = "{\"orderNum\":\"" + dbParm.FogOrderID + "\",\"status\":\"" + dbParm.OrderBookStatus + "\",\"operator\":\"" + dbParm.LogMessages.Username + "\",\"remark\":\"" + dbParm.BookRemark + "\",\"cancelReason\":\"" + dbParm.CanelReson + "\"}";
            }
            else
            {
                DataString = "{\"orderNum\":\"" + dbParm.FogOrderID + "\",\"status\":\"" + dbParm.OrderBookStatus + "\",\"operator\":\"" + dbParm.LogMessages.Username + "\",\"remark\":\"" + dbParm.BookRemark + "\"}";
            }
            string HotelPrRoomPlanUrl = JsonRequestURLBuilder.IssueOrderV2();
            CallWebPage callWebPage = new CallWebPage();
            string strHotelPrRoomPlan = callWebPage.CallWebByURL(HotelPrRoomPlanUrl, DataString);
            JObject oHotelPrRoomPlan = JObject.Parse(strHotelPrRoomPlan);

            if ("200".Equals(JsonRequestURLBuilder.GetJsonStringValue(oHotelPrRoomPlan, "code").Trim('"')))
            {
                return "";
            }
            else
            {
                if ("更改的订单状态不可与库中相同".Equals(JsonRequestURLBuilder.GetJsonStringValue(oHotelPrRoomPlan, "message").Trim('"')))
                {
                    return "";
                }
                else
                {
                    return JsonRequestURLBuilder.GetJsonStringValue(oHotelPrRoomPlan, "message").Trim('"');
                }
            }
        }