| | |
| | | { |
| | | return await Task.Factory.StartNew(() => |
| | | { |
| | | var model = input.Adapt<AddAssetsPipeRoughnessCoefficientInput, Model.AssetsPipeRoughnessCoefficient>(); |
| | | var model = input.Adapt<AddAssetsPipeRoughnessCoefficientInput, Model.AssetsPipeLineCoefficient>(); |
| | | var id = _service.Insert(model); |
| | | return id; |
| | | }); |
| | |
| | | { |
| | | return await Task.Factory.StartNew(() => |
| | | { |
| | | var list = inputList.Select(x => x.Adapt<AddAssetsPipeRoughnessCoefficientInput, Model.AssetsPipeRoughnessCoefficient>()).ToList(); |
| | | var list = inputList.Select(x => x.Adapt<AddAssetsPipeRoughnessCoefficientInput, Model.AssetsPipeLineCoefficient>()).ToList(); |
| | | var bol = _service.Inserts(list); |
| | | return bol; |
| | | }); |
| | |
| | | throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D001, $"ID:{input.ID} 数据不存在"); |
| | | } |
| | | |
| | | var rhs = new Model.AssetsPipeRoughnessCoefficient(model); |
| | | var rhs = new Model.AssetsPipeLineCoefficient(model); |
| | | input.Adapt(rhs); |
| | | var bol = _service.Update(rhs); |
| | | return bol; |
| | |
| | | { |
| | | return false; |
| | | } |
| | | var list = inputList.Select(x => x.Adapt<UpdateAssetsPipeRoughnessCoefficientInput, Model.AssetsPipeRoughnessCoefficient>()).ToList(); |
| | | var list = inputList.Select(x => x.Adapt<UpdateAssetsPipeRoughnessCoefficientInput, Model.AssetsPipeLineCoefficient>()).ToList(); |
| | | var bol = _service.Updates(list); |
| | | return bol; |
| | | }); |