18 changed files with 112 additions and 21 deletions
@ -0,0 +1,9 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.Application.Contracts; |
|||
|
|||
public class ProductRecycleJobDTO |
|||
{ |
|||
|
|||
} |
@ -0,0 +1,9 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.Application.Contracts; |
|||
|
|||
public class ProductRecycleJobDetailDTO |
|||
{ |
|||
|
|||
} |
@ -0,0 +1,10 @@ |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.Application.Contracts; |
|||
|
|||
public interface IProductRecycleJobAppService |
|||
: ISfsJobAppServiceBase<ProductReceiveJobDTO, SfsJobRequestInputBase, ProductReceiveJobCheckInput, ProductReceiveJobEditInput> |
|||
|
|||
{ |
|||
|
|||
} |
@ -1,10 +1,61 @@ |
|||
using System; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Linq.Expressions; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Domain.Repositories; |
|||
using Volo.Abp.Users; |
|||
using Volo.Abp.Validation; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.Jobs.ProductRecycleJobs; |
|||
internal class ProductRecycleJobManager |
|||
namespace Win_in.Sfs.Wms.Store.Domain; |
|||
|
|||
public class ProductRecycleJobManager : SfsJobManagerBase<ProductRecycleJob, ProductRecycleJobDetail>, IProductRecycleJobManager |
|||
{ |
|||
|
|||
public ProductRecycleJobManager( |
|||
IProductRecycleJobRepository repository |
|||
) : base(repository) |
|||
{ |
|||
} |
|||
|
|||
public override void CheckDetails(ProductRecycleJob entity, AbpValidationResult result) |
|||
{ |
|||
var details = entity.Details; |
|||
foreach (var detail in details) |
|||
{ |
|||
if (detail.HandledToLocationCode == null) |
|||
{ |
|||
result.Errors.Add(new ValidationResult($"{detail.HandledToLocationCode} 不能为空")); |
|||
} |
|||
|
|||
} |
|||
} |
|||
|
|||
public override async Task<List<ProductRecycleJob>> GetWorkingListByPackingAsync(string packingCode) |
|||
{ |
|||
return await Repository.GetListAsync( |
|||
c => c.Details.Any(p => p.RecommendPackingCode == packingCode) |
|||
&& c.JobStatus != EnumJobStatus.Closed |
|||
&& c.JobStatus != EnumJobStatus.Cancelled |
|||
, true).ConfigureAwait(false); |
|||
|
|||
} |
|||
|
|||
public override async Task<List<ProductRecycleJob>> GetWorkingListByContainerAsync(string containerCode) |
|||
{ |
|||
return await Repository.GetListAsync( |
|||
c => c.Details.Any(p => p.RecommendContainerCode == containerCode) |
|||
&& c.JobStatus != EnumJobStatus.Closed |
|||
&& c.JobStatus != EnumJobStatus.Cancelled |
|||
, true).ConfigureAwait(false); |
|||
|
|||
} |
|||
|
|||
public async Task<ProductRecycleJob> GetAsync(Expression<Func<ProductRecycleJob, bool>> expression) |
|||
{ |
|||
return await Repository.FindAsync(expression).ConfigureAwait(false); |
|||
} |
|||
|
|||
} |
|||
|
Loading…
Reference in new issue