Uat_Study
parent
728716256c
commit
ea435f94b1
|
@ -8,7 +8,61 @@ using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Service.Reading.Dto
|
namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
{
|
{
|
||||||
|
public class ReadingTableQuestionSystemView
|
||||||
|
{
|
||||||
|
public Guid Id { get; set; }
|
||||||
|
public Guid ReadingQuestionId { get; set; }
|
||||||
|
public string Type { get; set; }
|
||||||
|
public Guid? ParentId { get; set; }
|
||||||
|
public string ParentTriggerValue { get; set; }
|
||||||
|
public string QuestionName { get; set; }
|
||||||
|
public int IsRequired { get; set; }
|
||||||
|
public int ShowOrder { get; set; }
|
||||||
|
public string TypeValue { get; set; }
|
||||||
|
public bool IsEnable { get; set; }
|
||||||
|
public DateTime CreateTime { get; set; }
|
||||||
|
public Guid CreateUserId { get; set; }
|
||||||
|
public string Remark { get; set; }
|
||||||
|
public Guid? RelevanceId { get; set; }
|
||||||
|
public string RelevanceValue { get; set; }
|
||||||
|
public int ShowQuestion { get; set; }
|
||||||
|
public int? MaxQuestionCount { get; set; }
|
||||||
|
public string DataTableName { get; set; }
|
||||||
|
public string DataTableColumn { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class ReadingTableQuestionSystemQuery
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
public Guid ReadingQuestionId { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
///<summary> ReadingTableQuestionSystemAddOrEdit 列表查询参数模型</summary>
|
||||||
|
public class ReadingTableQuestionSystemAddOrEdit
|
||||||
|
{
|
||||||
|
public Guid Id { get; set; }
|
||||||
|
public Guid ReadingQuestionId { get; set; }
|
||||||
|
public string Type { get; set; }
|
||||||
|
public Guid? ParentId { get; set; }
|
||||||
|
public string ParentTriggerValue { get; set; }
|
||||||
|
public string QuestionName { get; set; }
|
||||||
|
public int IsRequired { get; set; }
|
||||||
|
public int ShowOrder { get; set; }
|
||||||
|
public string TypeValue { get; set; }
|
||||||
|
public bool IsEnable { get; set; }
|
||||||
|
public DateTime CreateTime { get; set; }
|
||||||
|
public Guid CreateUserId { get; set; }
|
||||||
|
public string Remark { get; set; }
|
||||||
|
public Guid? RelevanceId { get; set; }
|
||||||
|
public string RelevanceValue { get; set; }
|
||||||
|
public int ShowQuestion { get; set; }
|
||||||
|
public int? MaxQuestionCount { get; set; }
|
||||||
|
public string DataTableName { get; set; }
|
||||||
|
public string DataTableColumn { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class ReadingCriterionPageView
|
public class ReadingCriterionPageView
|
||||||
{
|
{
|
||||||
|
@ -484,6 +538,21 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
public Guid? ReadingCriterionPageId { get; set; }
|
public Guid? ReadingCriterionPageId { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class GetReadingTableOtherQuestionSystemInDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 表格父问题的ID
|
||||||
|
/// </summary>
|
||||||
|
[NotDefault]
|
||||||
|
public Guid ReadingQuestionId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 当前ID
|
||||||
|
/// </summary>
|
||||||
|
public Guid? Id { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class GetTrialCriterionOtherQuestionInDto
|
public class GetTrialCriterionOtherQuestionInDto
|
||||||
{
|
{
|
||||||
[NotDefault]
|
[NotDefault]
|
||||||
|
|
|
@ -33,7 +33,7 @@ namespace IRaCIS.Application.Services
|
||||||
private readonly IRepository<Dictionary> _dictionaryRepository;
|
private readonly IRepository<Dictionary> _dictionaryRepository;
|
||||||
private readonly IRepository<ReadingCriterionPage> _readingCriterionPageRepository;
|
private readonly IRepository<ReadingCriterionPage> _readingCriterionPageRepository;
|
||||||
private readonly IRepository<Trial> _trialRepository;
|
private readonly IRepository<Trial> _trialRepository;
|
||||||
|
private readonly IRepository<ReadingTableQuestionSystem> _readingTableQuestionSystemRepository;
|
||||||
private readonly IRepository<ReadingTaskQuestionAnswer> _readingTaskQuestionAnswer;
|
private readonly IRepository<ReadingTaskQuestionAnswer> _readingTaskQuestionAnswer;
|
||||||
private readonly IRepository<PreviousPDF> _previousPDFRepository;
|
private readonly IRepository<PreviousPDF> _previousPDFRepository;
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ namespace IRaCIS.Application.Services
|
||||||
IRepository<Dictionary> dictionaryRepository,
|
IRepository<Dictionary> dictionaryRepository,
|
||||||
IRepository<ReadingCriterionPage> readingCriterionPageRepository,
|
IRepository<ReadingCriterionPage> readingCriterionPageRepository,
|
||||||
IRepository<Trial> trialRepository,
|
IRepository<Trial> trialRepository,
|
||||||
|
IRepository<ReadingTableQuestionSystem> readingTableQuestionSystemRepository,
|
||||||
IRepository<ReadingTaskQuestionAnswer> readingTaskQuestionAnswer,
|
IRepository<ReadingTaskQuestionAnswer> readingTaskQuestionAnswer,
|
||||||
IRepository<PreviousPDF> previousPDFRepository
|
IRepository<PreviousPDF> previousPDFRepository
|
||||||
)
|
)
|
||||||
|
@ -63,11 +63,89 @@ namespace IRaCIS.Application.Services
|
||||||
this._dictionaryRepository = dictionaryRepository;
|
this._dictionaryRepository = dictionaryRepository;
|
||||||
this._readingCriterionPageRepository = readingCriterionPageRepository;
|
this._readingCriterionPageRepository = readingCriterionPageRepository;
|
||||||
this._trialRepository = trialRepository;
|
this._trialRepository = trialRepository;
|
||||||
|
this._readingTableQuestionSystemRepository = readingTableQuestionSystemRepository;
|
||||||
this._readingTaskQuestionAnswer = readingTaskQuestionAnswer;
|
this._readingTaskQuestionAnswer = readingTaskQuestionAnswer;
|
||||||
this._previousPDFRepository = previousPDFRepository;
|
this._previousPDFRepository = previousPDFRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取系统的表格问题
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<List<ReadingTableQuestionSystemView>> GetReadingTableQuestionSystemList(ReadingTableQuestionSystemQuery inDto)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
var readingTableQuestionSystemQueryable = _readingTableQuestionSystemRepository
|
||||||
|
.Where(x=>x.ReadingQuestionId==inDto.ReadingQuestionId).ProjectTo<ReadingTableQuestionSystemView>(_mapper.ConfigurationProvider);
|
||||||
|
|
||||||
|
var result=await readingTableQuestionSystemQueryable.ToListAsync();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 新增修改系统表格问题
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="addOrEditReadingTableQuestionSystem"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<IResponseOutput> AddOrUpdateReadingTableQuestionSystem(ReadingTableQuestionSystemAddOrEdit addOrEditReadingTableQuestionSystem)
|
||||||
|
{
|
||||||
|
|
||||||
|
var entity = await _readingTableQuestionSystemRepository.InsertOrUpdateAsync(addOrEditReadingTableQuestionSystem, true);
|
||||||
|
|
||||||
|
return ResponseOutput.Ok(entity.Id.ToString());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 删除系统表格问题
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="Id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpDelete("{Id:guid}")]
|
||||||
|
public async Task<IResponseOutput> DeleteReadingTableQuestionSystem(Guid Id)
|
||||||
|
{
|
||||||
|
if(await _readingTableQuestionSystemRepository.AnyAsync(x=>x.ParentId==Id||x.RelevanceId==Id))
|
||||||
|
{
|
||||||
|
return ResponseOutput.NotOk("当前问题存在子问题 删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
await _readingTableQuestionSystemRepository.BatchDeleteNoTrackingAsync(t => t.Id == Id);
|
||||||
|
var success= await _readingTableQuestionSystemRepository.SaveChangesAsync();
|
||||||
|
return ResponseOutput.Result(success);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取系统表格其他问题
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<List<CriterionOtherQuestionOutDto>> GetReadingTableOtherQuestionSystem(GetReadingTableOtherQuestionSystemInDto inDto)
|
||||||
|
{
|
||||||
|
var types = new List<string>()
|
||||||
|
{
|
||||||
|
"select","radio"
|
||||||
|
};
|
||||||
|
var questionList = await _readingTableQuestionSystemRepository.Where(x => x.ReadingQuestionId == inDto.ReadingQuestionId)
|
||||||
|
.Where(x => types.Contains(x.Type))
|
||||||
|
.WhereIf(inDto.Id != null, x => x.Id != inDto.Id && x.ParentId != inDto.Id)
|
||||||
|
|
||||||
|
.Select(x => new CriterionOtherQuestionOutDto()
|
||||||
|
{
|
||||||
|
QuestionId = x.Id,
|
||||||
|
QuestionName = x.QuestionName,
|
||||||
|
TypeValue = x.TypeValue,
|
||||||
|
}).ToListAsync();
|
||||||
|
|
||||||
|
return questionList;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设置项目裁判信息
|
/// 设置项目裁判信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -51,8 +51,10 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
#region 阅片问题
|
#region 阅片问题
|
||||||
|
|
||||||
|
CreateMap<ReadingTableQuestionSystem, ReadingTableQuestionSystemView>();
|
||||||
|
CreateMap<ReadingTableQuestionSystemAddOrEdit, ReadingTableQuestionSystem>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CreateMap<ReadingCriterionPageAddOrEdit, ReadingCriterionPage>();
|
CreateMap<ReadingCriterionPageAddOrEdit, ReadingCriterionPage>();
|
||||||
|
|
||||||
CreateMap<ReadingQuestionTrial, ReadingQuestionSystem>();
|
CreateMap<ReadingQuestionTrial, ReadingQuestionSystem>();
|
||||||
|
|
|
@ -0,0 +1,112 @@
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------
|
||||||
|
// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||||
|
// 生成时间 2022-08-11 14:15:27
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||||
|
using System;
|
||||||
|
using IRaCIS.Core.Domain.Share;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
namespace IRaCIS.Core.Domain.Models
|
||||||
|
{
|
||||||
|
///<summary>
|
||||||
|
///系统表格问题
|
||||||
|
///</summary>
|
||||||
|
[Table("ReadingTableQuestionSystem")]
|
||||||
|
public class ReadingTableQuestionSystem : Entity, IAuditAdd
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 问题ID
|
||||||
|
/// </summary>
|
||||||
|
public Guid ReadingQuestionId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Type
|
||||||
|
/// </summary>
|
||||||
|
public string Type { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ParentId
|
||||||
|
/// </summary>
|
||||||
|
public Guid? ParentId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///父问题触发值
|
||||||
|
/// </summary>
|
||||||
|
public string ParentTriggerValue { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 问题名称
|
||||||
|
/// </summary>
|
||||||
|
public string QuestionName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// IsRequired
|
||||||
|
/// </summary>
|
||||||
|
public int IsRequired { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序号
|
||||||
|
/// </summary>
|
||||||
|
public int ShowOrder { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 值
|
||||||
|
/// </summary>
|
||||||
|
public string TypeValue { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否启用
|
||||||
|
/// </summary>
|
||||||
|
public bool IsEnable { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 创建时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime CreateTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 创建用户
|
||||||
|
/// </summary>
|
||||||
|
public Guid CreateUserId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 备注
|
||||||
|
/// </summary>
|
||||||
|
public string Remark { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 显示父问题
|
||||||
|
/// </summary>
|
||||||
|
public Guid? RelevanceId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 显示父问题的值
|
||||||
|
/// </summary>
|
||||||
|
public string RelevanceValue { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否显示
|
||||||
|
/// </summary>
|
||||||
|
public int ShowQuestion { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 最大问题数
|
||||||
|
/// </summary>
|
||||||
|
public int? MaxQuestionCount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 数据表名称
|
||||||
|
/// </summary>
|
||||||
|
public string DataTableName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 数据列
|
||||||
|
/// </summary>
|
||||||
|
public string DataTableColumn { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -202,6 +202,8 @@ namespace IRaCIS.Core.Infra.EFCore
|
||||||
|
|
||||||
|
|
||||||
#region Reading
|
#region Reading
|
||||||
|
|
||||||
|
public virtual DbSet<ReadingTableQuestionSystem> ReadingTableQuestionSystem { get; set; }
|
||||||
public virtual DbSet<ReadingPeriodSet> ReadingPeriodSet { get; set; }
|
public virtual DbSet<ReadingPeriodSet> ReadingPeriodSet { get; set; }
|
||||||
|
|
||||||
public virtual DbSet<ReadingTaskQuestionAnswer> ReadingTaskQuestionAnswer { get; set; }
|
public virtual DbSet<ReadingTaskQuestionAnswer> ReadingTaskQuestionAnswer { get; set; }
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
public static readonly string ConnectionString = "Server=123.56.94.154,1433\\MSSQLSERVER;Database=IRaCIS_New_Tet;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true";
|
public static readonly string ConnectionString = "Server=123.56.94.154,1433\\MSSQLSERVER;Database=IRaCIS_New_Tet;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true";
|
||||||
public static readonly string DbDatabase = "IRaCIS_New_Tet";
|
public static readonly string DbDatabase = "IRaCIS_New_Tet";
|
||||||
//表名称用字符串,拼接
|
//表名称用字符串,拼接
|
||||||
public static readonly string TableName = "ReadingOncologyTaskInfo";
|
public static readonly string TableName = "ReadingTableQuestionSystem";
|
||||||
//具体文件里面 例如service 可以配置是否分页
|
//具体文件里面 例如service 可以配置是否分页
|
||||||
}
|
}
|
||||||
#>
|
#>
|
||||||
|
|
Loading…
Reference in New Issue