Browse Source

1

集成Redis
郑渤旭[Irelia] 2 years ago
parent
commit
5e3b87dee4
  1. 15
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/ProductReceiptNoteEventHandler.cs

15
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/ProductReceiptNoteEventHandler.cs

@ -77,16 +77,6 @@ public class ProductReceiptNoteEventHandler
var transaction = ObjectMapper.Map<ProductReceiptNoteDetail, TransactionEditInput>(detail); var transaction = ObjectMapper.Map<ProductReceiptNoteDetail, TransactionEditInput>(detail);
var itemBasicDto= await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false); var itemBasicDto= await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false);
var locationDtos = await _locationAppService.GetListByTypesAndErpCodeAsync(
new List<EnumLocationType> { EnumLocationType.WIP,EnumLocationType.FG },
detail.LocationErpCode,
detail.LocationCode).ConfigureAwait(false);
if (locationDtos == null||locationDtos.Count<1)
{
throw new UserFriendlyException(
$"Erp储位为【{detail.LocationErpCode}】,库位类型为{EnumLocationType.WIP.GetDisplayName()}的库位不存在。");
}
if (itemBasicDto == null) if (itemBasicDto == null)
{ {
@ -98,11 +88,6 @@ public class ProductReceiptNoteEventHandler
detail.ItemDesc2 = itemBasicDto.Desc2; detail.ItemDesc2 = itemBasicDto.Desc2;
detail.ItemName=itemBasicDto.Name; detail.ItemName=itemBasicDto.Name;
detail.StdPackQty=itemBasicDto.StdPackQty; detail.StdPackQty=itemBasicDto.StdPackQty;
var erpLocationDto = locationDtos.First();
detail.LocationArea = erpLocationDto.Code;
detail.LocationGroup = erpLocationDto.LocationGroupCode;
detail.LocationErpCode= erpLocationDto.Code;
detail.LocationCode= erpLocationDto.Code;
transaction.TransType = TransType; transaction.TransType = TransType;
transaction.TransInOut = TransInOut; transaction.TransInOut = TransInOut;

Loading…
Cancel
Save