From d14b82fec13361486c49165371b5dee1b7089c09 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期四, 09 十二月 2021 13:35:23 +0800
Subject: [PATCH] 提交
---
zhengcaioa/Services/ExpertTestTopicService.cs | 67 ++++++++++++++++++++-------------
1 files changed, 40 insertions(+), 27 deletions(-)
diff --git a/zhengcaioa/Services/ExpertTestTopicService.cs b/zhengcaioa/Services/ExpertTestTopicService.cs
index d98cbc3..2b69280 100644
--- a/zhengcaioa/Services/ExpertTestTopicService.cs
+++ b/zhengcaioa/Services/ExpertTestTopicService.cs
@@ -121,7 +121,7 @@
{
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();
@@ -243,28 +243,33 @@
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())
@@ -274,12 +279,12 @@
&& (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())
- select new ExpertTestTopicDTO
+
+ select new ExpertTestTopicDTO
{
Id = a.Id,
Topictype = a.Topictype,
@@ -306,15 +311,15 @@
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();
@@ -353,7 +358,15 @@
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);
--
Gitblit v1.9.1