NBUserManageBLL.cs 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  1. using LeaRun.Application.Entity.NBManage;
  2. using LeaRun.Application.Service.NBManage;
  3. using LeaRun.Util;
  4. using LeaRun.Util.WebControl;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10. namespace LeaRun.Application.Busines.NBManage
  11. {
  12. /// <summary>
  13. /// 用户管理
  14. /// </summary>
  15. public class NBUserManageBLL
  16. {
  17. NBUserManageService service = new NBUserManageService();
  18. #region 获取用户信息
  19. /// <summary>
  20. /// 获取用户信息
  21. /// </summary>
  22. /// <param name="pagination"></param>
  23. /// <param name="keyword"></param>
  24. /// <param name="searchType"></param>
  25. /// <param name="id"></param>
  26. /// <returns></returns>
  27. public string GetNBUserList(Pagination pagination, string keyword, string searchType, string id, string level)
  28. {
  29. return service.GetNBUserList(pagination, keyword, searchType, id, level);
  30. }
  31. #endregion
  32. #region 保存小区信息
  33. /// <summary>
  34. /// 保存小区信息
  35. /// </summary>
  36. /// <param name="data"></param>
  37. /// <returns></returns>
  38. public int SaveAreaForm(string data)
  39. {
  40. return service.SaveAreaForm(data);
  41. }
  42. #endregion
  43. #region 获取小区信息
  44. /// <summary>
  45. /// 获取小区信息
  46. /// </summary>
  47. /// <param name="id"></param>
  48. /// <returns></returns>
  49. public string GetAreaInfo(string id)
  50. {
  51. return Json.ToJson(service.GetAreaInfo(id));
  52. }
  53. #endregion
  54. #region 修改小区信息
  55. /// <summary>
  56. /// 修改小区信息
  57. /// </summary>
  58. /// <param name="keyValue"></param>
  59. /// <param name="data"></param>
  60. /// <returns></returns>
  61. public int EditAreaForm(string id, string data)
  62. {
  63. return service.EditAreaForm(id, data);
  64. }
  65. #endregion
  66. #region 删除小区信息
  67. /// <summary>
  68. /// 删除小区信息
  69. /// </summary>
  70. /// <param name="id"></param>
  71. /// <returns></returns>
  72. public int DeleteAreaForm(string id)
  73. {
  74. return service.DeleteAreaForm(id);
  75. }
  76. #endregion
  77. #region 获取楼宇信息
  78. /// <summary>
  79. /// 获取小区信息
  80. /// </summary>
  81. /// <param name="id"></param>
  82. /// <returns></returns>
  83. public string GetBldgInfo(string id)
  84. {
  85. return Json.ToJson(service.GetBldgInfo(id));
  86. }
  87. #endregion
  88. #region 保存楼宇信息
  89. /// <summary>
  90. /// 保存楼宇信息
  91. /// </summary>
  92. /// <param name="data"></param>
  93. /// <returns></returns>
  94. public int SaveBldgForm(string parentId, string data)
  95. {
  96. return service.SaveBldgForm(parentId, data);
  97. }
  98. /// <summary>
  99. /// 批量保存楼宇信息
  100. /// </summary>
  101. /// <param name="data"></param>
  102. /// <returns></returns>
  103. public int SaveBatchBldgForm(string parentId, string data)
  104. {
  105. return service.SaveBatchBldgForm(parentId, data);
  106. }
  107. #endregion
  108. #region 修改楼宇信息
  109. /// <summary>
  110. /// 修改小区信息
  111. /// </summary>
  112. /// <param name="keyValue"></param>
  113. /// <param name="data"></param>
  114. /// <returns></returns>
  115. public int EditBldgForm(string parentId, string id, string data)
  116. {
  117. return service.EditBldgForm(parentId, id, data);
  118. }
  119. #endregion
  120. #region 删除楼宇信息
  121. /// <summary>
  122. /// 删除楼宇信息
  123. /// </summary>
  124. /// <param name="id"></param>
  125. /// <returns></returns>
  126. public int DeleteBldgForm(string id)
  127. {
  128. return service.DeleteBldgForm(id);
  129. }
  130. #endregion
  131. #region 获取单元信息
  132. /// <summary>
  133. /// 获取小区信息
  134. /// </summary>
  135. /// <param name="id"></param>
  136. /// <returns></returns>
  137. public string GetApmtInfo(string id)
  138. {
  139. return Json.ToJson(service.GetApmtInfo(id));
  140. }
  141. #endregion
  142. #region 保存单元信息
  143. /// <summary>
  144. /// 保存单元信息
  145. /// </summary>
  146. /// <param name="data"></param>
  147. /// <returns></returns>
  148. public int SaveApmtForm(string parentId, string data)
  149. {
  150. return service.SaveApmtForm(parentId, data);
  151. }
  152. /// <summary>
  153. /// 批量保存楼宇信息
  154. /// </summary>
  155. /// <param name="data"></param>
  156. /// <returns></returns>
  157. public int SaveBatchApmtForm(string parentId, string data)
  158. {
  159. return service.SaveBatchApmtForm(parentId, data);
  160. }
  161. #endregion
  162. #region 修改单元信息
  163. /// <summary>
  164. /// 修改小区信息
  165. /// </summary>
  166. /// <param name="keyValue"></param>
  167. /// <param name="data"></param>
  168. /// <returns></returns>
  169. public int EditApmtForm(string parentId, string id, string data)
  170. {
  171. return service.EditApmtForm(parentId, id, data);
  172. }
  173. #endregion
  174. #region 删除单元信息
  175. /// <summary>
  176. /// 删除单元信息
  177. /// </summary>
  178. /// <param name="id"></param>
  179. /// <returns></returns>
  180. public int DeleteApmtForm(string id)
  181. {
  182. return service.DeleteApmtForm(id);
  183. }
  184. #endregion
  185. #region 添加用户时,先添加用户,再获得用户ID
  186. /// <summary>
  187. ///获得用户ID
  188. /// </summary>
  189. /// <param name="RoomNo">用户</param>
  190. /// <param name="ApmtID">单元ID</param>
  191. /// <param name="BldgID">楼宇ID</param>
  192. /// <param name="AreaID">小区ID</param>
  193. /// <returns></returns>
  194. public string GetRoomID(string RoomNo, string ApmtID, string BldgID, string AreaID)
  195. {
  196. return service.GetRoomID(RoomNo, ApmtID, BldgID, AreaID);
  197. }
  198. #endregion
  199. #region 保存用户信息
  200. /// <summary>
  201. /// 保存用户信息
  202. /// </summary>
  203. /// <param name="data"></param>
  204. /// <returns></returns>
  205. public int SaveUserForm(string parentId, string data)
  206. {
  207. return service.SaveUserForm(parentId, data);
  208. }
  209. /// <summary>
  210. /// 批量保存用户信息
  211. /// </summary>
  212. /// <param name="data"></param>
  213. /// <returns></returns>
  214. public int SaveBatchUserForm(string parentId, string data)
  215. {
  216. return service.SaveBatchUserForm(parentId, data);
  217. }
  218. #endregion
  219. #region 获取用户信息
  220. /// <summary>
  221. /// 获取用户信息
  222. /// </summary>
  223. /// <param name="id"></param>
  224. /// <returns></returns>
  225. public string GetUserInfo(string id)
  226. {
  227. return Json.ToJson(service.GetUserInfo(id));
  228. }
  229. #endregion
  230. #region 修改用户信息
  231. /// <summary>
  232. /// 修改用户信息
  233. /// </summary>
  234. /// <param name="keyValue"></param>
  235. /// <param name="data"></param>
  236. /// <returns></returns>
  237. public int EditUserForm(string parentId, string id, string data)
  238. {
  239. return service.EditUserForm(parentId, id, data);
  240. }
  241. #endregion
  242. #region 删除用户信息
  243. /// <summary>
  244. /// 删除用户信息
  245. /// </summary>
  246. /// <param name="id"></param>
  247. /// <returns></returns>
  248. public int DeleteUserForm(string id)
  249. {
  250. return service.DeleteUserForm(id);
  251. }
  252. #endregion
  253. #region 保存表具信息
  254. /// <summary>
  255. /// 保存表具信息
  256. /// </summary>
  257. /// <param name="data"></param>
  258. /// <returns></returns>
  259. public int SaveMeterForm(string parentId, string data)
  260. {
  261. return service.SaveMeterForm(parentId, data);
  262. }
  263. #endregion
  264. /// <summary>
  265. /// 修改表设备信息
  266. /// </summary>
  267. /// <returns></returns>
  268. public int EditMeterForm(string keyValue, string data)
  269. {
  270. return service.EditMeterForm(keyValue, data);
  271. }
  272. #region 获取表具信息
  273. /// <summary>
  274. /// 保存用户信息
  275. /// </summary>
  276. /// <param name="data"></param>
  277. /// <returns></returns>
  278. public NBMeterEntity GetMeterByMeterId(string meterId)
  279. {
  280. return service.GetMeterByMeterId(meterId);
  281. }
  282. #endregion
  283. #region 删除表具信息
  284. /// <summary>
  285. /// 删除表具信息
  286. /// </summary>
  287. /// <param name="data"></param>
  288. /// <returns></returns>
  289. public int DeleteMeterForm(string meterId)
  290. {
  291. return service.DeleteMeterForm(meterId);
  292. }
  293. public string SaveMeterRemove(string meterId, string areaId, string bldgId, string apmtId, string roomId)
  294. {
  295. return service.SaveMeterRemove(meterId, areaId, bldgId, apmtId, roomId);
  296. }
  297. #endregion
  298. }
  299. }