IDeviceService.cs 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. using IoTIntegrationPlatform.Model.common;
  2. using IoTIntegrationPlatform.Model.Dto;
  3. using IoTIntegrationPlatform.Model.Enum;
  4. using IoTIntegrationPlatform.Model.Model;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10. using static IoTIntegrationPlatform.Model.Enum.EnumDevice;
  11. namespace IoTIntegrationPlatform.Interface
  12. {
  13. public interface IDeviceService
  14. {
  15. /// <summary>
  16. /// 获取平台型号
  17. /// </summary>
  18. /// <param name="platformModelId"></param>
  19. /// <param name="code"></param>
  20. /// <returns></returns>
  21. PlatformModel GetPlatformModelInfo(int platformModelId, string code);
  22. /// <summary>
  23. /// 获取平台型号列表
  24. /// </summary>
  25. /// <param name="parm"></param>
  26. /// <param name="page"></param>
  27. /// <returns></returns>
  28. List<PlatformModel> GetPlatformModelList(BaseParm parm, ref int page);
  29. /// <summary>
  30. /// 添加平台型号
  31. /// </summary>
  32. /// <param name="model"></param>
  33. /// <returns></returns>
  34. bool AddPlatformModel(PlatformModel model);
  35. /// <summary>
  36. /// 编辑平台设备型号
  37. /// </summary>
  38. /// <param name="model"></param>
  39. /// <returns></returns>
  40. bool UpdatedPlatformModel(PlatformModel model);
  41. /// <summary>
  42. /// 删除平台设备型号
  43. /// </summary>
  44. /// <param name="id"></param>
  45. /// <returns></returns>
  46. bool DeletePlatformModel(int id);
  47. /// <summary>
  48. /// 获取设备明细信息
  49. /// </summary>
  50. /// <param name="detailId"></param>
  51. /// <param name="deviceName"></param>
  52. /// <param name="platformModelId"></param>
  53. /// <param name="deviceType"></param>
  54. /// <param name="deviceCommunicationType"></param>
  55. /// <returns></returns>
  56. PlatformModelDetail GetPlatformModelDetailInfo(int detailId, string deviceName, int platformModelId, int deviceType, int deviceCommunicationType);
  57. /// <summary>
  58. /// 获取平台型号明细列表
  59. /// </summary>
  60. /// <param name="parm"></param>
  61. /// <param name="page"></param>
  62. /// <returns></returns>
  63. List<PlatformModelDetail> GetPlatformModelDetailList(BaseParm parm, ref int page);
  64. /// <summary>
  65. /// 添加平台型号明细
  66. /// </summary>
  67. /// <param name="model"></param>
  68. /// <returns></returns>
  69. bool AddPlatformModelDetail(PlatformModelDetail model);
  70. /// <summary>
  71. /// 编辑平台设备型号
  72. /// </summary>
  73. /// <param name="model"></param>
  74. /// <returns></returns>
  75. bool UpdatedPlatformModelDetail(PlatformModelDetail model);
  76. /// <summary>
  77. /// 删除平台设备型号
  78. /// </summary>
  79. /// <param name="id"></param>
  80. /// <returns></returns>
  81. bool DeletePlatformModelDetail(int id);
  82. /// <summary>
  83. /// 获取平台设备信息
  84. /// </summary>
  85. /// <param name="platformId"></param>
  86. /// <param name="code"></param>
  87. /// <param name="customerId"></param>
  88. /// <returns></returns>
  89. PlatformDeviceInfo GetPlatformDeviceInfoInfo(int platformId, string code, int customerId);
  90. /// <summary>
  91. /// 获取平台设备列表
  92. /// </summary>
  93. /// <param name="parm"></param>
  94. /// <param name="page"></param>
  95. /// <returns></returns>
  96. List<PlatformDeviceInfoDto> GetPlatformDeviceList(BaseParm parm, ref int page);
  97. /// <summary>
  98. /// 添加平台设备
  99. /// </summary>
  100. /// <param name="model"></param>
  101. /// <returns></returns>
  102. bool AddPlatformDeviceInfo(PlatformDeviceInfo model);
  103. /// <summary>
  104. /// 编辑平台设备
  105. /// </summary>
  106. /// <param name="model"></param>
  107. /// <returns></returns>
  108. bool UpdatedPlatformDeviceInfo(PlatformDeviceInfo model);
  109. /// <summary>
  110. /// 批量编辑平台设备状态
  111. /// </summary>
  112. /// <param name="dataList"></param>
  113. /// <returns></returns>
  114. bool BatchUpdatePlatformDeviceStatus(List<PlatformDeviceInfoDto> dataList);
  115. /// <summary>
  116. /// 编辑平台状态
  117. /// </summary>
  118. /// <param name="model"></param>
  119. /// <returns></returns>
  120. bool UpdatedPlatformState(PlatformDeviceInfo model);
  121. /// <summary>
  122. /// 删除平台设备
  123. /// </summary>
  124. /// <param name="platformId"></param>
  125. /// <returns></returns>
  126. bool DeletePlatformDeviceInfo(int platformId);
  127. /// <summary>
  128. /// 根据mac地址修改平台设备心跳时间
  129. /// </summary>
  130. /// <param name="deviceMac"></param>
  131. /// <returns></returns>
  132. bool UpdateGatewayDeviceHeartTime(string deviceMac);
  133. /// <summary>
  134. /// 获取平台子设备列表
  135. /// </summary>
  136. /// <param name="parm"></param>
  137. /// <param name="page"></param>
  138. /// <returns></returns>
  139. List<PlatformDeviceDetailDto> GetPlatformDeviceDetailList(BaseParm parm, ref int page);
  140. /// <summary>
  141. /// 编辑平台子设备
  142. /// </summary>
  143. /// <param name="model"></param>
  144. /// <returns></returns>
  145. bool UpdatedPlatformSubDeviceInfo(PlatformDeviceDetail model);
  146. /// <summary>
  147. /// 编辑平台明细设备值
  148. /// </summary>
  149. /// <param name="model"></param>
  150. /// <returns></returns>
  151. bool UpdatedPlatformSubDeviceValue(PlatformDeviceDetail model);
  152. /// <summary>
  153. /// 删除平台子设备
  154. /// </summary>
  155. /// <param name="deviceId"></param>
  156. /// <returns></returns>
  157. bool DeletePlatformSubDeviceInfo(string deviceId);
  158. /// <summary>
  159. /// 编辑设备状态或值(根据设备ID)
  160. /// </summary>
  161. /// <param name="deviceId"></param>
  162. /// <param name="deviceStatus"></param>
  163. /// <param name="deviceValue"></param>
  164. /// <returns></returns>
  165. bool UpdateDeviceStateOrValue(string deviceId, EnumDeviceStatus deviceStatus, string deviceValue);
  166. /// <summary>
  167. /// 获取设备信息
  168. /// </summary>
  169. /// <param name="device_id"></param>
  170. /// <returns></returns>
  171. PlatformDeviceDetail GetDevideInfo(string device_id);
  172. /// <summary>
  173. /// 编辑设备读取数据状态
  174. /// </summary>
  175. /// <param name="model"></param>
  176. /// <returns></returns>
  177. bool UpdateDeviceReadState(PlatformDeviceDetail model);
  178. }
  179. }