台账编辑备注

optimize
wanghaomei 1 year ago
parent 0db60047d7
commit c5ae95941c

@ -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>
/// 删除订舱

@ -812,4 +812,24 @@ namespace Myshipping.Application
/// </summary>
public string VERSION { get; set; }
}
/// <summary>
/// 台账保存(操作备注、单证备注)功能
/// </summary>
public class BookingOrderSaveInListDto
{
/// <summary>
/// 主键
/// </summary>
public long Id { get; set; }
/// <summary>
/// 单证备注
/// </summary>
public string DZRemark { get; set; }
/// <summary>
/// 操作备注
/// </summary>
public string CZRemark { get; set; }
}
}

@ -46,7 +46,7 @@
"ValidateAudience": true, // bool true
"ValidAudience": "myshipping", // string
"ValidateLifetime": true, // bool truetrue
"ExpiredTime": 1440, // long 20
"ExpiredTime": 720, // long 20
"ClockSkew": 5 // long 5
},
"EncryptKey": {

Loading…
Cancel
Save