|
@ -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; |
|
|