From d4b0b578752a1478f6c11b352fbb8d2bad1f9e1d Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期三, 22 十月 2025 17:18:49 +0800
Subject: [PATCH] 1

---
 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Stock/StockInfoHtyService.cs |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Stock/StockInfoHtyService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Stock/StockInfoHtyService.cs"
index 06d3149..cd49b05 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Stock/StockInfoHtyService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Stock/StockInfoHtyService.cs"
@@ -1,6 +1,7 @@
 锘縰sing AngleSharp.Dom;
 using Mapster;
 using Masuit.Tools;
+using OfficeOpenXml.FormulaParsing.Excel.Functions.Math;
 using SqlSugar;
 using System.Collections;
 using System.Collections.Generic;
@@ -10,6 +11,7 @@
 using WIDESEA_Cache;
 using WIDESEA_Common;
 using WIDESEA_Core;
+using WIDESEA_Core.Enums;
 
 namespace WIDESEA_StorageBasicService;
 
@@ -54,10 +56,19 @@
             }
             catch { }
         }
+        Expression<Func<DtStockInfo_Hty, bool>> materielCode = null;
+        foreach (var item in searchParametersList)
+        {
+            if (item.Name.Contains("materielCode"))
+            {
+                materielCode = x => x.StockInfoDetails.Any(d => d.MaterielCode == item.Value);
+            }
+        }
         var data = BaseDal.Db.Queryable<DtStockInfo_Hty>()
             .Includes(x => x.StockInfoDetails)
             .Where(x=>x.CreateDate>DateTime.Now.AddMonths(-1))
             .WhereIF(!wheres.IsNullOrEmpty(), wheres)
+             .WhereIF(materielCode != null, materielCode)
             .OrderBy(orderByModels)
             .ToPageList(options.Page, options.Rows, ref totalCount);
         return new PageGridData<DtStockInfo_Hty>(totalCount, data);

--
Gitblit v1.9.3