From 552708c62590df3d2931718fd9689e3e9b56056a Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Tue, 5 Nov 2024 16:26:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8F=90=E5=8D=95=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BLIssueManage/IBLIssueManageService.cs | 2 +- .../BLIssueManage/BLIssueManageService.cs | 25 +++++++++++-------- .../Controllers/BLIssueManageController.cs | 4 +-- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/ds-wms-service/DS.WMS.Core/Op/Interface/BLIssueManage/IBLIssueManageService.cs b/ds-wms-service/DS.WMS.Core/Op/Interface/BLIssueManage/IBLIssueManageService.cs index d754120e..2a72e2ec 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Interface/BLIssueManage/IBLIssueManageService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Interface/BLIssueManage/IBLIssueManageService.cs @@ -19,7 +19,7 @@ namespace DS.WMS.Core.Op.Interface /// 查询条件 /// 是否导出 /// 返回回执 - Task>> GetPageAsync(PageRequest querySearch, bool isExport = false); + Task>> GetPageAsync(PageRequest querySearch, bool isExport = false); /// /// 打印 diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/BLIssueManage/BLIssueManageService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/BLIssueManage/BLIssueManageService.cs index dd5ca1ca..9b4895a6 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/BLIssueManage/BLIssueManageService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/BLIssueManage/BLIssueManageService.cs @@ -104,7 +104,7 @@ namespace DS.WMS.Core.Op.Method /// 查询条件 /// 是否导出 /// 返回回执 - public async Task>> GetPageAsync(PageRequest querySearch,bool isExport = false) + public async Task>> GetPageAsync(PageRequest querySearch,bool isExport = false) { /* 1、海运出口的订单数据跟提单管理表的数据关联,有提单记录的以提单记录为准。 @@ -113,8 +113,8 @@ namespace DS.WMS.Core.Op.Method var tenantDb = saasService.GetBizDbScopeById(user.TenantId); List whereList = null; - BLIssueMangeQueryExtDto otherQueryCondition = querySearch.OtherQueryCondition; + BLIssueMangeQueryExtDto otherQueryCondition = new BLIssueMangeQueryExtDto(); whereList = GetPageCondition(querySearch,out otherQueryCondition); @@ -379,11 +379,16 @@ namespace DS.WMS.Core.Op.Method /// 原始查询条件 /// 其他查询条件 /// - private List GetPageCondition(PageRequest querySearch,out BLIssueMangeQueryExtDto queryExt) + private List GetPageCondition(PageRequest querySearch,out BLIssueMangeQueryExtDto queryExt) { List whereList = null; - queryExt = querySearch.OtherQueryCondition; + queryExt = new BLIssueMangeQueryExtDto(); + + if (!string.IsNullOrWhiteSpace(querySearch.OtherQueryCondition)) + { + queryExt = JsonConvert.DeserializeObject(querySearch.OtherQueryCondition); + } if (!querySearch.QueryCondition.IsNullOrEmpty()) { @@ -477,7 +482,7 @@ namespace DS.WMS.Core.Op.Method DateTime currDate = DateTime.MinValue; if (DateTime.TryParse(b.FieldValue, out currDate)) { - querySearch.OtherQueryCondition.ETDStart = currDate; + queryExt.ETDStart = currDate; } } else if (b.ConditionalType == ConditionalType.LessThanOrEqual) @@ -485,7 +490,7 @@ namespace DS.WMS.Core.Op.Method DateTime currDate = DateTime.MinValue; if (DateTime.TryParse(b.FieldValue, out currDate)) { - querySearch.OtherQueryCondition.ETDEnd = currDate.AddDays(1); + queryExt.ETDEnd = currDate.AddDays(1); } } @@ -504,7 +509,7 @@ namespace DS.WMS.Core.Op.Method DateTime currDate = DateTime.MinValue; if (DateTime.TryParse(b.FieldValue, out currDate)) { - querySearch.OtherQueryCondition.CheckInDateStart = currDate; + queryExt.CheckInDateStart = currDate; } } else if (b.ConditionalType == ConditionalType.LessThanOrEqual) @@ -512,7 +517,7 @@ namespace DS.WMS.Core.Op.Method DateTime currDate = DateTime.MinValue; if (DateTime.TryParse(b.FieldValue, out currDate)) { - querySearch.OtherQueryCondition.CheckInDateEnd = currDate.AddDays(1); + queryExt.CheckInDateEnd = currDate.AddDays(1); } } @@ -531,7 +536,7 @@ namespace DS.WMS.Core.Op.Method DateTime currDate = DateTime.MinValue; if (DateTime.TryParse(b.FieldValue, out currDate)) { - querySearch.OtherQueryCondition.CheckOutDateStart = currDate; + queryExt.CheckOutDateStart = currDate; } } else if (b.ConditionalType == ConditionalType.LessThanOrEqual) @@ -539,7 +544,7 @@ namespace DS.WMS.Core.Op.Method DateTime currDate = DateTime.MinValue; if (DateTime.TryParse(b.FieldValue, out currDate)) { - querySearch.OtherQueryCondition.CheckOutDateEnd = currDate.AddDays(1); + queryExt.CheckOutDateEnd = currDate.AddDays(1); } } diff --git a/ds-wms-service/DS.WMS.OpApi/Controllers/BLIssueManageController.cs b/ds-wms-service/DS.WMS.OpApi/Controllers/BLIssueManageController.cs index 6096fb07..bd6aa692 100644 --- a/ds-wms-service/DS.WMS.OpApi/Controllers/BLIssueManageController.cs +++ b/ds-wms-service/DS.WMS.OpApi/Controllers/BLIssueManageController.cs @@ -34,7 +34,7 @@ namespace DS.WMS.OpApi.Controllers /// 返回回执 [HttpPost] [Route("GetPage")] - public async Task>> GetPageAsync([FromBody] PageRequest querySearch) + public async Task>> GetPageAsync([FromBody] PageRequest querySearch) { return await _BLIssueManageService.GetPageAsync(querySearch); } @@ -48,7 +48,7 @@ namespace DS.WMS.OpApi.Controllers /// 返回回执 [HttpPost] [Route("GetExportList")] - public async Task>> GetExportList(PageRequest querySearch) + public async Task>> GetExportList(PageRequest querySearch) { return await _BLIssueManageService.GetPageAsync(querySearch,true); }