郑勃旭 2 years ago
parent
commit
316d4847bf
  1. 7
      be/Modules/Label/src/Win_in.Sfs.Label.Application/InventoryLabels/InventoryLabelAppService.cs
  2. 37
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ItemTransformRequests/ItemTransformRequestAppService.cs
  3. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/MaterialRequestAppService.cs

7
be/Modules/Label/src/Win_in.Sfs.Label.Application/InventoryLabels/InventoryLabelAppService.cs

@ -112,7 +112,6 @@ public class InventoryLabelAppService
var createInput = ObjectMapper.Map<InventoryLabelWithoutCodeCreateInput, InventoryLabelEditInput>(input);
createInput.Code = numbers[i];
var dto = await base.CreateAsync(createInput).ConfigureAwait(false);
dto.FullBarcodeString = dto.Code;
dtos.Add(dto);
}
return dtos;
@ -130,6 +129,12 @@ public class InventoryLabelAppService
var createInput = ObjectMapper.Map<InventoryLabelWithoutCodeCreateInput, InventoryLabelEditInput>(input);
createInput.Code = numbers[i];
var dto = await base.CreateAsync(createInput).ConfigureAwait(false);
dto.SupplierCode = createInput.SupplierCode;
dto.PoNumber = createInput.PoNumber;
dto.Remark = createInput.Remark;
dto.FullBarcodeString = dto.Code;
dtos.Add(dto);
}
return dtos;

37
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ItemTransformRequests/ItemTransformRequestAppService.cs

@ -6,9 +6,11 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Volo.Abp;
using Win_in.Sfs.Label.Application.Contracts;
using Win_in.Sfs.Shared.Application.Contracts;
using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Wms.Store.Application.Contracts;
using Win_in.Sfs.Wms.Store.Domain;
@ -57,6 +59,41 @@ public class ItemTransformRequestAppService :
return dto;
}
protected override async Task<Dictionary<ItemTransformRequest, EntityState>> ImportProcessingEntityAsync(Dictionary<ItemTransformRequest, EntityState> dictionary)
{
var addList = dictionary.Where(p => p.Value == EntityState.Added).Select(p => p.Key);
foreach (var itemTransformRequest in addList)
{
itemTransformRequest.Worker = CurrentUser.GetUserName();
itemTransformRequest.CreatorId = CurrentUser.Id;
foreach (var detail in itemTransformRequest.Details)
{
var fromLocationDto= await LocationAclService.GetByCodeAsync(detail.FromLocationCode).ConfigureAwait(false);
var toLocationDto= await LocationAclService.GetByCodeAsync(detail.ToLocationCode).ConfigureAwait(false);
var itemBasicDto=await ItemBasicAclService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false);
detail.FromLocationArea = fromLocationDto.AreaCode;
detail.FromLocationErpCode = fromLocationDto.ErpLocationCode;
detail.FromLocationGroup = fromLocationDto.LocationGroupCode;
detail.FromWarehouseCode = fromLocationDto.WarehouseCode;
detail.ToLocationArea = toLocationDto.AreaCode;
detail.ToLocationErpCode = toLocationDto.ErpLocationCode;
detail.ToLocationGroup = toLocationDto.LocationGroupCode;
detail.ToWarehouseCode = toLocationDto.WarehouseCode;
detail.ItemDesc1 = itemBasicDto.Desc1;
detail.ItemDesc2= itemBasicDto.Desc2;
detail.ItemName= itemBasicDto.Name;
detail.Uom = itemBasicDto.BasicUom;
}
}
return dictionary;
}
protected virtual async Task ImportDataAsync(List<ItemTransformRequest> entites, List<ItemTransformRequest> deleteEntities)
{
await _manager.ImportDataAsync(entites, deleteEntities).ConfigureAwait(false);

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/MaterialRequestAppService.cs

@ -95,7 +95,7 @@ public class MaterialRequestAppService : SfsStoreRequestAppServiceBase<MaterialR
}
}
return await base.ImportProcessingEntityAsync(dictionary).ConfigureAwait(false);
return dictionary;
}
public override async Task<MaterialRequestDTO> HandleAsync(Guid id)

Loading…
Cancel
Save