| | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public class PumpSeries |
| | | public class AssetsPumpSeries |
| | | { |
| | | private readonly HStation.CAL.IPumpSeries _cal = CALCreateHelper.CreateCAL<HStation.CAL.IPumpSeries>(); |
| | | private readonly HStation.CAL.IAssetsPumpSeries _cal = CALCreateHelper.CreateCAL<HStation.CAL.IAssetsPumpSeries>(); |
| | | |
| | | #region Query |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public async Task<List<Vmo.PumpSeriesVmo>> GetAll() |
| | | public async Task<List<Vmo.AssetsPumpSeriesVmo>> GetAll() |
| | | { |
| | | var DtoList = await _cal.GetAll(); |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.PumpSeriesDto, Vmo.PumpSeriesVmo>() |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.AssetsPumpSeriesDto, Vmo.AssetsPumpSeriesVmo>() |
| | | ).CreateMapper(); |
| | | var vmoList = mapper.Map<List<Dto.Assets.PumpSeriesDto>, List<Vmo.PumpSeriesVmo>>(DtoList); |
| | | var vmoList = mapper.Map<List<Dto.Assets.AssetsPumpSeriesDto>, List<Vmo.AssetsPumpSeriesVmo>>(DtoList); |
| | | return vmoList; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public async Task<Vmo.PumpSeriesVmo> GetByID(long ID) |
| | | public async Task<Vmo.AssetsPumpSeriesVmo> GetByID(long ID) |
| | | { |
| | | var DtoList = await _cal.GetByID(ID); |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.PumpSeriesDto, Vmo.PumpSeriesVmo>() |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.AssetsPumpSeriesDto, Vmo.AssetsPumpSeriesVmo>() |
| | | ).CreateMapper(); |
| | | var vmo = mapper.Map<Dto.Assets.PumpSeriesDto, Vmo.PumpSeriesVmo>(DtoList); |
| | | var vmo = mapper.Map<Dto.Assets.AssetsPumpSeriesDto, Vmo.AssetsPumpSeriesVmo>(DtoList); |
| | | return vmo; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public async Task<List<Vmo.PumpSeriesVmo>> GetByIds(List<long> Ids) |
| | | public async Task<List<Vmo.AssetsPumpSeriesVmo>> GetByIds(List<long> Ids) |
| | | { |
| | | var DtoList = await _cal.GetByIds(Ids); |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.PumpSeriesDto, Vmo.PumpSeriesVmo>() |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.AssetsPumpSeriesDto, Vmo.AssetsPumpSeriesVmo>() |
| | | ).CreateMapper(); |
| | | var vmoList = mapper.Map<List<Dto.Assets.PumpSeriesDto>, List<Vmo.PumpSeriesVmo>>(DtoList); |
| | | var vmoList = mapper.Map<List<Dto.Assets.AssetsPumpSeriesDto>, List<Vmo.AssetsPumpSeriesVmo>>(DtoList); |
| | | return vmoList; |
| | | } |
| | | |
| | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public async Task<long> Insert(Vmo.PumpSeriesVmo model) |
| | | public async Task<long> Insert(Vmo.AssetsPumpSeriesVmo model) |
| | | { |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.PumpSeriesVmo, Dto.Assets.AddPumpSeriesInput>() |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsPumpSeriesVmo, Dto.Assets.AddAssetsPumpSeriesInput>() |
| | | ).CreateMapper(); |
| | | var vmoList = mapper.Map<Vmo.PumpSeriesVmo, AddPumpSeriesInput>(model); |
| | | var vmoList = mapper.Map<Vmo.AssetsPumpSeriesVmo, AddAssetsPumpSeriesInput>(model); |
| | | return await _cal.Insert(vmoList); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public async Task<bool> Inserts(List<Vmo.PumpSeriesVmo> list) |
| | | public async Task<bool> Inserts(List<Vmo.AssetsPumpSeriesVmo> list) |
| | | { |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.PumpSeriesVmo, Dto.Assets.AddPumpSeriesInput>() |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsPumpSeriesVmo, Dto.Assets.AddAssetsPumpSeriesInput>() |
| | | ).CreateMapper(); |
| | | var vmoList = mapper.Map<List<Vmo.PumpSeriesVmo>, List<AddPumpSeriesInput>>(list); |
| | | var vmoList = mapper.Map<List<Vmo.AssetsPumpSeriesVmo>, List<AddAssetsPumpSeriesInput>>(list); |
| | | return await _cal.Inserts(vmoList); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public async Task<bool> BulkInserts(List<Vmo.PumpSeriesVmo> list) |
| | | public async Task<bool> BulkInserts(List<Vmo.AssetsPumpSeriesVmo> list) |
| | | { |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.PumpSeriesVmo, Dto.Assets.AddPumpSeriesInput>() |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsPumpSeriesVmo, Dto.Assets.AddAssetsPumpSeriesInput>() |
| | | ).CreateMapper(); |
| | | var vmoList = mapper.Map<List<Vmo.PumpSeriesVmo>, List<AddPumpSeriesInput>>(list); |
| | | var vmoList = mapper.Map<List<Vmo.AssetsPumpSeriesVmo>, List<AddAssetsPumpSeriesInput>>(list); |
| | | |
| | | return await _cal.BulkInserts(vmoList); |
| | | } |
| | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public async Task<bool> Update(Vmo.PumpSeriesVmo model) |
| | | public async Task<bool> Update(Vmo.AssetsPumpSeriesVmo model) |
| | | { |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.PumpSeriesVmo, Dto.Assets.UpdatePumpSeriesInput>() |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsPumpSeriesVmo, Dto.Assets.UpdateAssetsPumpSeriesInput>() |
| | | ).CreateMapper(); |
| | | var vmo = mapper.Map<Vmo.PumpSeriesVmo, UpdatePumpSeriesInput>(model); |
| | | var vmo = mapper.Map<Vmo.AssetsPumpSeriesVmo, UpdateAssetsPumpSeriesInput>(model); |
| | | return await _cal.Update(vmo); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public async Task<bool> Updates(List<Vmo.PumpSeriesVmo> list) |
| | | public async Task<bool> Updates(List<Vmo.AssetsPumpSeriesVmo> list) |
| | | { |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.PumpSeriesVmo, Dto.Assets.UpdatePumpSeriesInput>() |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsPumpSeriesVmo, Dto.Assets.UpdateAssetsPumpSeriesInput>() |
| | | ).CreateMapper(); |
| | | var vmoList = mapper.Map<List<Vmo.PumpSeriesVmo>, List<UpdatePumpSeriesInput>>(list); |
| | | var vmoList = mapper.Map<List<Vmo.AssetsPumpSeriesVmo>, List<UpdateAssetsPumpSeriesInput>>(list); |
| | | |
| | | return await _cal.Updates(vmoList); |
| | | } |
| | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public async Task<bool> BulkUpdates(List<Vmo.PumpSeriesVmo> list) |
| | | public async Task<bool> BulkUpdates(List<Vmo.AssetsPumpSeriesVmo> list) |
| | | { |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.PumpSeriesVmo, Dto.Assets.UpdatePumpSeriesInput>() |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsPumpSeriesVmo, Dto.Assets.UpdateAssetsPumpSeriesInput>() |
| | | ).CreateMapper(); |
| | | var vmoList = mapper.Map<List<Vmo.PumpSeriesVmo>, List<UpdatePumpSeriesInput>>(list); |
| | | var vmoList = mapper.Map<List<Vmo.AssetsPumpSeriesVmo>, List<UpdateAssetsPumpSeriesInput>>(list); |
| | | |
| | | return await _cal.BulkUpdates(vmoList); |
| | | } |