|
|
|
@ -105,15 +105,26 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
{
|
|
|
|
|
/*
|
|
|
|
|
1、海运出口的订单数据跟提单管理表的数据关联,有提单记录的以提单记录为准。
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
|
|
|
|
|
|
|
|
|
var query = tenantDb.Queryable<SeaExport>().ClearFilter(typeof(IOrgId))
|
|
|
|
|
.LeftJoin<BLIssueManageBase>((l, r) => l.Id == r.BookingId)
|
|
|
|
|
.WhereIF(querySearch.OtherQueryCondition != null && !string.IsNullOrWhiteSpace(querySearch.OtherQueryCondition.QueryTabCode)
|
|
|
|
|
&& querySearch.OtherQueryCondition.QueryTabCode.Equals("CheckInQuery",StringComparison.OrdinalIgnoreCase),(l,r)=> r.IsCheckIn == false)
|
|
|
|
|
&& querySearch.OtherQueryCondition.QueryTabCode.Equals(BLQueryStatusEnum.CheckInQuery.ToString(), StringComparison.OrdinalIgnoreCase),(l,r)=> r.IsCheckIn == false)
|
|
|
|
|
.WhereIF(querySearch.OtherQueryCondition != null && !string.IsNullOrWhiteSpace(querySearch.OtherQueryCondition.QueryTabCode)
|
|
|
|
|
&& querySearch.OtherQueryCondition.QueryTabCode.Equals(BLQueryStatusEnum.CheckOutQuery.ToString(), StringComparison.OrdinalIgnoreCase), (l, r) => r.IsCheckIn == true)
|
|
|
|
|
.WhereIF(querySearch.OtherQueryCondition != null && !string.IsNullOrWhiteSpace(querySearch.OtherQueryCondition.QueryTabCode)
|
|
|
|
|
&& querySearch.OtherQueryCondition.QueryTabCode.Equals(BLQueryStatusEnum.HasCheckOutQuery.ToString(), StringComparison.OrdinalIgnoreCase), (l, r) => r.IsCheckOut == true)
|
|
|
|
|
.WhereIF(querySearch.OtherQueryCondition != null && !string.IsNullOrWhiteSpace(querySearch.OtherQueryCondition.QueryTabCode)
|
|
|
|
|
&& querySearch.OtherQueryCondition.QueryTabCode.Equals("CheckOutQuery", StringComparison.OrdinalIgnoreCase), (l, r) => r.IsCheckIn == true)
|
|
|
|
|
&& querySearch.OtherQueryCondition.QueryTabCode.Equals(BLQueryStatusEnum.BLModifyQuery.ToString(), StringComparison.OrdinalIgnoreCase), (l, r) => r.IsBLModify == true)
|
|
|
|
|
.WhereIF(querySearch.OtherQueryCondition != null && !string.IsNullOrWhiteSpace(querySearch.OtherQueryCondition.QueryTabCode)
|
|
|
|
|
&& querySearch.OtherQueryCondition.QueryTabCode.Equals(BLQueryStatusEnum.BLSeizeQuery.ToString(), StringComparison.OrdinalIgnoreCase), (l, r) => r.IsBLSeize == true)
|
|
|
|
|
.WhereIF(querySearch.OtherQueryCondition != null && !string.IsNullOrWhiteSpace(querySearch.OtherQueryCondition.MHouseFlag)
|
|
|
|
|
&& querySearch.OtherQueryCondition.QueryTabCode.Equals("M", StringComparison.OrdinalIgnoreCase), (l, r) => l.ParentId == 0)
|
|
|
|
|
.WhereIF(querySearch.OtherQueryCondition != null && !string.IsNullOrWhiteSpace(querySearch.OtherQueryCondition.MHouseFlag)
|
|
|
|
|
&& querySearch.OtherQueryCondition.QueryTabCode.Equals("H", StringComparison.OrdinalIgnoreCase), (l, r) => l.ParentId > 0)
|
|
|
|
|
.Select((l, r) => new { order = l, bl = r });
|
|
|
|
|
|
|
|
|
|
BLIssueMangeQueryExtDto otherQuery = null;
|
|
|
|
@ -206,6 +217,20 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
|
|
|
|
|
var query = tenantDb.Queryable<SeaExport>().ClearFilter(typeof(IOrgId))
|
|
|
|
|
.LeftJoin<BLIssueManageBase>((l, r) => l.Id == r.BookingId)
|
|
|
|
|
.WhereIF(querySearch.OtherQueryCondition != null && !string.IsNullOrWhiteSpace(querySearch.OtherQueryCondition.QueryTabCode)
|
|
|
|
|
&& querySearch.OtherQueryCondition.QueryTabCode.Equals(BLQueryStatusEnum.CheckInQuery.ToString(), StringComparison.OrdinalIgnoreCase), (l, r) => r.IsCheckIn == false)
|
|
|
|
|
.WhereIF(querySearch.OtherQueryCondition != null && !string.IsNullOrWhiteSpace(querySearch.OtherQueryCondition.QueryTabCode)
|
|
|
|
|
&& querySearch.OtherQueryCondition.QueryTabCode.Equals(BLQueryStatusEnum.CheckOutQuery.ToString(), StringComparison.OrdinalIgnoreCase), (l, r) => r.IsCheckIn == true)
|
|
|
|
|
.WhereIF(querySearch.OtherQueryCondition != null && !string.IsNullOrWhiteSpace(querySearch.OtherQueryCondition.QueryTabCode)
|
|
|
|
|
&& querySearch.OtherQueryCondition.QueryTabCode.Equals(BLQueryStatusEnum.HasCheckOutQuery.ToString(), StringComparison.OrdinalIgnoreCase), (l, r) => r.IsCheckOut == true)
|
|
|
|
|
.WhereIF(querySearch.OtherQueryCondition != null && !string.IsNullOrWhiteSpace(querySearch.OtherQueryCondition.QueryTabCode)
|
|
|
|
|
&& querySearch.OtherQueryCondition.QueryTabCode.Equals(BLQueryStatusEnum.BLModifyQuery.ToString(), StringComparison.OrdinalIgnoreCase), (l, r) => r.IsBLModify == true)
|
|
|
|
|
.WhereIF(querySearch.OtherQueryCondition != null && !string.IsNullOrWhiteSpace(querySearch.OtherQueryCondition.QueryTabCode)
|
|
|
|
|
&& querySearch.OtherQueryCondition.QueryTabCode.Equals(BLQueryStatusEnum.BLSeizeQuery.ToString(), StringComparison.OrdinalIgnoreCase), (l, r) => r.IsBLSeize == true)
|
|
|
|
|
.WhereIF(querySearch.OtherQueryCondition != null && !string.IsNullOrWhiteSpace(querySearch.OtherQueryCondition.MHouseFlag)
|
|
|
|
|
&& querySearch.OtherQueryCondition.QueryTabCode.Equals("M", StringComparison.OrdinalIgnoreCase), (l, r) => l.ParentId == 0)
|
|
|
|
|
.WhereIF(querySearch.OtherQueryCondition != null && !string.IsNullOrWhiteSpace(querySearch.OtherQueryCondition.MHouseFlag)
|
|
|
|
|
&& querySearch.OtherQueryCondition.QueryTabCode.Equals("H", StringComparison.OrdinalIgnoreCase), (l, r) => l.ParentId > 0)
|
|
|
|
|
.Select((l, r) => new { order = l, bl = r });
|
|
|
|
|
|
|
|
|
|
if (!querySearch.QueryCondition.IsNullOrEmpty())
|
|
|
|
|