李昊 лет назад: 4
Родитель
Сommit
b523451ec6
1 измененных файлов с 42 добавлено и 0 удалено
  1. 42 0
      GxPress/Api/GxPress.Api/AppControllers/AppFlowController.cs

+ 42 - 0
GxPress/Api/GxPress.Api/AppControllers/AppFlowController.cs

@@ -122,6 +122,48 @@ namespace GxPress.Api.AppControllers
         /// 获取工作项列表
         /// </summary>
         /// <returns></returns>
+        [HttpGet]
+        public async Task<ListResult> GetList(FlowListRequest request)
+        {
+            var userId = _loginContext.AccountId;
+            request.Page = request.Page <= 0 ? 1 : request.Page;
+            request.PerPage = request.PerPage <= 0 ? 15 : request.PerPage;
+            if (request.Type == nameof(FlowListTypeConst.MyChecking))
+            {
+                return await _flowService.ListMyCheckingAsync(userId, request, nameof(FlowListTypeConst.MyChecking));
+            }
+
+            if (request.Type == nameof(FlowListTypeConst.MyChecked))
+            {
+                return await _flowService.ListMyCheckedAsync(userId, request, nameof(FlowListTypeConst.MyChecked));
+            }
+
+            if (request.Type == nameof(FlowListTypeConst.CcUnread))
+            {
+                return await _flowService.ListCcUnreadAsync(userId, request);
+            }
+
+            if (request.Type == nameof(FlowListTypeConst.CcAll))
+            {
+                return await _flowService.ListCcAllAsync(userId, request, nameof(FlowListTypeConst.CcAll));
+            }
+
+            if (request.Type == nameof(FlowListTypeConst.SubmittedChecking))
+            {
+                return await _flowService.ListSubmittedCheckingAsync(userId, request, nameof(FlowListTypeConst.SubmittedChecking));
+            }
+
+            if (request.Type == nameof(FlowListTypeConst.SubmittedChecked))
+            {
+                return await _flowService.ListSubmittedCheckedAsync(userId, request);
+            }
+
+            return new ListResult();
+        }
+        /// <summary>
+        /// 获取工作项列表
+        /// </summary>
+        /// <returns></returns>
         [HttpPost("list")]
         public async Task<ListResult> PostList(FlowListRequest request)
         {