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.

40 lines
1.3 KiB

2 years ago
using Volo.Abp.Timing;
using Win_in.Sfs.Shared.Domain.Shared;
namespace Win_in.Sfs.Wms.Job.Domain;
public static class DeliverExtension
{
// public static DeliverJob SetDetails(this DeliverJob job,IGuidGenerator guidGenerator, LocationDTO location)
// {
// foreach (var detail in job.Details)
// {
// detail.SetIdAndNumber(guidGenerator,job.Id,job.Number);
// detail.RecommendLocationCode = location.Code;
// detail.SetBatch(detail.RecommendBatch);
// }
// return job;
// }
public static DeliverJob SetWorkGroup(this DeliverJob job, string warehouseCode, string workGroupCode)
{
job.WorkGroupCode = workGroupCode;
job.WarehouseCode = warehouseCode;
return job;
}
public static DeliverJob SetPriority(this DeliverJob job, IClock clock)
{
job.Priority = PriorityHelper.GetPriority(clock);
job.PriorityIncrement = 1;
return job;
}
// public static DeliverJob SetNumber(this DeliverJob job,IGuidGenerator guidGenerator, ISnowflakeIdGenerator numberGenerator)
// {
// var number = (numberGenerator.CreateAsync().GetAwaiter().GetResult()).ToString();
// job.SetIdAndNumber(guidGenerator, number);
// return job;
// }
}