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.

FileInfoBLL.cs 6.3 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. using Learun.Util;
  2. using System;
  3. using System.Collections.Generic;
  4. namespace Learun.Application.Base.Files
  5. {
  6. /// <summary>
  7. /// 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架
  8. /// Copyright (c) 2013-2018 上海力软信息技术有限公司
  9. /// 创 建:超级管理员
  10. /// 日 期:2019-11-29 14:04
  11. /// 描 述:文件管理
  12. /// </summary>
  13. public class FileInfoBLL: FileInfoIBLL
  14. {
  15. private FileInfoService fileInfoService = new FileInfoService();
  16. #region 获取数据
  17. /// <summary>
  18. /// 获取表实体数据
  19. /// </summary>
  20. /// <param name="keyValue">主键</param>
  21. /// <returns></returns>
  22. public FileBInfoEntity GetEntity(string keyValue)
  23. {
  24. try
  25. {
  26. return fileInfoService.GetEntity(keyValue);
  27. }
  28. catch (Exception ex)
  29. {
  30. if (ex is ExceptionEx)
  31. {
  32. throw;
  33. }
  34. else
  35. {
  36. throw ExceptionEx.ThrowBusinessException(ex);
  37. }
  38. }
  39. }
  40. /// <summary>
  41. /// 获取文件列表实体
  42. /// </summary>
  43. /// <param name="keyValue"></param>
  44. /// <returns></returns>
  45. public FilelistEntity GetListEntity(string keyValue)
  46. {
  47. try
  48. {
  49. return fileInfoService.GetListEntity(keyValue);
  50. }
  51. catch (Exception ex)
  52. {
  53. if (ex is ExceptionEx)
  54. {
  55. throw;
  56. }
  57. else
  58. {
  59. throw ExceptionEx.ThrowBusinessException(ex);
  60. }
  61. }
  62. }
  63. /// <summary>
  64. /// 获取文件列表实体
  65. /// </summary>
  66. /// <param name="fileInfoId"></param>
  67. /// <returns></returns>
  68. public FilelistEntity GetListEntityByInfoId(string fileInfoId)
  69. {
  70. try
  71. {
  72. return fileInfoService.GetListEntityByInfoId(fileInfoId);
  73. }
  74. catch (Exception ex)
  75. {
  76. if (ex is ExceptionEx)
  77. {
  78. throw;
  79. }
  80. else
  81. {
  82. throw ExceptionEx.ThrowServiceException(ex);
  83. }
  84. }
  85. }
  86. /// <summary>
  87. /// 文件审核列表
  88. /// </summary>
  89. /// <param name="strWfSql">查询语句</param>
  90. /// <param name="pagination">分页参数</param>
  91. /// <param name="keyword">查询关键字</param>
  92. /// <param name="userId">当前登陆者用户</param>
  93. /// <returns></returns>
  94. public IEnumerable<WFFileModel> GetWfPageList(string strWfSql, Pagination pagination, string keyword,string userId)
  95. {
  96. return fileInfoService.GetWfPageList(strWfSql, pagination, keyword, userId);
  97. }
  98. /// <summary>
  99. /// 获取正式发布的文件
  100. /// </summary>
  101. /// <param name="keyword">查询关键字</param>
  102. /// <param name="folderId">文件夹id</param>
  103. /// <returns></returns>
  104. public IEnumerable<FileBInfoEntity> GetAllPublishPageList(string keyword, string folderId)
  105. {
  106. return fileInfoService.GetAllPublishPageList(keyword, folderId);
  107. }
  108. /// <summary>
  109. /// 获取正式发布的文件
  110. /// </summary>
  111. /// <param name="keyword">查询关键字</param>
  112. /// <param name="folderId">文件夹id</param>
  113. /// <returns></returns>
  114. public IEnumerable<FileBInfoEntity> GetPublishList(string keyword, string folderId) {
  115. return fileInfoService.GetPublishList(keyword, folderId);
  116. }
  117. /// <summary>
  118. /// 获取文件的历史信息
  119. /// </summary>
  120. /// <param name="fileInfoId">主键</param>
  121. /// <returns></returns>
  122. public IEnumerable<FileBInfoEntity> GetHistoryList(string fileInfoId) {
  123. return fileInfoService.GetHistoryList(fileInfoId);
  124. }
  125. /// <summary>
  126. /// 获取正式发布的文件
  127. /// </summary>
  128. /// <param name="keyword">查询关键字</param>
  129. /// <returns></returns>
  130. public IEnumerable<FileBInfoEntity> GetDeleteList(string keyword) {
  131. return fileInfoService.GetDeleteList(keyword);
  132. }
  133. #endregion
  134. #region 提交数据
  135. /// <summary>
  136. /// 保存数据
  137. /// </summary>
  138. /// <param name="keyValue">文件列表主键</param>
  139. /// <param name="fileBInfoEntity">文件主信息</param>
  140. /// <param name="filelistEntity">文件列表信息</param>
  141. public void SaveEntity(string keyValue, FileBInfoEntity fileBInfoEntity, FilelistEntity filelistEntity)
  142. {
  143. try
  144. {
  145. fileInfoService.SaveEntity(keyValue, fileBInfoEntity, filelistEntity);
  146. }
  147. catch (Exception ex)
  148. {
  149. if (ex is ExceptionEx)
  150. {
  151. throw;
  152. }
  153. else
  154. {
  155. throw ExceptionEx.ThrowBusinessException(ex);
  156. }
  157. }
  158. }
  159. /// <summary>
  160. /// 更新文件发布状态
  161. /// </summary>
  162. /// <param name="processId">流程实例主键</param>
  163. public void UpdateEntity(string processId)
  164. {
  165. fileInfoService.UpdateEntity(processId);
  166. }
  167. /// <summary>
  168. /// 虚拟删除文件
  169. /// </summary>
  170. /// <param name="keyValue">主键</param>
  171. public void VDeleteEntity(string keyValue)
  172. {
  173. fileInfoService.VDeleteEntity(keyValue);
  174. }
  175. /// <summary>
  176. /// 还原虚拟删除文件
  177. /// </summary>
  178. /// <param name="keyValue">主键</param>
  179. public void RecoveryEntity(string keyValue) {
  180. fileInfoService.RecoveryEntity(keyValue);
  181. }
  182. /// <summary>
  183. /// 彻底删除
  184. /// </summary>
  185. /// <param name="keyValue"></param>
  186. public void DeleteEntity(string keyValue)
  187. {
  188. fileInfoService.DeleteEntity(keyValue);
  189. }
  190. #endregion
  191. }
  192. }