username@email.com
2022-08-27 6e2b929cf381e2320ba6e7dec56c0371124d2b51
zhengcaioa/Services/ExpertTestTopicService.cs
@@ -186,8 +186,7 @@
            var listCode = (from a in _context.SysCodeDtls
                            join b in _context.SysCodes
                            on a.CodeId equals b.Id
                            where a.RecStatus == "A"
                                          && b.RecStatus == "A"
                            where  b.RecStatus == "A"
                            select new CodeDataEntity()
                            {
                                CodeId = b.Id,
@@ -281,7 +280,7 @@
                               && (string.IsNullOrWhiteSpace(searchEntity.Falv) || lll.Falv == searchEntity.Falv.Trim())
                                && (string.IsNullOrWhiteSpace(searchEntity.shanchuzhishitype) || a.Zhishitype == searchEntity.shanchuzhishitype.Trim())
                         select  new ExpertTestTopicDTO
@@ -408,9 +407,31 @@
        /// <returns></returns>
        public List<ExpertTestTopicDTO> GetList()
        {
            var listCode = (from a in _context.SysCodeDtls
                            join b in _context.SysCodes
                            on a.CodeId equals b.Id
                            where a.RecStatus == "A" &&  b.RecStatus == "A"
                            select new CodeDataEntity()
                            {
                                CodeId = b.Id,
                                CodeTable = b.CodeTable,
                                CodeField = b.CodeField,
                                CodeSn = a.CodeSn,
                                Comments = a.Comments,
                                Contents = a.Contents,
                                RecStatus = a.RecStatus,
                                Sort = a.Sort
                            }
                              );
            var listRole = _context.ExpertTestTopics.Where(r => r.RecStatus == "A").ToList();
            var listRole =
                 ( from a in _context.ExpertTestTopics.Where(r => r.RecStatus == "A")
                   join f in listCode.Where(x => x.CodeTable == "expert_test_topic" && x.CodeField == "zhishitype")
                    on a.Zhishitype equals f.CodeSn
                   select a ).ToList();
            var list = _mapper.Map<List<ExpertTestTopicDTO>>(listRole);
@@ -837,8 +858,8 @@
                            join f in listCode.Where(x => x.CodeTable == "expert_test_topic" && x.CodeField == "zhishitype")
                       on a.Zhishitype equals f.CodeSn
                       into fsssss
                            from fff in fsssss.DefaultIfEmpty()
                       //into fsssss
                       //     from fff in fsssss.DefaultIfEmpty()
                            where a.RecStatus == "A"
@@ -850,7 +871,7 @@
                                Topictype = a.Topictype,
                                TopictypeName = eee.Comments,
                                Zhishitype = a.Zhishitype,
                                ZhishitypeName = fff.Comments,
                                ZhishitypeName = f.Comments,
                                Fenshu = a.Fenshu ?? 0,
                                Fenzhi = a.Fenzhi??0,
                                FenshuName = (a.Fenshu ?? 0).ToString("0.##"),