改了领料出库

This commit is contained in:
2025-06-30 14:34:42 +08:00
parent 3964d2b03d
commit 06e1fb8b3e
9 changed files with 179 additions and 2 deletions

View File

@@ -347,6 +347,22 @@ namespace WMS.Web.Domain.Services
return await this.SsynDate(erp_result.Data.ToList(), isTransaction);
}
/// <summary>
/// 生产领料出库
/// </summary>
/// <param name="isTransaction"></param>
/// <param name="sourceBillNos"></param>
/// <returns></returns>
public async Task<Result> BillQueryForPickingOutStock(bool isTransaction, List<string> sourceBillNos = null, DateTime? beginTime = null)
{
var erp_result = await _erpService.BillQueryForPickingOutStock(sourceBillNos, beginTime);
if (!erp_result.IsSuccess)
return Result.ReFailure(erp_result.Message, erp_result.Status);
return await this.SsynDate(erp_result.Data.ToList(), isTransaction);
}
/// <summary>
/// 分布式调出
/// </summary>
@@ -397,6 +413,7 @@ namespace WMS.Web.Domain.Services
return await this.SsynDate(erp_result.Data.ToList(), isTransaction);
}
/// <summary>
/// 销售出库单
/// </summary>
@@ -449,6 +466,10 @@ namespace WMS.Web.Domain.Services
result = await BillQueryForMisDeliveryOutStock(false, null, begin);
if (!result.IsSuccess) isRollback = true;
result = await BillQueryForPickingOutStock(false, null, begin);
if (!result.IsSuccess) isRollback = true;
//更新时间管理
//isSuccess = await _erpOpsSyncDateRepositories.Edit(ErpOpsSyncType.OutStock, false);
//if (!isSuccess) isRollback = true;
@@ -470,6 +491,7 @@ namespace WMS.Web.Domain.Services
List<string> TransferOut_Nos = new List<string>();
List<string> AssembledApp_Nos = new List<string>();
List<string> MisDeliveryOut_Nos = new List<string>();
List<string> PickingOut_Nos = new List<string>();
var taskList = await _outStockTaskRepositories.GetListByBillNo(billNos);
foreach (var entity in taskList)
{
@@ -483,6 +505,9 @@ namespace WMS.Web.Domain.Services
AssembledApp_Nos.AddRange(entity.Details.SelectMany(s => s.ErpDetails).Select(s => s.SourceBillNo));
else if (entity.Type == OutStockType.Miscellaneous)
MisDeliveryOut_Nos.AddRange(entity.Details.SelectMany(s => s.ErpDetails).Select(s => s.SourceBillNo));
else if (entity.Type == OutStockType.PickingOut)
PickingOut_Nos.AddRange(entity.Details.SelectMany(s => s.ErpDetails).Select(s => s.SourceBillNo));
}
if (TransferOut_Nos.Count() > 0)
{
@@ -511,6 +536,12 @@ namespace WMS.Web.Domain.Services
result = await BillQueryForMisDeliveryOutStock(false, MisDeliveryOut_Nos);
if (!result.IsSuccess) isRollback = true;
}
if (PickingOut_Nos.Count() > 0)
{
result = await BillQueryForPickingOutStock(false, MisDeliveryOut_Nos);
if (!result.IsSuccess) isRollback = true;
}
//4.提交事务