コード例 #1
0
        /// <summary>
        /// 预约百分比
        /// </summary>
        /// <param name="year"></param>
        /// <param name="month"></param>
        /// <param name="day"></param>
        /// <returns></returns>
        public string AppoingmentDayData(int year, int month, int day)
        {
            var date   = new DateTime(year, month, day);
            var qyList = qyjbxxService.GetqypaList(GLYadmin.YYID, date.ToString("yyyy-MM-dd"));


            List <dynamic>     yyrsList = ddService.GetTjYyrsByDay(GLYadmin.YYID, date);
            List <PqTjrqModel> pqList   = new PqTjrqService().GetList(GLYadmin.YYID, date);

            var query = from a in qyList
                        join b in yyrsList on a.key equals b.dwbh into bb
                        from bbb in bb.DefaultIfEmpty()
                        join c in pqList on a.key equals c.qybh into cc
                        from ccc in cc.DefaultIfEmpty()
                        select new OrderDayReport
            {
                Qymc = a.values,
                Yyrs = bbb == null ? 0 : bbb.yyrs,
                Zrs  = ccc == null ? 0 : ccc.tjrs
            };

            return(JsonConvert.SerializeObject(query.ToList()));
        }