duheng
2024-12-04 ca1ccd0dd9f2d6936368f07d14a2b29b309fd151
BLL/HStation.BLL.Assets.Core/04-bll/17-Flowmeter/02-FlowmeterMain/AssetsFlowmeterMain.cs
@@ -4,18 +4,17 @@
{
    /// <summary>
    /// 流量计
    ///</summary>
    ///</summary>
    public partial class AssetsFlowmeterMain
    {
    {
        private readonly CAL.IAssetsFlowmeterMain _cal = CALCreateHelper.CreateCAL<CAL.IAssetsFlowmeterMain>();
        #region Query
        /// <summary>
        /// 获取所有
        /// </summary>
        public async virtual Task<List<Vmo.AssetsFlowmeterMainVmo>> GetAll()
        public virtual async Task<List<Vmo.AssetsFlowmeterMainVmo>> GetAll()
        {
            var dtoList = await _cal.GetAll();
            return Dto2Vmos(dtoList);
@@ -24,7 +23,7 @@
        /// <summary>
        /// 通过 ID 获取
        /// </summary>
        public async virtual Task<Vmo.AssetsFlowmeterMainVmo> GetByID(long ID)
        public virtual async Task<Vmo.AssetsFlowmeterMainVmo> GetByID(long ID)
        {
            var dto = await _cal.GetByID(ID);
            return Dto2Vmo(dto);
@@ -33,20 +32,32 @@
        /// <summary>
        /// 通过 Ids 获取
        /// </summary>
        public async virtual Task<List<Vmo.AssetsFlowmeterMainVmo>> GetByIds(List<long> Ids)
        public virtual async Task<List<Vmo.AssetsFlowmeterMainVmo>> GetByIds(List<long> Ids)
        {
            var dtoList = await _cal.GetByIds(Ids);
            return Dto2Vmos(dtoList);
        }
        #endregion
        /// <summary>
        /// 通过系列ID查找
        /// </summary>
        /// <param name="ID"></param>
        /// <returns></returns>
        public async Task<List<Vmo.AssetsFlowmeterMainVmo>> GetBySeriesID(long ID)
        {
            var Dto = await _cal.GetBySeriesID(ID);
            var dtoList = Dto2Vmos(Dto);
            return dtoList;
        }
        #endregion Query
        #region Insert
        /// <summary>
        /// 插入一条
        /// </summary>
        public async virtual Task<long> Insert(Vmo.AssetsFlowmeterMainVmo vmo)
        public virtual async Task<long> Insert(Vmo.AssetsFlowmeterMainVmo vmo)
        {
            var dto = Vmo2AddDto(vmo);
            var id = await _cal.Insert(dto);
@@ -56,21 +67,21 @@
        /// <summary>
        /// 插入多条
        /// </summary>
        public async virtual Task<bool> Inserts(List<Vmo.AssetsFlowmeterMainVmo> vmoList)
        public virtual async Task<bool> Inserts(List<Vmo.AssetsFlowmeterMainVmo> vmoList)
        {
            var dtoList = Vmo2AddDtos(vmoList);
            var bol = await _cal.Inserts(dtoList);
            return bol;
        }
        #endregion
        #endregion Insert
        #region Update
        /// <summary>
        /// 更新
        /// </summary>
        public async virtual Task<bool> Update(Vmo.AssetsFlowmeterMainVmo vmo)
        public virtual async Task<bool> Update(Vmo.AssetsFlowmeterMainVmo vmo)
        {
            var dto = Vmo2UpdateDto(vmo);
            var bol = await _cal.Update(dto);
@@ -80,65 +91,64 @@
        /// <summary>
        /// 批量更新
        /// </summary>
        public async virtual Task<bool> Updates(List<Vmo.AssetsFlowmeterMainVmo> vmoList)
        public virtual async Task<bool> Updates(List<Vmo.AssetsFlowmeterMainVmo> vmoList)
        {
            var dtoList = Vmo2UpdateDtos(vmoList);
            var bol = await _cal.Updates(dtoList);
            return bol;
        }
        /// <summary>
        /// 更新排序码
        /// </summary>
        public async virtual Task<bool> UpdateSortCode(long ID, int SortCode)
        public virtual async Task<bool> UpdateSortCode(long ID, int SortCode)
        {
            var bol = await _cal.UpdateSortCode(ID, SortCode);
            return bol;
        }
        }
        /// <summary>
        /// 批量更新排序码
        /// </summary>
        public async virtual Task<bool> UpdateSorter(List<Yw.Vmo.Sorter> Sorters)
        public virtual async Task<bool> UpdateSorter(List<Yw.Vmo.Sorter> Sorters)
        {
            var dtoList = Sorters.ToDtoList();
            var bol = await _cal.UpdateSorter(dtoList);
            return bol;
        }
        /// <summary>
        /// 更新 Flags
        /// </summary>
        public async virtual Task<bool> UpdateFlags(long ID, List<string> Flags)
        public virtual async Task<bool> UpdateFlags(long ID, List<string> Flags)
        {
            return await _cal.UpdateFlags(ID, Flags);
        }
        /// <summary>
        /// 更新 Paras
        /// </summary>
        public async virtual Task<bool> UpdateParas(long ID, Dictionary<string, string> Paras)
        public virtual async Task<bool> UpdateParas(long ID, Dictionary<string, string> Paras)
        {
            return await _cal.UpdateParas(ID, Paras);
        }
        /// <summary>
        /// 更新 TagName
        /// </summary>
        public async virtual Task<bool> UpdateTagName(long ID, string TagName)
        public virtual async Task<bool> UpdateTagName(long ID, string TagName)
        {
            return await _cal.UpdateTagName(ID, TagName);
        }
        #endregion
        #endregion Update
        #region Exist
        /// <summary>
        /// 判断 TagName 是否存在
        /// </summary>
        public async virtual Task<bool> IsExistTagName(string TagName)
        public virtual async Task<bool> IsExistTagName(string TagName)
        {
            return await _cal.IsExistTagName(TagName);
        }
@@ -146,25 +156,24 @@
        /// <summary>
        /// 判断 TagName 是否存在 ExceptID
        /// </summary>
        public async virtual Task<bool> IsExistTagNameExceptID(string TagName, long ExceptID)
        public virtual async Task<bool> IsExistTagNameExceptID(string TagName, long ExceptID)
        {
            return await _cal.IsExistTagNameExceptID(TagName, ExceptID);
        }
        #endregion
        #region Delete
        #endregion Exist
        #region Delete
        /// <summary>
        /// 通过 ID 删除
        /// </summary>
        public async virtual Task<bool> DeleteByID(long ID)
        public virtual async Task<bool> DeleteByID(long ID)
        {
            var bol = await _cal.DeleteByID(ID);
            return bol;
        }
        }
        #endregion
        #endregion Delete
    }
}