lixiaojun
2024-10-12 f2333318a31e92f6cbc3a572d8eb9fae9da0f892
BLL/HStation.BLL.Assets.Core/03-localclient/04-PipeLineRoughnessCoefficient/PipeLineRoughnessCoefficient.cs
@@ -15,12 +15,12 @@
        /// <summary>
        /// 获取所有
        /// </summary>
        public async Task<List<PipeRoughnessCoefficientDto>> GetAll()
        public async Task<List<AssetsPipeRoughnessCoefficientDto>> GetAll()
        {
            return await Task.Factory.StartNew(() =>
            {
                var list = _service.GetAll();
                var vm_list = list?.Select(x => new PipeRoughnessCoefficientDto(x)).ToList();
                var vm_list = list?.Select(x => new AssetsPipeRoughnessCoefficientDto(x)).ToList();
                return vm_list;
            });
        }
@@ -28,24 +28,24 @@
        /// <summary>
        /// 通过 ID 获取
        /// </summary>
        public async Task<PipeRoughnessCoefficientDto> GetByID(long ID)
        public async Task<AssetsPipeRoughnessCoefficientDto> GetByID(long ID)
        {
            return await Task.Factory.StartNew(() =>
            {
                var model = _service.GetByID(ID);
                return model == null ? null : new PipeRoughnessCoefficientDto(model);
                return model == null ? null : new AssetsPipeRoughnessCoefficientDto(model);
            });
        }
        /// <summary>
        /// 通过 管道ID 获取
        /// </summary>
        public async Task<List<PipeRoughnessCoefficientDto>> GetByPipeID(long ID)
        public async Task<List<AssetsPipeRoughnessCoefficientDto>> GetByPipeID(long ID)
        {
            return await Task.Factory.StartNew(() =>
            {
                var list = _service.GetByPipeID(ID);
                var vm_list = list?.Select(x => new PipeRoughnessCoefficientDto(x)).ToList();
                var vm_list = list?.Select(x => new AssetsPipeRoughnessCoefficientDto(x)).ToList();
                return vm_list;
            });
        }
@@ -53,12 +53,12 @@
        /// <summary>
        /// 通过 Ids 获取
        /// </summary>
        public async Task<List<PipeRoughnessCoefficientDto>> GetByIds(List<long> Ids)
        public async Task<List<AssetsPipeRoughnessCoefficientDto>> GetByIds(List<long> Ids)
        {
            return await Task.Factory.StartNew(() =>
            {
                var list = _service.GetByIds(Ids);
                var vm_list = list?.Select(x => new PipeRoughnessCoefficientDto(x)).ToList();
                var vm_list = list?.Select(x => new AssetsPipeRoughnessCoefficientDto(x)).ToList();
                return vm_list;
            });
        }
@@ -70,11 +70,11 @@
        /// <summary>
        /// 插入一条
        /// </summary>
        public async Task<long> Insert(AddPipeRoughnessCoefficientInput input)
        public async Task<long> Insert(AddAssetsPipeRoughnessCoefficientInput input)
        {
            return await Task.Factory.StartNew(() =>
            {
                var model = input.Adapt<AddPipeRoughnessCoefficientInput, Model.PipeRoughnessCoefficient>();
                var model = input.Adapt<AddAssetsPipeRoughnessCoefficientInput, Model.AssetsPipeRoughnessCoefficient>();
                var id = _service.Insert(model);
                return id;
            });
@@ -83,11 +83,11 @@
        /// <summary>
        /// 批量插入
        /// </summary>
        public async Task<bool> Inserts(List<AddPipeRoughnessCoefficientInput> inputList)
        public async Task<bool> Inserts(List<AddAssetsPipeRoughnessCoefficientInput> inputList)
        {
            return await Task.Factory.StartNew(() =>
            {
                var list = inputList.Select(x => x.Adapt<AddPipeRoughnessCoefficientInput, Model.PipeRoughnessCoefficient>()).ToList();
                var list = inputList.Select(x => x.Adapt<AddAssetsPipeRoughnessCoefficientInput, Model.AssetsPipeRoughnessCoefficient>()).ToList();
                var bol = _service.Inserts(list);
                return bol;
            });
@@ -96,7 +96,7 @@
        /// <summary>
        /// 大批量插入
        /// </summary>
        public async Task<bool> BulkInserts(List<AddPipeRoughnessCoefficientInput> list)
        public async Task<bool> BulkInserts(List<AddAssetsPipeRoughnessCoefficientInput> list)
        {
            return await Task.Factory.StartNew(() =>
            {
@@ -111,7 +111,7 @@
        /// <summary>
        /// 更新一条
        /// </summary>
        public async Task<bool> Update(UpdatePipeRoughnessCoefficientInput input)
        public async Task<bool> Update(UpdateAssetsPipeRoughnessCoefficientInput input)
        {
            return await Task.Factory.StartNew(() =>
            {
@@ -121,7 +121,7 @@
                    throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D001, $"ID:{input.ID} 数据不存在");
                }
                var rhs = new Model.PipeRoughnessCoefficient(model);
                var rhs = new Model.AssetsPipeRoughnessCoefficient(model);
                input.Adapt(rhs);
                var bol = _service.Update(rhs);
                return bol;
@@ -131,7 +131,7 @@
        /// <summary>
        /// 批量更新
        /// </summary>
        public async Task<bool> Updates(List<UpdatePipeRoughnessCoefficientInput> inputList)
        public async Task<bool> Updates(List<UpdateAssetsPipeRoughnessCoefficientInput> inputList)
        {
            return await Task.Factory.StartNew(() =>
            {
@@ -139,7 +139,7 @@
                {
                    return false;
                }
                var list = inputList.Select(x => x.Adapt<UpdatePipeRoughnessCoefficientInput, Model.PipeRoughnessCoefficient>()).ToList();
                var list = inputList.Select(x => x.Adapt<UpdateAssetsPipeRoughnessCoefficientInput, Model.AssetsPipeRoughnessCoefficient>()).ToList();
                var bol = _service.Updates(list);
                return bol;
            });
@@ -148,7 +148,7 @@
        /// <summary>
        /// 大批量更新
        /// </summary>
        public async Task<bool> BulkUpdates(List<UpdatePipeRoughnessCoefficientInput> list)
        public async Task<bool> BulkUpdates(List<UpdateAssetsPipeRoughnessCoefficientInput> list)
        {
            return await Task.Factory.StartNew(() =>
            {