diff --git a/DM_Weight/ViewModels/InvoiceInWindowViewModel.cs b/DM_Weight/ViewModels/InvoiceInWindowViewModel.cs index ed48102..c8da0d4 100644 --- a/DM_Weight/ViewModels/InvoiceInWindowViewModel.cs +++ b/DM_Weight/ViewModels/InvoiceInWindowViewModel.cs @@ -207,7 +207,7 @@ namespace DM_Weight.ViewModels { List q = SqlSugarHelper.Db.Queryable() .Includes(cs => cs.DrugInfo) - .WhereIF(!string.IsNullOrEmpty(invoice.DrugEffDate), cs => cs.EffDate.Equals(invoice.DrugEffDate)) + .WhereIF(!string.IsNullOrEmpty(invoice.DrugEffDate), cs => cs.EffDate.Substring(0,10).Equals(invoice.DrugEffDate.Substring(0,10))) .WhereIF(!string.IsNullOrEmpty(invoice.DrugManuNo), cs => cs.ManuNo.Equals(invoice.DrugManuNo)) .Where(cs => cs.DrugId == invoice.DrugId) .Where(cs => cs.DrawerType == 1) @@ -334,7 +334,7 @@ namespace DM_Weight.ViewModels sb.Append(" and i.cancel_flag=@CancelFlag "); if (OrderDate != null) { - sb.Append(" and i.invoice_date = @CreateTime "); + sb.Append(" and DATE_FORMAT(i.invoice_date,'%Y-%m-%d') = @CreateTime "); } if (!String.IsNullOrEmpty(SearchValue)) {