You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

357 lines
10 KiB

  1. using Learun.Util;
  2. using System;
  3. using System.Data;
  4. using System.Collections.Generic;
  5. namespace Learun.Application.TwoDevelopment.PersonnelManagement
  6. {
  7. /// <summary>
  8. /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
  9. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  10. /// 创 建:超级管理员
  11. /// 日 期:2020-02-03 14:37
  12. /// 描 述:疫情记录
  13. /// </summary>
  14. public class EpidemicSituationBLL : EpidemicSituationIBLL
  15. {
  16. private EpidemicSituationService epidemicSituationService = new EpidemicSituationService();
  17. #region 获取数据
  18. /// <summary>
  19. /// 获取页面显示列表分页数据
  20. /// <summary>
  21. /// <param name="pagination">分页参数</param>
  22. /// <param name="queryJson">查询参数</param>
  23. /// <returns></returns>
  24. public IEnumerable<EpidemicSituationEntity> GetPageList(Pagination pagination, string queryJson)
  25. {
  26. try
  27. {
  28. return epidemicSituationService.GetPageList(pagination, queryJson);
  29. }
  30. catch (Exception ex)
  31. {
  32. if (ex is ExceptionEx)
  33. {
  34. throw;
  35. }
  36. else
  37. {
  38. throw ExceptionEx.ThrowBusinessException(ex);
  39. }
  40. }
  41. }
  42. /// <summary>
  43. /// 获取页面显示列表分页数据
  44. /// <summary>
  45. /// <param name="pagination">分页参数</param>
  46. /// <param name="queryJson">查询参数</param>
  47. /// <returns></returns>
  48. public List<EpidemicSituationEntity> GetReportPageList(Pagination pagination, string queryJson)
  49. {
  50. try
  51. {
  52. return epidemicSituationService.GetReportPageList(pagination, queryJson);
  53. }
  54. catch (Exception ex)
  55. {
  56. if (ex is ExceptionEx)
  57. {
  58. throw;
  59. }
  60. else
  61. {
  62. throw ExceptionEx.ThrowBusinessException(ex);
  63. }
  64. }
  65. }
  66. /// <summary>
  67. /// 获取页面显示列表数据
  68. /// <summary>
  69. /// <param name="queryJson">查询参数</param>
  70. /// <returns></returns>
  71. public IEnumerable<EpidemicSituationEntity> GetList(string queryJson)
  72. {
  73. try
  74. {
  75. return epidemicSituationService.GetList(queryJson);
  76. }
  77. catch (Exception ex)
  78. {
  79. if (ex is ExceptionEx)
  80. {
  81. throw;
  82. }
  83. else
  84. {
  85. throw ExceptionEx.ThrowBusinessException(ex);
  86. }
  87. }
  88. }
  89. /// <summary>
  90. /// 获取EpidemicSituation表实体数据
  91. /// <param name="keyValue">主键</param>
  92. /// <summary>
  93. /// <returns></returns>
  94. public EpidemicSituationEntity GetEpidemicSituationEntity(string keyValue)
  95. {
  96. try
  97. {
  98. return epidemicSituationService.GetEpidemicSituationEntity(keyValue);
  99. }
  100. catch (Exception ex)
  101. {
  102. if (ex is ExceptionEx)
  103. {
  104. throw;
  105. }
  106. else
  107. {
  108. throw ExceptionEx.ThrowBusinessException(ex);
  109. }
  110. }
  111. }
  112. /// <summary>
  113. /// 获取ContactsDetails表数据
  114. /// <summary>
  115. /// <returns></returns>
  116. public IEnumerable<ContactsDetailsEntity> GetContactsDetailsList(string keyValue)
  117. {
  118. try
  119. {
  120. return epidemicSituationService.GetContactsDetailsList(keyValue);
  121. }
  122. catch (Exception ex)
  123. {
  124. if (ex is ExceptionEx)
  125. {
  126. throw;
  127. }
  128. else
  129. {
  130. throw ExceptionEx.ThrowBusinessException(ex);
  131. }
  132. }
  133. }
  134. /// <summary>
  135. /// 获取ContactsDetails表实体数据
  136. /// <param name="keyValue">主键</param>
  137. /// <summary>
  138. /// <returns></returns>
  139. public ContactsDetailsEntity GetContactsDetailsEntity(string keyValue)
  140. {
  141. try
  142. {
  143. return epidemicSituationService.GetContactsDetailsEntity(keyValue);
  144. }
  145. catch (Exception ex)
  146. {
  147. if (ex is ExceptionEx)
  148. {
  149. throw;
  150. }
  151. else
  152. {
  153. throw ExceptionEx.ThrowBusinessException(ex);
  154. }
  155. }
  156. }
  157. /// <summary>
  158. /// 获取ContactsDetails表数据
  159. /// <summary>
  160. /// <returns></returns>
  161. public IEnumerable<PassPlaceEntity> GetPassPlaceList(string keyValue)
  162. {
  163. try
  164. {
  165. return epidemicSituationService.GetPassPlaceList(keyValue);
  166. }
  167. catch (Exception ex)
  168. {
  169. if (ex is ExceptionEx)
  170. {
  171. throw;
  172. }
  173. else
  174. {
  175. throw ExceptionEx.ThrowBusinessException(ex);
  176. }
  177. }
  178. }
  179. /// <summary>
  180. /// 获取ContactsDetails表数据
  181. /// <summary>
  182. /// <returns></returns>
  183. public IEnumerable<PeopleDetailsEntity> GetPeopleDetailslist(string keyValue)
  184. {
  185. try
  186. {
  187. return epidemicSituationService.GetPeopleDetailsList(keyValue);
  188. }
  189. catch (Exception ex)
  190. {
  191. if (ex is ExceptionEx)
  192. {
  193. throw;
  194. }
  195. else
  196. {
  197. throw ExceptionEx.ThrowBusinessException(ex);
  198. }
  199. }
  200. }
  201. /// <summary>
  202. /// 获取ContactsDetails表实体数据
  203. /// <param name="keyValue">主键</param>
  204. /// <summary>
  205. /// <returns></returns>
  206. public PassPlaceEntity GetPassPlaceEntity(string keyValue)
  207. {
  208. try
  209. {
  210. return epidemicSituationService.GetPassPlaceEntity(keyValue);
  211. }
  212. catch (Exception ex)
  213. {
  214. if (ex is ExceptionEx)
  215. {
  216. throw;
  217. }
  218. else
  219. {
  220. throw ExceptionEx.ThrowBusinessException(ex);
  221. }
  222. }
  223. }
  224. /// <summary>
  225. /// 获取ContactsDetails表实体数据
  226. /// <param name="keyValue">主键</param>
  227. /// <summary>
  228. /// <returns></returns>
  229. public PeopleDetailsEntity GetPeopleDetailsEntity(string keyValue)
  230. {
  231. try
  232. {
  233. return epidemicSituationService.GetPeopleDetailsEntity(keyValue);
  234. }
  235. catch (Exception ex)
  236. {
  237. if (ex is ExceptionEx)
  238. {
  239. throw;
  240. }
  241. else
  242. {
  243. throw ExceptionEx.ThrowBusinessException(ex);
  244. }
  245. }
  246. }
  247. #endregion
  248. #region 提交数据
  249. /// <summary>
  250. /// 删除实体数据
  251. /// <param name="keyValue">主键</param>
  252. /// <summary>
  253. /// <returns></returns>
  254. public void DeleteEntity(string keyValue)
  255. {
  256. try
  257. {
  258. epidemicSituationService.DeleteEntity(keyValue);
  259. }
  260. catch (Exception ex)
  261. {
  262. if (ex is ExceptionEx)
  263. {
  264. throw;
  265. }
  266. else
  267. {
  268. throw ExceptionEx.ThrowBusinessException(ex);
  269. }
  270. }
  271. }
  272. /// <summary>
  273. /// 保存实体数据(新增、修改)
  274. /// <param name="keyValue">主键</param>
  275. /// <summary>
  276. /// <returns></returns>
  277. public void SaveEntity(UserInfo userInfo, string keyValue, EpidemicSituationEntity entity, List<ContactsDetailsEntity> contactsDetailsList)
  278. {
  279. try
  280. {
  281. epidemicSituationService.SaveEntity(userInfo, keyValue, entity, contactsDetailsList);
  282. }
  283. catch (Exception ex)
  284. {
  285. if (ex is ExceptionEx)
  286. {
  287. throw;
  288. }
  289. else
  290. {
  291. throw ExceptionEx.ThrowBusinessException(ex);
  292. }
  293. }
  294. }
  295. /// <summary>
  296. /// 保存实体数据(新增、修改)
  297. /// <param name="keyValue">主键</param>
  298. /// <summary>
  299. /// <returns></returns>
  300. public void SaveEntity(UserInfo userInfo, string keyValue, EpidemicSituationEntity entity, List<ContactsDetailsEntity> contactsDetailsList, List<PassPlaceEntity> passDetailsList, List<PeopleDetailsEntity> peopleDetailsEntity)
  301. {
  302. try
  303. {
  304. epidemicSituationService.SaveEntity(userInfo, keyValue, entity, contactsDetailsList, passDetailsList, peopleDetailsEntity);
  305. }
  306. catch (Exception ex)
  307. {
  308. if (ex is ExceptionEx)
  309. {
  310. throw;
  311. }
  312. else
  313. {
  314. throw ExceptionEx.ThrowBusinessException(ex);
  315. }
  316. }
  317. }
  318. public bool HasTodayValue(string userId)
  319. {
  320. try
  321. {
  322. return epidemicSituationService.HasTodayValue(userId);
  323. }
  324. catch (Exception ex)
  325. {
  326. if (ex is ExceptionEx)
  327. {
  328. throw;
  329. }
  330. else
  331. {
  332. throw ExceptionEx.ThrowBusinessException(ex);
  333. }
  334. }
  335. }
  336. #endregion
  337. }
  338. }