From c1c1b1f95b0880cd58afadb98d6933287fe6311c Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周日, 15 12月 2024 16:41:37 +0800
Subject: [PATCH] 22

---
 LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/Mes_Package_Gather/Mes_Package_GatherService.cs |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/Mes_Package_Gather/Mes_Package_GatherService.cs b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/Mes_Package_Gather/Mes_Package_GatherService.cs
index 23f6d0f..edae6d2 100644
--- a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/Mes_Package_Gather/Mes_Package_GatherService.cs
+++ b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/Mes_Package_Gather/Mes_Package_GatherService.cs
@@ -158,6 +158,26 @@
             .WhereIF(!string.IsNullOrWhiteSpace(input.Info13), u => u.Info13.Contains(input.Info13.Trim()))
             .WhereIF(input.UpiFlag.HasValue, u => u.UpiFlag == input.UpiFlag)
             .Select<Mes_Package_GatherOutput>();
+        if(input.CreateTimeRange != null && input.CreateTimeRange.Count >0)
+        {
+            DateTime? start= input.CreateTimeRange[0].Value;
+            query = query.WhereIF(start.HasValue, u => u.CreateTime >= start);
+            if (input.CreateTimeRange.Count >1 && input.CreateTimeRange[1].HasValue)
+            {
+                var end = input.CreateTimeRange[1].Value;
+                query = query.Where(u => u.CreateTime <= end);
+            }
+        } 
+        if(input.UpdateTimeRange != null && input.UpdateTimeRange.Count >0)
+        {
+            DateTime? start= input.UpdateTimeRange[0].Value;
+            query = query.WhereIF(start.HasValue, u => u.UpdateTime >= start);
+            if (input.UpdateTimeRange.Count >1 && input.UpdateTimeRange[1].HasValue)
+            {
+                var end = input.UpdateTimeRange[1].Value;
+                query = query.Where(u => u.UpdateTime <= end);
+            }
+        } 
         return query;
        }
 

--
Gitblit v1.9.3