|
|
@ -5,11 +5,13 @@ using System.Linq; |
|
|
|
using System.Linq.Expressions; |
|
|
|
using System.Threading; |
|
|
|
using System.Threading.Tasks; |
|
|
|
|
|
|
|
using DocumentFormat.OpenXml.Office.CustomUI; |
|
|
|
using Microsoft.AspNetCore.Authorization; |
|
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
|
using Microsoft.EntityFrameworkCore; |
|
|
|
using Volo.Abp; |
|
|
|
using Volo.Abp.Application.Dtos; |
|
|
|
using Volo.Abp.Domain.Entities; |
|
|
|
using Win_in.Sfs.Basedata.Application.Contracts; |
|
|
|
using Win_in.Sfs.Shared.Application.Contracts; |
|
|
|
using Win_in.Sfs.Shared.Domain; |
|
|
@ -25,28 +27,124 @@ namespace Win_in.Sfs.Wms.Store.Application; |
|
|
|
/// </summary>
|
|
|
|
[Authorize] |
|
|
|
[Route($"{StoreConsts.RootPath}product-receipt-request")] |
|
|
|
|
|
|
|
public class ProductReceiptRequestAppService : |
|
|
|
SfsStoreRequestAppServiceBase<ProductReceiptRequest, ProductReceiptRequestDTO, SfsStoreRequestInputBase, ProductReceiptRequestEditInput, ProductReceiptRequestDetail, ProductReceiptRequestDetailDTO, SfsStoreRequestInputBase, ProductReceiptRequestImportInput> |
|
|
|
SfsStoreRequestAppServiceBase<ProductReceiptRequest, ProductReceiptRequestDTO, SfsStoreRequestInputBase, |
|
|
|
ProductReceiptRequestEditInput, ProductReceiptRequestDetail, ProductReceiptRequestDetailDTO, |
|
|
|
SfsStoreRequestInputBase, ProductReceiptRequestImportInput> |
|
|
|
{ |
|
|
|
private readonly IProductReceiptRequestManager _productReceiptRequestManager; |
|
|
|
|
|
|
|
private readonly IAreaAppService _areaApp; |
|
|
|
private readonly IItemBasicAppService _itemBasicAppService; |
|
|
|
private readonly ILocationAppService _locationAppService; |
|
|
|
|
|
|
|
public ProductReceiptRequestAppService( |
|
|
|
IProductReceiptRequestRepository repository |
|
|
|
, IProductReceiptRequestManager productReceiptRequestManager |
|
|
|
, IAreaAppService areaApp |
|
|
|
) : base(repository, productReceiptRequestManager) |
|
|
|
, IAreaAppService areaApp, |
|
|
|
IItemBasicAppService itemBasicAppService, |
|
|
|
ILocationAppService locationAppService) : base(repository, productReceiptRequestManager) |
|
|
|
{ |
|
|
|
|
|
|
|
this._areaApp = areaApp; |
|
|
|
_areaApp = areaApp; |
|
|
|
_itemBasicAppService = itemBasicAppService; |
|
|
|
_locationAppService = locationAppService; |
|
|
|
_productReceiptRequestManager = productReceiptRequestManager; |
|
|
|
base.CreatePolicyName = ProductReceiptRequestPermissions.Create; |
|
|
|
base.UpdatePolicyName = ProductReceiptRequestPermissions.Update; |
|
|
|
base.DeletePolicyName = ProductReceiptRequestPermissions.Delete; |
|
|
|
} |
|
|
|
|
|
|
|
#region 东阳
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 用来重写 导入数据时可以加工数据
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="dictionary"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
protected override async Task<Dictionary<ProductReceiptRequest, EntityState>> ImportProcessingEntityAsync( |
|
|
|
Dictionary<ProductReceiptRequest, EntityState> dictionary) |
|
|
|
{ |
|
|
|
var addList = dictionary.Where(p => p.Value == EntityState.Added).Select(p => p.Key); |
|
|
|
|
|
|
|
foreach (var productReceiptRequest in addList) |
|
|
|
{ |
|
|
|
productReceiptRequest.Worker = CurrentUser.GetUserName(); |
|
|
|
productReceiptRequest.CreatorId = CurrentUser.Id; |
|
|
|
|
|
|
|
await SetRequestAutoPropertiesAsync(productReceiptRequest).ConfigureAwait(false); |
|
|
|
foreach (var detail in productReceiptRequest.Details) |
|
|
|
{ |
|
|
|
await SetDetailPropertiesAsync(detail).ConfigureAwait(false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return dictionary; |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 赋值详情
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="detail"></param>
|
|
|
|
/// <param name="input"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
private async Task SetDetailPropertiesAsync(ProductReceiptRequestDetail detail) |
|
|
|
{ |
|
|
|
var itemBasic = await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false); |
|
|
|
|
|
|
|
if (itemBasic != null) |
|
|
|
{ |
|
|
|
detail.ItemName = itemBasic.Name; |
|
|
|
detail.ItemDesc1 = itemBasic.Desc1; |
|
|
|
detail.ItemDesc2 = itemBasic.Desc2; |
|
|
|
detail.StdPackQty = itemBasic.StdPackQty; |
|
|
|
detail.Uom = itemBasic.BasicUom; |
|
|
|
} |
|
|
|
|
|
|
|
var location = await _locationAppService.GetByCodeAsync(detail.LocationCode).ConfigureAwait(false); |
|
|
|
|
|
|
|
if (location != null) |
|
|
|
{ |
|
|
|
detail.LocationErpCode = location.ErpLocationCode; |
|
|
|
detail.WarehouseCode = location.WarehouseCode; |
|
|
|
detail.LocationArea = location.AreaCode; |
|
|
|
detail.LocationGroup = location.LocationGroupCode; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 设置事务类型
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="entity"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
private async Task SetRequestAutoPropertiesAsync(ProductReceiptRequest entity) |
|
|
|
{ |
|
|
|
var enumTransSubType = EnumTransSubType.None; |
|
|
|
switch (entity.Type) |
|
|
|
{ |
|
|
|
case EnumProductReceiptType.ProductReceipt_Manual: |
|
|
|
enumTransSubType = EnumTransSubType.ProductReceipt_Manual; |
|
|
|
break; |
|
|
|
case EnumProductReceiptType.ProductReceipt_WIP: |
|
|
|
enumTransSubType = EnumTransSubType.ProductReceipt_WIP; |
|
|
|
break; |
|
|
|
default: |
|
|
|
throw new UserFriendlyException("缴库类型错误"); |
|
|
|
} |
|
|
|
|
|
|
|
var tranType = await TransactionTypeAclService |
|
|
|
.GetByTransTypeAsync(EnumTransType.ProductReceipt, enumTransSubType) |
|
|
|
.ConfigureAwait(false); |
|
|
|
|
|
|
|
Check.NotNull(tranType, "事务类型", "事务类型不存在"); |
|
|
|
|
|
|
|
entity.AutoCompleteJob = tranType.AutoCompleteJob; |
|
|
|
entity.AutoSubmit = tranType.AutoSubmitRequest; |
|
|
|
entity.AutoAgree = tranType.AutoAgreeRequest; |
|
|
|
entity.AutoHandle = tranType.AutoHandleRequest; |
|
|
|
entity.DirectCreateNote = tranType.DirectCreateNote; |
|
|
|
} |
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 新增实体
|
|
|
|
/// </summary>
|
|
|
@ -56,7 +154,6 @@ public class ProductReceiptRequestAppService : |
|
|
|
//[Authorize(ProductReceiptRequestPermissions.Create)]
|
|
|
|
public override async Task<ProductReceiptRequestDTO> CreateAsync(ProductReceiptRequestEditInput input) |
|
|
|
{ |
|
|
|
|
|
|
|
var entity = ObjectMapper.Map<ProductReceiptRequestEditInput, ProductReceiptRequest>(input); |
|
|
|
|
|
|
|
await _productReceiptRequestManager.CreateAsync(entity).ConfigureAwait(false); |
|
|
@ -79,35 +176,37 @@ public class ProductReceiptRequestAppService : |
|
|
|
bool includeDetails = false, |
|
|
|
CancellationToken cancellationToken = default) |
|
|
|
{ |
|
|
|
Expression<Func<ProductReceiptRequest, bool>> expression = p => p.Type == type; |
|
|
|
Expression<Func<ProductReceiptRequest, bool>> expression = p => p.Type.ToString() == type; |
|
|
|
if (requestInput.Condition.Filters?.Count > 0) |
|
|
|
{ |
|
|
|
expression = expression.And(requestInput.Condition.Filters.ToLambda<ProductReceiptRequest>()); |
|
|
|
} |
|
|
|
|
|
|
|
return await GetPagedListAsync(expression, requestInput.SkipCount, requestInput.MaxResultCount, |
|
|
|
requestInput.Sorting, includeDetails, cancellationToken).ConfigureAwait(false); |
|
|
|
requestInput.Sorting, includeDetails, cancellationToken).ConfigureAwait(false); |
|
|
|
} |
|
|
|
|
|
|
|
[HttpPost("export-by-type")] |
|
|
|
public virtual async Task<IActionResult> ExportByTypeAsync(SfsExportRequestInput requestInput, string type) |
|
|
|
{ |
|
|
|
|
|
|
|
Expression<Func<ProductReceiptRequest, bool>> expression = p => p.Type == type; |
|
|
|
Expression<Func<ProductReceiptRequest, bool>> expression = p => p.Type.ToString() == type; |
|
|
|
if (requestInput.Condition.Filters?.Count > 0) |
|
|
|
{ |
|
|
|
expression = expression.And(requestInput.Condition.Filters.ToLambda<ProductReceiptRequest>()); |
|
|
|
} |
|
|
|
|
|
|
|
var entities = await _repository.GetPagedListAsync(expression, requestInput.SkipCount, requestInput.MaxResultCount, requestInput.Sorting, true).ConfigureAwait(false); |
|
|
|
var entities = await _repository |
|
|
|
.GetPagedListAsync(expression, requestInput.SkipCount, requestInput.MaxResultCount, requestInput.Sorting, |
|
|
|
true).ConfigureAwait(false); |
|
|
|
|
|
|
|
var list = ObjectMapper.Map<List<ProductReceiptRequest>, List<ProductReceiptRequestDTO>>(entities); |
|
|
|
return ExportImportService.Export(list, true, "Details"); |
|
|
|
} |
|
|
|
|
|
|
|
#region Import
|
|
|
|
#region 校验
|
|
|
|
|
|
|
|
protected virtual async Task CheckImportInputBusinessAsync(ProductReceiptRequestImportInput importInput, EnumImportMethod importMethod, List<ValidationResult> validationRresult) |
|
|
|
protected virtual async Task CheckImportInputBusinessAsync(ProductReceiptRequestImportInput importInput, |
|
|
|
EnumImportMethod importMethod, List<ValidationResult> validationRresult) |
|
|
|
{ |
|
|
|
//await base.CheckImportInputBusinessAsync(importInput, importMethod);
|
|
|
|
|
|
|
@ -124,7 +223,8 @@ public class ProductReceiptRequestAppService : |
|
|
|
//CheckTransactionType(EnumTransInOut.In, transactionType.InInventoryStatuses.FirstOrDefault(), transactionType, itemBasic, location);
|
|
|
|
} |
|
|
|
|
|
|
|
protected async Task<ItemBasicDTO> CheckItemBasicAsync(ProductReceiptRequestImportInput importInput, List<ValidationResult> validationRresult) |
|
|
|
protected async Task<ItemBasicDTO> CheckItemBasicAsync(ProductReceiptRequestImportInput importInput, |
|
|
|
List<ValidationResult> validationRresult) |
|
|
|
{ |
|
|
|
var item = await ItemBasicAclService.GetByCodeAsync(importInput.ItemCode).ConfigureAwait(false); |
|
|
|
|
|
|
@ -132,25 +232,30 @@ public class ProductReceiptRequestAppService : |
|
|
|
{ |
|
|
|
validationRresult.Add("物品代码", $"物品代码{importInput.ItemCode}不存在"); |
|
|
|
} |
|
|
|
|
|
|
|
//可以缴入负数
|
|
|
|
if (importInput.Qty == 0) |
|
|
|
{ |
|
|
|
validationRresult.Add("数量", $"数量不能等于0"); |
|
|
|
} |
|
|
|
|
|
|
|
return item; |
|
|
|
} |
|
|
|
|
|
|
|
protected async Task<LocationDTO> CheckLocationAsync(ProductReceiptRequestImportInput importInput, List<ValidationResult> validationRresult) |
|
|
|
protected async Task<LocationDTO> CheckLocationAsync(ProductReceiptRequestImportInput importInput, |
|
|
|
List<ValidationResult> validationRresult) |
|
|
|
{ |
|
|
|
var location = await LocationAclService.GetByCodeAsync(importInput.LocationCode).ConfigureAwait(false); |
|
|
|
if (location == null) |
|
|
|
{ |
|
|
|
validationRresult.Add("调入库位", $"调入库位{importInput.LocationCode}不存在"); |
|
|
|
} |
|
|
|
|
|
|
|
return location; |
|
|
|
} |
|
|
|
|
|
|
|
protected async Task CheckAreaAsync(ProductReceiptRequestImportInput importInput, List<ValidationResult> validationRresult) |
|
|
|
protected async Task CheckAreaAsync(ProductReceiptRequestImportInput importInput, |
|
|
|
List<ValidationResult> validationRresult) |
|
|
|
{ |
|
|
|
var location = await _areaApp.GetByCodeAsync(importInput.RawArea).ConfigureAwait(false); |
|
|
|
if (location == null) |
|
|
@ -161,17 +266,14 @@ public class ProductReceiptRequestAppService : |
|
|
|
|
|
|
|
protected async Task<TransactionTypeDTO> CheckTransactionTypeAsync(List<ValidationResult> validationRresult) |
|
|
|
{ |
|
|
|
var transactionType = await TransactionTypeAclService.GetByTransTypeAsync(EnumTransType.ProductReceipt, EnumTransSubType.None).ConfigureAwait(false); |
|
|
|
var transactionType = await TransactionTypeAclService |
|
|
|
.GetByTransTypeAsync(EnumTransType.ProductReceipt, EnumTransSubType.None).ConfigureAwait(false); |
|
|
|
if (transactionType == null) |
|
|
|
{ |
|
|
|
validationRresult.Add("事务类型", $"{EnumTransType.ProductReceipt.GetDisplayName()}事务类型不存在"); |
|
|
|
} |
|
|
|
return transactionType; |
|
|
|
} |
|
|
|
|
|
|
|
protected virtual async Task ImportDataAsync(List<ProductReceiptRequest> entites, List<ProductReceiptRequest> deleteEntities) |
|
|
|
{ |
|
|
|
await _productReceiptRequestManager.ImportDataAsync(entites, deleteEntities).ConfigureAwait(false); |
|
|
|
return transactionType; |
|
|
|
} |
|
|
|
|
|
|
|
protected override Func<ProductReceiptRequestImportInput, object> GetEntityExpression() |
|
|
@ -179,118 +281,92 @@ public class ProductReceiptRequestAppService : |
|
|
|
return p => p.Type; |
|
|
|
} |
|
|
|
|
|
|
|
protected virtual async Task<(List<ProductReceiptRequest> entites, List<ProductReceiptRequest> deleteEntities)> BuildImportDataAsync(ImportResult<ProductReceiptRequestImportInput> importResult, EnumImportMethod importMethod = EnumImportMethod.Update, bool isAllowPartImport = false) |
|
|
|
{ |
|
|
|
if (importResult.Data.Any(t => t.ReportStatus == EnumImportReportStatus.Failed)) |
|
|
|
{ |
|
|
|
if (!isAllowPartImport) |
|
|
|
{ |
|
|
|
return (null, null); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
var entites = new List<ProductReceiptRequest>(); |
|
|
|
|
|
|
|
var details = new List<ProductReceiptRequestDetail>(); |
|
|
|
|
|
|
|
var deleteEntites = new List<ProductReceiptRequest>(); |
|
|
|
|
|
|
|
var entityExpression = GetEntityExpression(); |
|
|
|
|
|
|
|
var groupList = importResult.Data.ToList().GroupBy(entityExpression).Distinct().ToList(); |
|
|
|
|
|
|
|
foreach (var group in groupList) |
|
|
|
{ |
|
|
|
var input = group.FirstOrDefault(); |
|
|
|
#endregion
|
|
|
|
|
|
|
|
var inputDetails = group.ToList(); |
|
|
|
//protected virtual async Task ImportDataAsync(List<ProductReceiptRequest> entites,
|
|
|
|
// List<ProductReceiptRequest> deleteEntities)
|
|
|
|
//{
|
|
|
|
// await _productReceiptRequestManager.ImportDataAsync(entites, deleteEntities).ConfigureAwait(false);
|
|
|
|
//}
|
|
|
|
//protected virtual async Task<(List<ProductReceiptRequest> entites, List<ProductReceiptRequest> deleteEntities)>
|
|
|
|
// BuildImportDataAsync(ImportResult<ProductReceiptRequestImportInput> importResult,
|
|
|
|
// EnumImportMethod importMethod = EnumImportMethod.Update, bool isAllowPartImport = false)
|
|
|
|
//{
|
|
|
|
// if (importResult.Data.Any(t => t.ReportStatus == EnumImportReportStatus.Failed))
|
|
|
|
// {
|
|
|
|
// if (!isAllowPartImport)
|
|
|
|
// {
|
|
|
|
// return (null, null);
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
if (!inputDetails.Any(t => t.ReportStatus == EnumImportReportStatus.Failed)) |
|
|
|
{ |
|
|
|
var exist = await GetEntityAsync(input).ConfigureAwait(false); |
|
|
|
// var entites = new List<ProductReceiptRequest>();
|
|
|
|
|
|
|
|
var entity = ObjectMapper.Map<ProductReceiptRequestImportInput, ProductReceiptRequest>(input); |
|
|
|
// var details = new List<ProductReceiptRequestDetail>();
|
|
|
|
|
|
|
|
await SetEntityPropertiesAsync(entity, input).ConfigureAwait(false); |
|
|
|
// var deleteEntites = new List<ProductReceiptRequest>();
|
|
|
|
|
|
|
|
switch (importMethod) |
|
|
|
{ |
|
|
|
case EnumImportMethod.Update: |
|
|
|
entity.SetId(exist != null ? exist.Id : GuidGenerator.Create()); |
|
|
|
// var entityExpression = GetEntityExpression();
|
|
|
|
|
|
|
|
if (exist != null) |
|
|
|
{ |
|
|
|
entity.SetId(exist.Id); |
|
|
|
} |
|
|
|
break; |
|
|
|
case EnumImportMethod.Replace: |
|
|
|
if (exist != null) |
|
|
|
{ |
|
|
|
deleteEntites.Add(exist); |
|
|
|
} |
|
|
|
// var groupList = importResult.Data.ToList().GroupBy(entityExpression).Distinct().ToList();
|
|
|
|
|
|
|
|
entity.SetId(GuidGenerator.Create()); |
|
|
|
break; |
|
|
|
} |
|
|
|
// foreach (var group in groupList)
|
|
|
|
// {
|
|
|
|
// var input = group.FirstOrDefault();
|
|
|
|
|
|
|
|
foreach (var inputDetail in inputDetails) |
|
|
|
{ |
|
|
|
var detail = ObjectMapper.Map<ProductReceiptRequestImportInput, ProductReceiptRequestDetail>(inputDetail); |
|
|
|
// var inputDetails = group.ToList();
|
|
|
|
|
|
|
|
detail.SetIdAndNumber(GuidGenerator, entity.Id, entity.Number); |
|
|
|
// if (!inputDetails.Any(t => t.ReportStatus == EnumImportReportStatus.Failed))
|
|
|
|
// {
|
|
|
|
// var exist = await GetEntityAsync(input).ConfigureAwait(false);
|
|
|
|
|
|
|
|
await SetDetailPropertiesAsync(detail, input).ConfigureAwait(false); |
|
|
|
entity.AddDetail(detail); |
|
|
|
} |
|
|
|
// var entity = ObjectMapper.Map<ProductReceiptRequestImportInput, ProductReceiptRequest>(input);
|
|
|
|
|
|
|
|
entites.Add(entity); |
|
|
|
} |
|
|
|
} |
|
|
|
// await SetEntityPropertiesAsync(entity, input).ConfigureAwait(false);
|
|
|
|
|
|
|
|
return (entites, deleteEntites); |
|
|
|
} |
|
|
|
// switch (importMethod)
|
|
|
|
// {
|
|
|
|
// case EnumImportMethod.Update:
|
|
|
|
// entity.SetId(exist != null ? exist.Id : GuidGenerator.Create());
|
|
|
|
|
|
|
|
private async Task SetDetailPropertiesAsync(ProductReceiptRequestDetail detail, ProductReceiptRequestImportInput input) |
|
|
|
{ |
|
|
|
var itemBasic = await ItemBasicAclService.GetByCodeAsync(input.ItemCode).ConfigureAwait(false); |
|
|
|
// if (exist != null)
|
|
|
|
// {
|
|
|
|
// entity.SetId(exist.Id);
|
|
|
|
// }
|
|
|
|
|
|
|
|
if (itemBasic != null) |
|
|
|
{ |
|
|
|
detail.ItemName = itemBasic.Name; |
|
|
|
detail.ItemDesc1 = itemBasic.Desc1; |
|
|
|
detail.ItemDesc2 = itemBasic.Desc2; |
|
|
|
detail.Qty = input.Qty; |
|
|
|
detail.StdPackQty = itemBasic.StdPackQty; |
|
|
|
} |
|
|
|
// break;
|
|
|
|
// case EnumImportMethod.Replace:
|
|
|
|
// if (exist != null)
|
|
|
|
// {
|
|
|
|
// deleteEntites.Add(exist);
|
|
|
|
// }
|
|
|
|
|
|
|
|
var location = await LocationAclService.GetByCodeAsync(input.LocationCode).ConfigureAwait(false); |
|
|
|
// entity.SetId(GuidGenerator.Create());
|
|
|
|
// break;
|
|
|
|
// }
|
|
|
|
|
|
|
|
if (location != null) |
|
|
|
{ |
|
|
|
detail.LocationErpCode = location.ErpLocationCode; |
|
|
|
detail.WarehouseCode = location.WarehouseCode; |
|
|
|
} |
|
|
|
} |
|
|
|
// foreach (var inputDetail in inputDetails)
|
|
|
|
// {
|
|
|
|
// var detail =
|
|
|
|
// ObjectMapper.Map<ProductReceiptRequestImportInput, ProductReceiptRequestDetail>(inputDetail);
|
|
|
|
|
|
|
|
private async Task SetEntityPropertiesAsync(ProductReceiptRequest entity, ProductReceiptRequestImportInput input) |
|
|
|
{ |
|
|
|
entity.Worker = CurrentUser.GetUserName(); |
|
|
|
// detail.SetIdAndNumber(GuidGenerator, entity.Id, entity.Number);
|
|
|
|
|
|
|
|
await SetRequestAutoPropertiesAsync(entity).ConfigureAwait(false); |
|
|
|
} |
|
|
|
// await SetDetailPropertiesAsync(detail, input).ConfigureAwait(false);
|
|
|
|
// entity.AddDetail(detail);
|
|
|
|
// }
|
|
|
|
|
|
|
|
private async Task SetRequestAutoPropertiesAsync(ProductReceiptRequest entity) |
|
|
|
{ |
|
|
|
var tranType = await TransactionTypeAclService.GetByTransTypeAsync(EnumTransType.ProductReceipt, Enum.Parse<EnumTransSubType>(entity.Type)).ConfigureAwait(false); |
|
|
|
// entites.Add(entity);
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
Check.NotNull(tranType, "事务类型", "事务类型不存在"); |
|
|
|
// return (entites, deleteEntites);
|
|
|
|
//}
|
|
|
|
|
|
|
|
entity.AutoCompleteJob = tranType.AutoCompleteJob; |
|
|
|
entity.AutoSubmit = tranType.AutoSubmitRequest; |
|
|
|
entity.AutoAgree = tranType.AutoAgreeRequest; |
|
|
|
entity.AutoHandle = tranType.AutoHandleRequest; |
|
|
|
entity.DirectCreateNote = tranType.DirectCreateNote; |
|
|
|
} |
|
|
|
//private async Task SetEntityPropertiesAsync(ProductReceiptRequest entity, ProductReceiptRequestImportInput input)
|
|
|
|
//{
|
|
|
|
// entity.Worker = CurrentUser.GetUserName();
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
// await SetRequestAutoPropertiesAsync(entity).ConfigureAwait(false);
|
|
|
|
//}
|
|
|
|
} |
|
|
|