修改舱位管理

master
jianghaiqing 4 months ago
parent b02313998a
commit 42e30cc693

@ -13559,7 +13559,7 @@ namespace Myshipping.Application
3
*/
var orderList = await _rep.AsQueryable().Filter(null, true)
.Where(a => (a.MBLNO == mblNo || a.CUSTNO == mblNo) && a.IsDeleted == false).ToListAsync();
.Where(a => (a.MBLNO == mblNo || a.CUSTNO == mblNo) && a.IsDeleted == false && (a.ParentId == null || a.ParentId == 0)).ToListAsync();
var currOrder = orderList.FirstOrDefault(a => a.MBLNO == mblNo);
@ -13583,7 +13583,7 @@ namespace Myshipping.Application
//找到所有相关的分票
var list = await _rep.AsQueryable().Filter(null, true)
.Where(a => a.CUSTNO == mblNo && a.IsDeleted == false && a.Id != currOrder.Id).ToListAsync();
.Where(a => a.CUSTNO == mblNo && a.IsDeleted == false && a.Id != currOrder.Id && (a.ParentId == null || a.ParentId == 0)).ToListAsync();
model.otherOrderList = list.Select(b => new SeaExportOrderExtensionSubInfo
{
@ -13606,7 +13606,7 @@ namespace Myshipping.Application
//找到所有相关的分票
var list = await _rep.AsQueryable().Filter(null, true)
.Where(a => a.HBLNO == currOrder.HBLNO && a.IsDeleted == false && a.Id != currOrder.Id).ToListAsync();
.Where(a => a.HBLNO == currOrder.HBLNO && a.IsDeleted == false && a.Id != currOrder.Id && (a.ParentId == null || a.ParentId == 0)).ToListAsync();
model.otherOrderList = list.Select(b => new SeaExportOrderExtensionSubInfo
{

@ -970,6 +970,8 @@ namespace Myshipping.Application
dto.DataObj.Adapt(model);
model.Id = id;
// 1.判断新的舱位信息的7个库存统计维度是否发生变化
// 2.如果有变化,则需要更新旧的库存信息
bool isNeedUpdateOldStock = false;
@ -982,7 +984,13 @@ namespace Myshipping.Application
{
isNeedUpdateOldStock = true;
}
await _repBase.UpdateAsync(model);
//await _repBase.UpdateAsync(model);
await _repBase.AsUpdateable(model).IgnoreColumns(x => new {
x.CreatedUserId,
x.CreatedTime,
x.CreatedUserName
}).ExecuteCommandAsync();
if (isNeedUpdateOldStock)
{

Loading…
Cancel
Save