Ejemplo n.º 1
0
        public static void SyncTest()
        {
            Console.WriteLine("开始同步");

            string url = "";


            #region

            List <int> BIDList = new List <int>
            {
                5370689
            };

            #endregion

            for (int i = 0; i < BIDList.Count; i++)
            {
                //AlterRecevied(BIDList[i]);

                string RequestStr = JsonConvert.SerializeObject(BIDList[i]);

                string result = SendRequest(RequestStr, url);

                ResultBaseModel ResponseInfo = JsonConvert.DeserializeObject <ResultBaseModel>(result);



                ILog logger = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);

                string resultmsg = string.Format("订单:{0},结果:{1},信息:{2}", BIDList[i], ResponseInfo.IsSuccess, ResponseInfo.ErrorInfo);

                logger.Info(resultmsg);
            }


            Console.WriteLine("同步结束");
        }
Ejemplo n.º 2
0
        public static void ReplyInstruction()
        {
            ReplyInstructionInputParmModel model = new ReplyInstructionInputParmModel();

            //SELECT FillStatus, BusinessID, REPLACE(REPLACE(REPLACE(CONVERT(varchar(100), RepayTime, 120), '-', ''), ':', ''), ' ', ''),RepayAmt,RepayType,BillIndex,JQHDeductId,ReCapital,ReInterest,RePunitiveInterest FROM dbo.JQHDeductRecord
            //WHERE BusinessID = 5582820

            model.BusinessId         = 6161589;
            model.RepayTime          = "20171206152017";
            model.RepayAmt           = 681.46;
            model.RepayStatus        = 1;
            model.RepayPeriod        = 3;
            model.RepayKey           = "REPAY20171206152017917034041124";
            model.ReCapital          = 668.00;
            model.ReInterest         = 13.46;
            model.RePunitiveInterest = 0.00;
            model.IsRepair           = true;

            JavaScriptSerializer JavaScriptSerializer = new JavaScriptSerializer();

            string url = "";

            string RequestStr = JsonConvert.SerializeObject(model);

            string result = SendRequest(RequestStr, url);

            ResultBaseModel ResponseInfo = JsonConvert.DeserializeObject <ResultBaseModel>(result);

            ILog logger = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);

            string resultmsg = string.Format("订单:{0},结果:{1},信息:{2}",
                                             model.BusinessId, ResponseInfo.IsSuccess, ResponseInfo.ErrorInfo);

            logger.Info(resultmsg);

            Thread.Sleep(2000);
        }