|
|
@ -156,6 +156,13 @@ public class InjectioModelPlanAppService : |
|
|
|
} |
|
|
|
|
|
|
|
var bomlist = await _bomAppService.GetSubcomponentsRecursiveList(inputs, EnumBomSelectedType.Last).ConfigureAwait(false); |
|
|
|
if(bomlist.Count==0) |
|
|
|
{ |
|
|
|
throw new Exception("Bom中没有查到零件BOM结构"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ExportImportService.Export(bomlist); |
|
|
|
|
|
|
|
|
|
|
@ -168,15 +175,15 @@ public class InjectioModelPlanAppService : |
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(p_input.Number)) |
|
|
|
{ |
|
|
|
new UserFriendlyException("输入值单号为空!"); |
|
|
|
throw new UserFriendlyException("输入值单号为空!"); |
|
|
|
} |
|
|
|
if (string.IsNullOrEmpty(p_input.ItemCode)) |
|
|
|
{ |
|
|
|
new UserFriendlyException("输入值零件号为空!"); |
|
|
|
throw new UserFriendlyException("输入值零件号为空!"); |
|
|
|
} |
|
|
|
if (p_input.PlanQty>0) |
|
|
|
{ |
|
|
|
new UserFriendlyException("计划数量必须大于0!"); |
|
|
|
throw new UserFriendlyException("计划数量必须大于0!"); |
|
|
|
} |
|
|
|
|
|
|
|
var first = _repository.WithDetails().FirstOrDefault(p =>p.Number==p_input.Number ); |
|
|
|