private string CommonProcess(string strRequestType, string strInputXML)
        {
            while (!CheckCount(strRequestType))
            {
                System.Threading.Thread.Sleep(1000);
            }


            APICommon apicommon = new APICommon();

            string requestHeader = apicommon.GetHeadXML(strRequestType, "");

            strInputXML = "<HotelRequest><RequestBody xmlns:ns=\"http://www.opentravel.org/OTA/2003/05\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">" + strInputXML + "</RequestBody></HotelRequest>";

            string       requestXML = string.Format(requestHeader, strInputXML);
            string       url        = APICommon.APIService + "Hotel/" + strRequestType + ".asmx";
            WebSvcCaller process    = new WebSvcCaller();
            Hashtable    ht         = new Hashtable();

            ht.Add("requestXML", requestXML);

            logger.Info(string.Format(logFormat, strRequestType, strInputXML));

            XmlDocument xd = WebSvcCaller.QuerySoapWebService(url, "Request", ht);

            return(xd.InnerText);
        }
Esempio n. 2
0
        public static void TestWebSvcCaller()
        {
            Hashtable ht = new Hashtable();

            ht.Add("theEmail", "*****@*****.**");
            //XmlDocument xdoc = WebSvcCaller.QuerySoapWebService("http://www.webxml.com.cn/WebServices/ValidateEmailWebService.asmx?wsdl", "ValidateEmailAddress", ht);
            XmlDocument xdoc = WebSvcCaller.QuerySoapWebService("http://www.webxml.com.cn/WebServices/ValidateEmailWebService.asmx?wsdl", "ValidateEmailAddress", ht);

            Console.WriteLine(xdoc.InnerText);
        }
        public string GetTicketBySearch(int areaId, string keywords)
        {
            string reqXml =
                @"<ScenicSpotSearchRequest>
<DistributionChannel>9</DistributionChannel>
<PagingParameter>
<PageIndex>1</PageIndex>
<PageSize>20</PageSize>
</PagingParameter>
<SearchParameter>
<Keyword>北京</Keyword>
<SaleCityID>1</SaleCityID>
</SearchParameter>
</ScenicSpotSearchRequest>";

            APICommon apicommon = new APICommon();

            return(WebSvcCaller.TicketCaller(apicommon.GetTicketJson(0, reqXml, "TicketSenicSpotSearch", "TicketSenicSpotSearch")));
        }
Esempio n. 4
0
        public void checkSellDetail()
        {
            //退款距离当前时间 5分钟之前到40分钟之前的
            string sql = "select DATEDIFF(MI,createTime,GETDATE()) sjc,"
                         + " p.appid,p.trxid,p.acct,p.type,p.payType,p.trxamt,p.createTime,p.chLdNo,p.unionID,p.mechineID,p.productID,p.companyID,p.chzt,s.mechineID,s.billno,s.orderTime from  asm_pay_info p left join asm_sellDetail s on p.trxid = s.billno"
                         + " where p.type = 2 and p.statu = 1 and p.payType in(1,2,4) "
                         + " and DATEDIFF(MI, createTime, GETDATE())>= 5 and DATEDIFF(MI, createTime, GETDATE())<= 120 and p.companyID=14  and s.billno is null"
                         + " order by p.id desc";
            DataTable dt = DbHelperSQL.Query(sql).Tables[0];

            if (dt.Rows.Count > 0)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1, 0, 0, 0, 0));
                    long            t         = (DateTime.Now.Ticks - startTime.Ticks) / 10000; //除10000调整为13位
                    string          payType   = "";
                    if (dt.Rows[i]["payType"].ToString() == "4")
                    {
                        payType = "3";
                    }
                    else
                    {
                        payType = dt.Rows[i]["payType"].ToString();
                    }

                    string productID = dt.Rows[i]["productID"].ToString();
                    string money     = (double.Parse(dt.Rows[i]["trxamt"].ToString()) / 100).ToString("f2");
                    string ldNO      = dt.Rows[i]["chLdNo"].ToString();
                    string type      = "2";
                    string bill      = dt.Rows[i]["trxid"].ToString();
                    string mechineID = dt.Rows[i]["mechineID"].ToString();

                    Util.Debuglog("payType=" + payType + ";productID=" + productID + ";money=" + money + ";ldNO=" + ldNO + ";bill=" + bill + ";mechineID=" + mechineID, "检查支付成功未出货订单.txt");
                    if (string.IsNullOrEmpty(productID) || string.IsNullOrEmpty(bill) || string.IsNullOrEmpty(mechineID))
                    {
                        continue;
                    }

                    string    memberID = "0";
                    string    sqlM     = "select * from asm_member where openID='" + dt.Rows[i]["acct"].ToString() + "' ";
                    DataTable dm       = DbHelperSQL.Query(sqlM).Tables[0];
                    if (dm.Rows.Count > 0)
                    {
                        memberID = dm.Rows[0]["id"].ToString();
                    }
                    Hashtable ht = new Hashtable();
                    ht.Add("payType", payType);
                    ht.Add("productID", productID);
                    ht.Add("orderTime", dt.Rows[i]["createTime"].ToString());
                    ht.Add("num", 1);
                    ht.Add("totalMoney", money);
                    if (string.IsNullOrEmpty(ldNO))
                    {
                        ht.Add("proLD", "0");
                    }
                    else
                    {
                        ht.Add("proLD", ldNO);
                    }

                    ht.Add("type", type);
                    ht.Add("orderNO", t);
                    if (dt.Rows[i]["chzt"].ToString() == "1")
                    {
                        ht.Add("bz", "交易成功");
                    }
                    else
                    {
                        ht.Add("bz", "出货失败");
                    }

                    ht.Add("code", "");
                    ht.Add("billno", bill);
                    ht.Add("mechineID", mechineID);
                    ht.Add("memberID", memberID);
                    Hashtable ht1 = new Hashtable();
                    ht1.Add("recordList", "[" + Util.HashtableToWxJson(ht) + "]");
                    Util.Debuglog("[" + Util.HashtableToWxJson(ht) + "]", "检查支付成功未出货订单1.txt");
                    XmlDocument xx     = WebSvcCaller.QuerySoapWebService("http://nq.bingoseller.com/api/mechineService.asmx", "upSellRecord", ht1);
                    string      result = xx.OuterXml;
                    Util.Debuglog("result=" + result, "检查支付成功未出货订单.txt");
                }
            }
        }
