ÎļþÃû´Ó BLL/HStation.BLL.Assets.Core/04-bll/17-Flowmeter/02-FlowmeterMain/AssetsFlowmeterMain.cs ÐÞ¸Ä |
| | |
| | | using Yw.BLL; |
| | | |
| | | namespace HStation.BLL |
| | | { |
| | | /// <summary> |
| | | /// æµé计 |
| | | ///</summary> |
| | | /// |
| | | /// </summary> |
| | | public partial class AssetsFlowmeterMain |
| | | { |
| | | private readonly CAL.IAssetsFlowmeterMain _cal = CALCreateHelper.CreateCAL<CAL.IAssetsFlowmeterMain>(); |
| | | private readonly HStation.CAL.IAssetsFlowmeterMain _cal = CALCreateHelper.CreateCAL<HStation.CAL.IAssetsFlowmeterMain>(); |
| | | |
| | | #region Query |
| | | |
| | | /// <summary> |
| | | /// è·åææ |
| | | /// </summary> |
| | | public virtual async Task<List<Vmo.AssetsFlowmeterMainVmo>> GetAll() |
| | | public virtual async Task<List<AssetsFlowmeterMainVmo>> GetAll() |
| | | { |
| | | var dtoList = await _cal.GetAll(); |
| | | return Dto2Vmos(dtoList); |
| | |
| | | /// <summary> |
| | | /// éè¿ ID è·å |
| | | /// </summary> |
| | | public virtual async Task<Vmo.AssetsFlowmeterMainVmo> GetByID(long ID) |
| | | public virtual async Task<AssetsFlowmeterMainVmo> GetByID(long ID) |
| | | { |
| | | var dto = await _cal.GetByID(ID); |
| | | return Dto2Vmo(dto); |
| | |
| | | /// <summary> |
| | | /// éè¿ Ids è·å |
| | | /// </summary> |
| | | public virtual async Task<List<Vmo.AssetsFlowmeterMainVmo>> GetByIds(List<long> Ids) |
| | | public virtual async Task<List<AssetsFlowmeterMainVmo>> GetByIds(List<long> Ids) |
| | | { |
| | | var dtoList = await _cal.GetByIds(Ids); |
| | | return Dto2Vmos(dtoList); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// éè¿ç³»åIDæ¥æ¾ |
| | | /// éè¿ SeriesID è·å |
| | | /// </summary> |
| | | /// <param name="ID"></param> |
| | | /// <returns></returns> |
| | | public async Task<List<Vmo.AssetsFlowmeterMainVmo>> GetBySeriesID(long ID) |
| | | public virtual async Task<List<AssetsFlowmeterMainVmo>> GetBySeriesID(long SeriesID) |
| | | { |
| | | var Dto = await _cal.GetBySeriesID(ID); |
| | | var dtoList = Dto2Vmos(Dto); |
| | | return dtoList; |
| | | var dtoList = await _cal.GetBySeriesID(SeriesID); |
| | | return Dto2Vmos(dtoList); |
| | | } |
| | | |
| | | #endregion Query |
| | | /// <summary> |
| | | /// è·åæ°é |
| | | /// </summary> |
| | | public virtual async Task<int> GetCount() |
| | | { |
| | | var count = await _cal.GetCount(); |
| | | return count; |
| | | } |
| | | |
| | | |
| | | #endregion |
| | | |
| | | #region Insert |
| | | |
| | | /// <summary> |
| | | /// æå
¥ä¸æ¡ |
| | | /// </summary> |
| | | public virtual async Task<long> Insert(Vmo.AssetsFlowmeterMainVmo vmo) |
| | | public virtual async Task<long> Insert(AssetsFlowmeterMainVmo vmo) |
| | | { |
| | | var dto = Vmo2AddDto(vmo); |
| | | var id = await _cal.Insert(dto); |
| | |
| | | /// <summary> |
| | | /// æå
¥å¤æ¡ |
| | | /// </summary> |
| | | public virtual async Task<bool> Inserts(List<Vmo.AssetsFlowmeterMainVmo> vmoList) |
| | | public virtual async Task<bool> Inserts(List<AssetsFlowmeterMainVmo> vmoList) |
| | | { |
| | | var dtoList = Vmo2AddDtos(vmoList); |
| | | var bol = await _cal.Inserts(dtoList); |
| | | return bol; |
| | | } |
| | | |
| | | #endregion Insert |
| | | #endregion |
| | | |
| | | #region Update |
| | | |
| | | /// <summary> |
| | | /// æ´æ° |
| | | /// </summary> |
| | | public virtual async Task<bool> Update(Vmo.AssetsFlowmeterMainVmo vmo) |
| | | public virtual async Task<bool> Update(AssetsFlowmeterMainVmo vmo) |
| | | { |
| | | var dto = Vmo2UpdateDto(vmo); |
| | | var bol = await _cal.Update(dto); |
| | |
| | | /// <summary> |
| | | /// æ¹éæ´æ° |
| | | /// </summary> |
| | | public virtual async Task<bool> Updates(List<Vmo.AssetsFlowmeterMainVmo> vmoList) |
| | | public virtual async Task<bool> Updates(List<AssetsFlowmeterMainVmo> vmoList) |
| | | { |
| | | var dtoList = Vmo2UpdateDtos(vmoList); |
| | | var bol = await _cal.Updates(dtoList); |
| | |
| | | return await _cal.UpdateTagName(ID, TagName); |
| | | } |
| | | |
| | | #endregion Update |
| | | #endregion |
| | | |
| | | #region Exist |
| | | |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 夿 TagName æ¯å¦åå¨ ExceptID |
| | | /// 夿TagNameæ¯å¦åå¨ ExceptID |
| | | /// </summary> |
| | | public virtual async Task<bool> IsExistTagNameExceptID(string TagName, long ExceptID) |
| | | { |
| | | return await _cal.IsExistTagNameExceptID(TagName, ExceptID); |
| | | } |
| | | |
| | | #endregion Exist |
| | | #endregion |
| | | |
| | | #region Delete |
| | | |
| | |
| | | return bol; |
| | | } |
| | | |
| | | #endregion Delete |
| | | |
| | | #endregion |
| | | |
| | | |
| | | } |
| | | } |