医学审核失效
parent
c8d1e2fb6b
commit
be54e8c2c4
|
@ -156,7 +156,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
|
|
||||||
var extraIdentification = string.Empty;
|
var extraIdentification = string.Empty;
|
||||||
|
|
||||||
if(_dbContext.Entry(entity).Property(t=>t.IsMustGlobalReading).IsModified == true)
|
if (_dbContext.Entry(entity).Property(t => t.IsMustGlobalReading).IsModified == true)
|
||||||
{
|
{
|
||||||
extraIdentification = $"/IsGlobalReading";
|
extraIdentification = $"/IsGlobalReading";
|
||||||
}
|
}
|
||||||
|
@ -169,7 +169,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
await InsertInspection<ReadingQuestionCriterionSystem>(entity, type, x => new InspectionConvertDTO()
|
await InsertInspection<ReadingQuestionCriterionSystem>(entity, type, x => new InspectionConvertDTO()
|
||||||
{
|
{
|
||||||
IsDistinctionInterface = /*type == AuditOpt.Update ? true :*/ false,
|
IsDistinctionInterface = /*type == AuditOpt.Update ? true :*/ false,
|
||||||
ExtraIndentification= extraIdentification
|
ExtraIndentification = extraIdentification
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -428,33 +428,44 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
//if (_userInfo.RequestUrl == "ReadingQuestion/setCriterionDictionary")
|
//if (_userInfo.RequestUrl == "ReadingQuestion/setCriterionDictionary")
|
||||||
//{
|
//{
|
||||||
|
|
||||||
var type = AuditOpt.Add;
|
var type = AuditOpt.Add;
|
||||||
|
|
||||||
var list = entitys.Where(x => x.Entity.GetType() == typeof(ReadingCriterionDictionary)).Select(t => t.Entity as ReadingCriterionDictionary).ToList();
|
var list = entitys.Where(x => x.Entity.GetType() == typeof(ReadingCriterionDictionary)).Select(t => t.Entity as ReadingCriterionDictionary).ToList();
|
||||||
|
|
||||||
var firstEntity = list.First();
|
var firstEntity = list.First();
|
||||||
|
|
||||||
var cloneEntity = firstEntity.Clone();
|
var cloneEntity = firstEntity.Clone();
|
||||||
|
|
||||||
|
|
||||||
//查询出字典的Value ValueCN Des 保存
|
//查询出字典的Value ValueCN Des 保存
|
||||||
var dicIdList = list.Select(t => t.DictionaryId).ToList();
|
var dicIdList = list.Select(t => t.DictionaryId).ToList();
|
||||||
var selectList = await _dbContext.Dictionary.Where(x => dicIdList.Contains(x.Id)).Select(t => new { t.Id, t.Value, t.ValueCN, t.Description, t.ShowOrder }).ToListAsync();
|
var selectList = await _dbContext.Dictionary.Where(x => dicIdList.Contains(x.Id)).Select(t => new { t.Id, t.Value, t.ValueCN, t.Description, t.ShowOrder }).ToListAsync();
|
||||||
|
|
||||||
//保证Id 唯一
|
//保证Id 唯一
|
||||||
cloneEntity.Id = IdentifierHelper.CreateGuid(firstEntity.CriterionId.ToString(), firstEntity.ParentCode.ToString());
|
cloneEntity.Id = IdentifierHelper.CreateGuid(firstEntity.CriterionId.ToString(), firstEntity.ParentCode.ToString());
|
||||||
|
|
||||||
await InsertInspection<ReadingCriterionDictionary>(cloneEntity, type, x => new InspectionConvertDTO()
|
|
||||||
{
|
|
||||||
|
|
||||||
ObjectRelationParentId = x.CriterionId,
|
var extraIdentification = string.Empty;
|
||||||
|
|
||||||
TrialReadingCriterionId = x.IsSystemCriterion == false ? x.CriterionId : null,
|
//系统标准
|
||||||
|
if (cloneEntity.IsSystemCriterion)
|
||||||
|
{
|
||||||
|
extraIdentification = $"/{cloneEntity.ParentCode}";
|
||||||
|
}
|
||||||
|
|
||||||
//不显示区分接口 通过是否是系统字典 以及字典Code 区分
|
|
||||||
IsDistinctionInterface=false
|
|
||||||
|
|
||||||
},
|
await InsertInspection<ReadingCriterionDictionary>(cloneEntity, type, x => new InspectionConvertDTO()
|
||||||
|
{
|
||||||
|
|
||||||
|
ObjectRelationParentId = x.CriterionId,
|
||||||
|
|
||||||
|
TrialReadingCriterionId = x.IsSystemCriterion == false ? x.CriterionId : null,
|
||||||
|
|
||||||
|
//不显示区分接口 通过是否是系统字典 以及字典Code 区分
|
||||||
|
IsDistinctionInterface = false,
|
||||||
|
ExtraIndentification=extraIdentification
|
||||||
|
|
||||||
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
SelectList = selectList.Join(list, t => t.Id, u => u.DictionaryId, (t, u) =>
|
SelectList = selectList.Join(list, t => t.Id, u => u.DictionaryId, (t, u) =>
|
||||||
|
@ -539,13 +550,25 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
|
|
||||||
var entity = item.Entity as TaskMedicalReview;
|
var entity = item.Entity as TaskMedicalReview;
|
||||||
|
|
||||||
|
var extraIdentification = string.Empty;
|
||||||
|
|
||||||
|
//失效的时候 不区分标识
|
||||||
|
if (_dbContext.Entry(entity).Property(t => t.IsInvalid).IsModified == true && entity.IsInvalid==true)
|
||||||
|
{
|
||||||
|
extraIdentification = $"/Invalid";
|
||||||
|
}
|
||||||
|
|
||||||
await InsertInspection<TaskMedicalReview>(entity, type, x => new InspectionConvertDTO()
|
await InsertInspection<TaskMedicalReview>(entity, type, x => new InspectionConvertDTO()
|
||||||
{
|
{
|
||||||
VisitTaskId = entity.VisitTaskId,
|
VisitTaskId = entity.VisitTaskId,
|
||||||
|
|
||||||
ObjectRelationParentId = entity.VisitTaskId,
|
ObjectRelationParentId = entity.VisitTaskId,
|
||||||
|
|
||||||
ObjectRelationParentId2 = entity.MedicalManagerUserId
|
ObjectRelationParentId2 = entity.MedicalManagerUserId,
|
||||||
|
|
||||||
|
ExtraIndentification = extraIdentification,
|
||||||
|
|
||||||
|
IsDistinctionInterface= (type==AuditOpt.Add || extraIdentification !=String.Empty)?false:true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -575,7 +598,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
//byzhouhang
|
//byzhouhang
|
||||||
ObjectRelationParentId = x.TaskMedicalReviewId,
|
ObjectRelationParentId = x.TaskMedicalReviewId,
|
||||||
|
|
||||||
IsDistinctionInterface=false,
|
IsDistinctionInterface = false,
|
||||||
}, new
|
}, new
|
||||||
{
|
{
|
||||||
QuestionAnswerList = list.Join(questionNameList, t => t.ReadingMedicineQuestionId, u => u.ReadingMedicineQuestionId, (t, u) => new { t.Answer, u.QuestionName, u.ShowOrder }).OrderBy(t => t.ShowOrder).ToList(),
|
QuestionAnswerList = list.Join(questionNameList, t => t.ReadingMedicineQuestionId, u => u.ReadingMedicineQuestionId, (t, u) => new { t.Answer, u.QuestionName, u.ShowOrder }).OrderBy(t => t.ShowOrder).ToList(),
|
||||||
|
@ -593,7 +616,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
|
|
||||||
await InsertInspection<ReadingMedicalReviewDialog>(entity, type, x => new InspectionConvertDTO()
|
await InsertInspection<ReadingMedicalReviewDialog>(entity, type, x => new InspectionConvertDTO()
|
||||||
{
|
{
|
||||||
IsDistinctionInterface=false,
|
IsDistinctionInterface = false,
|
||||||
VisitTaskId = entity.VisitTaskId,
|
VisitTaskId = entity.VisitTaskId,
|
||||||
|
|
||||||
ObjectRelationParentId = entity.TaskMedicalReviewId,
|
ObjectRelationParentId = entity.TaskMedicalReviewId,
|
||||||
|
@ -2056,7 +2079,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
var generalId = (inspection.GeneralId != null && inspection.GeneralId != Guid.Empty) ? inspection.GeneralId : entityObj.Id;
|
var generalId = (inspection.GeneralId != null && inspection.GeneralId != Guid.Empty) ? inspection.GeneralId : entityObj.Id;
|
||||||
inspection.GeneralId = generalId;
|
inspection.GeneralId = generalId;
|
||||||
|
|
||||||
inspection.Identification = await GetInspectionRecordIdentificationAsync(inspection, entityObj, type, inspection.IsDistinctionInterface)+inspection.ExtraIndentification;
|
inspection.Identification = await GetInspectionRecordIdentificationAsync(inspection, entityObj, type, inspection.IsDistinctionInterface) + inspection.ExtraIndentification;
|
||||||
|
|
||||||
//将实体对象属性 映射到稽查实体
|
//将实体对象属性 映射到稽查实体
|
||||||
MapEntityPropertyToAuditEntity(entityObj, inspection);
|
MapEntityPropertyToAuditEntity(entityObj, inspection);
|
||||||
|
@ -2550,17 +2573,17 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
//系统 项目公用
|
////系统 项目公用
|
||||||
case nameof(ReadingCriterionDictionary):
|
//case nameof(ReadingCriterionDictionary):
|
||||||
|
|
||||||
var readingCriterionDictionary = entityObj as ReadingCriterionDictionary;
|
// var readingCriterionDictionary = entityObj as ReadingCriterionDictionary;
|
||||||
|
|
||||||
if (readingCriterionDictionary.IsSystemCriterion)
|
// if (readingCriterionDictionary.IsSystemCriterion)
|
||||||
{
|
// {
|
||||||
type = $"{type}/{readingCriterionDictionary.ParentCode}";
|
// type = $"{type}/{readingCriterionDictionary.ParentCode}";
|
||||||
}
|
// }
|
||||||
|
|
||||||
break;
|
// break;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue