From 89b928115c2309c6548b096b4d71c0dedbcaa2db Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期五, 17 一月 2025 16:02:55 +0800 Subject: [PATCH] 远程报错修改 --- Application/HStation.Application.Assets.Core/01-Pump/PumpPart_Controller.cs | 40 ++++++++++++++++++++-------------------- 1 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Application/HStation.Application.Assets.Core/01-Pump/PumpPart_Controller.cs b/Application/HStation.Application.Assets.Core/01-Pump/PumpPart_Controller.cs index bd6cbac..95d2f82 100644 --- a/Application/HStation.Application.Assets.Core/01-Pump/PumpPart_Controller.cs +++ b/Application/HStation.Application.Assets.Core/01-Pump/PumpPart_Controller.cs @@ -1,4 +1,4 @@ -锘縰sing HStation.Dto.Assets; +锘縰sing Mapster; namespace HStation.Application { @@ -97,12 +97,12 @@ //鎻掑叆鎷撳睍 [Route("InsertEx@V1.0")] [HttpPost] - public long InsertEx(AddAssetsPumpPartMainInput part, List<AddAssetsPumpPropContentInput> propcontents, AddAssetsPumpMainAndPartMapInput partmap) + public long InsertEx(AddPumpPartMainExInput input) { - var partmodel = part.Adapt<AddAssetsPumpPartMainInput, Model.AssetsPumpPartMain>(); + var partmodel = input.PartMain.Adapt<AddAssetsPumpPartMainInput, Model.AssetsPumpPartMain>(); partmodel.SortCode = _service.GetMaxSortCode() + 1; - var propcontentlistmodel = propcontents.Select(x => x.Adapt<AddAssetsPumpPropContentInput, Model.AssetsPumpPropContent>()).ToList(); - var partmapmodel = partmap.Adapt<AddAssetsPumpMainAndPartMapInput, Model.AssetsPumpMainAndPartMapping>(); + var propcontentlistmodel = input.PropContent.Select(x => x.Adapt<AddAssetsPumpPropContentInput, Model.AssetsPumpPropContent>()).ToList(); + var partmapmodel = input.PartMapping.Adapt<AddAssetsPumpMainAndPartMapInput, Model.AssetsPumpMainAndPartMapping>(); var id = _service.InsertEX(partmodel, propcontentlistmodel, partmapmodel); return id; } @@ -148,11 +148,11 @@ //缂栬緫鎷撳睍 [Route("UpdateEx@V1.0")] - [HttpPut] - public bool UpdateEx(UpdateAssetsPumpPartMainInput pumppart, List<UpdateAssetsPumpPropContentInput> updateAssetsPumpPropContentDtos) + [HttpPost] + public bool UpdateEx(UpdatePumpPartMainExInput input) { - var partmodel = pumppart.Adapt<UpdateAssetsPumpPartMainInput, Model.AssetsPumpPartMain>(); - var propcontentlistmodel = updateAssetsPumpPropContentDtos.Select(x => x.Adapt<UpdateAssetsPumpPropContentInput, Model.AssetsPumpPropContent>()).ToList(); + var partmodel = input.PartMain.Adapt<UpdateAssetsPumpPartMainInput, Model.AssetsPumpPartMain>(); + var propcontentlistmodel = input.PropContent.Select(x => x.Adapt<UpdateAssetsPumpPropContentInput, Model.AssetsPumpPropContent>()).ToList(); return _service.UpdateEX(partmodel, propcontentlistmodel); } @@ -202,17 +202,17 @@ return true; } - /* [Route("DeleteEx@V1.0")] - [HttpDelete] - public bool DeleteEx(long ID) - { - var bol = _service.DeleteExByID(ID); - if (!bol) - { - throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D999, "鍒犻櫎澶辫触"); - } - return true; - }*/ + [Route("DeleteEx@V1.0")] + [HttpDelete] + public bool DeleteEx(long ID) + { + var bol = _service.DeleteExByID(ID); + if (!bol) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D999, "鍒犻櫎澶辫触"); + } + return true; + } #endregion Delete } -- Gitblit v1.9.3