稽查修改
parent
6a63ffd1f2
commit
f69ad1b4e3
|
|
@ -1613,6 +1613,17 @@ namespace IRaCIS.Core.Application.Service
|
||||||
x.Answer = needSetNa.Contains(x.QuestionMark) ? "NA" : x.Answer;
|
x.Answer = needSetNa.Contains(x.QuestionMark) ? "NA" : x.Answer;
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case CriterionType.mRECISTHCC:
|
||||||
|
needSaveMark = new List<QuestionMark?>()
|
||||||
|
{
|
||||||
|
QuestionMark.Organ,
|
||||||
|
QuestionMark.Location,
|
||||||
|
QuestionMark.Part,
|
||||||
|
QuestionMark.IsLymph,
|
||||||
|
QuestionMark.TypicalIntrahepaticLesion,
|
||||||
|
};
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
await _readingTableAnswerRowInfoRepository.AddAsync(rowAnswer);
|
await _readingTableAnswerRowInfoRepository.AddAsync(rowAnswer);
|
||||||
await _readingTableQuestionAnswerRepository.AddRangeAsync(_mapper.Map<List<ReadingTableQuestionAnswer>>(tableAnswers));
|
await _readingTableQuestionAnswerRepository.AddRangeAsync(_mapper.Map<List<ReadingTableQuestionAnswer>>(tableAnswers));
|
||||||
|
|
@ -2999,6 +3010,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
await _visitTaskRepository.BatchUpdateNoTrackingAsync(x => x.Id == task.VisitTaskId && x.TaskState == TaskState.Effect && x.ReadingTaskState != ReadingTaskState.HaveSigned, x => new VisitTask()
|
await _visitTaskRepository.BatchUpdateNoTrackingAsync(x => x.Id == task.VisitTaskId && x.TaskState == TaskState.Effect && x.ReadingTaskState != ReadingTaskState.HaveSigned, x => new VisitTask()
|
||||||
{
|
{
|
||||||
|
|
||||||
FirstReadingTime = DateTime.Now,
|
FirstReadingTime = DateTime.Now,
|
||||||
});
|
});
|
||||||
await _visitTaskRepository.SaveChangesAsync();
|
await _visitTaskRepository.SaveChangesAsync();
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ using MassTransit;
|
||||||
using Microsoft.EntityFrameworkCore.ChangeTracking;
|
using Microsoft.EntityFrameworkCore.ChangeTracking;
|
||||||
using Microsoft.EntityFrameworkCore.ChangeTracking.Internal;
|
using Microsoft.EntityFrameworkCore.ChangeTracking.Internal;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using static MassTransit.ValidationResultExtensions;
|
||||||
|
|
||||||
|
|
||||||
namespace IRaCIS.Core.Infra.EFCore.Common
|
namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
|
|
@ -61,6 +62,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
{
|
{
|
||||||
return new List<Type>()
|
return new List<Type>()
|
||||||
{
|
{
|
||||||
|
typeof(TrialIdentityUser),
|
||||||
typeof(TrialUserRole),
|
typeof(TrialUserRole),
|
||||||
typeof(TrialSiteSurvey),
|
typeof(TrialSiteSurvey),
|
||||||
typeof(TrialSiteUser),
|
typeof(TrialSiteUser),
|
||||||
|
|
@ -1623,12 +1625,19 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
var type = GetEntityAuditOpt(item);
|
var type = GetEntityAuditOpt(item);
|
||||||
|
|
||||||
var entity = item.Entity as TrialUserRole;
|
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);
|
//var user = await _dbContext.Users.Include(x => x.UserTypeRole).FirstOrDefaultAsync(x => x.Id == entity.UserId);
|
||||||
await InsertInspection<TrialUserRole>(entity, type, x => new InspectionConvertDTO
|
await InsertInspection<TrialUserRole>(entity, type, x => new InspectionConvertDTO
|
||||||
{
|
{
|
||||||
IsDistinctionInterface = type == AuditOpt.Update ? true : false,
|
IsDistinctionInterface = type == AuditOpt.Update ? true : false,
|
||||||
TrialId = x.TrialId,
|
TrialId = x.TrialId,
|
||||||
ObjectRelationParentId = x.TrialId,
|
ObjectRelationParentId = x.TrialId,
|
||||||
|
ExtraIndentification = extraIndentification,
|
||||||
ObjectRelationParentId2 = x.UserId,
|
ObjectRelationParentId2 = x.UserId,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -1715,6 +1724,32 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
//});
|
//});
|
||||||
#endregion
|
#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,
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 访视
|
// 访视
|
||||||
|
|
@ -2953,7 +2988,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
u.ShowOrder
|
u.ShowOrder
|
||||||
}
|
}
|
||||||
).OrderBy(t => t.ShowOrder).ToList()
|
).OrderBy(t => t.ShowOrder).ToList()
|
||||||
});
|
}, _userInfo.AuditIdentification);
|
||||||
|
|
||||||
|
|
||||||
////添加/修改病灶接口 只会对单个病灶进行操作
|
////添加/修改病灶接口 只会对单个病灶进行操作
|
||||||
|
|
@ -3394,7 +3429,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
/// <param name="expression">表达式</param>
|
/// <param name="expression">表达式</param>
|
||||||
/// <param name="otherItem">其他对象</param>
|
/// <param name="otherItem">其他对象</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task InsertInspection<T>(T entityObj, string type, Expression<Func<T, InspectionConvertDTO>> expression = null, object otherItem = null) where T : Entity
|
public async Task InsertInspection<T>(T entityObj, string type, Expression<Func<T, InspectionConvertDTO>> expression = null, object otherItem = null, string auditIdentification = "") where T : Entity
|
||||||
{
|
{
|
||||||
|
|
||||||
InspectionConvertDTO inspection = new InspectionConvertDTO();
|
InspectionConvertDTO inspection = new InspectionConvertDTO();
|
||||||
|
|
@ -3411,7 +3446,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 = GetInspectionRecordIdentification(entityObj, type, inspection.IsDistinctionInterface, inspection.IsSelfDefine) + inspection.ExtraIndentification;
|
inspection.Identification = GetInspectionRecordIdentification(entityObj, type, inspection.IsDistinctionInterface, inspection.IsSelfDefine, auditIdentification) + inspection.ExtraIndentification;
|
||||||
|
|
||||||
//将实体对象属性 映射到稽查实体
|
//将实体对象属性 映射到稽查实体
|
||||||
MapEntityPropertyToAuditEntity(entityObj, inspection);
|
MapEntityPropertyToAuditEntity(entityObj, inspection);
|
||||||
|
|
@ -3617,11 +3652,11 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
/// 获取稽查记录的标识符 部分业务会进行特殊处理
|
/// 获取稽查记录的标识符 部分业务会进行特殊处理
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public string GetInspectionRecordIdentification<T>(T entityObj, string type, bool IsDistinctionInterface = true, bool isSelfDefine = false)
|
public string GetInspectionRecordIdentification<T>(T entityObj, string type, bool IsDistinctionInterface = true, bool isSelfDefine = false, string auditIdentification = "")
|
||||||
{
|
{
|
||||||
var entityTypeName = entityObj.GetType().Name;
|
var entityTypeName = entityObj.GetType().Name;
|
||||||
|
|
||||||
|
var result = string.Empty;
|
||||||
|
|
||||||
//默认规则
|
//默认规则
|
||||||
if (IsDistinctionInterface)
|
if (IsDistinctionInterface)
|
||||||
|
|
@ -3629,11 +3664,11 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
//自定义 标识后面 补充由代码上层的 extraIdentification 附加
|
//自定义 标识后面 补充由代码上层的 extraIdentification 附加
|
||||||
if (isSelfDefine)
|
if (isSelfDefine)
|
||||||
{
|
{
|
||||||
return $"{_userInfo.RequestUrl}/{entityTypeName}";
|
result= $"{_userInfo.RequestUrl}/{entityTypeName}";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return $"{_userInfo.RequestUrl}/{entityTypeName}/{type}";
|
result = $"{_userInfo.RequestUrl}/{entityTypeName}/{type}";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -3643,15 +3678,22 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
//自定义 标识后面 补充由代码上层的 extraIdentification 附加
|
//自定义 标识后面 补充由代码上层的 extraIdentification 附加
|
||||||
if (isSelfDefine)
|
if (isSelfDefine)
|
||||||
{
|
{
|
||||||
return $"{entityTypeName}";
|
result = $"{entityTypeName}";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return $"{entityTypeName}/{type}";
|
result = $"{entityTypeName}/{type}";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (auditIdentification.IsNotNullOrEmpty())
|
||||||
|
{
|
||||||
|
result = result + "/" + auditIdentification;
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue