From 146ca8c7eefe74d3b73c00a73e99e94e903be401 Mon Sep 17 00:00:00 2001 From: lixiaojun <1287241240@qq.com> Date: 星期四, 06 二月 2025 15:04:21 +0800 Subject: [PATCH] 增加工况管理功能和计算结果自由压力与绝对压力切换 --- BLL/HStation.BLL.Assets.Core/04-bll/02-Valve/03-ValveFactor/AssetsValveFactor.cs | 118 ++++++++++++++++++---------------------------------------- 1 files changed, 37 insertions(+), 81 deletions(-) diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/02-Valve/03-ValveFactor/AssetsValveFactor.cs b/BLL/HStation.BLL.Assets.Core/04-bll/02-Valve/03-ValveFactor/AssetsValveFactor.cs index a777fc5..0d7e15e 100644 --- a/BLL/HStation.BLL.Assets.Core/04-bll/02-Valve/03-ValveFactor/AssetsValveFactor.cs +++ b/BLL/HStation.BLL.Assets.Core/04-bll/02-Valve/03-ValveFactor/AssetsValveFactor.cs @@ -1,9 +1,4 @@ -锘縰sing AutoMapper; -using HStation.Dto; -using System.Collections.Generic; -using Yw; -using Yw.BLL; -using Yw.Dto; +锘縰sing Yw.BLL; namespace HStation.BLL { @@ -17,40 +12,30 @@ #region Query /// <summary> - /// + /// 鑾峰彇鎵�鏈� /// </summary> - public async Task<List<Vmo.AssetsValveFactorVmo>> GetAll() + public virtual async Task<List<AssetsValveFactorVmo>> GetAll() { - var DtoList = await _cal.GetAll(); - var vmoList = Dto2Vmos(DtoList); - return vmoList; + var dtoList = await _cal.GetAll(); + return Dto2Vmos(dtoList); } /// <summary> - /// + /// 閫氳繃 ID 鑾峰彇 /// </summary> - public async Task<Vmo.AssetsValveFactorVmo> GetByID(long ID) + public virtual async Task<AssetsValveFactorVmo> GetByID(long ID) { - var Dto = await _cal.GetByID(ID); - var vmo = Dto2Vmo(Dto); - return vmo; + var dto = await _cal.GetByID(ID); + return Dto2Vmo(dto); } /// <summary> - /// + /// 閫氳繃 Ids 鑾峰彇 /// </summary> - public async Task<List<Vmo.AssetsValveFactorVmo>> GetByIds(List<long> Ids) + public virtual async Task<List<AssetsValveFactorVmo>> GetByIds(List<long> Ids) { - var DtoList = await _cal.GetByIds(Ids); - var vmoList = Dto2Vmos(DtoList); - return vmoList; - } - - public async Task<List<Vmo.AssetsValveFactorVmo>> GetByMainID(long ID) - { - var DtoList = await _cal.GetByMainID(ID); - var vmoList = Dto2Vmos(DtoList); - return vmoList; + var dtoList = await _cal.GetByIds(Ids); + return Dto2Vmos(dtoList); } #endregion Query @@ -58,30 +43,23 @@ #region Insert /// <summary> - /// + /// 鎻掑叆涓�鏉� /// </summary> - public async Task<long> Insert(Vmo.AssetsValveFactorVmo model) + public virtual async Task<long> Insert(AssetsValveFactorVmo vmo) { - var vmo = Vmo2AddDto(model); - return await _cal.Insert(vmo); + var dto = Vmo2AddDto(vmo); + var id = await _cal.Insert(dto); + return id; } /// <summary> - /// + /// 鎻掑叆澶氭潯 /// </summary> - public async Task<bool> Inserts(List<Vmo.AssetsValveFactorVmo> list) + public virtual async Task<bool> Inserts(List<AssetsValveFactorVmo> vmoList) { - var vmoList = Vmo2AddDtos(list); - return await _cal.Inserts(vmoList); - } - - /// <summary> - /// - /// </summary> - public async Task<bool> BulkInserts(List<Vmo.AssetsValveFactorVmo> list) - { - var VmoList = Vmo2AddDtos(list); - return await _cal.BulkInserts(VmoList); + var dtoList = Vmo2AddDtos(vmoList); + var bol = await _cal.Inserts(dtoList); + return bol; } #endregion Insert @@ -89,30 +67,23 @@ #region Update /// <summary> - /// + /// 鏇存柊 /// </summary> - public async Task<bool> Update(Vmo.AssetsValveFactorVmo model) + public virtual async Task<bool> Update(AssetsValveFactorVmo vmo) { - var Vmo = Vmo2UpdateDto(model); - return await _cal.Update(Vmo); + var dto = Vmo2UpdateDto(vmo); + var bol = await _cal.Update(dto); + return bol; } /// <summary> - /// + /// 鎵归噺鏇存柊 /// </summary> - public async Task<bool> Updates(List<Vmo.AssetsValveFactorVmo> list) + public virtual async Task<bool> Updates(List<AssetsValveFactorVmo> vmoList) { - var VmoList = Vmo2UpdateDtos(list); - return await _cal.Updates(VmoList); - } - - /// <summary> - /// - /// </summary> - public async Task<bool> BulkUpdates(List<Vmo.AssetsValveFactorVmo> list) - { - var VmoList = Vmo2UpdateDtos(list); - return await _cal.BulkUpdates(VmoList); + var dtoList = Vmo2UpdateDtos(vmoList); + var bol = await _cal.Updates(dtoList); + return bol; } /// <summary> @@ -139,27 +110,12 @@ #region Delete /// <summary> - /// + /// 閫氳繃 ID 鍒犻櫎 /// </summary> - public async Task<bool> DeleteByID(long ID) + public virtual async Task<bool> DeleteByID(long ID) { - return await _cal.DeleteByID(ID); - } - - /// <summary> - /// - /// </summary> - public async Task<bool> DeleteByIds(List<long> Ids) - { - return await _cal.DeleteByIds(Ids); - } - - /// <summary> - /// - /// </summary> - public async Task<bool> DeleteAll() - { - return await _cal.DeleteAll(); + var bol = await _cal.DeleteByID(ID); + return bol; } #endregion Delete -- Gitblit v1.9.3