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); }