From 7ee2220ed0bb91e5dd3a089cae7070050f9f3b47 Mon Sep 17 00:00:00 2001 From: TML <1448969505@qq.com> Date: Thu, 7 Jan 2021 16:09:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=B6=E9=97=B4=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controller/SCP_RECEIVE_CONTROLLER.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Controller/SCP_RECEIVE_CONTROLLER.cs b/Controller/SCP_RECEIVE_CONTROLLER.cs index 55afc5d..d3cfe45 100644 --- a/Controller/SCP_RECEIVE_CONTROLLER.cs +++ b/Controller/SCP_RECEIVE_CONTROLLER.cs @@ -101,12 +101,13 @@ namespace CK.SCP.Controller if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) { q = q.Where(p => p_entity.UserInAddress.Contains(p.Site)); - } - if (p_entity.ShipTimeStart != null && !p_entity.ShipTimeStart.ToString().Contains("0001/1/1")) + } + + if (p_entity.ShipTimeStart != null && !p_entity.ShipTimeStart.ToString("yyyy-M-d").Contains("0001-1-1")) { q = q.Where(p => p.ShipTime >= p_entity.ShipTimeStart); } - if (p_entity.ShipTimeEnd != null && !p_entity.ShipTimeEnd.ToString().Contains("0001/1/1")) + if (p_entity.ShipTimeEnd != null && !p_entity.ShipTimeEnd.ToString("yyyy-M-d").Contains("0001-1-1")) { q = q.Where(p => p.ShipTime <= p_entity.ShipTimeEnd); }