|
|
@ -80,20 +80,13 @@ public class InjectioModelPlanAppService : |
|
|
|
//input.Details.AddRange(inputDetails);
|
|
|
|
|
|
|
|
var entity = ObjectMapper.Map<InjectioModelPlanEditInput, InjectioModelPlan>(input); |
|
|
|
|
|
|
|
foreach (var itm in input.Details) |
|
|
|
{ |
|
|
|
InjectioModelPlanDetail plan= new InjectioModelPlanDetail(); |
|
|
|
plan.InjectFrom(itm); |
|
|
|
entity.Details.Add(plan); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await _InjectioModelPlanManager.CreateAsync(entity).ConfigureAwait(false); |
|
|
|
|
|
|
|
var dto = ObjectMapper.Map<InjectioModelPlan, InjectioModelPlanDTO>(entity); |
|
|
|
return dto; |
|
|
|
} |
|
|
@ -160,13 +153,7 @@ public class InjectioModelPlanAppService : |
|
|
|
{ |
|
|
|
throw new Exception("Bom中没有查到零件BOM结构"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ExportImportService.Export(bomlist); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
[HttpPost("get-bom-by-detail")] |
|
|
|