From 5a49a9296ead6e56f5bf3e4396ba0de6c3f39481 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E5=B7=A7?= <625215135@qq.com> Date: Thu, 21 Aug 2025 18:01:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8A=A5=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CreateAccountBookConsole/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CreateAccountBookConsole/Program.cs b/CreateAccountBookConsole/Program.cs index 71af24b..49d798a 100644 --- a/CreateAccountBookConsole/Program.cs +++ b/CreateAccountBookConsole/Program.cs @@ -114,7 +114,7 @@ public class CreateClass //1)查询库存,为每一个批次的药品生成日结存数据 string sql = $@"SELECT machine_id,drug_id,manu_no,eff_date,IF(sum(quantity) IS null,0,sum(quantity)) manuQuantity,(SELECT IF(sum(quantity)is NULL,0,sum(quantity)) from channel_stock tCS WHERE MACHINE_ID in('DM3','DM5') and drawer_type=1 and quantity>0 and tCS.drug_id=bCS.drug_id) totalQuantity FROM channel_stock bCS - WHERE MACHINE_ID in('DM1','DM5') and drawer_type=1 and quantity>0 GROUP BY drug_id,manu_no,eff_date"; + WHERE MACHINE_ID in('DM3','DM5') and drawer_type=1 and quantity>0 GROUP BY drug_id,manu_no,eff_date"; DataSet dsQuantity = SqlHelper.ExecuteQuery(sql); if (dsQuantity != null && dsQuantity.Tables[0] != null && dsQuantity.Tables[0].Rows.Count > 0) {