From 27d5886dda516cbbc0da97a0b4132b54ff53035d Mon Sep 17 00:00:00 2001 From: maqiao <625215135@qq.com> Date: Thu, 2 Jan 2025 13:48:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E8=A1=A81=E4=B8=AD=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E7=A9=BA=E7=93=B6=EF=BC=88=E6=97=A0=E6=89=B9=E6=AC=A1=EF=BC=89?= =?UTF-8?q?=E6=95=B0=E6=8D=AE;=E5=80=BC=E7=8F=AD=E6=9F=9C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=BA1=E3=80=812=E5=8F=B7=E6=8A=BD=E5=B1=89?= =?UTF-8?q?=E5=8F=AF=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DM_Weight/Report/GridReportUtil.cs | 8 ++--- DM_Weight/ReportTemp/account_book_temp-01.grf | 30 +++++++++++++++++++ .../BindingChannelDialogViewModel.cs | 4 +-- .../BindingChannelNewDialogViewModel .cs | 4 +-- .../CheckRecordDetailDialogViewModel.cs | 4 +-- .../CheckStockNew2WindowViewModel.cs | 4 +-- .../CheckStockNewWindowViewModel.cs | 8 ++--- .../MultiOrderTakeDialogViewModel.cs | 4 +-- .../ViewModels/OrderTakeDialogViewModel.cs | 4 +-- .../ViewModels/ReturnDrugWindow2ViewModel.cs | 4 +-- .../ViewModels/ReturnDrugWindowViewModel.cs | 4 +-- .../ViewModels/ReturnEmptyWindowViewModel.cs | 4 +-- .../ViewModels/SelfAddWindowViewModel.cs | 4 +-- .../ViewModels/SelfTakeDrugWindowViewModel.cs | 4 +-- .../ViewModels/StockListWindowViewModel.cs | 4 +-- 15 files changed, 62 insertions(+), 32 deletions(-) diff --git a/DM_Weight/Report/GridReportUtil.cs b/DM_Weight/Report/GridReportUtil.cs index 289f58a..3fa0f50 100644 --- a/DM_Weight/Report/GridReportUtil.cs +++ b/DM_Weight/Report/GridReportUtil.cs @@ -399,7 +399,7 @@ namespace DM_Weight.Report manunoQuantity as stockQuantity,u1.user_name as operatorName,u2.user_name as reviewerName,di.`drug_name` AS `drugName`, di.`drug_spec` AS `drugSpec`, di.`pack_unit` AS `packUnit`,di.big_unit as bigUnit, di.`dosage` AS `dosage`, di.`manufactory` AS `manufactory` FROM dm_machine_record mr INNER JOIN DRUG_INFO di ON mr.drug_id=di.drug_id LEFT JOIN user_list u1 ON mr.`operator` = u1.`id`LEFT JOIN user_list u2 ON mr.`reviewer` = u2.`id` - WHERE mr.`machine_id` = '{machine_id}' and type in(1,2,31,4,5) and DATE_FORMAT(operation_time,'%Y-%m')='{strDate}'and IF(mr.`type` = 4 AND mr.`quantity` = 0, 99999, mr.`quantity`) <>99999 + WHERE mr.`machine_id` = '{machine_id}' and type in(1,2,31,4,5) and mr.manu_no is not NULL and DATE_FORMAT(operation_time,'%Y-%m')='{strDate}'and IF(mr.`type` = 4 AND mr.`quantity` = 0, 99999, mr.`quantity`) <>99999 GROUP BY drugId,DMYear,DMMonth,DMDay,manuNo ORDER BY mr.drug_id,operation_time) t on dmr.id=t.id"; List> tableList = SqlSugarHelper.Db.SqlQueryable(SQL).ToDictionaryList(); @@ -416,19 +416,19 @@ namespace DM_Weight.Report string strValue = kvp.Value.ToString(); string inQuantitySQL = $@"SELECT GROUP_CONCAT(SumInQuantity) as StrTotalQuantity,GROUP_CONCAT(manu_no) as StrTotalManuNo from (SELECT sum(IF(mr.`type` IN (1, 31), mr.`quantity`, IF(mr.`type` = 4 AND mr.`quantity` > 0, mr.`quantity`, 0))) as SumInQuantity,manu_no - from dm_machine_record mr where drug_id='{strValue}' and machine_id='{machine_id}' and type in(1,2,31,4,5) + from dm_machine_record mr where drug_id='{strValue}' and machine_id='{machine_id}' and type in(1,2,31,4,5) and mr.manu_no is not NULL and DATE_FORMAT(operation_time,'%Y-%m')='{strDate}'and IF(mr.`type` = 4 AND mr.`quantity` = 0, 99999, mr.`quantity`) <>99999 GROUP BY drug_id,manu_no ORDER BY drug_id,operation_time) as t"; InTotalModel = SqlSugarHelper.Db.SqlQueryable(inQuantitySQL).First(); string outQuantitySQL = $@"SELECT GROUP_CONCAT(SumInQuantity) as StrTotalQuantity,GROUP_CONCAT(manu_no) as StrTotalManuNo from (SELECT sum(IF(mr.`type` = 2, mr.`quantity`, IF(mr.`type` = 4 AND mr.`quantity` < 0, (0 - mr.`quantity`), 0))) as SumInQuantity ,manu_no - from dm_machine_record mr where drug_id='{strValue}' and machine_id='{machine_id}' and type in(1,2,31,4,5) + from dm_machine_record mr where drug_id='{strValue}' and machine_id='{machine_id}' and type in(1,2,31,4,5) and mr.manu_no is not NULL and DATE_FORMAT(operation_time,'%Y-%m')='{strDate}' and IF(mr.`type` = 4 AND mr.`quantity` = 0, 99999, mr.`quantity`) <>99999 GROUP BY drug_id,manu_no ORDER BY drug_id,operation_time) as t"; OutTotalModel = SqlSugarHelper.Db.SqlQueryable(outQuantitySQL).First(); string stockQuantitySQL = $@"SELECT GROUP_CONCAT(a.Manu_No) as StrTotalManuNo,GROUP_CONCAT(a.manunoQuantity) as StrTotalQuantity from dm_machine_record a inner join (select drug_id,manu_no,max(operation_time) as latest_date,stock_quantity from dm_machine_record - WHERE DATE_FORMAT(operation_time,'%Y-%m')='{strDate}' and machine_id='{machine_id}' GROUP BY drug_id,manu_no ) b on a.drug_id=b.drug_id and a.manu_no=b.manu_no + WHERE DATE_FORMAT(operation_time,'%Y-%m')='{strDate}' and machine_id='{machine_id}'and manu_no is not NULL GROUP BY drug_id,manu_no ) b on a.drug_id=b.drug_id and a.manu_no=b.manu_no and a.operation_time=b.latest_date and machine_id='{machine_id}' WHERE a.drug_id='{strValue}' and DATE_FORMAT(operation_time,'%Y-%m')='{strDate}'"; StackTotalModel = SqlSugarHelper.Db.SqlQueryable(stockQuantitySQL).First(); } diff --git a/DM_Weight/ReportTemp/account_book_temp-01.grf b/DM_Weight/ReportTemp/account_book_temp-01.grf index e6e2399..67f334f 100644 --- a/DM_Weight/ReportTemp/account_book_temp-01.grf +++ b/DM_Weight/ReportTemp/account_book_temp-01.grf @@ -294,6 +294,7 @@ "Name":"Group1", "ByFields":"drugId", "GroupHeader":{ + "Height":2.01083, "PrintGridBorder":false, "Control":[ { @@ -476,6 +477,35 @@ "Charset":134 }, "DataField":"月" + }, + { + "Type":"StaticBox", + "Name":"StaticBox37", + "Top":1, + "Width":1.8, + "Height":0.98, + "Font":{ + "Name":"宋体", + "Size":105000, + "Bold":true, + "Charset":134 + }, + "Text":"上月结存:" + }, + { + "Type":"StaticBox", + "Name":"StaticBox38", + "Left":6.2177, + "Top":1, + "Width":1.08, + "Height":0.98, + "Font":{ + "Name":"宋体", + "Size":105000, + "Bold":true, + "Charset":134 + }, + "Text":"批号:" } ], "NewPageColumn":"Before" diff --git a/DM_Weight/ViewModels/BindingChannelDialogViewModel.cs b/DM_Weight/ViewModels/BindingChannelDialogViewModel.cs index 859d86d..31e64c4 100644 --- a/DM_Weight/ViewModels/BindingChannelDialogViewModel.cs +++ b/DM_Weight/ViewModels/BindingChannelDialogViewModel.cs @@ -229,8 +229,8 @@ namespace DM_Weight.ViewModels var list = SqlSugarHelper.Db.Queryable() .Includes(cs => cs.DrugInfo) .WhereIF(DrawerNo > 0, cs => cs.DrawerNo == DrawerNo) - .WhereIF(App.SingleModel, cs => cs.DrawerNo <= 1) //单人登录开前8个抽屉,双人登录开后8个抽屉 - .WhereIF(!(App.SingleModel), cs => cs.DrawerNo > 1) + .WhereIF(App.SingleModel, cs => cs.DrawerNo <= 2) //单人登录开前8个抽屉,双人登录开后8个抽屉 + .WhereIF(!(App.SingleModel), cs => cs.DrawerNo > 2) .Where(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1")) .OrderBy(cs => cs.DrawerNo) .OrderBy(cs => cs.ColNo) diff --git a/DM_Weight/ViewModels/BindingChannelNewDialogViewModel .cs b/DM_Weight/ViewModels/BindingChannelNewDialogViewModel .cs index 50504c2..8d5a3ed 100644 --- a/DM_Weight/ViewModels/BindingChannelNewDialogViewModel .cs +++ b/DM_Weight/ViewModels/BindingChannelNewDialogViewModel .cs @@ -258,8 +258,8 @@ namespace DM_Weight.ViewModels int totalCount = 0; var list = SqlSugarHelper.Db.Queryable() .Includes(cl => cl.Drug) - .WhereIF(App.SingleModel, cl => cl.DrawerNo <= 1) //单人登录开前8个抽屉,双人登录开后8个抽屉 - .WhereIF(!(App.SingleModel), cl => cl.DrawerNo > 1) + .WhereIF(App.SingleModel, cl => cl.DrawerNo <= 2) //单人登录开前8个抽屉,双人登录开后8个抽屉 + .WhereIF(!(App.SingleModel), cl => cl.DrawerNo > 2) .Includes(cs => cs.channelStocks) .WhereIF(DrawerNo > 0, cl => cl.DrawerNo == DrawerNo) .Where(cl => cl.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1")) diff --git a/DM_Weight/ViewModels/CheckRecordDetailDialogViewModel.cs b/DM_Weight/ViewModels/CheckRecordDetailDialogViewModel.cs index ac8c6b1..d49b1de 100644 --- a/DM_Weight/ViewModels/CheckRecordDetailDialogViewModel.cs +++ b/DM_Weight/ViewModels/CheckRecordDetailDialogViewModel.cs @@ -159,8 +159,8 @@ namespace DM_Weight.ViewModels List checkList = SqlSugarHelper.Db.Queryable() .Includes(cs => cs.DrugInfo) .Where(cs => cs.optdate == OptDate).OrderByDescending(cs => cs.optdate) - .WhereIF(App.SingleModel, cs => cs.rowNo <= 1) //单人登录开前2个抽屉,双人登录开后14个抽屉 - .WhereIF(!(App.SingleModel), cs => cs.rowNo > 1) + .WhereIF(App.SingleModel, cs => cs.rowNo <= 2) //单人登录开前2个抽屉,双人登录开后14个抽屉 + .WhereIF(!(App.SingleModel), cs => cs.rowNo > 2) .ToList(); ICollectionView vw = CollectionViewSource.GetDefaultView(checkList); vw.GroupDescriptions.Add(new PropertyGroupDescription("DrugInfo")); diff --git a/DM_Weight/ViewModels/CheckStockNew2WindowViewModel.cs b/DM_Weight/ViewModels/CheckStockNew2WindowViewModel.cs index 94d198a..5a58f2a 100644 --- a/DM_Weight/ViewModels/CheckStockNew2WindowViewModel.cs +++ b/DM_Weight/ViewModels/CheckStockNew2WindowViewModel.cs @@ -574,8 +574,8 @@ namespace DM_Weight.ViewModels .Where(cs => cs.DrawerType == 1) .Where(cs => cs.DrugId != null) .Where(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1")) - .WhereIF(App.SingleModel, cs => cs.DrawerNo <= 1) //单人登录开前8个抽屉,双人登录开后8个抽屉 - .WhereIF(!(App.SingleModel), cs => cs.DrawerNo > 1) + .WhereIF(App.SingleModel, cs => cs.DrawerNo <= 2) //单人登录开前8个抽屉,双人登录开后8个抽屉 + .WhereIF(!(App.SingleModel), cs => cs.DrawerNo > 2) .WhereIF(!String.IsNullOrEmpty(SearchValue), cs => cs.DrugInfo.DrugName == SearchValue) .OrderBy(cs => cs.DrawerNo) .OrderBy(cs => cs.ColNo) diff --git a/DM_Weight/ViewModels/CheckStockNewWindowViewModel.cs b/DM_Weight/ViewModels/CheckStockNewWindowViewModel.cs index a814390..7cf17b3 100644 --- a/DM_Weight/ViewModels/CheckStockNewWindowViewModel.cs +++ b/DM_Weight/ViewModels/CheckStockNewWindowViewModel.cs @@ -29,8 +29,8 @@ namespace DM_Weight.ViewModels public static List SelectUseList = new() { - new UseFor{UseId=0,UseName="入账册"}, - new UseFor { UseId = 96, UseName = "不入账册" } + new UseFor{UseId=0,UseName="不入账册"}, + new UseFor { UseId = 96, UseName = "入账册" } }; private List _selectsUseFor = SelectUseList; @@ -722,8 +722,8 @@ namespace DM_Weight.ViewModels .Where(cs => cs.DrawerType == 1) .Where(cs => cs.DrugId != null) .Where(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1")) - .WhereIF(App.SingleModel, cs => cs.DrawerNo <= 1) //单人登录开前8个抽屉,双人登录开后8个抽屉 - .WhereIF(!(App.SingleModel), cs => cs.DrawerNo > 1) + .WhereIF(App.SingleModel, cs => cs.DrawerNo <= 2) //单人登录开前8个抽屉,双人登录开后8个抽屉 + .WhereIF(!(App.SingleModel), cs => cs.DrawerNo > 2) .WhereIF(!String.IsNullOrEmpty(SearchValue), cs => cs.DrugInfo.DrugName == SearchValue) .OrderBy(cs => cs.DrawerNo) //.OrderByDescending(cs => cs.DrawerNo) diff --git a/DM_Weight/ViewModels/MultiOrderTakeDialogViewModel.cs b/DM_Weight/ViewModels/MultiOrderTakeDialogViewModel.cs index 7b56439..631bf20 100644 --- a/DM_Weight/ViewModels/MultiOrderTakeDialogViewModel.cs +++ b/DM_Weight/ViewModels/MultiOrderTakeDialogViewModel.cs @@ -198,8 +198,8 @@ namespace DM_Weight.ViewModels .WhereIF(!string.IsNullOrEmpty(orderDetail.SetEffDate), cs => cs.EffDate.Equals(orderDetail.SetEffDate)) .WhereIF(!string.IsNullOrEmpty(orderDetail.SetManuNo), cs => cs.ManuNo.Equals(orderDetail.SetManuNo)) .Where(cs => cs.DrugId == orderDetail.DrugId) - .WhereIF(App.SingleModel, cs => cs.DrawerNo <= 1) //单人登录开前2个抽屉,双人登录开后14个抽屉 - .WhereIF(!(App.SingleModel), cs => cs.DrawerNo > 1) + .WhereIF(App.SingleModel, cs => cs.DrawerNo <= 2) //单人登录开前2个抽屉,双人登录开后14个抽屉 + .WhereIF(!(App.SingleModel), cs => cs.DrawerNo > 2) .OrderBy(cs => cs.EffDate) .OrderBy(cs => cs.DrawerNo) .OrderBy(cs => cs.ManuNo) diff --git a/DM_Weight/ViewModels/OrderTakeDialogViewModel.cs b/DM_Weight/ViewModels/OrderTakeDialogViewModel.cs index 0fe7ba5..c71ee65 100644 --- a/DM_Weight/ViewModels/OrderTakeDialogViewModel.cs +++ b/DM_Weight/ViewModels/OrderTakeDialogViewModel.cs @@ -207,8 +207,8 @@ namespace DM_Weight.ViewModels .WhereIF(!string.IsNullOrEmpty(orderDetail.SetEffDate), cs => cs.EffDate.Equals(orderDetail.SetEffDate)) .WhereIF(!string.IsNullOrEmpty(orderDetail.SetManuNo), cs => cs.ManuNo.Equals(orderDetail.SetManuNo)) .Where(cs => cs.DrugId == orderDetail.DrugId) - .WhereIF(App.SingleModel, cs => cs.DrawerNo <= 1) //单人登录开前2个抽屉,双人登录开后14个抽屉 - .WhereIF(!(App.SingleModel), cs => cs.DrawerNo > 1) + .WhereIF(App.SingleModel, cs => cs.DrawerNo <= 2) //单人登录开前2个抽屉,双人登录开后14个抽屉 + .WhereIF(!(App.SingleModel), cs => cs.DrawerNo > 2) .OrderBy(cs => cs.EffDate) .OrderBy(cs => cs.DrawerNo) .OrderBy(cs => cs.ManuNo) diff --git a/DM_Weight/ViewModels/ReturnDrugWindow2ViewModel.cs b/DM_Weight/ViewModels/ReturnDrugWindow2ViewModel.cs index 626ecdb..4fc9c05 100644 --- a/DM_Weight/ViewModels/ReturnDrugWindow2ViewModel.cs +++ b/DM_Weight/ViewModels/ReturnDrugWindow2ViewModel.cs @@ -219,8 +219,8 @@ namespace DM_Weight.ViewModels List queryData = SqlSugarHelper.Db.Queryable() .InnerJoin((oi, od) => oi.OrderNo == od.OrderNo) .InnerJoin(SqlSugarHelper.Db.Queryable().Where(cs => cs.DrawerType == 1) - .WhereIF(App.SingleModel, cs => cs.DrawerNo <= 1) //单人登录开前8个抽屉,双人登录开后8个抽屉 - .WhereIF(!(App.SingleModel), cs => cs.DrawerNo > 1) + .WhereIF(App.SingleModel, cs => cs.DrawerNo <= 2) //单人登录开前8个抽屉,双人登录开后8个抽屉 + .WhereIF(!(App.SingleModel), cs => cs.DrawerNo > 2) .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(!String.IsNullOrEmpty(SearchValue) && SelectedItem.Code.Equals("OrderNo"), oi => oi.OrderNo == SearchValue) diff --git a/DM_Weight/ViewModels/ReturnDrugWindowViewModel.cs b/DM_Weight/ViewModels/ReturnDrugWindowViewModel.cs index c7989e9..9668557 100644 --- a/DM_Weight/ViewModels/ReturnDrugWindowViewModel.cs +++ b/DM_Weight/ViewModels/ReturnDrugWindowViewModel.cs @@ -184,8 +184,8 @@ namespace DM_Weight.ViewModels .WhereIF(!String.IsNullOrEmpty(SearchValue) && SelectedItem.Code.Equals("DrugName"), (mr) => mr.DrugInfo.DrugName.Contains(SearchValue)) .WhereIF(!String.IsNullOrEmpty(SearchValue) && SelectedItem.Code.Equals("PyCode"), (mr) => mr.DrugInfo.PyCode.Contains(SearchValue)) .WhereIF(!String.IsNullOrEmpty(SearchValue) && SelectedItem.Code.Equals("DrugBarcode"), (mr) => mr.DrugInfo.DrugBarcode.Contains(SearchValue)) - .WhereIF(App.SingleModel, cs => cs.DrawerNo <= 1) //单人登录开前8个抽屉,双人登录开后8个抽屉 - .WhereIF(!(App.SingleModel), cs => cs.DrawerNo > 1) + .WhereIF(App.SingleModel, cs => cs.DrawerNo <= 2) //单人登录开前8个抽屉,双人登录开后8个抽屉 + .WhereIF(!(App.SingleModel), cs => cs.DrawerNo > 2) .OrderBy(mr => mr.OperationTime) .ToList(); MachineRecords = queryData; diff --git a/DM_Weight/ViewModels/ReturnEmptyWindowViewModel.cs b/DM_Weight/ViewModels/ReturnEmptyWindowViewModel.cs index 9bbeff3..42fc5f7 100644 --- a/DM_Weight/ViewModels/ReturnEmptyWindowViewModel.cs +++ b/DM_Weight/ViewModels/ReturnEmptyWindowViewModel.cs @@ -105,8 +105,8 @@ namespace DM_Weight.ViewModels Channels = SqlSugarHelper.Db.Queryable() .LeftJoin((cs,di) => cs.DrugId == di.DrugId.ToString()) .Where((cs) => cs.DrawerType != 1) - .WhereIF(App.SingleModel, cs => cs.DrawerNo <= 1) //单人登录开前8个抽屉,双人登录开后8个抽屉 - .WhereIF(!(App.SingleModel), cs => cs.DrawerNo > 1) + .WhereIF(App.SingleModel, cs => cs.DrawerNo <= 2) //单人登录开前8个抽屉,双人登录开后8个抽屉 + .WhereIF(!(App.SingleModel), cs => cs.DrawerNo > 2) .Where(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1")) .Select((cs, di) => new ChannelStock{ CanReturnQuantity = SqlFunc.Subqueryable().Where(mr => mr.DrugId == cs.DrugId&&mr.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1")).Where(mr => mr.Type == 2).Where(mr => mr.Status != 2).Select(mr => SqlFunc.IsNull(SqlFunc.AggregateSumNoNull(mr.Quantity - mr.ReturnQuantity1 - mr.ReturnQuantity2), 0)) , diff --git a/DM_Weight/ViewModels/SelfAddWindowViewModel.cs b/DM_Weight/ViewModels/SelfAddWindowViewModel.cs index 91f3ea6..fc7c0ba 100644 --- a/DM_Weight/ViewModels/SelfAddWindowViewModel.cs +++ b/DM_Weight/ViewModels/SelfAddWindowViewModel.cs @@ -212,8 +212,8 @@ namespace DM_Weight.ViewModels //ChannelStocks = queryData; List q = SqlSugarHelper.Db.Queryable() .Includes(di => di.channelStocks.Where(cs => cs.DrawerType == 1) - .WhereIF(App.SingleModel, cs => cs.DrawerNo <= 1) //单人登录开前8个抽屉,双人登录开后8个抽屉 - .WhereIF(!(App.SingleModel), cs => cs.DrawerNo > 1) + .WhereIF(App.SingleModel, cs => cs.DrawerNo <= 2) //单人登录开前8个抽屉,双人登录开后8个抽屉 + .WhereIF(!(App.SingleModel), cs => cs.DrawerNo > 2) .Where(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1") && cs.DrugId != null).OrderBy(cs => cs.DrawerNo).OrderBy(cs => cs.ColNo).ToList()) .WhereIF(!String.IsNullOrEmpty(SearchValue) && SelectedItem.Code.Equals("DrugId"), (cs) => cs.DrugId.Contains(SearchValue)) .WhereIF(!String.IsNullOrEmpty(SearchValue) && SelectedItem.Code.Equals("DrugName"), (cs) => cs.DrugName.Contains(SearchValue)) diff --git a/DM_Weight/ViewModels/SelfTakeDrugWindowViewModel.cs b/DM_Weight/ViewModels/SelfTakeDrugWindowViewModel.cs index 5847835..7492ab6 100644 --- a/DM_Weight/ViewModels/SelfTakeDrugWindowViewModel.cs +++ b/DM_Weight/ViewModels/SelfTakeDrugWindowViewModel.cs @@ -197,8 +197,8 @@ namespace DM_Weight.ViewModels //ChannelStocks = queryData; List q = SqlSugarHelper.Db.Queryable() .Includes(di => di.channelStocks.Where(cs => cs.DrawerType == 1) - .WhereIF(App.SingleModel, cs => cs.DrawerNo <= 1 ) //单人登录开前8个抽屉,双人登录开后8个抽屉 - .WhereIF(!(App.SingleModel), cs => cs.DrawerNo > 1 ) + .WhereIF(App.SingleModel, cs => cs.DrawerNo <= 2 ) //单人登录开前8个抽屉,双人登录开后8个抽屉 + .WhereIF(!(App.SingleModel), cs => cs.DrawerNo > 2 ) .Where(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1") && cs.DrugId != null&&cs.Quantity>0).OrderBy(cs => cs.DrawerNo).OrderBy(cs => cs.ColNo).ToList()) .WhereIF(!String.IsNullOrEmpty(SearchValue) && SelectedItem.Code.Equals("DrugId"), (cs) => cs.DrugId.Contains(SearchValue)) .WhereIF(!String.IsNullOrEmpty(SearchValue) && SelectedItem.Code.Equals("DrugName"), (cs) => cs.DrugName.Contains(SearchValue)) diff --git a/DM_Weight/ViewModels/StockListWindowViewModel.cs b/DM_Weight/ViewModels/StockListWindowViewModel.cs index 6b8ec0a..33eb09e 100644 --- a/DM_Weight/ViewModels/StockListWindowViewModel.cs +++ b/DM_Weight/ViewModels/StockListWindowViewModel.cs @@ -243,8 +243,8 @@ namespace DM_Weight.ViewModels List q = SqlSugarHelper.Db.Queryable() .Includes(di => di.channelStocks.Where(cs => cs.DrawerType == 1) - .WhereIF(App.SingleModel, cs => cs.DrawerNo <= 1) //单人登录开前8个抽屉,双人登录开后8个抽屉 - .WhereIF(!(App.SingleModel), cs => cs.DrawerNo > 1) + .WhereIF(App.SingleModel, cs => cs.DrawerNo <= 2) //单人登录开前8个抽屉,双人登录开后8个抽屉 + .WhereIF(!(App.SingleModel), cs => cs.DrawerNo > 2) .Where(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1") && cs.DrugId != null).OrderBy(cs => cs.DrawerNo).OrderBy(cs => cs.ColNo).ToList()) .WhereIF(!String.IsNullOrEmpty(SearchValue) && SelectedItem.Code.Equals("DrugId"), (cs) => cs.DrugId.Contains(SearchValue)) .WhereIF(!String.IsNullOrEmpty(SearchValue) && SelectedItem.Code.Equals("DrugName"), (cs) => cs.DrugName.Contains(SearchValue))