From 30b40fb28eddcc1375a047a78e988ed60f271f7b Mon Sep 17 00:00:00 2001 From: zhoukeda <1315948824@qq.com> Date: Wed, 8 Nov 2023 11:01:37 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=86=E6=96=99=E8=AE=B0=E5=BD=95=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E7=8A=B6=E6=80=81=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProductionMgr/Tnb.ProductionMgr/PrdFeedingService.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdFeedingService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdFeedingService.cs index 29b7c2fe..842c6e30 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdFeedingService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdFeedingService.cs @@ -519,6 +519,7 @@ namespace Tnb.ProductionMgr Dictionary queryJson = string.IsNullOrEmpty(input.queryJson) ? new Dictionary() : input.queryJson.ToObject>(); string? code = queryJson.ContainsKey("code") ? queryJson["code"].ToString() : ""; + string? status = queryJson.ContainsKey("status") ? queryJson["status"].ToString() : ""; // DateTime? start_time = queryJson.ContainsKey("start_time") ? queryJson["start_time"].ToString() == "" ? null : Convert.ToDateTime(queryJson["start_time"]) : null; // DateTime? end_time = queryJson.ContainsKey("end_time") ? queryJson["end_time"].ToString() == "" ? null : Convert.ToDateTime(queryJson["end_time"]) : null; @@ -531,6 +532,7 @@ namespace Tnb.ProductionMgr var queryable1 = db.Queryable() .LeftJoin((a, b) => a.create_id == b.Id) .Where((a,b)=>a.workstation_id==input.stationId) + .WhereIF(!string.IsNullOrEmpty(status),a=>a.status==status) .Select((a, b) => new FeedingRecordListOutput() { id = a.id, @@ -545,6 +547,7 @@ namespace Tnb.ProductionMgr var queryable2 = db.Queryable() .LeftJoin((a, b) => a.create_id == b.Id) .Where((a,b)=>a.workstation_id==input.stationId) + .WhereIF(!string.IsNullOrEmpty(status),a=>a.status==status) .Select((a, b) => new FeedingRecordListOutput() { id = a.id,