代码修改

IRC_NewDev
he 2024-06-06 16:37:28 +08:00
parent 5a6411c6c3
commit e79c3a8f37
3 changed files with 24 additions and 11 deletions

View File

@ -61,7 +61,8 @@ namespace IRaCIS.Core.Application.Contracts
//---已锁定,不允许操作
return ResponseOutput.NotOk(_localizer["TrialSiteEquipment_Locked"]);
}
var success = await _trialSiteEquipmentSurveyRepository.BatchDeleteNoTrackingAsync(t => t.Id == trialSiteEquipmentSurveyId);
await _trialSiteEquipmentSurveyRepository.DeleteFromQueryAsync(t => t.Id == trialSiteEquipmentSurveyId);
var success = await _trialSiteEquipmentSurveyRepository.SaveChangesAsync();
return ResponseOutput.Result(success);
}

View File

@ -142,7 +142,8 @@ namespace IRaCIS.Core.Application.Contracts
return ResponseOutput.NotOk(_localizer["TrialSiteUser_Locked"]);
}
var success = await _trialSiteUserSurveyRepository.BatchDeleteNoTrackingAsync(t => t.Id == trialSiteUserSurveyId);
await _trialSiteUserSurveyRepository.DeleteFromQueryAsync(t => t.Id == trialSiteUserSurveyId);
var success = await _trialSiteUserSurveyRepository.SaveChangesAsync();
return ResponseOutput.Result(success);
}

View File

@ -1504,11 +1504,16 @@ namespace IRaCIS.Core.Infra.EFCore.Common
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(TrialSiteUserSurvey)))
{
var type = GetEntityAuditOpt(item);
var entity = item.Entity as TrialSiteUserSurvey;
var trialid = await _dbContext.TrialSiteSurvey.Where(x => x.Id == entity.TrialSiteSurveyId).Select(x=>x.TrialId).FirstOrDefaultAsync();
await InsertInspection<TrialSiteUserSurvey>(entity, type, x => new InspectionConvertDTO()
{
TrialId= trialid,
IsDistinctionInterface = false
});
@ -1518,9 +1523,11 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var type = GetEntityAuditOpt(item);
var entity = item.Entity as TrialSiteEquipmentSurvey;
var trialid = await _dbContext.TrialSiteSurvey.Where(x => x.Id == entity.TrialSiteSurveyId).Select(x => x.TrialId).FirstOrDefaultAsync();
await InsertInspection<TrialSiteEquipmentSurvey>(entity, type, x => new InspectionConvertDTO()
{
TrialId = trialid,
IsDistinctionInterface = false
});
@ -2527,6 +2534,8 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var entity = item.Entity as TaskAllocationRule;
var userRealName =await _dbContext.User.Where(x => x.Id == entity.DoctorUserId).Select(x => x.FullName).FirstOrDefaultAsync();
await InsertInspection<TaskAllocationRule>(entity, type, x => new InspectionConvertDTO()
{
IsDistinctionInterface = false,
@ -2535,6 +2544,8 @@ namespace IRaCIS.Core.Infra.EFCore.Common
ObjectRelationParentId2 = entity.DoctorUserId
}, new {
UserRealName= userRealName
});
}
@ -3115,8 +3126,8 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var type = GetEntityAuditOpt(item);
var entity = item.Entity as VisitTask;
var obj = new object() { };
var userRealName = await _dbContext.User.Where(x => x.Id == entity.DoctorUserId).Select(x => x.FullName).FirstOrDefaultAsync();
var obj = new { UserRealName= userRealName };
#region 标识区分