| | |
| | | { |
| | | for (int i = 0; i < Falv.Length; i++) |
| | | { |
| | | if (!string.IsNullOrEmpty(dto.Falv[i])) |
| | | if (!string.IsNullOrEmpty(dto.Falv[i]) || !string.IsNullOrEmpty(dto.Fatiao[i]) || !string.IsNullOrEmpty(dto.Fatiaomingxi[i])) |
| | | { |
| | | ExpertTestTopicjiexi expertTestTopicjiexi = new ExpertTestTopicjiexi(); |
| | | |
| | |
| | | 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, |
| | |
| | | into ksssss |
| | | from kkk in ksssss.DefaultIfEmpty() |
| | | |
| | | |
| | | //join ll in ( from aaa in _context.ExpertTestTopicanwsers.Where(x => x.RecStatus == "A").Select(e => new { Topic = e.Topic, Items = e.Anwserno + " " + e.Anwser + "</br>" }).GroupBy(e => new { e.Topic }) |
| | | // let ids = aaa.Select(b => b.Items.ToString()).ToArray() |
| | | |
| | | // select new { Topic = aaa.Key.Topic, Items = String.Join(" ", ids) } |
| | | // //.Select(eg => new |
| | | // //{ |
| | | // // Topic = eg.Key.Topic, |
| | | // // //EmployeeName = eg.First().EmployeeName, |
| | | // // Items = eg.Select(i => i.Anwserno) + " " + eg.Select(i => i.Anwser) + "</br>", |
| | | // //}) |
| | | // ) |
| | | //on a.Id equals ll.Topic |
| | | // into llsssss |
| | | //from llll in llsssss.DefaultIfEmpty() |
| | | join l in _context.ExpertTestTopicjiexis |
| | | on a.Id equals l.Topic |
| | | into lsssss |
| | | from lll in lsssss.DefaultIfEmpty() |
| | | |
| | | |
| | | |
| | | //join ll in ( from aaa in _context.ExpertTestTopicanwsers.Where(x => x.RecStatus == "A").Select(e => new { Topic = e.Topic, Items = e.Anwserno + " " + e.Anwser + "</br>" }).GroupBy(e => new { e.Topic }) |
| | | // let ids = aaa.Select(b => b.Items.ToString()).ToArray() |
| | | |
| | | // select new { Topic = aaa.Key.Topic, Items = String.Join(" ", ids) } |
| | | // //.Select(eg => new |
| | | // //{ |
| | | // // Topic = eg.Key.Topic, |
| | | // // //EmployeeName = eg.First().EmployeeName, |
| | | // // Items = eg.Select(i => i.Anwserno) + " " + eg.Select(i => i.Anwser) + "</br>", |
| | | // //}) |
| | | // ) |
| | | //on a.Id equals ll.Topic |
| | | // into llsssss |
| | | //from llll in llsssss.DefaultIfEmpty() |
| | | |
| | | |
| | | |
| | | where a.RecStatus == "A" |
| | | |
| | | |
| | | |
| | | where a.RecStatus == "A" |
| | | |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Topictype) || a.Topictype == searchEntity.Topictype.Trim()) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Zhishitype) || a.Zhishitype == searchEntity.Zhishitype.Trim()) |
| | |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Topic) || a.Topic.Contains(searchEntity.Topic.Trim())) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Area) || a.Area == searchEntity.Area.Trim()) |
| | | |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Falv) || lll.Falv == searchEntity.Falv.Trim()) |
| | | |
| | | |
| | | && (string.IsNullOrWhiteSpace(searchEntity.shanchuzhishitype) || a.Zhishitype == searchEntity.shanchuzhishitype.Trim()) |
| | | |
| | | |
| | | |
| | | select new ExpertTestTopicDTO |
| | | select new ExpertTestTopicDTO |
| | | { |
| | | Id = a.Id, |
| | | Topictype = a.Topictype, |
| | |
| | | Modifytime = a.Modifytime, |
| | | |
| | | } |
| | | ).OrderByDescending(x => x.Modifytime).ToList(); |
| | | ).Distinct().OrderByDescending(x => x.Modifytime).ToList(); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | //if (searchEntity.totalrows == 0) |
| | | searchEntity.totalrows = query.Count(); |
| | | //if (searchEntity.totalrows == 0) |
| | | searchEntity.totalrows = query.Count(); |
| | | var lianlist = query.Skip((searchEntity.page - 1) * searchEntity.rows).Take(searchEntity.rows).ToList(); |
| | | |
| | | var lianlist11 = lianlist.Select(x => x.Id).ToList(); |
| | |
| | | |
| | | foreach (var quer in querydel) |
| | | { |
| | | lian.Topic += quer.Anwserno + " " + quer.Anwser + " </br>"; |
| | | if (lian.Topictype != "03") |
| | | { |
| | | lian.Topic += quer.Anwserno + " " + quer.Anwser + " </br>"; |
| | | } |
| | | |
| | | if(quer.Shifouzhengqu == "A") |
| | | { |
| | | lian.Anwsers += quer.Anwserno ; |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | jiexi +=(falv!=null? "《" + falv.Comments + "》" : "") + " " + quer.Fatiao + " " + quer.Jiexi + " </br>" ; |
| | | } |
| | | lian.Jiexi = jiexi + lian.Jiexi + " </br>"; |
| | | if (string.IsNullOrEmpty(lian.Jiexi)) |
| | | { |
| | | lian.Jiexi = jiexi; |
| | | } |
| | | else |
| | | { |
| | | lian.Jiexi = jiexi + lian.Jiexi + " </br>"; |
| | | } |
| | | |
| | | } |
| | | |
| | | data.LoadData(searchEntity, lianlist); |
| | |
| | | /// <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); |
| | |
| | | |
| | | 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" |
| | |
| | | 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.##"), |