public async Task <ObjectResultModule> IncomeDetailsList([FromBody] IncomeDetailsIn IncomeDetailsInList) { if (!Commons.CheckSecret(IncomeDetailsInList.Secret)) { this.ObjectResultModule.StatusCode = 422; this.ObjectResultModule.Message = "Wrong Secret"; this.ObjectResultModule.Object = ""; return(this.ObjectResultModule); } var userid = _IabpSession.UserId > 0 ? (int)_IabpSession.UserId : 0; IncomeDetailsInList.AndAlso(t => !t.IsDelete); if (!string.IsNullOrEmpty(IncomeDetailsInList.DoctorName)) { IncomeDetailsInList.AndAlso(t => t.DoctorName.Contains(IncomeDetailsInList.DoctorName)); } var values = await _IncomeDetailsService.IncomeDetailsList(IncomeDetailsInList); if (values.Count() == 0) { this.ObjectResultModule.StatusCode = 204; this.ObjectResultModule.Message = "NoContent"; this.ObjectResultModule.Object = ""; } else { this.ObjectResultModule.Object = values; this.ObjectResultModule.Message = "sucess"; this.ObjectResultModule.StatusCode = 200; } #region 操作日志 var CreateYaeherOperList = new YaeherOperList() { OperExplain = "IncomeDetailsList", OperContent = JsonHelper.ToJson(IncomeDetailsInList), OperType = "IncomeDetailsList", CreatedBy = userid, CreatedOn = DateTime.Now }; var resultLog = await _yaeherOperListService.CreateYaeherOperList(CreateYaeherOperList); #endregion return(this.ObjectResultModule); }
public async Task <List <AdminIncomeDetail> > IncomeConsultationDetail(IncomeDetailsIn detailin) { var con = _repository.GetAll().Where(t => !t.IsDelete); var incom = _incomerepository.GetAll().Where(detailin.Expression); var query = from a in incom join b in con on a.ConsultID equals b.Id select new AdminIncomeDetail { ConsultType = b.ConsultType, //咨询类型 ConsultID = b.Id, ConsultantName = b.ConsultantName, //咨询人姓名 PatientName = b.PatientName, //患者姓名 CreatedOn = a.CreatedOn, OrderMoney = a.OrderMoney, //流水金额 ProportionMoney = Math.Round(a.OrderMoney - a.ProportionMoney, 2), //公司进账 DoctorName = a.DoctorName, DoctorID = a.DoctorID, }; return(await query.ToListAsync()); }