public ActionResult GetWriteInvioceList(GetWriteInvioceListReq req) { InvioceFacade facaed = new InvioceFacade(); var result = facaed.GetWriteInvioceList(req); if (result == null) { return(Json(new { Data = result, Message = facaed.PromptInfo.Message, Result = -1 })); } return(Json(new { Data = result, Message = "成功", Result = 1 })); }
/// <summary> /// 获取开票列表 /// </summary> /// <param name="req"></param> /// <returns></returns> public AlreadyApplyAdminDto GetWriteInvioceList(GetWriteInvioceListReq req) { var query = (from tci in db.TblcCentcardInvoiceSet join tc in db.TblcCentcardSet on tci.Idno equals tc.Idno into tcdata from tcd in tcdata.DefaultIfEmpty() join tr in db.TnetReginfoSet on tci.Nodeid equals tr.Nodeid into trdata from trd in trdata.DefaultIfEmpty() orderby tci.Createtime descending select new InvioceAlreadyApplyAdminDto { Amount = (decimal)tcd.Amount, Infoid = tci.Infoid, CardNum = tcd.Cardno, Head = tci.Head, ShowName = "充值码(SVC)", Status = tci.Status, TaxNum = tci.Code, Typeid = tci.Typeid, IdNo = tci.Infoid, Expressno = tci.Expressno, IsPerson = tci.Isperson, NodeCode = trd.Nodecode }).ToList(); if (req.Status != -1) { query = query.Where(c => c.Status == req.Status).ToList(); } if (req.Typeid != -1) { query = query.Where(c => c.Typeid == req.Typeid).ToList(); } if (req.IsPerson != -1) { query = query.Where(c => c.IsPerson == req.IsPerson).ToList(); } int num = query.Count(); return(new AlreadyApplyAdminDto { List = query.ToPagedList(req.PageNum, req.PageSize).ToList(), Num = num }); }