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.
 
 
 
 
 
 

242 rivejä
6.5 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-11-07 11:54
  13. /// 描 述:工资条
  14. /// </summary>
  15. public class WageScheduleBLL : WageScheduleIBLL
  16. {
  17. private WageScheduleService wageScheduleService = new WageScheduleService();
  18. #region 获取数据
  19. /// <summary>
  20. /// 获取列表数据
  21. /// </summary>
  22. /// <param name="queryJson">查询参数</param>
  23. /// <returns></returns>
  24. public IEnumerable<WageScheduleEntity> GetList(string queryJson)
  25. {
  26. try
  27. {
  28. return wageScheduleService.GetList(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 IEnumerable<WageScheduleEntity> GetPageList(Pagination pagination, string queryJson)
  49. {
  50. try
  51. {
  52. return wageScheduleService.GetPageList(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="keyValue">主键</param>
  70. /// <returns></returns>
  71. public WageScheduleEntity GetEntity(string keyValue)
  72. {
  73. try
  74. {
  75. return wageScheduleService.GetEntity(keyValue);
  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. public List<WageScheduleEntity> GetPeopleType()
  90. {
  91. try
  92. {
  93. return wageScheduleService.GetPeopleType().Select(x => new WageScheduleEntity { Id = x.PeopleType, PeopleType = x.PeopleType }).Distinct().ToList();
  94. }
  95. catch (Exception ex)
  96. {
  97. if (ex is ExceptionEx)
  98. {
  99. throw;
  100. }
  101. else
  102. {
  103. throw ExceptionEx.ThrowBusinessException(ex);
  104. }
  105. }
  106. }
  107. public List<WageScheduleEntity> GetPostType()
  108. {
  109. try
  110. {
  111. return wageScheduleService.GetPostType().Select(x => new WageScheduleEntity { Id = x.PostType, PostType = x.PostType }).Distinct().ToList();
  112. }
  113. catch (Exception ex)
  114. {
  115. if (ex is ExceptionEx)
  116. {
  117. throw;
  118. }
  119. else
  120. {
  121. throw ExceptionEx.ThrowBusinessException(ex);
  122. }
  123. }
  124. }
  125. public List<WageScheduleEntity> GetPayGrade()
  126. {
  127. try
  128. {
  129. return wageScheduleService.GetPayGrade().Select(x => new WageScheduleEntity { Id = x.PayGrade, PayGrade = x.PayGrade }).Distinct().ToList();
  130. }
  131. catch (Exception ex)
  132. {
  133. if (ex is ExceptionEx)
  134. {
  135. throw;
  136. }
  137. else
  138. {
  139. throw ExceptionEx.ThrowBusinessException(ex);
  140. }
  141. }
  142. }
  143. #endregion
  144. #region 提交数据
  145. /// <summary>
  146. /// 删除实体数据
  147. /// </summary>
  148. /// <param name="keyValue">主键</param>
  149. public void DeleteEntity(string keyValue)
  150. {
  151. try
  152. {
  153. wageScheduleService.DeleteEntity(keyValue);
  154. }
  155. catch (Exception ex)
  156. {
  157. if (ex is ExceptionEx)
  158. {
  159. throw;
  160. }
  161. else
  162. {
  163. throw ExceptionEx.ThrowBusinessException(ex);
  164. }
  165. }
  166. }
  167. /// <summary>
  168. /// 保存实体数据(新增、修改)
  169. /// </summary>
  170. /// <param name="keyValue">主键</param>
  171. /// <param name="entity">实体</param>
  172. public void SaveEntity(string keyValue, WageScheduleEntity entity)
  173. {
  174. try
  175. {
  176. wageScheduleService.SaveEntity(keyValue, entity);
  177. }
  178. catch (Exception ex)
  179. {
  180. if (ex is ExceptionEx)
  181. {
  182. throw;
  183. }
  184. else
  185. {
  186. throw ExceptionEx.ThrowBusinessException(ex);
  187. }
  188. }
  189. }
  190. public void CheckEntity(string keyValue,string Status)
  191. {
  192. try
  193. {
  194. wageScheduleService.CheckEntity(keyValue, Status);
  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. public string SalarySheelImport(DataTable dt, string fileId)
  209. {
  210. try
  211. {
  212. return wageScheduleService.SalarySheelImport(dt, fileId);
  213. }
  214. catch (Exception ex)
  215. {
  216. if (ex is ExceptionEx)
  217. {
  218. throw;
  219. }
  220. else
  221. {
  222. throw ExceptionEx.ThrowBusinessException(ex);
  223. }
  224. }
  225. }
  226. #endregion
  227. }
  228. }