/// <summary>
        /// 根据请求参数获取对应的订单交接明细列表
        /// <para>作    者:郭伟佳</para>
        /// <para>创建时间:2018-11-17</para>
        /// </summary>
        /// <param name="request">订单交接明细请求对象</param>
        /// <returns>订单交接明细信息分页列表</returns>
        public PageResult <OrderHandoverDetailListResponse> GetHandDetailList(OrderHandoverDetailRequest request)
        {
            var result = _viewDetailRepository.Value.GetDetailsByHandoverId(request);

            if (result != null && result.Data != null && result.Data.Count > 0)
            {
                //获取校区的所有学生信息
                var studentInfoList = StudentService.GetStudentByIds(result.Data.Select(a => a.StudentId).Distinct()).Result;
                result.Data.ForEach(a =>
                {
                    var studentInfo      = studentInfoList.FirstOrDefault(s => s.StudentId == a.StudentId);//学生信息
                    a.StudentNo          = studentInfo?.StudentNo;
                    a.StudentName        = studentInfo?.StudentName;
                    a.OrderTradeTypeName = EnumName.GetDescription(typeof(OrderTradeType), a.OrderTradeType);
                });
                return(result);
            }
            return(new PageResult <OrderHandoverDetailListResponse>());
        }
예제 #2
0
        /// <summary>
        /// 根据请求参数获取对应的订单交接明细列表
        /// <para>作    者:郭伟佳</para>
        /// <para>创建时间:2018-11-19</para>
        /// </summary>
        /// <param name="request">订单交接明细请求对象</param>
        /// <returns>订单交接明细信息列表</returns>
        public PageResult <OrderHandoverDetailListResponse> GetDetailsByHandoverId(OrderHandoverDetailRequest request)
        {
            var result = from a in CurrentContext.TblFinOrderHandover
                         join b in CurrentContext.TblFinOrderHandoverDetail on a.OrderHandoverId equals b.OrderHandoverId
                         where a.OrderHandoverId == request.HandoverId &&
                         a.SchoolId == request.SchoolId
                         select new OrderHandoverDetailListResponse
            {
                StudentId      = b.StudentId,
                OrderId        = b.OrderId,
                OrderNo        = b.OrderNo,
                OrderTradeType = b.OrderTradeType,
                PayAmount      = b.PayAmount,
                HandoverDate   = a.HandoverDate,
                CreateTime     = b.CreateTime,
                PayDate        = b.PayDate,
                Remark         = b.Remark
            };

            return(result.ToPagerSource(request.PageIndex, request.PageSize));
        }
예제 #3
0
 public PageResult <OrderHandoverDetailListResponse> GetHandDetailList([FromQuery] OrderHandoverDetailRequest request)
 {
     request.SchoolId = base.SchoolId;
     //校区Id是招生专员对应的校区Id
     return(new OrderHandoverService(base.SchoolId).GetHandDetailList(request));
 }