李昊 4 yıl önce
ebeveyn
işleme
d964fae548

+ 6 - 5
GxPress/Api/GxPress.Api/AppControllers/AppFlowController.Actions.cs

@@ -78,12 +78,13 @@ namespace GxPress.Api.AppControllers
         [AllowAnonymous]
         public async Task<DefaultResult> ActionsMeeting([FromBody] ActionRequest request)
         {
-            var flowTodo = await _flowTodoRepository.GetAsync(request.FlowId);
-            if (flowTodo != null)
-                request.FlowId = flowTodo.FlowId;
+            // var todoId = request.FlowId;
+            // var flowTodo = await _flowTodoRepository.GetAsync(request.FlowId);
+            // if (flowTodo != null)
+            //     request.FlowId = flowTodo.FlowId;
             //await _flowRepository.UpdateStateAsync(request.FlowId, nameof(FlowState.Meeting));
             //修改当前用户的审核状态
-            await _flowTodoRepository.UpdateAsync(Q.Set(nameof(Entity.WorkFlow.FlowTodo.IsDone), true).Set(nameof(Entity.WorkFlow.FlowTodo.IsChecked), false).Set(nameof(Entity.WorkFlow.FlowTodo.DoneType), 1).Where(nameof(Entity.WorkFlow.FlowTodo.FlowId), request.FlowId).Where(nameof(Entity.WorkFlow.FlowTodo.Type), nameof(TodoTypeConst.ApproverCheck)).Where(nameof(Entity.WorkFlow.FlowTodo.UserId), _loginContext.AccountId));
+            await _flowTodoRepository.UpdateAsync(Q.Set(nameof(Entity.WorkFlow.FlowTodo.IsDone), true).Set(nameof(Entity.WorkFlow.FlowTodo.IsChecked), false).Set(nameof(Entity.WorkFlow.FlowTodo.DoneType), 1).Where(nameof(Entity.WorkFlow.FlowTodo.Id),request.FlowId));
             return new DefaultResult
             {
                 Value = true
@@ -101,7 +102,7 @@ namespace GxPress.Api.AppControllers
         {
             //await _flowRepository.UpdateStateAsync(request.FlowId, nameof(FlowState.Checking));
             //修改当前操作人为带审核
-            await _flowTodoRepository.UpdateAsync(Q.Where(nameof(Entity.WorkFlow.FlowTodo.FlowId), request.FlowId).Where(nameof(Entity.WorkFlow.FlowTodo.UserId), _loginContext.AccountId).Set(nameof(Entity.WorkFlow.FlowTodo.IsDone), false).Set(nameof(Entity.WorkFlow.FlowTodo.IsChecked), false).Set(nameof(Entity.WorkFlow.FlowTodo.DoneType), 0).Set(nameof(Entity.WorkFlow.FlowTodo.IsOperate), true));
+            await _flowTodoRepository.UpdateAsync(Q.Where(nameof(Entity.WorkFlow.FlowTodo.Id), request.FlowId).Set(nameof(Entity.WorkFlow.FlowTodo.IsDone), false).Set(nameof(Entity.WorkFlow.FlowTodo.IsChecked), false).Set(nameof(Entity.WorkFlow.FlowTodo.DoneType), 0).Set(nameof(Entity.WorkFlow.FlowTodo.IsOperate), true));
             return new DefaultResult
             {
                 Value = true

+ 1 - 3
GxPress/Service/GxPress.Service.Implement/Flow/FlowService.Actions1.Add.cs

@@ -208,9 +208,7 @@ namespace GxPress.Service.Implement
         /// <returns></returns>
         public async Task<bool> ActionsWait(int flowId, int userId)
         {
-            var flow = await GetAsync(flowId);
-            if (flow == null) return false;
-            var flowTode = await _flowTodoRepository.GetAsync(Q.Where(nameof(Entity.WorkFlow.FlowTodo.FlowId), flowId).Where(nameof(Entity.WorkFlow.FlowTodo.UserId), userId));
+            var flowTode = await _flowTodoRepository.GetAsync(flowId);
             if (flowTode == null)
                 return false;
             flowTode.IsDone = true;