|
|
@ -79,10 +79,13 @@ namespace Myshipping.Application
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(input.PORTDISCHARGE), x => x.PORTDISCHARGE.Contains(input.PORTDISCHARGE))
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(input.PORTDISCHARGE), x => x.PORTDISCHARGE.Contains(input.PORTDISCHARGE))
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(input.CARRIERID), x => x.CARRIERID == input.CARRIERID)
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(input.CARRIERID), x => x.CARRIERID == input.CARRIERID)
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(input.CARRIER), x => x.CARRIER.Contains(input.CARRIER))
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(input.CARRIER), x => x.CARRIER.Contains(input.CARRIER))
|
|
|
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(input.BookingTenantName), x => x.BookingTenantName.Contains(input.BookingTenantName))
|
|
|
|
.WhereIF(input.ETDStart.HasValue, x => x.ETD >= input.ETDStart)
|
|
|
|
.WhereIF(input.ETDStart.HasValue, x => x.ETD >= input.ETDStart)
|
|
|
|
.WhereIF(input.ETDEnd.HasValue, x => x.ETD < input.ETDEnd.Value.Date.AddDays(1))
|
|
|
|
.WhereIF(input.ETDEnd.HasValue, x => x.ETD < input.ETDEnd.Value.Date.AddDays(1))
|
|
|
|
.WhereIF(input.CreatedTimeStart.HasValue, x => x.CreatedTime >= input.CreatedTimeStart)
|
|
|
|
.WhereIF(input.CreatedTimeStart.HasValue, x => x.CreatedTime >= input.CreatedTimeStart)
|
|
|
|
.WhereIF(input.CreatedTimeEnd.HasValue, x => x.CreatedTime < input.CreatedTimeEnd.Value.Date.AddDays(1))
|
|
|
|
.WhereIF(input.CreatedTimeEnd.HasValue, x => x.CreatedTime < input.CreatedTimeEnd.Value.Date.AddDays(1))
|
|
|
|
|
|
|
|
.WhereIF(input.UpdateTimeStart.HasValue, x => x.UpdatedTime >= input.UpdateTimeStart)
|
|
|
|
|
|
|
|
.WhereIF(input.UpdateTimeEnd.HasValue, x => x.UpdatedTime < input.UpdateTimeEnd.Value.Date.AddDays(1))
|
|
|
|
.WhereIF(input.BSStatusList != null && input.BSStatusList.Count > 0, x => input.BSStatusList.Contains(x.BSSTATUS))
|
|
|
|
.WhereIF(input.BSStatusList != null && input.BSStatusList.Count > 0, x => input.BSStatusList.Contains(x.BSSTATUS))
|
|
|
|
;
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
@ -103,7 +106,7 @@ namespace Myshipping.Application
|
|
|
|
var staLogList = _repStatuslog.Where(x => bkIdList.Contains(x.BookingId.Value) && x.Category == StaLogCateAudit).ToList();
|
|
|
|
var staLogList = _repStatuslog.Where(x => bkIdList.Contains(x.BookingId.Value) && x.Category == StaLogCateAudit).ToList();
|
|
|
|
foreach (var item in list.Items)
|
|
|
|
foreach (var item in list.Items)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
item.LogList = staLogList.Where(x => x.BookingId == item.Id).OrderBy(x => x.OpTime).Adapt<List<BookingCustomerLogDto>>();
|
|
|
|
item.LogList = staLogList.Where(x => x.BookingId == item.Id).OrderByDescending(x => x.OpTime).Adapt<List<BookingCustomerLogDto>>();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return list;
|
|
|
|
return list;
|
|
|
@ -263,7 +266,7 @@ namespace Myshipping.Application
|
|
|
|
var dicFile = new Dictionary<long, string>();
|
|
|
|
var dicFile = new Dictionary<long, string>();
|
|
|
|
_repFile.AsQueryable().Where(x => x.BookingId == entity.Id).ForEach(x => dicFile.Add(x.Id, x.FileName));
|
|
|
|
_repFile.AsQueryable().Where(x => x.BookingId == entity.Id).ForEach(x => dicFile.Add(x.Id, x.FileName));
|
|
|
|
outModel.Files = dicFile;
|
|
|
|
outModel.Files = dicFile;
|
|
|
|
outModel.LogList = _repStatuslog.AsQueryable().Where(x => x.BookingId == entity.Id && x.Category == StaLogCateAudit).ToList().Adapt<List<BookingCustomerLogDto>>();
|
|
|
|
outModel.LogList = _repStatuslog.AsQueryable().Where(x => x.BookingId == entity.Id && x.Category == StaLogCateAudit).OrderByDescending(x => x.OpTime).ToList().Adapt<List<BookingCustomerLogDto>>();
|
|
|
|
outModel.ServiceItemList = _repServiceItem.AsQueryable().Where(x => x.BookingId == entity.Id).ToList().Adapt<List<BookingServiceItemCustomerDto>>();
|
|
|
|
outModel.ServiceItemList = _repServiceItem.AsQueryable().Where(x => x.BookingId == entity.Id).ToList().Adapt<List<BookingServiceItemCustomerDto>>();
|
|
|
|
|
|
|
|
|
|
|
|
return outModel;
|
|
|
|
return outModel;
|
|
|
@ -285,7 +288,7 @@ namespace Myshipping.Application
|
|
|
|
var dicFile = new Dictionary<long, string>();
|
|
|
|
var dicFile = new Dictionary<long, string>();
|
|
|
|
_repFile.AsQueryable().Where(x => x.BookingId == entity.Id).ForEach(x => dicFile.Add(x.Id, x.FileName));
|
|
|
|
_repFile.AsQueryable().Where(x => x.BookingId == entity.Id).ForEach(x => dicFile.Add(x.Id, x.FileName));
|
|
|
|
outModel.Files = dicFile;
|
|
|
|
outModel.Files = dicFile;
|
|
|
|
outModel.LogList = _repStatuslog.AsQueryable().Where(x => x.BookingId == entity.Id && x.Category == StaLogCateAudit).ToList().Adapt<List<BookingCustomerLogDto>>();
|
|
|
|
outModel.LogList = _repStatuslog.AsQueryable().Where(x => x.BookingId == entity.Id && x.Category == StaLogCateAudit).OrderByDescending(x => x.OpTime).ToList().Adapt<List<BookingCustomerLogDto>>();
|
|
|
|
outModel.ServiceItemList = _repServiceItem.AsQueryable().Where(x => x.BookingId == entity.Id).ToList().Adapt<List<BookingServiceItemCustomerDto>>();
|
|
|
|
outModel.ServiceItemList = _repServiceItem.AsQueryable().Where(x => x.BookingId == entity.Id).ToList().Adapt<List<BookingServiceItemCustomerDto>>();
|
|
|
|
|
|
|
|
|
|
|
|
return outModel;
|
|
|
|
return outModel;
|
|
|
@ -647,6 +650,15 @@ namespace Myshipping.Application
|
|
|
|
await _repCtn.InsertAsync(ctn);
|
|
|
|
await _repCtn.InsertAsync(ctn);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//服务项目
|
|
|
|
|
|
|
|
var servList = await _repServiceItem.Where(x => x.BookingId == model.Id).ToListAsync();
|
|
|
|
|
|
|
|
foreach (var serv in servList)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
serv.Id = YitIdHelper.NextId();
|
|
|
|
|
|
|
|
serv.BookingId = bkOrder.Id;
|
|
|
|
|
|
|
|
await _repServiceItem.InsertAsync(serv);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return bkOrder.Id;
|
|
|
|
return bkOrder.Id;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -788,7 +800,7 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
var idBackup = order.Id; //防止覆盖
|
|
|
|
var idBackup = order.Id; //防止覆盖
|
|
|
|
var bsnoBackup = order.BSNO; //防止覆盖
|
|
|
|
var bsnoBackup = order.BSNO; //防止覆盖
|
|
|
|
order = order.Adapt(order);
|
|
|
|
order = item.Adapt(order);
|
|
|
|
order.Id = idBackup;
|
|
|
|
order.Id = idBackup;
|
|
|
|
order.BSNO = bsnoBackup;
|
|
|
|
order.BSNO = bsnoBackup;
|
|
|
|
order.BSSTATUS = "已接收";
|
|
|
|
order.BSSTATUS = "已接收";
|
|
|
@ -973,6 +985,15 @@ namespace Myshipping.Application
|
|
|
|
ctn.BILLID = bkOrder.Id;
|
|
|
|
ctn.BILLID = bkOrder.Id;
|
|
|
|
await _repCtn.InsertAsync(ctn);
|
|
|
|
await _repCtn.InsertAsync(ctn);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//服务项目
|
|
|
|
|
|
|
|
var servList = await _repServiceItem.Where(x => x.BookingId == model.Id).ToListAsync();
|
|
|
|
|
|
|
|
foreach (var serv in servList)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
serv.Id = YitIdHelper.NextId();
|
|
|
|
|
|
|
|
serv.BookingId = bkOrder.Id;
|
|
|
|
|
|
|
|
await _repServiceItem.InsertAsync(serv);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|