Uat_Study
he 2022-12-08 16:47:37 +08:00
parent 1b123b0a3d
commit 5c3701012a
7 changed files with 83 additions and 13 deletions

View File

@ -424,7 +424,11 @@ namespace IRaCIS.Application.Services
});
await _readModuleRepository.DeleteFromQueryAsync(t => t.Id == readModuleId, true);
await _readModuleRepository.UpdatePartialFromQueryAsync(t => t.Id == readModuleId, x => new ReadModule()
{
IsDeleted = true
});
await _readModuleRepository.SaveChangesAsync();
return ResponseOutput.Result(true);
}

View File

@ -128,9 +128,17 @@ namespace IRaCIS.Application.Services
[HttpDelete("{readingPeriodSetId:guid}")]
public async Task<IResponseOutput> DeleteReadingPeriodSet(Guid readingPeriodSetId)
{
await _readingPeriodSetRepository.DeleteFromQueryAsync(t => t.Id == readingPeriodSetId, true);
await _readingPeriodPlanRepository.DeleteFromQueryAsync(t => t.ReadingPeriodSetId == readingPeriodSetId, true);
await _readingPeriodSetRepository.UpdatePartialFromQueryAsync(t => t.Id == readingPeriodSetId, x => new ReadingPeriodSet()
{
IsDeleted = true
}) ;
await _readingPeriodPlanRepository.UpdatePartialFromQueryAsync(t => t.ReadingPeriodSetId == readingPeriodSetId, x => new ReadingPeriodPlan()
{
IsDeleted = true
}) ;
await _readingPeriodPlanRepository.SaveChangesAsync();
return ResponseOutput.Ok();
}
@ -304,7 +312,10 @@ namespace IRaCIS.Application.Services
TaskState = TaskState.Adbandon
});
await _readModuleRepository.DeleteFromQueryAsync(x => x.ReadingPeriodSetId == indto.Id);
await _readModuleRepository.UpdatePartialFromQueryAsync(x => x.ReadingPeriodSetId == indto.Id,x=>new ReadModule() {
IsDeleted=true
});
}
var readQuery = await _readingPeriodSetRepository.UpdatePartialFromQueryAsync(indto.Id, x => new ReadingPeriodSet()
@ -369,7 +380,14 @@ namespace IRaCIS.Application.Services
ReadingPeriodSetId = inDto.ReadingPeriodSetId
});
});
await _readingPeriodPlanRepository.DeleteFromQueryAsync(x => x.ReadingPeriodSetId == inDto.ReadingPeriodSetId);
await _readingPeriodPlanRepository.UpdatePartialFromQueryAsync(x => x.ReadingPeriodSetId == inDto.ReadingPeriodSetId, x => new ReadingPeriodPlan()
{
IsDeleted = true
});
await _readingPeriodPlanRepository.SaveChangesAsync();
await _readingPeriodPlanRepository.AddRangeAsync(plans);
var result = await _readingPeriodPlanRepository.SaveChangesAsync();

View File

@ -62,7 +62,10 @@ namespace IRaCIS.Core.Application.Triggers
if (readingPeriodSet != null)
{
await _readingPeriodPlanRepository.DeleteFromQueryAsync(x => x.ReadingPeriodSetId == readingPeriodSet.Id && x.SubjectVisitId == subjectVisit.Id);
await _readModuleRepository.DeleteFromQueryAsync(x => x.SubjectVisitId == subjectVisit.Id && x.ReadingPeriodSetId == readingPeriodSet.Id);
await _readModuleRepository.UpdatePartialFromQueryAsync(x => x.SubjectVisitId == subjectVisit.Id && x.ReadingPeriodSetId == readingPeriodSet.Id,x=> new ReadModule() {
IsDeleted = true
});
await _readModuleRepository.SaveChangesAsync();
@ -139,7 +142,10 @@ namespace IRaCIS.Core.Application.Triggers
});
await _readModuleRepository.DeleteFromQueryAsync(x => x.ReadingSetType == ReadingSetType.ImageReading && x.TrialReadingCriterionId == item.Id && x.SubjectVisitId == subjectVisitId, true);
await _readModuleRepository.UpdatePartialFromQueryAsync(x => x.ReadingSetType == ReadingSetType.ImageReading && x.TrialReadingCriterionId == item.Id && x.SubjectVisitId == subjectVisitId, x=> new ReadModule() {
IsDeleted = true
});
await _readModuleRepository.AddAsync(new ReadModule()
{

View File

@ -110,12 +110,15 @@ namespace IRaCIS.Core.Domain.Models
/// </summary>
public Guid CreateUserId { get; set; }
public int? NumberOfFrames { get; set; }
public Guid UpdateUserId { get; set; }
//string UpdateUserName { get; set; }
public DateTime UpdateTime { get; set; }
public int? NumberOfFrames { get; set; }
public bool IsDeleted { get; set; }

View File

@ -11,7 +11,7 @@ namespace IRaCIS.Core.Domain.Models
///读片模块
///</summary>
[Table("ReadModule")]
public class ReadModule : Entity, IAuditAdd
public class ReadModule : Entity, IAuditAdd, IAuditUpdate, ISoftDelete
{
[JsonIgnore]
@ -67,12 +67,25 @@ namespace IRaCIS.Core.Domain.Models
/// </summary>
public Guid TrialId { get; set; }
public Guid UpdateUserId { get; set; }
public DateTime UpdateTime { get; set; }
public bool IsDeleted { get; set; }
public DateTime? DeletedTime { get; set; }
public Guid? DeleteUserId { get; set; }
///// <summary>
/////
///// </summary>
//public decimal VisitNum { get; set; }
// [JsonIgnore]
// [JsonIgnore]
///// <summary>
///// 对应
///// </summary>

View File

@ -11,7 +11,7 @@ namespace IRaCIS.Core.Domain.Models
/// 阅片计划
///</summary>
[Table("ReadingPeriodPlan")]
public class ReadingPeriodPlan : Entity, IAuditAdd
public class ReadingPeriodPlan : Entity, IAuditAdd, IAuditUpdate, ISoftDelete
{
/// <summary>
@ -46,6 +46,19 @@ namespace IRaCIS.Core.Domain.Models
/// </summary>
public Guid CreateUserId { get; set; }
public Guid UpdateUserId { get; set; }
public DateTime UpdateTime { get; set; }
public bool IsDeleted { get; set; }
public DateTime? DeletedTime { get; set; }
public Guid? DeleteUserId { get; set; }
}

View File

@ -12,7 +12,7 @@ namespace IRaCIS.Core.Domain.Models
///阅片期设置 只会设计到所有人 或者某个Site 针对全局
///</summary>
[Table("ReadingPeriodSet")]
public class ReadingPeriodSet : Entity, IAuditAdd
public class ReadingPeriodSet : Entity, IAuditAdd, IAuditUpdate, ISoftDelete
{
/// <summary>
@ -84,7 +84,20 @@ namespace IRaCIS.Core.Domain.Models
/// </summary>
public ReadingSetType ReadingSetType { get; set; }
[JsonIgnore]
public Guid UpdateUserId { get; set; }
public DateTime UpdateTime { get; set; }
public bool IsDeleted { get; set; }
public DateTime? DeletedTime { get; set; }
public Guid? DeleteUserId { get; set; }
[JsonIgnore]
public List<ReadingPeriodSite> ReadingPeriodSites { get; set; } = new List<ReadingPeriodSite>();