From 1f6265e8d7b7d61b314dd9757a135ec0cb40604f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E5=B7=A7?= <625215135@qq.com> Date: Wed, 24 Sep 2025 13:59:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=80=81=E5=B8=88=E7=94=B5?= =?UTF-8?q?=E8=84=91=E4=B8=8A=E5=AE=89=E8=A3=85=E7=9A=84=E6=8A=A5=E8=A1=A8?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=E6=9F=A5=E8=AF=A2sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DM_Weight/Report/GridReportUtil.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DM_Weight/Report/GridReportUtil.cs b/DM_Weight/Report/GridReportUtil.cs index 4f1ce51..43fcb0c 100644 --- a/DM_Weight/Report/GridReportUtil.cs +++ b/DM_Weight/Report/GridReportUtil.cs @@ -400,8 +400,8 @@ namespace DM_Weight.Report string p_machine_id = (ConfigurationManager.AppSettings["machineId"] ?? "DM1"); string SQL = $@" select ab.drug_id, ab.type, di.drug_name AS DrugName,di.Drug_spec AS DrugSpec,di.big_unit AS BigUnit,di.small_unit AS SmallUnit, - DATE_FORMAT(ab.create_date,'%Y/%m/%d') AS YearMD,ab.manu_no AS ManuNo,DATE_FORMAT(ab.eff_date,'%Y%m%d') AS effDate,IF(ab.type=1,ab.add_quantity,'') AS InQuantity,ab.shoushuJian AS shoushuJian, - re.Patient_name AS PName,re.sex AS Sex,re.age AS Age,re.use_dose AS UseDose,re.residual_dose AS ResidualDose,re.create_time AS DiposalTime + DATE_FORMAT(ab.create_date,'%Y/%m/%d') AS YearMD,ab.manu_no AS ManuNo,DATE_FORMAT(ab.eff_date,'%Y%m%d') AS effDate,IF(ab.type=2,'',ab.add_quantity) AS InQuantity,ab.shoushuJian AS shoushuJian, + re.Patient_name AS PName,re.sex AS Sex,re.age AS Age,IF(ab.type=3,ab.use_dose,re.use_dose) AS UseDose,IF(ab.type=3,ab.residual_dose,re.residual_dose) AS ResidualDose,re.create_time AS DiposalTime ,re.operator_name, ab.manu_stock AS Stock,ab.total_stock AS empty,ab.total_stock,UL.User_name AS SendUser, IF(ab.type=1,UL.User_name,UL2.User_name) AS InCheckUser, re.supervisor_name AS CheckUser,ab.manu_stock,ab.total_stock,ab.user_id1,ab.user_id2,ab.out_Quantity @@ -413,7 +413,7 @@ namespace DM_Weight.Report LEFT JOIN order_info_sm oi on ab.invoice_no=oi.order_no LEFT JOIN user_list UL ON ab.user_id1=UL.ID LEFT JOIN user_list UL2 ON ab.user_id2=UL.ID - LEFT JOIN surgical_residual re on ab.invoice_no=re.order_no WHERE ab.machine_id='DM3' and ab.type in(1,2) and + LEFT JOIN surgical_residual re on ab.invoice_no=re.order_no WHERE ab.machine_id='DM3' and ab.type in(1,2,3) and ab.create_time>'{p_startDate}' AND ab.create_time<'{p_endDate}' "; if (!string.IsNullOrEmpty(drug_id)) {