| | |
| | | } |
| | | |
| | | //插入拓展 |
| | | public async Task<long> InsertEx(AddAssetsPumpPartMainInput part, List<AddAssetsPumpPropContentInput> propcontents, AddAssetsPumpMainAndPartMapDto partmap) |
| | | public async Task<long> InsertEx(AddAssetsPumpPartMainInput part, List<AddAssetsPumpPropContentInput> propcontents, AddAssetsPumpMainAndPartMapInput partmap) |
| | | { |
| | | return await Task.Factory.StartNew(() => |
| | | { |
| | | var partmodel = part.Adapt<AddAssetsPumpPartMainInput, Model.AssetsPumpPartMain>(); |
| | | partmodel.SortCode = _service.GetMaxSortCode() + 1; |
| | | var propcontentlistmodel = propcontents.Select(x => x.Adapt<AddAssetsPumpPropContentInput, Model.AssetsPumpPropContent>()).ToList(); |
| | | var partmapmodel = partmap.Adapt<AddAssetsPumpMainAndPartMapDto, Model.AssetsPumpMainAndPartMap>(); |
| | | var partmapmodel = partmap.Adapt<AddAssetsPumpMainAndPartMapInput, Model.AssetsPumpMainAndPartMap>(); |
| | | var id = _service.InsertEX(partmodel, propcontentlistmodel, partmapmodel); |
| | | return id; |
| | | }); |
| | |
| | | } |
| | | return true; |
| | | }); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 通过 Ids 删除 |