修改查询处方时的时间字段由order_date改为recv_date,现场数据库中order_date字段值为空

This commit is contained in:
maqiao 2024-10-21 15:58:53 +08:00
parent a62dacfc9e
commit ca6d93b0db
1 changed files with 2 additions and 2 deletions

View File

@ -226,14 +226,14 @@ namespace DM_Weight.ViewModels
List<OrderInfo> queryData = SqlSugarHelper.Db.Queryable<OrderInfo>()
.InnerJoin<OrderDetail>((oi, od) => oi.OrderNo == od.OrderNo)
.InnerJoin(SqlSugarHelper.Db.Queryable<ChannelStock>().Where(cs => cs.DrawerType == (Int32)DrawerTypeEnum.drawerTypeOne).Where(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1")).GroupBy(cs => cs.DrugId), (oi, od, t) => od.DrugId == t.DrugId)
.WhereIF(OrderDate != null, oi => oi.OrderDate.ToString("yyyy-MM-dd") == OrderDate)
.WhereIF(OrderDate != null, oi => oi.RecvDate.ToString("yyyy-MM-dd") == OrderDate)
.WhereIF(!String.IsNullOrEmpty(SearchValue) && SelectedItem.Code.Equals("OrderNo"), oi => oi.OrderNo == SearchValue)
.WhereIF(!String.IsNullOrEmpty(SearchValue) && SelectedItem.Code.Equals("PatientId"), oi => oi.PatientId == SearchValue)
.WhereIF(!String.IsNullOrEmpty(ConfigurationManager.AppSettings["storage"]), oi => oi.Pharmacy == ConfigurationManager.AppSettings["storage"])
.Where(oi => oi.DmStatus == 0)
.Where(oi => oi.HisDispFlag == 0)
.Where(oi => oi.CancelFlag == 0)
.GroupBy(oi => oi.OrderDate)
.GroupBy(oi => oi.RecvDate)
.Select(oi => oi)
.ToPageList(PageNum, PageSize, ref totalCount);
//.ToList();