You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.2 KiB
39 lines
1.2 KiB
using Volo.Abp.Timing;
|
|
using Win_in.Sfs.Shared.Domain.Shared;
|
|
|
|
namespace Win_in.Sfs.Wms.Job.Domain;
|
|
|
|
public static class PurchaseReceiptExtension
|
|
{
|
|
public static PurchaseReceiptJob SetDetails(this PurchaseReceiptJob job, string locationCode)
|
|
{
|
|
foreach (var detail in job.Details)
|
|
{
|
|
detail.RecommendLocationCode = locationCode;
|
|
// detail.SetBatch(detail.RecommendBatch);
|
|
}
|
|
return job;
|
|
}
|
|
|
|
public static PurchaseReceiptJob SetWorkGroup(this PurchaseReceiptJob job, string warehouseCode, string workGroupCode)
|
|
{
|
|
job.WorkGroupCode = workGroupCode;
|
|
job.WarehouseCode = warehouseCode;
|
|
return job;
|
|
}
|
|
|
|
public static PurchaseReceiptJob SetPriority(this PurchaseReceiptJob job, IClock clock)
|
|
{
|
|
job.Priority = PriorityHelper.GetPriority(clock);
|
|
job.PriorityIncrement = 1;
|
|
return job;
|
|
}
|
|
|
|
// public static PurchaseReceiptJob SetNumber(this PurchaseReceiptJob job,IGuidGenerator guidGenerator, ISnowflakeIdGenerator numberGenerator)
|
|
// {
|
|
// var number = (numberGenerator.CreateAsync().GetAwaiter().GetResult()).ToString();
|
|
// job.SetIdAndNumber(guidGenerator, number);
|
|
// return job;
|
|
// }
|
|
|
|
}
|
|
|