From d4051846910f2cc1e7cef649c1ee05f1c590d5e8 Mon Sep 17 00:00:00 2001 From: maqiao <625215135@qq.com> Date: Mon, 24 Mar 2025 11:27:20 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=98=E7=82=B9=E8=AE=B0=E5=BD=95=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0machine=5Fid=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DM_Weight/Report/GridReportUtil.cs | 2 +- DM_Weight/ViewModels/CheckRecordNewWindowViewModel.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DM_Weight/Report/GridReportUtil.cs b/DM_Weight/Report/GridReportUtil.cs index ca2f1b0..5925d92 100644 --- a/DM_Weight/Report/GridReportUtil.cs +++ b/DM_Weight/Report/GridReportUtil.cs @@ -83,7 +83,7 @@ namespace DM_Weight.Report //}); string machine_id = (ConfigurationManager.AppSettings["machineId"] ?? "DM1"); string SQL = $@"SELECT cl.`row_no` AS drawerNo,cl.`col_no` AS colNo,cl.`quantity` AS quantity,cl.`manu_no` AS manuNo,cl.`eff_date` AS effDate, - `drug_name` AS drugName,`drug_spec` AS drugSpec,`pack_unit` AS packUnit,di.small_unit as smallUnit,`manufactory` AS manuFactory,`max_stock` AS baseQuantity, + `drug_name` AS drugName,`drug_spec` AS drugSpec,`pack_unit` AS smallUnit,`manufactory` AS manuFactory,`max_stock` AS baseQuantity, cl.`drug_id` AS drugId,cl.manuquantity, cl.`optdate` FROM check_stock cl WHERE cl.`machine_id` = '{machine_id}' AND cl.`optdate` > '{p_startDate}' AND cl.`optdate` < '{p_endDate}' ORDER BY cl.`optdate` desc, cl.`drug_id`"; // 加载模板文件 Report.LoadFromFile(new FileInfo(AppDomain.CurrentDomain.BaseDirectory) + "ReportTemp//" + "machine_log_check_new2.grf"); diff --git a/DM_Weight/ViewModels/CheckRecordNewWindowViewModel.cs b/DM_Weight/ViewModels/CheckRecordNewWindowViewModel.cs index baeb103..bb82762 100644 --- a/DM_Weight/ViewModels/CheckRecordNewWindowViewModel.cs +++ b/DM_Weight/ViewModels/CheckRecordNewWindowViewModel.cs @@ -145,7 +145,7 @@ namespace DM_Weight.ViewModels { int totalCount = 0; string strSql = @"SELECT optDate AS optdate,U.User_name AS operatorUser,R.User_name AS reviewerUser,Drug_spec AS drugSpec,Manufactory AS manufactory,Quantity FROM check_stock C - LEFT JOIN user_list U ON C.operator=U.ID LEFT JOIN user_list R ON C.reviewer=R.ID WHERE C.machine_id='" + ConfigurationManager.AppSettings["machineId"] ?? "DM1" + "'"; + LEFT JOIN user_list U ON C.operator=U.ID LEFT JOIN user_list R ON C.reviewer=R.ID WHERE C.machine_id='" + (ConfigurationManager.AppSettings["machineId"] ?? "DM1") + "'"; if (StartDate!=null) { strSql += " AND C.optDate>@OPTSTARTDATE ";