/// <summary>
        /// 新增TaskExamine
        /// </summary>
        protected virtual async Task <TaskExamineEditDto> CreateTaskExamineAsync(TaskExamineEditDto input)
        {
            //TODO:新增前的逻辑判断,是否允许新增

            var entity = ObjectMapper.Map <TaskExamine>(input);
            var id     = await _taskexamineRepository.InsertAndGetIdAsync(entity);

            return(entity.MapTo <TaskExamineEditDto>());
        }
        /// <summary>
        /// 删除任务信息
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public async Task TaskExaminesDeleteByIdAsync(TaskExamineEditDto input)
        {
            var entity = await _taskexamineRepository.GetAsync(input.Id);

            input.MapTo(entity);
            entity.IsDeleted     = true;
            entity.DeletionTime  = DateTime.Now;
            entity.DeleterUserId = AbpSession.UserId;
            await _taskexamineRepository.UpdateAsync(entity);
        }
        /// <summary>
        /// 编辑TaskExamine
        /// </summary>
        protected virtual async Task <TaskExamineEditDto> UpdateTaskExamineAsync(TaskExamineEditDto input)
        {
            //TODO:更新前的逻辑判断,是否允许更新

            var entity = await _taskexamineRepository.GetAsync(input.Id);

            input.MapTo(entity);
            var result = await _taskexamineRepository.UpdateAsync(entity);

            return(entity.MapTo <TaskExamineEditDto>());
        }
 /// <summary>
 /// 添加或者修改TaskExamine的公共方法
 /// </summary>
 /// <param name="input"></param>
 /// <returns></returns>
 private async Task CreateOrUpdateTaskExamineAsync(TaskExamineEditDto input)
 {
     if (input.Id == 0)
     {
         await UpdateTaskExamineAsync(input);
     }
     else
     {
         await CreateTaskExamineAsync(input);
     }
 }
 /// <summary>
 /// 添加或者修改TaskExamine的公共方法
 /// </summary>
 /// <param name="input"></param>
 /// <returns></returns>
 public async Task <TaskExamineEditDto> CreateOrUpdateTaskExamineAsync(TaskExamineEditDto input)
 {
     if (input.Id == 0)
     {
         return(await UpdateTaskExamineAsync(input));
     }
     else
     {
         return(await CreateTaskExamineAsync(input));
     }
 }
        /// <summary>
        /// MPA版本才会用到的方法
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public async Task <GetTaskExamineForEditOutput> GetTaskExamineForEdit(NullableIdDto <int> input)
        {
            var output = new GetTaskExamineForEditOutput();
            TaskExamineEditDto taskexamineEditDto;

            if (input.Id.HasValue)
            {
                var entity = await _taskexamineRepository.GetAsync(input.Id.Value);

                taskexamineEditDto = entity.MapTo <TaskExamineEditDto>();

                //taskexamineEditDto = ObjectMapper.Map<List <taskexamineEditDto>>(entity);
            }
            else
            {
                taskexamineEditDto = new TaskExamineEditDto();
            }

            output.TaskExamine = taskexamineEditDto;
            return(output);
        }