Compare commits

..

No commits in common. "5526a2dd53954bc21aaee798a867228cf3c15a55" and "b869693d63f1d72b1970116248c95dffdf362eb8" have entirely different histories.

2 changed files with 9 additions and 63 deletions

View File

@ -1624,17 +1624,6 @@ namespace IRaCIS.Core.Application.Service
x.Answer = needSetNa.Contains(x.QuestionMark) ? "NA" : x.Answer;
});
break;
case CriterionType.mRECISTHCC:
needSaveMark = new List<QuestionMark?>()
{
QuestionMark.Organ,
QuestionMark.Location,
QuestionMark.Part,
QuestionMark.IsLymph,
QuestionMark.TypicalIntrahepaticLesion,
};
break;
}
await _readingTableAnswerRowInfoRepository.AddAsync(rowAnswer);
await _readingTableQuestionAnswerRepository.AddRangeAsync(_mapper.Map<List<ReadingTableQuestionAnswer>>(tableAnswers));
@ -3031,7 +3020,6 @@ namespace IRaCIS.Core.Application.Service
await _visitTaskRepository.BatchUpdateNoTrackingAsync(x => x.Id == task.VisitTaskId && x.TaskState == TaskState.Effect && x.ReadingTaskState != ReadingTaskState.HaveSigned, x => new VisitTask()
{
FirstReadingTime = DateTime.Now,
});
await _visitTaskRepository.SaveChangesAsync();

View File

@ -6,7 +6,6 @@ using MassTransit;
using Microsoft.EntityFrameworkCore.ChangeTracking;
using Microsoft.EntityFrameworkCore.ChangeTracking.Internal;
using Newtonsoft.Json;
using static MassTransit.ValidationResultExtensions;
namespace IRaCIS.Core.Infra.EFCore.Common
@ -62,7 +61,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common
{
return new List<Type>()
{
typeof(TrialIdentityUser),
typeof(TrialUserRole),
typeof(TrialSiteSurvey),
typeof(TrialSiteUser),
@ -1625,19 +1623,12 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var type = GetEntityAuditOpt(item);
var entity = item.Entity as TrialUserRole;
string extraIndentification = string.Empty;
if (type == AuditOpt.Update)
{
extraIndentification = "/" + entity.IsDeleted.ToString();
}
//var user = await _dbContext.Users.Include(x => x.UserTypeRole).FirstOrDefaultAsync(x => x.Id == entity.UserId);
await InsertInspection<TrialUserRole>(entity, type, x => new InspectionConvertDTO
{
IsDistinctionInterface = type == AuditOpt.Update ? true : false,
TrialId = x.TrialId,
ObjectRelationParentId = x.TrialId,
ExtraIndentification = extraIndentification,
ObjectRelationParentId2 = x.UserId,
});
}
@ -1724,32 +1715,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common
//});
#endregion
}
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(SCPStudySubjectVisit)))
{
var type = GetEntityAuditOpt(item);
var entity = item.Entity as SCPStudySubjectVisit;
var sCPStudy=await _dbContext.SCPStudy.Where(x => x.Id == entity.SCPStudyId).FirstOrDefaultAsync();
await InsertInspection<SCPStudySubjectVisit>(item.Entity as SCPStudySubjectVisit, type, x => new InspectionConvertDTO()
{
ObjectRelationParentId = x.SubjectId,
ObjectRelationParentId2=x.SubjectVisitId,
ObjectRelationParentId3 = x.StudyId,
}, new
{
StudyTime = sCPStudy!=null? sCPStudy.StudyTime:null,
});
}
// 访视
@ -2988,7 +2953,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
u.ShowOrder
}
).OrderBy(t => t.ShowOrder).ToList()
}, _userInfo.AuditIdentification);
});
////添加/修改病灶接口 只会对单个病灶进行操作
@ -3429,7 +3394,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
/// <param name="expression">表达式</param>
/// <param name="otherItem">其他对象</param>
/// <returns></returns>
public async Task InsertInspection<T>(T entityObj, string type, Expression<Func<T, InspectionConvertDTO>> expression = null, object otherItem = null, string auditIdentification = "") where T : Entity
public async Task InsertInspection<T>(T entityObj, string type, Expression<Func<T, InspectionConvertDTO>> expression = null, object otherItem = null) where T : Entity
{
InspectionConvertDTO inspection = new InspectionConvertDTO();
@ -3446,7 +3411,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var generalId = (inspection.GeneralId != null && inspection.GeneralId != Guid.Empty) ? inspection.GeneralId : entityObj.Id;
inspection.GeneralId = generalId;
inspection.Identification = GetInspectionRecordIdentification(entityObj, type, inspection.IsDistinctionInterface, inspection.IsSelfDefine, auditIdentification) + inspection.ExtraIndentification;
inspection.Identification = GetInspectionRecordIdentification(entityObj, type, inspection.IsDistinctionInterface, inspection.IsSelfDefine) + inspection.ExtraIndentification;
//将实体对象属性 映射到稽查实体
MapEntityPropertyToAuditEntity(entityObj, inspection);
@ -3652,11 +3617,11 @@ namespace IRaCIS.Core.Infra.EFCore.Common
/// 获取稽查记录的标识符 部分业务会进行特殊处理
/// </summary>
/// <returns></returns>
public string GetInspectionRecordIdentification<T>(T entityObj, string type, bool IsDistinctionInterface = true, bool isSelfDefine = false, string auditIdentification = "")
public string GetInspectionRecordIdentification<T>(T entityObj, string type, bool IsDistinctionInterface = true, bool isSelfDefine = false)
{
var entityTypeName = entityObj.GetType().Name;
var result = string.Empty;
//默认规则
if (IsDistinctionInterface)
@ -3664,11 +3629,11 @@ namespace IRaCIS.Core.Infra.EFCore.Common
//自定义 标识后面 补充由代码上层的 extraIdentification 附加
if (isSelfDefine)
{
result= $"{_userInfo.RequestUrl}/{entityTypeName}";
return $"{_userInfo.RequestUrl}/{entityTypeName}";
}
else
{
result = $"{_userInfo.RequestUrl}/{entityTypeName}/{type}";
return $"{_userInfo.RequestUrl}/{entityTypeName}/{type}";
}
@ -3678,22 +3643,15 @@ namespace IRaCIS.Core.Infra.EFCore.Common
//自定义 标识后面 补充由代码上层的 extraIdentification 附加
if (isSelfDefine)
{
result = $"{entityTypeName}";
return $"{entityTypeName}";
}
else
{
result = $"{entityTypeName}/{type}";
return $"{entityTypeName}/{type}";
}
}
if (auditIdentification.IsNotNullOrEmpty())
{
result = result + "/" + auditIdentification;
}
return result;
}