From 51aebb52e3f964ad5d0e96c6b92ae8e455b24ceb Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期五, 10 四月 2026 13:08:17 +0800
Subject: [PATCH] 需要修改的,   不选板材,直接按照板材规格扣减库存。  发版套数不填的话就是1.  扣减库存的量就是  数量*发版套数 20260410  试卷 6年级添加 答题卡 选项  完成

---
 CY_ECommercePlatform/CY.SQLDAL/OA/OA_InventoryDAL.cs |   52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 52 insertions(+), 0 deletions(-)

diff --git a/CY_ECommercePlatform/CY.SQLDAL/OA/OA_InventoryDAL.cs b/CY_ECommercePlatform/CY.SQLDAL/OA/OA_InventoryDAL.cs
index 518f751..667d6bf 100644
--- a/CY_ECommercePlatform/CY.SQLDAL/OA/OA_InventoryDAL.cs
+++ b/CY_ECommercePlatform/CY.SQLDAL/OA/OA_InventoryDAL.cs
@@ -384,6 +384,58 @@
             return _dataBase.SelectModelPage<Model.OA_Inventory>(pa, selectTarget, fromSource, "  a.LastUpdateTime ");
         }
 
+
+
+        /// <summary>
+        /// 鑾峰彇璐у搧鐨勮缁嗕俊鎭�
+        /// </summary>
+        /// <param name="pa"></param>
+        /// <param name="FirmId"></param>
+        /// <param name="CargoSpaceName"></param>
+        /// <param name="WarehouseName"></param>
+        /// <param name="GoodsName"></param>
+        /// <param name="CommodityName"></param>
+        /// <param name="BrandName"></param>
+        /// <param name="SpecificationName"></param>
+        /// <returns></returns>
+        public IEnumerable<Model.OA_Inventory> SelecetModelDetailInfoList( Guid FirmId, string WarehouseName, string GoodsName, string CommodityName, string BrandName, string SpecificationName)
+        {
+
+            string selectTarget = " a.*,b.Name AS CargoSpaceName , c.WarehouseName AS WarehouseName ,e.Name AS BrandName,f.Name AS SpecificationName,g.GoodsName ,g.CommodityName ,g.IsPaper   ,g.CommodityId";
+
+            string condition = " where a.FirmId='" + FirmId + "'  ";
+            if (!string.IsNullOrEmpty(WarehouseName))
+            {
+                condition += string.Format("  and  a.WarehouseName='{0}' ", WarehouseName);
+            }
+
+            if (!string.IsNullOrEmpty(BrandName))
+            {
+                condition += string.Format("  and  e.Name='{0}' ", BrandName);
+            }
+            if (!string.IsNullOrEmpty(SpecificationName))
+            {
+                condition += string.Format("  and  f.Name='{0}' ", SpecificationName);
+            }
+            if (!string.IsNullOrEmpty(GoodsName))
+            {
+                condition += string.Format("  and  g.GoodsName='{0}' ", GoodsName);
+            }
+
+            if (!string.IsNullOrEmpty(CommodityName))
+            {
+                condition += string.Format("  and  g.CommodityName='{0}' ", CommodityName);
+            }
+
+            string fromSource = "dbo.OA_Inventory  AS a   LEFT JOIN  dbo.OA_CargoSpace AS b ON a.CargoSpaceId=b.Keyid " +
+          "  LEFT JOIN dbo.OA_WarehouseInfo AS c ON a.WarehouseId = c.Keyid"
+          + "   LEFT JOIN dbo.OA_Specification AS f ON a.SpecificationId=f.Keyid "
+           + "  LEFT JOIN dbo.OA_Brand AS e ON a.BrandId = e.Keyid "
+          + " LEFT JOIN (SELECT d.*   ,j.CommodityName,j.IsPaper,j.Keyid AS CommodityId FROM dbo.OA_GoodsInfo AS  d "
+          + "LEFT JOIN dbo.OA_Commodity AS j ON d.GoodsTypeId=j.Keyid  ) AS g ON a.GoodsId=g.Keyid  " + condition;
+            return _dataBase.SelectModel<Model.OA_Inventory>( selectTarget, fromSource);
+        }
+
         public IEnumerable<OA_FirmAccount> getAllSubject(Guid FirmId, string AccountType)
         {
             string selectTarget = "  Keyid,AccountName,AccountType,UserName,Balance";

--
Gitblit v1.9.1