修改一版
parent
9c03cdbeb3
commit
62a61aec67
|
@ -50,6 +50,13 @@
|
|||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.FrontAuditConfigService.AccessToDialogue(IRaCIS.Core.Infra.EFCore.Common.Dto.AccessToDialogueInDto)">
|
||||
<summary>
|
||||
获取查询对象
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.FrontAuditConfigService.GetTableColumn(System.String)">
|
||||
<summary>
|
||||
获取表列名
|
||||
|
|
|
@ -14,6 +14,7 @@ using IRaCIS.Core.Infra.EFCore.Common.Dto;
|
|||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// FrontAuditConfigService
|
||||
/// </summary>
|
||||
|
@ -22,10 +23,17 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
|
||||
private readonly IRepository<FrontAuditConfig> _frontAuditConfigRepository;
|
||||
private readonly IRepository<QCChallengeDialog> _qCChallengeDialogRepository;
|
||||
private readonly IRepository<CheckChallengeDialog> _checkChallengeDialogRepository;
|
||||
|
||||
public FrontAuditConfigService(IRepository<FrontAuditConfig> frontAuditConfigRepository)
|
||||
public FrontAuditConfigService(IRepository<FrontAuditConfig> frontAuditConfigRepository,
|
||||
IRepository<QCChallengeDialog> qCChallengeDialogRepository,
|
||||
IRepository<CheckChallengeDialog> checkChallengeDialogRepository
|
||||
)
|
||||
{
|
||||
_frontAuditConfigRepository = frontAuditConfigRepository;
|
||||
this._qCChallengeDialogRepository = qCChallengeDialogRepository;
|
||||
this._checkChallengeDialogRepository = checkChallengeDialogRepository;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -38,6 +46,45 @@ namespace IRaCIS.Core.Application.Service
|
|||
return await _frontAuditConfigRepository._dbContext.GetTableList().ToListAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取查询对象
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<List<AccessToDialogueOutDto>> AccessToDialogue(AccessToDialogueInDto inDto)
|
||||
{
|
||||
List<AccessToDialogueOutDto> data = new List<AccessToDialogueOutDto>();
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取表列名
|
||||
/// </summary>
|
||||
|
|
|
@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// 质疑
|
||||
/// </summary>
|
||||
Question = 0,
|
||||
|
||||
/// <summary>
|
||||
/// 一致性核查
|
||||
/// </summary>
|
||||
Consistency = 1,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 复制
|
||||
|
|
Loading…
Reference in New Issue