Esempio n. 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="keyValue"></param>
        /// <param name="entity"></param>
        public void SaveEvaluate(string keyValue, string category, ActivityEvaluateEntity entity)
        {
            var user = OperatorProvider.Provider.Current();

            try
            {
                if (user != null)  //移动端评价,user=null
                {
                    entity.DeptName = user.DeptName;
                }
                service.SaveEvaluate(keyValue, entity);
                NextTodo(category, keyValue);
                var messagebll = new MessageBLL();
                switch (category)
                {
                case "班前班后会":
                    messagebll.SendMessage("评价班前班后会", entity.ActivityEvaluateId);
                    break;

                case "危险预知训练":
                    messagebll.SendMessage("评价危险预知训练", entity.ActivityEvaluateId);
                    break;

                case "班组活动":
                    messagebll.SendMessage("评价班组活动", entity.ActivityEvaluateId);
                    break;

                case "人身风险预控":
                    messagebll.SendMessage("人身风险预控评价", entity.ActivityEvaluateId);
                    //var dangerbll = new DangerBLL();
                    //var danger = dangerbll.GetTrainingDetail(keyValue);
                    //users = userbll.GetDeptUsers(danger.GroupId);
                    //messagebll.SendMessage("评价班前班后会", null, string.Join(",", users.Select(x => x.UserId)), "工作评价", meeting.MeetingStartTime.ToString("yyyy-MM-dd"), keyValue);
                    break;

                default:
                    break;
                }
            }
            catch (Exception e)
            {
                throw e;
            }
        }