Exemplo n.º 1
0
        /// <summary>
        /// 获得智享计划回款还款 按月汇总列表
        /// </summary>
        public void GetZxReturnAndPayMonths()
        {
            var      startDate = int.Parse(WEBRequest.GetString("startDate"));
            DateTime sTime;
            DateTime eTime;

            if (startDate == 1)
            {
                sTime = DateTime.Parse(DateTime.Now.AddDays(1).ToShortDateString());
                eTime =
                    new DateTime(DateTime.Now.AddMonths(3).Year, DateTime.Now.AddMonths(3).Month, 1).AddMilliseconds(-1);
            }
            else
            {
                sTime = new DateTime(DateTime.Now.AddMonths(3 * (startDate - 1)).Year,
                                     DateTime.Now.AddMonths(3 * (startDate - 1)).Month, 1);
                eTime =
                    new DateTime(DateTime.Now.AddMonths(3 * (startDate)).Year, DateTime.Now.AddMonths(3 * (startDate)).Month,
                                 1).AddMilliseconds(-1);
            }


            MyReturnAndPayList        myList = new MyReturnAndPayList();
            List <MyReturnAndPayInfo> list   = new List <MyReturnAndPayInfo>();
            List <ZXWxDueAmountMonth> zxList = new ZXWXSelectBLL().GetZxWxDueAmountMonths(userid, sTime, eTime, 1);

            if (zxList != null && zxList.Count > 0)
            {
                foreach (var item in zxList)
                {
                    MyReturnAndPayInfo info = new MyReturnAndPayInfo();
                    info.myDate      = item.cycDate;
                    info.myMonth     = item.cycDate;
                    info.payMoney    = item.dueOutTotalAmount;
                    info.returnMoney = item.dueInTotalAmount;
                    list.Add(info);
                }
            }
            myList.list = list;
            string resultStr = JsonHelper.ToJson(myList);

            PrintJson(resultStr);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 智享 获得回款还款明细 按天汇总列表  (页面上点击月份事件)
        /// </summary>
        public void GetZxReturnAndPayDetail()
        {
            int      year  = Tool.SafeConvert.ToInt32(Context.Request.Form["year"], 2016);
            int      month = Tool.SafeConvert.ToInt32(Context.Request.Form["month"], 8);
            DateTime startTime;
            DateTime endTime;

            if (year == DateTime.Now.Year && month == DateTime.Now.Month)
            {
                startTime = DateTime.Parse(DateTime.Now.AddDays(1).ToShortDateString());
                endTime   = new DateTime(startTime.AddMonths(1).Year, startTime.AddMonths(1).Month, 1);;
            }
            else
            {
                startTime = new DateTime(year, month, 1);
                endTime   = startTime.AddMonths(1);
            }
            List <MyReturnAndPayInfo> list   = new List <MyReturnAndPayInfo>();
            List <ZXWxDueAmountMonth> zxList = new ZXWXSelectBLL().GetZxWxDueAmountMonths(userid, startTime, endTime, 2);

            if (zxList != null && zxList.Count > 0)
            {
                foreach (var item in zxList)
                {
                    MyReturnAndPayInfo info = new MyReturnAndPayInfo();
                    info.myDate      = item.cycDate;
                    info.myMonth     = item.cycDate;
                    info.payMoney    = item.dueOutTotalAmount;
                    info.returnMoney = item.dueInTotalAmount;
                    list.Add(info);
                }
            }
            string resultStr = JsonHelper.ToJson(list);

            PrintJson(resultStr);
        }