lixiaojun
2024-10-12 f2333318a31e92f6cbc3a572d8eb9fae9da0f892
BLL/HStation.BLL.Assets.Core/04-bll/01-PumpProdcuct/08-PumpType/PumpType.cs
@@ -8,21 +8,21 @@
    /// <summary>
    ///
    /// </summary>
    public class PumpType
    public class AssetsPumpType
    {
        private readonly HStation.CAL.IPumpType _cal = CALCreateHelper.CreateCAL<HStation.CAL.IPumpType>();
        private readonly HStation.CAL.IAssetsPumpType _cal = CALCreateHelper.CreateCAL<HStation.CAL.IAssetsPumpType>();
        #region Query
        /// <summary>
        ///
        /// </summary>
        public async Task<List<Vmo.PumpTypeVmo>> GetAll()
        public async Task<List<Vmo.AssetsPumpTypeVmo>> GetAll()
        {
            var DtoList = await _cal.GetAll();
            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.PumpTypeDto, Vmo.PumpTypeVmo>()
            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.AssetsPumpTypeDto, Vmo.AssetsPumpTypeVmo>()
 ).CreateMapper();
            var vmoList = mapper.Map<List<Dto.Assets.PumpTypeDto>, List<Vmo.PumpTypeVmo>>(DtoList);
            var vmoList = mapper.Map<List<Dto.Assets.AssetsPumpTypeDto>, List<Vmo.AssetsPumpTypeVmo>>(DtoList);
            return vmoList;
        }
@@ -30,24 +30,24 @@
        /// <summary>
        ///
        /// </summary>
        public async Task<Vmo.PumpTypeVmo> GetByID(long ID)
        public async Task<Vmo.AssetsPumpTypeVmo> GetByID(long ID)
        {
            var DtoList = await _cal.GetByID(ID);
            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.PumpTypeDto, Vmo.PumpTypeVmo>()
            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.AssetsPumpTypeDto, Vmo.AssetsPumpTypeVmo>()
 ).CreateMapper();
            var vmo = mapper.Map<Dto.Assets.PumpTypeDto, Vmo.PumpTypeVmo>(DtoList);
            var vmo = mapper.Map<Dto.Assets.AssetsPumpTypeDto, Vmo.AssetsPumpTypeVmo>(DtoList);
            return vmo;
        }
        /// <summary>
        ///
        /// </summary>
        public async Task<List<Vmo.PumpTypeVmo>> GetByIds(List<long> Ids)
        public async Task<List<Vmo.AssetsPumpTypeVmo>> GetByIds(List<long> Ids)
        {
            var DtoList = await _cal.GetByIds(Ids);
            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.PumpTypeDto, Vmo.PumpTypeVmo>()
            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.AssetsPumpTypeDto, Vmo.AssetsPumpTypeVmo>()
 ).CreateMapper();
            var vmoList = mapper.Map<List<Dto.Assets.PumpTypeDto>, List<Vmo.PumpTypeVmo>>(DtoList);
            var vmoList = mapper.Map<List<Dto.Assets.AssetsPumpTypeDto>, List<Vmo.AssetsPumpTypeVmo>>(DtoList);
            return vmoList;
        }
@@ -58,11 +58,11 @@
        /// <summary>
        ///
        /// </summary>
        public async Task<long> Insert(Vmo.PumpTypeVmo model)
        public async Task<long> Insert(Vmo.AssetsPumpTypeVmo model)
        {
            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.PumpTypeVmo, AddPumpTypeInput>()
            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsPumpTypeVmo, AddAssetsPumpTypeInput>()
).CreateMapper();
            var vmo = mapper.Map<Vmo.PumpTypeVmo, AddPumpTypeInput>(model);
            var vmo = mapper.Map<Vmo.AssetsPumpTypeVmo, AddAssetsPumpTypeInput>(model);
            return await _cal.Insert(vmo);
        }
@@ -70,22 +70,22 @@
        /// <summary>
        ///
        /// </summary>
        public async Task<bool> Inserts(List<Vmo.PumpTypeVmo> list)
        public async Task<bool> Inserts(List<Vmo.AssetsPumpTypeVmo> list)
        {
            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.PumpTypeVmo, AddPumpTypeInput>()
            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsPumpTypeVmo, AddAssetsPumpTypeInput>()
).CreateMapper();
            var vmoList = mapper.Map<List<Vmo.PumpTypeVmo>, List<AddPumpTypeInput>>(list);
            var vmoList = mapper.Map<List<Vmo.AssetsPumpTypeVmo>, List<AddAssetsPumpTypeInput>>(list);
            return await _cal.Inserts(vmoList);
        }
        /// <summary>
        ///
        /// </summary>
        public async Task<bool> BulkInserts(List<Vmo.PumpTypeVmo> list)
        public async Task<bool> BulkInserts(List<Vmo.AssetsPumpTypeVmo> list)
        {
            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.PumpTypeVmo, AddPumpTypeInput>()
            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsPumpTypeVmo, AddAssetsPumpTypeInput>()
).CreateMapper();
            var vmoList = mapper.Map<List<Vmo.PumpTypeVmo>, List<AddPumpTypeInput>>(list);
            var vmoList = mapper.Map<List<Vmo.AssetsPumpTypeVmo>, List<AddAssetsPumpTypeInput>>(list);
            return await _cal.BulkInserts(vmoList);
        }
@@ -97,11 +97,11 @@
        /// <summary>
        ///
        /// </summary>
        public async Task<bool> Update(Vmo.PumpTypeVmo model)
        public async Task<bool> Update(Vmo.AssetsPumpTypeVmo model)
        {
            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.PumpTypeVmo, UpdatePumpTypeInput>()
            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsPumpTypeVmo, UpdateAssetsPumpTypeInput>()
).CreateMapper();
            var vmo = mapper.Map<Vmo.PumpTypeVmo, UpdatePumpTypeInput>(model);
            var vmo = mapper.Map<Vmo.AssetsPumpTypeVmo, UpdateAssetsPumpTypeInput>(model);
            return await _cal.Update(vmo);
        }
@@ -109,11 +109,11 @@
        /// <summary>
        ///
        /// </summary>
        public async Task<bool> Updates(List<Vmo.PumpTypeVmo> list)
        public async Task<bool> Updates(List<Vmo.AssetsPumpTypeVmo> list)
        {
            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.PumpTypeVmo, UpdatePumpTypeInput>()
            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsPumpTypeVmo, UpdateAssetsPumpTypeInput>()
).CreateMapper();
            var vmoList = mapper.Map<List<Vmo.PumpTypeVmo>, List<UpdatePumpTypeInput>>(list);
            var vmoList = mapper.Map<List<Vmo.AssetsPumpTypeVmo>, List<UpdateAssetsPumpTypeInput>>(list);
            return await _cal.Updates(vmoList);
        }
@@ -121,11 +121,11 @@
        /// <summary>
        ///
        /// </summary>
        public async Task<bool> BulkUpdates(List<Vmo.PumpTypeVmo> list)
        public async Task<bool> BulkUpdates(List<Vmo.AssetsPumpTypeVmo> list)
        {
            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.PumpTypeVmo, UpdatePumpTypeInput>()
            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsPumpTypeVmo, UpdateAssetsPumpTypeInput>()
).CreateMapper();
            var vmoList = mapper.Map<List<Vmo.PumpTypeVmo>, List<UpdatePumpTypeInput>>(list);
            var vmoList = mapper.Map<List<Vmo.AssetsPumpTypeVmo>, List<UpdateAssetsPumpTypeInput>>(list);
            return await _cal.BulkUpdates(vmoList);
        }