Esempio n. 5
0
        public void checkOrderDetail()
        {
            //退款距离当前时间 5分钟之前到40分钟之前的
            string    sql = "select p.* from asm_orderlistDetail p where statu = 1 and zt = 4 and DATEDIFF(MI, sellTime, GETDATE())> 30 AND not exists( select 1 from asm_sellDetail s where p.code = s.code and p.mechineID = s.mechineID and p.memberID = s.memberID and p.ldNO = s.proLD )  ";
            DataTable dt  = DbHelperSQL.Query(sql).Tables[0];

            if (dt.Rows.Count > 0)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1, 0, 0, 0, 0));
                    long            t         = (DateTime.Now.Ticks - startTime.Ticks) / 10000; //除10000调整为13位
                    string          payType   = "3";


                    string    productID = dt.Rows[i]["productID"].ToString();
                    string    money     = "0.00";
                    string    sql1      = "select price from asm_orderlist where orderNO='" + dt.Rows[i]["orderNO"].ToString() + "' ";
                    DataTable dt1       = DbHelperSQL.Query(sql1).Tables[0];
                    if (dt1.Rows.Count > 0)
                    {
                        money = dt1.Rows[0]["price"].ToString();
                    }
                    string ldNO = dt.Rows[i]["ldNO"].ToString();
                    string type = "2";
                    // string bill = dt.Rows[i]["orderNO"].ToString();
                    string mechineID = dt.Rows[i]["mechineID"].ToString();

                    Util.Debuglog("payType=" + payType + ";productID=" + productID + ";money=" + money + ";ldNO=" + ldNO + ";bill=" + t + ";mechineID=" + mechineID, "检查支付成功未出货订单.txt");
                    if (string.IsNullOrEmpty(productID) || string.IsNullOrEmpty(t.ToString()) || string.IsNullOrEmpty(mechineID))
                    {
                        continue;
                    }

                    string memberID = dt.Rows[i]["memberID"].ToString();

                    Hashtable ht = new Hashtable();
                    ht.Add("payType", payType);
                    ht.Add("productID", productID);
                    ht.Add("orderTime", dt.Rows[i]["sellTime"].ToString());
                    ht.Add("num", 1);
                    ht.Add("totalMoney", money);
                    if (string.IsNullOrEmpty(ldNO))
                    {
                        ht.Add("proLD", "0");
                    }
                    else
                    {
                        ht.Add("proLD", ldNO);
                    }

                    ht.Add("type", type);
                    ht.Add("orderNO", t);

                    ht.Add("bz", "出货失败");


                    ht.Add("code", dt.Rows[i]["code"].ToString());
                    ht.Add("billno", t);
                    ht.Add("mechineID", mechineID);
                    ht.Add("memberID", memberID);
                    Hashtable ht1 = new Hashtable();
                    ht1.Add("recordList", "[" + Util.HashtableToWxJson(ht) + "]");
                    Util.Debuglog("[" + Util.HashtableToWxJson(ht) + "]", "订购未出货订单1.txt");
                    XmlDocument xx     = WebSvcCaller.QuerySoapWebService("http://nq.bingoseller.com/api/mechineService.asmx", "upSellRecord", ht1);
                    string      result = xx.OuterXml;
                    Util.Debuglog("result=" + result, "订购未出货订单.txt");
                }
            }
        }