|
|
@ -165,6 +165,20 @@ public class InjectioModelPlanAppService : |
|
|
|
[HttpPost("get-bom-by-detail")] |
|
|
|
public virtual async Task<List<BomComponentDTO>> GetBomByPartCode(InjectioModelPlanDetailInput p_input) |
|
|
|
{ |
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(p_input.Number)) |
|
|
|
{ |
|
|
|
new UserFriendlyException("输入值单号为空!"); |
|
|
|
} |
|
|
|
if (string.IsNullOrEmpty(p_input.ItemCode)) |
|
|
|
{ |
|
|
|
new UserFriendlyException("输入值零件号为空!"); |
|
|
|
} |
|
|
|
if (p_input.PlanQty>0) |
|
|
|
{ |
|
|
|
new UserFriendlyException("计划数量必须大于0!"); |
|
|
|
} |
|
|
|
|
|
|
|
var first = _repository.WithDetails().FirstOrDefault(p =>p.Number==p_input.Number ); |
|
|
|
List<BomComponentDTO> inputs = new List<BomComponentDTO>(); |
|
|
|
if (first != null) |
|
|
|