From 46542660851f182f7f29a6d3ca234c9afe77284d Mon Sep 17 00:00:00 2001 From: maqiao <625215135@qq.com> Date: Thu, 27 Jun 2024 16:56:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E8=B4=A6=E5=86=8C=E4=B8=AD?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E4=BF=AE=E6=94=B9sql=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=EF=BC=9B=E8=AF=B7=E9=A2=86=E5=88=97=E8=A1=A8=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6=E4=BF=AE=E6=94=B9=EF=BC=88?= =?UTF-8?q?=E4=B8=8D=E6=A0=B9=E6=8D=AEmachin=5Fid=EF=BC=8C=E8=A6=81?= =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E9=83=A8=E9=97=A8=E5=90=8D=E7=A7=B0=EF=BC=8C?= =?UTF-8?q?=E8=AF=B7=E9=A2=86=E5=88=97=E8=A1=A8=E9=87=8C=E7=9A=84machin=5F?= =?UTF-8?q?id=E4=B8=8D=E6=98=AF=E7=94=B3=E8=AF=B7=E6=96=B9=E7=9A=84?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DM_Weight/ViewModels/AccountWindowViewModel.cs | 6 +++--- DM_Weight/ViewModels/ApplyListWindowViewModel.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DM_Weight/ViewModels/AccountWindowViewModel.cs b/DM_Weight/ViewModels/AccountWindowViewModel.cs index ffe0ee6..bd1ba10 100644 --- a/DM_Weight/ViewModels/AccountWindowViewModel.cs +++ b/DM_Weight/ViewModels/AccountWindowViewModel.cs @@ -308,16 +308,15 @@ namespace DM_Weight.ViewModels { SQL += " AND ac.drug_id='" + drug_id + "' "; } - SQL += " ORDER BY ac.create_date desc,ac.drug_id"; if (type > 0) { if (type == 1) { - SQL += " WHERE AddQuantity>0 "; + SQL += " WHERE ac.add_quantity>0 "; } if (type == 2) { - SQL += " WHERE OutQuantity>0 "; + SQL += " WHERE ac.out_quantity>0 "; } if (type == 3) { @@ -328,6 +327,7 @@ namespace DM_Weight.ViewModels SQL += " WHERE type=4 "; } } + SQL += " ORDER BY ac.create_date desc,ac.drug_id"; //ChannelStocks = q.Select(it => { it.CheckQuantity = it.Quantity; return it; }).ToList(); diff --git a/DM_Weight/ViewModels/ApplyListWindowViewModel.cs b/DM_Weight/ViewModels/ApplyListWindowViewModel.cs index 05e4f06..16a0d6d 100644 --- a/DM_Weight/ViewModels/ApplyListWindowViewModel.cs +++ b/DM_Weight/ViewModels/ApplyListWindowViewModel.cs @@ -143,7 +143,7 @@ namespace DM_Weight.ViewModels CollectDrugLst = SqlSugarHelper.Db.Queryable() .Includes(cd => cd.drugPleaseClaim) .Includes(cd => cd.drugInfo) - .Where(cd => cd.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1")) + .Where(cd => cd.DeptName.Equals(ConfigurationManager.AppSettings["department"] ?? "")) .WhereIF(!String.IsNullOrEmpty(SearchValue) && SelectedItem.Code.Equals("DrugId"), (cd) => cd.drugInfo.DrugId.ToString() == SearchValue) .WhereIF(!String.IsNullOrEmpty(SearchValue) && SelectedItem.Code.Equals("DrugName"), (cd) => cd.drugInfo.DrugName.Contains(SearchValue)) .WhereIF(!String.IsNullOrEmpty(SearchValue) && SelectedItem.Code.Equals("PyCode"), (cd) => cd.drugInfo.PyCode.Contains(SearchValue))