|
@ -95,10 +95,10 @@ public class PositionCodeAppService |
|
|
{ |
|
|
{ |
|
|
throw new UserFriendlyException($"{id} 未找到位置码信息"); |
|
|
throw new UserFriendlyException($"{id} 未找到位置码信息"); |
|
|
} |
|
|
} |
|
|
var itemEntity = await _repository.FirstOrDefaultAsync(p => p.PartCode == input.PartCode && p.Code!=input.Code).ConfigureAwait(false); |
|
|
var itemEntity = await _repository.FirstOrDefaultAsync(p => p.PartCode == input.PartCode && p.Code==input.Code).ConfigureAwait(false); |
|
|
if (itemEntity != null) |
|
|
if (itemEntity != null) |
|
|
{ |
|
|
{ |
|
|
throw new UserFriendlyException($"{input.PartCode} 物品已存在"); |
|
|
throw new UserFriendlyException($"位置码{input.Code}已存在物品{input.PartCode}的信息 "); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -142,6 +142,7 @@ public class PositionCodeAppService |
|
|
var itemBasic = await ItemBasicAppService.GetByCodeAsync(positionCode.PartCode).ConfigureAwait(false); |
|
|
var itemBasic = await ItemBasicAppService.GetByCodeAsync(positionCode.PartCode).ConfigureAwait(false); |
|
|
positionCode.PartName = itemBasic.Name; |
|
|
positionCode.PartName = itemBasic.Name; |
|
|
positionCode.PartDesc = itemBasic.Desc1; |
|
|
positionCode.PartDesc = itemBasic.Desc1; |
|
|
|
|
|
if (string.IsNullOrEmpty(positionCode.BasicUom)) positionCode.BasicUom = itemBasic.BasicUom; |
|
|
switch (positionCode.Type) |
|
|
switch (positionCode.Type) |
|
|
{ |
|
|
{ |
|
|
case EnumPositionCodeType.InjectionIssue: |
|
|
case EnumPositionCodeType.InjectionIssue: |
|
|