作废单据不同步更新金蝶数据

This commit is contained in:
18942506660
2024-07-10 14:33:27 +08:00
parent 7d42eeeed5
commit ba4780c6ae
3 changed files with 37 additions and 18 deletions

View File

@@ -172,6 +172,13 @@ namespace WMS.Web.Domain.Services
{
//仓库不同 拆分成不同的
var detail = outStockTask.Details.FirstOrDefault(w => w.MaterialNumber == erp.MaterialNumber);
//如果该明细作废 则不修改了
if (detail != null && detail.IsRepeal == true)
{
//操作完后剔除
erp_removeList.Add(erp);
continue;
}
if (detail == null)
{
//添加一条物料明细
@@ -211,7 +218,8 @@ namespace WMS.Web.Domain.Services
outStockTask.GenerateStatus();
}
}
var update_date_list = data_list.Where(w => update_ids.Contains(w.Id)).ToList();
//过滤掉已经作废的单据
var update_date_list = data_list.Where(w => update_ids.Contains(w.Id) && w.Status != OutStockStatus.Repeal).ToList();
//2.2.提交修改
var isSuccess = await _outStockTaskRepositories.EditEntityList(update_date_list, isTransaction);
if (!isSuccess)