|
|
|
@ -205,7 +205,7 @@ namespace Myshipping.Application
|
|
|
|
|
[HttpPost("/BookingOrder/PageData")]
|
|
|
|
|
public async Task<dynamic> PageData(BookingOrderInput input)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<long> userlist = await _right.GetDataScopeList(MenuConst.MenuBookingOrder);
|
|
|
|
|
List<long?> pidlist = new List<long?>();
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(input.SEALNO) || !string.IsNullOrWhiteSpace(input.CNTRNO))
|
|
|
|
@ -237,7 +237,7 @@ namespace Myshipping.Application
|
|
|
|
|
.WhereIF(input.ISDel, x => x.IsDeleted == true)
|
|
|
|
|
.WhereIF(input.firstFlag, x => (x.ETD <= etoday && x.ETD >= ftoday || x.ETD == null) && x.CreatedUserId == UserManager.UserId) //首次加载数据:ETD前后15天,且创建人是当前人
|
|
|
|
|
.Where(x => x.ParentId == 0 || x.ParentId == null) //台账只查询主单!!
|
|
|
|
|
.WhereIF( input.Id!=0,x=>x.Id==input.Id)
|
|
|
|
|
.WhereIF(input.Id != 0, x => x.Id == input.Id)
|
|
|
|
|
.WhereIF(pidlist != null && pidlist.Count > 0, x => pidlist.Contains(x.Id))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.BSNO), u => u.BSNO.Contains(input.BSNO))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.BSSTATUS), u => u.BSSTATUS == input.BSSTATUS)
|
|
|
|
@ -924,7 +924,7 @@ namespace Myshipping.Application
|
|
|
|
|
var ctnlist = await _repCtn.AsQueryable().Where(x => x.BILLID == Id).ToListAsync();
|
|
|
|
|
var ctninput = ctnlist.Adapt<List<BookingCtnDto>>();
|
|
|
|
|
var ctnIdlist = ctnlist.Select(x => x.Id).ToList();
|
|
|
|
|
var ctndetaillist= await _ctndetailrep.AsQueryable().Where(x => ctnIdlist.Contains((long)x.CTNID)).ToListAsync();
|
|
|
|
|
var ctndetaillist = await _ctndetailrep.AsQueryable().Where(x => ctnIdlist.Contains((long)x.CTNID)).ToListAsync();
|
|
|
|
|
foreach (var item in ctninput)
|
|
|
|
|
{
|
|
|
|
|
var _ctndetaillist = ctndetaillist.Where(x => x.CTNID == item.Id).ToList();
|
|
|
|
@ -986,6 +986,34 @@ namespace Myshipping.Application
|
|
|
|
|
return ordOut;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 在订舱台账保存单证备注、操作备注等功能
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="model"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost("/BookingOrder/SaveInList")]
|
|
|
|
|
public async Task SaveInList(BookingOrderSaveInListDto model)
|
|
|
|
|
{
|
|
|
|
|
var order = await _rep.AsQueryable().Filter(null, true).FirstAsync(x => x.Id == model.Id);
|
|
|
|
|
if (order == null)
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah("订舱数据不存在");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//判断权限
|
|
|
|
|
List<long> userlist = await _right.GetDataScopeList(MenuConst.MenuBookingOrder, true);
|
|
|
|
|
if (!userlist.Contains(UserManager.UserId))
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah("无权修改");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
model.Adapt(order);
|
|
|
|
|
order.VERSION = Guid.NewGuid().ToString();
|
|
|
|
|
await _rep.UpdateAsync(order);
|
|
|
|
|
|
|
|
|
|
//todo:记录修改日志,等待抽取方法
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 删除订舱
|
|
|
|
|