From 0404a7124d87ef965a1dcc4c22d9ff10541fa63f Mon Sep 17 00:00:00 2001 From: Shuxia Ning <NingShuxia0927@outlook.com> Date: 星期二, 12 十一月 2024 12:11:58 +0800 Subject: [PATCH] 创建方案 --- BLL/HStation.BLL.Assets.Core/03-localclient/05-PipeManage/PipeLineMain.cs | 21 ++++----------------- 1 files changed, 4 insertions(+), 17 deletions(-) diff --git a/BLL/HStation.BLL.Assets.Core/03-localclient/05-PipeManage/PipeLineMain.cs b/BLL/HStation.BLL.Assets.Core/03-localclient/05-PipeManage/PipeLineMain.cs index 1bf0b98..3075fcb 100644 --- a/BLL/HStation.BLL.Assets.Core/03-localclient/05-PipeManage/PipeLineMain.cs +++ b/BLL/HStation.BLL.Assets.Core/03-localclient/05-PipeManage/PipeLineMain.cs @@ -88,6 +88,10 @@ return await Task.Factory.StartNew(() => { var list = inputList.Select(x => x.Adapt<AddAssetsPipeMainInput, Model.AssetsPipeMain>()).ToList(); + list.ForEach(x => + { + x.SortCode = _service.GetMaxSortCode() + 1 + list.IndexOf(x); + }); var bol = _service.Inserts(list); return bol; }); @@ -124,23 +128,6 @@ var rhs = new Model.AssetsPipeMain(model); input.Adapt(rhs); var bol = _service.Update(rhs); - return bol; - }); - } - - /// <summary> - /// 鏇存柊榛樿鍊肩姸鎬� - /// </summary> - public async Task<bool> UpdateDefaultStatus(long ID, bool status) - { - return await Task.Factory.StartNew(() => - { - var model = _service.GetByID(ID); - if (model == null) - { - throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D001, $"ID:{ID} 鏁版嵁涓嶅瓨鍦�"); - } - var bol = _service.UpdateDefaultStatus(ID, status); return bol; }); } -- Gitblit v1.9.3