From a5770e3760d8e966efcc6076c37fdaec72a04bc0 Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期二, 24 十二月 2024 09:47:53 +0800 Subject: [PATCH] 修改报告字段命名 --- BLL/HStation.BLL.Assets.Core/03-localclient/15-Tank/AssetsTankCoefficient.cs | 71 ++++++++++++++++++++++++----------- 1 files changed, 48 insertions(+), 23 deletions(-) diff --git a/BLL/HStation.BLL.Assets.Core/03-localclient/15-Tank/AssetsTankCoefficient.cs b/BLL/HStation.BLL.Assets.Core/03-localclient/15-Tank/AssetsTankCoefficient.cs index 68087f8..48c516b 100644 --- a/BLL/HStation.BLL.Assets.Core/03-localclient/15-Tank/AssetsTankCoefficient.cs +++ b/BLL/HStation.BLL.Assets.Core/03-localclient/15-Tank/AssetsTankCoefficient.cs @@ -1,26 +1,23 @@ -锘縰sing HStation.Dto; -using Yw.Dto; - -namespace HStation.CAL.LocalClient +锘縩amespace HStation.CAL.LocalClient { /// <summary> - /// 姘存睜绯绘暟 - ///</summary> - public class AssetsTankCoefficient : IAssetsTankCoefficient + /// 鍐峰嵈濉旂郴鏁� + /// </summary> + public class AssetsTankFactor : IAssetsTankFactor { - private readonly Service.AssetsTankCoefficient _service = new(); + private readonly HStation.Service.AssetsTankFactor _service = new(); #region Query /// <summary> /// 鑾峰彇鎵�鏈� /// </summary> - public async Task<List<AssetsTankCoefficientDto>> GetAll() + public async Task<List<AssetsTankFactorDto>> GetAll() { return await Task.Factory.StartNew(() => { var list = _service.GetAll(); - var vm_list = list?.Select(x => new AssetsTankCoefficientDto(x)).ToList(); + var vm_list = list?.Select(x => new AssetsTankFactorDto(x)).ToList(); return vm_list; }); } @@ -28,24 +25,24 @@ /// <summary> /// 閫氳繃 ID 鑾峰彇 /// </summary> - public async Task<AssetsTankCoefficientDto> GetByID(long ID) + public async Task<AssetsTankFactorDto> GetByID(long ID) { return await Task.Factory.StartNew(() => { var model = _service.GetByID(ID); - return model == null ? null : new AssetsTankCoefficientDto(model); + return model == null ? null : new AssetsTankFactorDto(model); }); } /// <summary> /// 閫氳繃 Ids 鑾峰彇 /// </summary> - public async Task<List<AssetsTankCoefficientDto>> GetByIds(List<long> Ids) + public async Task<List<AssetsTankFactorDto>> GetByIds(List<long> Ids) { return await Task.Factory.StartNew(() => { var list = _service.GetByIds(Ids); - var vm_list = list?.Select(x => new AssetsTankCoefficientDto(x)).ToList(); + var vm_list = list?.Select(x => new AssetsTankFactorDto(x)).ToList(); return vm_list; }); } @@ -59,11 +56,12 @@ /// <summary> /// 鎻掑叆涓�鏉� /// </summary> - public async Task<long> Insert(AddAssetsTankCoefficientInput input) + public async Task<long> Insert(AddAssetsTankFactorInput input) { return await Task.Factory.StartNew(() => { - var model = input.Adapt<AddAssetsTankCoefficientInput, Model.AssetsTankCoefficient>(); + var model = input.Adapt<AddAssetsTankFactorInput, Model.AssetsTankFactor>(); + model.SortCode = _service.GetMaxSortCode() + 1; var id = _service.Insert(model); return id; }); @@ -72,7 +70,7 @@ /// <summary> /// 鎵归噺鎻掑叆 /// </summary> - public async Task<bool> Inserts(List<AddAssetsTankCoefficientInput> inputList) + public async Task<bool> Inserts(List<AddAssetsTankFactorInput> inputList) { return await Task.Factory.StartNew(() => { @@ -83,7 +81,7 @@ /// <summary> /// 澶ф壒閲忔彃鍏� /// </summary> - public async Task<bool> BulkInserts(List<AddAssetsTankCoefficientInput> list) + public async Task<bool> BulkInserts(List<AddAssetsTankFactorInput> list) { return await Task.Factory.StartNew(() => { @@ -98,7 +96,7 @@ /// <summary> /// 鏇存柊涓�鏉� /// </summary> - public async Task<bool> Update(UpdateAssetsTankCoefficientInput input) + public async Task<bool> Update(UpdateAssetsTankFactorInput input) { return await Task.Factory.StartNew(() => { @@ -107,7 +105,7 @@ { throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D001, $"ID:{input.ID} 鏁版嵁涓嶅瓨鍦�"); } - var rhs = new Model.AssetsTankCoefficient(model); + var rhs = new Model.AssetsTankFactor(model); input.Adapt(rhs); var bol = _service.Update(rhs); return bol; @@ -117,7 +115,7 @@ /// <summary> /// 鎵归噺鏇存柊 /// </summary> - public async Task<bool> Updates(List<UpdateAssetsTankCoefficientInput> inputList) + public async Task<bool> Updates(List<UpdateAssetsTankFactorInput> inputList) { return await Task.Factory.StartNew(() => { @@ -128,11 +126,36 @@ /// <summary> /// 澶ф壒閲忔洿鏂� /// </summary> - public async Task<bool> BulkUpdates(List<UpdateAssetsTankCoefficientInput> list) + public async Task<bool> BulkUpdates(List<UpdateAssetsTankFactorInput> list) { return await Task.Factory.StartNew(() => { return false; + }); + } + + /// <summary> + /// 鏇存柊鎺掑簭鐮� + /// </summary> + public async Task<bool> UpdateSortCode(long ID, int SortCode) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.UpdateSortCode(ID, SortCode); + return bol; + }); + } + + /// <summary> + /// 鏇存柊鎺掑簭 + /// </summary> + public async Task<bool> UpdateSorter(List<UpdateSortCodeInput> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<Yw.Model.Sorter>()).ToList(); + var bol = _service.UpdateSorter(list); + return bol; }); } @@ -168,8 +191,9 @@ } /// <summary> - /// 鍏ㄩ儴鍒犻櫎 + /// 鍒犻櫎鍏ㄩ儴 /// </summary> + /// <returns></returns> public async Task<bool> DeleteAll() { return await Task.Factory.StartNew(() => @@ -179,5 +203,6 @@ } #endregion Delete + } } \ No newline at end of file -- Gitblit v1.9.3