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.
 
 
 
 
 
 

246 lines
6.8 KiB

  1. using Learun.Util;
  2. using System;
  3. using System.Data;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. namespace Learun.Application.TwoDevelopment.EducationalAdministration
  7. {
  8. /// <summary>
  9. /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
  10. /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  11. /// 创 建:超级管理员
  12. /// 日 期:2022-05-18 11:08
  13. /// 描 述:一卡通交易流水
  14. /// </summary>
  15. public class MealCardRunTabBLL : MealCardRunTabIBLL
  16. {
  17. private MealCardRunTabService mealCardRunTabService = new MealCardRunTabService();
  18. #region 获取数据
  19. public List<MealCardRunTabEntity> GetDept()
  20. {
  21. try
  22. {
  23. return mealCardRunTabService.GetDept().Select(x => new MealCardRunTabEntity { Id = x.depName, depName = x.depName }).Distinct().ToList();
  24. }
  25. catch (Exception ex)
  26. {
  27. if (ex is ExceptionEx)
  28. {
  29. throw;
  30. }
  31. else
  32. {
  33. throw ExceptionEx.ThrowBusinessException(ex);
  34. }
  35. }
  36. }
  37. public List<MealCardRunTabEntity> GetdentiName()
  38. {
  39. try
  40. {
  41. return mealCardRunTabService.GetdentiName().Select(x => new MealCardRunTabEntity { Id = x.identiName, identiName = x.identiName }).Distinct().ToList();
  42. }
  43. catch (Exception ex)
  44. {
  45. if (ex is ExceptionEx)
  46. {
  47. throw;
  48. }
  49. else
  50. {
  51. throw ExceptionEx.ThrowBusinessException(ex);
  52. }
  53. }
  54. }
  55. public List<MealCardRunTabEntity> Getflowtype()
  56. {
  57. try
  58. {
  59. return mealCardRunTabService.Getflowtype().Select(x => new MealCardRunTabEntity { Id = x.flowtype, flowtype = x.flowtype }).Distinct().ToList();
  60. }
  61. catch (Exception ex)
  62. {
  63. if (ex is ExceptionEx)
  64. {
  65. throw;
  66. }
  67. else
  68. {
  69. throw ExceptionEx.ThrowBusinessException(ex);
  70. }
  71. }
  72. }
  73. public List<MealCardRunTabEntity> Getseg()
  74. {
  75. try
  76. {
  77. return mealCardRunTabService.Getseg().Select(x => new MealCardRunTabEntity { Id = x.seg, seg = x.seg }).Distinct().ToList();
  78. }
  79. catch (Exception ex)
  80. {
  81. if (ex is ExceptionEx)
  82. {
  83. throw;
  84. }
  85. else
  86. {
  87. throw ExceptionEx.ThrowBusinessException(ex);
  88. }
  89. }
  90. }
  91. /// <summary>
  92. /// 获取列表数据
  93. /// </summary>
  94. /// <param name="queryJson">查询参数</param>
  95. /// <returns></returns>
  96. public IEnumerable<MealCardRunTabEntity> GetList(string queryJson)
  97. {
  98. try
  99. {
  100. return mealCardRunTabService.GetList(queryJson);
  101. }
  102. catch (Exception ex)
  103. {
  104. if (ex is ExceptionEx)
  105. {
  106. throw;
  107. }
  108. else
  109. {
  110. throw ExceptionEx.ThrowBusinessException(ex);
  111. }
  112. }
  113. }
  114. /// <summary>
  115. /// 获取列表分页数据
  116. /// </summary>
  117. /// <param name="pagination">分页参数</param>
  118. /// <param name="queryJson">查询参数</param>
  119. /// <returns></returns>
  120. public IEnumerable<MealCardRunTabEntity> GetPageList(Pagination pagination, string queryJson)
  121. {
  122. try
  123. {
  124. return mealCardRunTabService.GetPageList(pagination, queryJson);
  125. }
  126. catch (Exception ex)
  127. {
  128. if (ex is ExceptionEx)
  129. {
  130. throw;
  131. }
  132. else
  133. {
  134. throw ExceptionEx.ThrowBusinessException(ex);
  135. }
  136. }
  137. }
  138. /// <summary>
  139. /// 获取实体数据
  140. /// </summary>
  141. /// <param name="keyValue">主键</param>
  142. /// <returns></returns>
  143. public MealCardRunTabEntity GetEntity(string keyValue)
  144. {
  145. try
  146. {
  147. return mealCardRunTabService.GetEntity(keyValue);
  148. }
  149. catch (Exception ex)
  150. {
  151. if (ex is ExceptionEx)
  152. {
  153. throw;
  154. }
  155. else
  156. {
  157. throw ExceptionEx.ThrowBusinessException(ex);
  158. }
  159. }
  160. }
  161. #endregion
  162. #region 提交数据
  163. /// <summary>
  164. /// 删除实体数据
  165. /// </summary>
  166. /// <param name="keyValue">主键</param>
  167. public void DeleteEntity(string keyValue)
  168. {
  169. try
  170. {
  171. mealCardRunTabService.DeleteEntity(keyValue);
  172. }
  173. catch (Exception ex)
  174. {
  175. if (ex is ExceptionEx)
  176. {
  177. throw;
  178. }
  179. else
  180. {
  181. throw ExceptionEx.ThrowBusinessException(ex);
  182. }
  183. }
  184. }
  185. /// <summary>
  186. /// 保存实体数据(新增、修改)
  187. /// </summary>
  188. /// <param name="keyValue">主键</param>
  189. /// <param name="entity">实体</param>
  190. public void SaveEntity(string keyValue, MealCardRunTabEntity entity)
  191. {
  192. try
  193. {
  194. mealCardRunTabService.SaveEntity(keyValue, entity);
  195. }
  196. catch (Exception ex)
  197. {
  198. if (ex is ExceptionEx)
  199. {
  200. throw;
  201. }
  202. else
  203. {
  204. throw ExceptionEx.ThrowBusinessException(ex);
  205. }
  206. }
  207. }
  208. #endregion
  209. /// <summary>
  210. /// 获取页面显示列表数据
  211. /// <summary>
  212. /// <param name="queryJson">查询参数</param>
  213. /// <returns></returns>
  214. public IEnumerable<MealCardRunTabEntity> GetListByAccount(string account)
  215. {
  216. try
  217. {
  218. return mealCardRunTabService.GetListByAccount(account); ;
  219. }
  220. catch (Exception ex)
  221. {
  222. if (ex is ExceptionEx)
  223. {
  224. throw;
  225. }
  226. else
  227. {
  228. throw ExceptionEx.ThrowServiceException(ex);
  229. }
  230. }
  231. }
  232. }
  233. }