Revert "提交修改"

This reverts commit fb413c18f4.
This commit is contained in:
maqiao 2025-08-21 18:05:12 +08:00
parent fb413c18f4
commit b7e40daab4
1 changed files with 1 additions and 1 deletions

View File

@ -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('DM3','DM5') and drawer_type=1 and quantity>0 GROUP BY drug_id,manu_no";
WHERE MACHINE_ID in('DM1','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)
{