From 62a61aec678ac2b67d9735b3c38e43747db29eda Mon Sep 17 00:00:00 2001
From: he <10978375@qq.com>
Date: Fri, 20 May 2022 14:14:25 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=80=E7=89=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../IRaCIS.Core.Application.xml | 7 +++
.../Service/Common/FrontAuditConfigService.cs | 51 ++++++++++++++++++-
.../Common/Dto/SetDictionaryValueDto.cs | 31 +++++++++++
3 files changed, 87 insertions(+), 2 deletions(-)
diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index 154d2ba87..97161d6ac 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -50,6 +50,13 @@
+
+
+ 获取查询对象
+
+
+
+
获取表列名
diff --git a/IRaCIS.Core.Application/Service/Common/FrontAuditConfigService.cs b/IRaCIS.Core.Application/Service/Common/FrontAuditConfigService.cs
index b7622a57b..8438efd2f 100644
--- a/IRaCIS.Core.Application/Service/Common/FrontAuditConfigService.cs
+++ b/IRaCIS.Core.Application/Service/Common/FrontAuditConfigService.cs
@@ -14,6 +14,7 @@ using IRaCIS.Core.Infra.EFCore.Common.Dto;
namespace IRaCIS.Core.Application.Service
{
+
///
/// FrontAuditConfigService
///
@@ -22,10 +23,17 @@ namespace IRaCIS.Core.Application.Service
{
private readonly IRepository _frontAuditConfigRepository;
+ private readonly IRepository _qCChallengeDialogRepository;
+ private readonly IRepository _checkChallengeDialogRepository;
- public FrontAuditConfigService(IRepository frontAuditConfigRepository)
+ public FrontAuditConfigService(IRepository frontAuditConfigRepository,
+ IRepository qCChallengeDialogRepository,
+ IRepository checkChallengeDialogRepository
+ )
{
_frontAuditConfigRepository = frontAuditConfigRepository;
+ this._qCChallengeDialogRepository = qCChallengeDialogRepository;
+ this._checkChallengeDialogRepository = checkChallengeDialogRepository;
}
///
@@ -38,6 +46,45 @@ namespace IRaCIS.Core.Application.Service
return await _frontAuditConfigRepository._dbContext.GetTableList().ToListAsync();
}
+ ///
+ /// 获取查询对象
+ ///
+ ///
+ ///
+ [HttpPost]
+ public async Task> AccessToDialogue(AccessToDialogueInDto inDto)
+ {
+ List data = new List();
+ switch (inDto.Type)
+ {
+ case AccessToDialogueEnum.Question:
+
+
+ data =await _qCChallengeDialogRepository.Where(x => x.QCChallengeId == inDto.Id && x.CreateTime <= inDto.Createtime.AddSeconds(1)).Include(x => x.CreateUser).Select(
+ x => new AccessToDialogueOutDto()
+ {
+ CreateTime = x.CreateTime,
+ CreateUserName = x.CreateUser.UserName,
+ TalkContent = x.TalkContent
+ }
+ ).OrderBy(x => x.CreateTime).ToListAsync();
+ break;
+ case AccessToDialogueEnum.Consistency:
+ data = await _checkChallengeDialogRepository.Where(x => x.SubjectVisitId == inDto.Id && x.CreateTime <= inDto.Createtime.AddSeconds(1)).Include(x => x.CreateUser).Select(
+ x => new AccessToDialogueOutDto()
+ {
+ CreateTime = x.CreateTime,
+ CreateUserName = x.CreateUser.UserName,
+ TalkContent = x.TalkContent
+ }
+ ).OrderBy(x => x.CreateTime).ToListAsync();
+ break;
+
+ }
+
+ return data;
+ }
+
///
/// 获取表列名
///
@@ -71,7 +118,7 @@ namespace IRaCIS.Core.Application.Service
frontAudits.Add(frontAuditConfig);
frontAudits.AddRange(fronts);
- await _frontAuditConfigRepository.AddRangeAsync(frontAudits);
+ await _frontAuditConfigRepository.AddRangeAsync(frontAudits);
await _frontAuditConfigRepository.SaveChangesAsync();
}
diff --git a/IRaCIS.Core.Infra.EFCore/Common/Dto/SetDictionaryValueDto.cs b/IRaCIS.Core.Infra.EFCore/Common/Dto/SetDictionaryValueDto.cs
index fb3c8a1c6..cfd255f05 100644
--- a/IRaCIS.Core.Infra.EFCore/Common/Dto/SetDictionaryValueDto.cs
+++ b/IRaCIS.Core.Infra.EFCore/Common/Dto/SetDictionaryValueDto.cs
@@ -17,6 +17,37 @@ namespace IRaCIS.Core.Infra.EFCore.Common.Dto
}
+ public class AccessToDialogueInDto
+ {
+ public Guid Id { get; set; }
+
+ public AccessToDialogueEnum Type { get; set; }
+
+ public DateTime Createtime { get; set; }
+ }
+
+
+ public class AccessToDialogueOutDto
+ {
+ public string CreateUserName { get; set; }
+
+ public string TalkContent { get; set; }
+
+ public DateTime CreateTime { get; set; }
+ }
+
+ public enum AccessToDialogueEnum
+ {
+ ///
+ /// 质疑
+ ///
+ Question = 0,
+
+ ///
+ /// 一致性核查
+ ///
+ Consistency = 1,
+ }
///
/// 复制