/// <summary>
        /// 更新假期信息
        /// </summary>
        /// <param name="dbContext">数据库上下文</param>
        /// <param name="order">申请单</param>
        /// <param name="workflow">申请单流程</param>
        /// <param name="nextStep">流程下一步</param>
        /// <param name="nextStatus">申请单状态</param>
        private void UpdateAttendanceSummary(MissionskyOAEntities dbContext, OrderModel order, WorkflowModel workflow,
                                             WorkflowStepModel nextStep, OrderStatus nextStatus)
        {
            var detail = order.OrderDets.FirstOrDefault(); //申请单详细

            if (detail == null || detail.IOHours == null || Math.Abs(detail.IOHours.Value) <= 0.0)
            {
                Log.Error("申请单无效");
                throw new InvalidOperationException("申请单无效。");
            }

            var curStep = order.NextStep == Constant.WORKFLOW_DIRECT_SUPERVISOR_APPROVE_NODE
                ? workflow.GetDirectSupervisorApproveStep()
                : workflow.WorkflowSteps.FirstOrDefault(it => it.Id == order.NextStep); //当前步骤

            var isUpdated = false;
            var times     = detail.IOHours.Value;

            //1, 拒绝
            if (nextStatus == OrderStatus.Rejected)
            {
                if (curStep != null && curStep.IsFinanceReviewing()) //当前是[财务审阅]: [行政审批]完成,已经更新了假期,需要[财务审阅]时,取消扣除的假期
                {
                    isUpdated = true;
                    times     = -times;
                }
            }
            //2, 流程结束(只能在没有财务审批节点才更新,避免重复更新(原始需求:完成行政审批就已经更新假期))
            else if (!workflow.NeedFinanceApprove() && nextStep == null)
            {
                isUpdated = true;
            }
            //3, 流程未结束, 转到[财务审阅](完成行政审批就更新)
            else if (nextStep != null && nextStep.IsFinanceReviewing())
            {
                isUpdated = true;
            }

            if (isUpdated)
            {
                order.OrderUsers.ToList().ForEach(user =>
                {
                    var summary = new UpdateAttendanceSummaryModel()
                    {
                        UserId      = user.Id,
                        SummaryYear = DateTime.Now.Year,
                        Times       = times,
                        Type        = order.OrderType
                    };

                    double beforeUpdated = 0.0;
                    double afterUpdated  = 0.0;
                    string auditMsg      = string.Empty;

                    this._attendanceSummaryService.UpdateAttendanceSummary(dbContext, summary, ref beforeUpdated,
                                                                           ref afterUpdated); //更新假期

                    #region 更新剩余结果

                    if (order.OrderType == OrderType.AnnualLeave)
                    {
                        auditMsg = string.Format("剩余年假: 申请前{0}小时,申请后{1}小时", beforeUpdated, afterUpdated);
                    }

                    else if (order.OrderType == OrderType.Overtime)
                    {
                        auditMsg = string.Format("累计加班: 申请前{0}小时,申请后{1}小时", beforeUpdated, afterUpdated);
                    }
                    else if (order.OrderType == OrderType.DaysOff)
                    {
                        auditMsg = string.Format("剩余调休: 申请前{0}小时,申请后{1}小时", beforeUpdated, afterUpdated);
                    }
                    else
                    {
                        auditMsg = string.Format("累计休假: 申请前{0}小时,申请后{1}小时", beforeUpdated, afterUpdated);
                    }

                    if (!string.IsNullOrEmpty(auditMsg))
                    {
                        detail.Audit = auditMsg;
                    }

                    #endregion
                });
            }
        }