/// <summary>
        /// 创建套卷
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        public CrmQpaperMstr CreateQpaper(CrmQpaperMstrDto dto)
        {
            try
            {
                if (CheckPaperName(dto.Id, dto.PAPER_NAME, dto.PAPER_TYPE, AbpSession.ORG_NO))
                {
                    var strList = dto.INCLUDE_QUESTION_IDS.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList();
                    var list    = _crmQpaperQuRepository.GetAllList(c => c.DEL_FLAG == 1).Where(c => strList.Contains(c.Id)).ToList();
                    //将选择的题目设置为启用
                    foreach (var item in list)
                    {
                        item.QU_ENABLED = 1;
                        _crmQpaperQuRepository.Update(item);
                    }

                    if (string.IsNullOrEmpty(dto.Id))
                    {
                        dto.Id = Guid.NewGuid().ToString("N");
                        _initHelper.InitAdd(dto, AbpSession.USR_ID, AbpSession.ORG_NO, AbpSession.BG_NO);

                        return(_crmQpaperMstrRepository.Insert(dto.ToEntity()));
                    }
                    else
                    {
                        _initHelper.InitUpdate(dto, AbpSession.USR_ID);
                        return(_crmQpaperMstrRepository.Update(dto.ToEntity()));
                    }
                }
                return(null);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        /// <summary>
        /// 编辑/新增题目
        /// </summary>
        /// <param name="crmQpaperQuDto"></param>
        /// <returns></returns>
        public CrmQpaperQu SaveQpaperQuInfo(CrmQpaperQuDto crmQpaperQuDto, ref string msg)
        {
            try
            {
                CrmQpaperQu qu = null;
                if (CheckQuestion(crmQpaperQuDto.Id, crmQpaperQuDto.QU_NAME, crmQpaperQuDto.QU_SN, AbpSession.BG_NO, ref msg))
                {
                    if (string.IsNullOrEmpty(crmQpaperQuDto.Id))
                    {
                        //新增
                        crmQpaperQuDto.Id = Guid.NewGuid().ToString("N");
                        _initHelper.InitAdd(crmQpaperQuDto, AbpSession.USR_ID, AbpSession.ORG_NO, AbpSession.BG_NO);

                        qu = _crmQpaperQuRepository.Insert(crmQpaperQuDto.ToEntity());
                    }
                    else
                    {
                        //修改
                        _initHelper.InitUpdate(crmQpaperQuDto, AbpSession.USR_ID);
                        qu = _crmQpaperQuRepository.Update(crmQpaperQuDto.ToEntity());
                    }
                }

                return(qu);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }