This commit is contained in:
tongfei
2024-03-15 10:11:32 +08:00
parent d7e9bab58a
commit ae3d0d67b2
3 changed files with 9 additions and 4 deletions

View File

@@ -155,7 +155,7 @@ namespace WMS.Web.Domain.Entitys
{
det.SuccessSync = SyncStatus.Success;
det.ErpSyncBillNo = erpBillNo;
});
});
//所有erp明细同步成功才是整个单据成功
if (this.ErpDetails.Where(w => w.SuccessSync == SyncStatus.Success).Count() == this.ErpDetails.Count())
@@ -163,6 +163,8 @@ namespace WMS.Web.Domain.Entitys
this.SuccessSync = SyncStatus.Success;
this.Remark = "";
}
else
this.SuccessSync = SyncStatus.Fail;
this.OperateId = operateId;
this.SyncTime = DateTime.Now;
}

View File

@@ -684,7 +684,7 @@ namespace WMS.Web.Domain.Services
//1.1筛选出对应仓库的明细
var task_details = task.Details.Where(x => x.StockCode == dto.StockCode).ToList();
var task_details = task.Details.Where(x => x.StockCode == dto.StockCode && x.AccruedQty>0).ToList();
//2.找到箱对应的物料信息:多个箱
var boxs = await _boxRepositories.GetEntityListByNos(dto.BoxBillNos);

View File

@@ -256,7 +256,7 @@ namespace WMS.Web.Repositories
AvailableQty = s.AccruedQty - s.ReceiveQty,
Remark = s.Remark,
ErpDetailId=s.ErpDetailId
}).ToListAsync();
}).Where(x=>x.AvailableQty>0).ToListAsync();
//找箱
var task_box = await _context.InstockTaskBox.Where(x => ids.Contains(x.TaskId))
@@ -279,8 +279,11 @@ namespace WMS.Web.Repositories
var response = new List<SourceBillNoNoPurchaseQueryResponse>();
foreach (var item in taskList)
{
if (item.Details.Count != 0)
if (item.Details.Count != 0)
{
response.Add(item);
}
}
return response;
}