lihao 4 years ago
parent
commit
b95378d777

+ 8 - 7
gx_api/GxPress/Service/GxPress.Service.Implement/Note/NoteService.cs

@@ -58,13 +58,13 @@ namespace GxPress.Service.Implement.Note
             IMiddleRepository middleRepository, IMapper mapper, IUserRepository userRepository,
             IArticleRepository articleRepository, INoticeRepository noticeRepository,
             IMissiveRepository missiveRepository, ITopicRepository topicRepository, IGroupRepository groupRepository,
-            ICollectionRepository collectionRepository, ICommentRepository commentRepository, 
-            IVisitRepository visitRepository, 
-            IVisitService visitService, 
-            IFolderUserRepository folderUserRepository, 
-            IAnalyzeService analyzeService, 
-            IUserMiddleService userMiddleService, 
-            IRecordFolderRepository recordFolderRepository, 
+            ICollectionRepository collectionRepository, ICommentRepository commentRepository,
+            IVisitRepository visitRepository,
+            IVisitService visitService,
+            IFolderUserRepository folderUserRepository,
+            IAnalyzeService analyzeService,
+            IUserMiddleService userMiddleService,
+            IRecordFolderRepository recordFolderRepository,
             IMediaRepository mediaRepository)
         {
             _middleService = middleService;
@@ -235,6 +235,7 @@ namespace GxPress.Service.Implement.Note
         public async Task<PagedList<NotePageListRequest>> NotePageListAsync(NoteSearchPageListRequest request)
         {
             var result = await _noteRepository.NotePageListAsync(request);
+            result.DraftCount = await _noteRepository.GetDraftCountAsync(request.UserId, request.TypeValue == 1);
             if (request.FolderId > 0)
             {
                 var middle = await _middleRepository.GetMiddleAsync(request.FolderId);

+ 0 - 6
gx_api/GxPress/Service/GxPress.Service.Implement/UserService.cs

@@ -356,13 +356,7 @@ namespace GxPress.Service.Implement
             var result = await _userRepository.GetUserCountAsync(userId);
             //工作我的审批未操作数量
             var request = new FlowListRequest();
-            // result.FlowAuditUReadCount = await _flowTodoRepository.CountAsync(Q.Where(nameof(Entity.WorkFlow.FlowTodo.UserId), userId).Where(nameof(Entity.WorkFlow.FlowTodo.Type), "ApproverCheck").Where(nameof(Entity.WorkFlow.FlowTodo.IsRead), false));
             result.FlowAuditUReadCount = await _userRepository.GetUserUReadFlowTodoCountAsync(userId);
-            // 工作我发起的已批复未读数量
-            // var flowState = new List<string> { FlowState.Checked.GetValue(), FlowState.Denied.GetValue() };
-            // result.FlowSendUReadCount = await _flowRepository.CountAsync(Q.Where(nameof(Entity.WorkFlow.Flow.UserId), userId).WhereIn(nameof(Entity.WorkFlow.Flow.State), flowState).Where(nameof(Entity.WorkFlow.Flow.IsRead), false).Where(nameof(Entity.WorkFlow.Flow.ProcessId), ">", 0));
-            // 工作抄送我的未读数量
-            // result.FlowCcUReadCount = await _flowTodoRepository.FlowCcUReadCountAsync(userId);
             //待办事项未执行数量
             result.WaitHandleUFinishCount = await waitHandleRepository.GetUFinishAsync(userId);
             return result;