修改仓储名称

This commit is contained in:
2022-04-26 16:56:18 +08:00
parent f118dd6e42
commit 8f6830ea8d
50 changed files with 173 additions and 167 deletions
@@ -104,7 +104,7 @@ namespace IRaCIS.Application.Services
return ResponseOutput.NotOk("This item is referenced by content of the trial infomation.");
}
var success = await _dicRepository.BatchDeleteAsync(t => t.Id == id);
var success = await _dicRepository.BatchDeleteNoTrackingAsync(t => t.Id == id);
return ResponseOutput.Result(success);
}
@@ -50,7 +50,7 @@ namespace IRaCIS.Core.Application.Contracts
[HttpDelete("{emailNoticeConfigId:guid}")]
public async Task<IResponseOutput> DeleteEmailNoticeConfig(Guid emailNoticeConfigId)
{
var success = await repository.BatchDeleteAsync(t => t.Id == emailNoticeConfigId);
var success = await repository.BatchDeleteNoTrackingAsync(t => t.Id == emailNoticeConfigId);
return ResponseOutput.Result(success);
}
@@ -223,7 +223,7 @@ namespace IRaCIS.Core.Application.Service
{
foreach (var item in sortDto.SortData)
{
await _frontAuditConfigRepository.BatchUpdateAsync(x => x.Id == item.Id, x => new FrontAuditConfig
await _frontAuditConfigRepository.BatchUpdateNoTrackingAsync(x => x.Id == item.Id, x => new FrontAuditConfig
{
Sort = item.Sort
});
@@ -42,7 +42,7 @@ namespace IRaCIS.Application.Services
// File.Delete(temp);
//}
var success =await _attachmentrepository.BatchDeleteAsync(a => a.Id == param.Id);
var success =await _attachmentrepository.BatchDeleteNoTrackingAsync(a => a.Id == param.Id);
return ResponseOutput.Result(success);
}
@@ -139,7 +139,7 @@ namespace IRaCIS.Application.Services
//重传的时候,发现 相同语言的官方简历数量为2 那么将重传的简历设置为非官方
if (attachments.Count(t => t.Language == reUpload.Language && t.IsOfficial) == 2)
{
await _attachmentrepository.BatchUpdateAsync(t => t.Id == reUpload.Id, u => new Attachment()
await _attachmentrepository.BatchUpdateNoTrackingAsync(t => t.Id == reUpload.Id, u => new Attachment()
{
Path = reUpload.Path,
CreateTime = DateTime.Now,
@@ -150,7 +150,7 @@ namespace IRaCIS.Application.Services
}
else //相同语言的重传
{
await _attachmentrepository.BatchUpdateAsync(t => t.Id == reUpload.Id, u => new Attachment()
await _attachmentrepository.BatchUpdateNoTrackingAsync(t => t.Id == reUpload.Id, u => new Attachment()
{
Path = reUpload.Path,
CreateTime = DateTime.Now,
@@ -241,7 +241,7 @@ namespace IRaCIS.Application.Services
[HttpPost("{doctorId:guid}/{attachmentId:guid}/{language}")]
public async Task<IResponseOutput> SetLanguage(Guid doctorId, Guid attachmentId, int language)
{
bool result =await _attachmentrepository.BatchUpdateAsync(t => t.Id == attachmentId, a => new Attachment
bool result =await _attachmentrepository.BatchUpdateNoTrackingAsync(t => t.Id == attachmentId, a => new Attachment
{
Language = language,
IsOfficial = false
@@ -431,7 +431,7 @@ namespace IRaCIS.Application.Services
{
return ResponseOutput.NotOk("Resume & Consultant Agreement must be upload ");
}
var success = await _doctorRepository.BatchUpdateAsync(o => o.Id == auditResumeParam.Id, u => new Doctor()
var success = await _doctorRepository.BatchUpdateNoTrackingAsync(o => o.Id == auditResumeParam.Id, u => new Doctor()
{
CooperateStatus = auditResumeParam.CooperateStatus,
ResumeStatus = auditResumeParam.ResumeStatus,
@@ -92,7 +92,7 @@ namespace IRaCIS.Application.Services
[HttpDelete, Route("{doctorId:guid}")]
public async Task<IResponseOutput> DeleteEducationInfo(Guid id)
{
var success = await _educationRepository.BatchDeleteAsync(o => o.Id == id);
var success = await _educationRepository.BatchDeleteNoTrackingAsync(o => o.Id == id);
return ResponseOutput.Result(success);
}
@@ -35,7 +35,7 @@ namespace IRaCIS.Application.Services
}
else
{
var success = await _vacationRepository.BatchUpdateAsync(u => u.Id == param.Id,
var success = await _vacationRepository.BatchUpdateNoTrackingAsync(u => u.Id == param.Id,
h => new Vacation
{
StartDate = param.StartDate,
@@ -56,7 +56,7 @@ namespace IRaCIS.Application.Services
[HttpDelete("{holidayId:guid}")]
public async Task<IResponseOutput> DeleteVacation(Guid holidayId)
{
var success = await _vacationRepository.BatchDeleteAsync(u => u.Id == holidayId);
var success = await _vacationRepository.BatchDeleteNoTrackingAsync(u => u.Id == holidayId);
return ResponseOutput.Result(success);
@@ -466,7 +466,7 @@ namespace IRaCIS.Core.Application.Services
return ResponseOutput.NotOk("该文档,已有用户签名 不允许删除");
}
var success = await _trialDocumentRepository.BatchDeleteAsync(t => t.Id == trialDocumentId);
var success = await _trialDocumentRepository.BatchDeleteNoTrackingAsync(t => t.Id == trialDocumentId);
return ResponseOutput.Result(success);
}
@@ -586,7 +586,7 @@ namespace IRaCIS.Core.Application.Services
}
else
{
await _trialDocumentRepository.BatchUpdateAsync(t => t.Id == documentId, u => new TrialDocument() { IsDeleted = true });
await _trialDocumentRepository.BatchUpdateNoTrackingAsync(t => t.Id == documentId, u => new TrialDocument() { IsDeleted = true });
}
return ResponseOutput.Ok();
}
@@ -595,7 +595,7 @@ namespace IRaCIS.Application.Services
foreach (var reviewer in needUpdatePayment)
{
await _paymentRepository.BatchUpdateAsync(u => u.YearMonth == yearMonth &&
await _paymentRepository.BatchUpdateNoTrackingAsync(u => u.YearMonth == yearMonth &&
!u.IsLock && u.DoctorId == reviewer.ReviewerId, t => new Payment()
{
AdjustmentUSD = reviewer.AdjustUSD,
@@ -638,12 +638,12 @@ namespace IRaCIS.Application.Services
// 如果是 当月计算的工作量费用 和 调整费用都为0,则删除该行记录
if (addOrUpdateModel.PaymentUSD == 0 && paymentModel.AdjustmentUSD == 0)
{
success =await _paymentRepository.BatchDeleteAsync(u => u.Id == paymentModel.Id);
success =await _paymentRepository.BatchDeleteNoTrackingAsync(u => u.Id == paymentModel.Id);
//_paymentDetailRepository.Delete(u=>u.PaymentId==paymentModel.Id);
}
else
{
success = await _paymentRepository.BatchUpdateAsync(t => t.Id == paymentModel.Id, u => new Payment()
success = await _paymentRepository.BatchUpdateNoTrackingAsync(t => t.Id == paymentModel.Id, u => new Payment()
{
PaymentUSD = addOrUpdateModel.PaymentUSD,
CalculateTime = addOrUpdateModel.CalculateTime,
@@ -670,7 +670,7 @@ namespace IRaCIS.Application.Services
private async Task<bool> AddOrUpdateMonthlyPaymentDetail(List<PaymentDetailCommand> addOrUpdateList, Guid paymentId)
{
//var paymentDetailIds = addOrUpdateList.Select(t => t.PaymentId).ToList();
await _paymentDetailRepository.BatchDeleteAsync(t => t.PaymentId == paymentId);
await _paymentDetailRepository.BatchDeleteNoTrackingAsync(t => t.PaymentId == paymentId);
await _paymentDetailRepository.AddRangeAsync(_mapper.Map<List<PaymentDetail>>(addOrUpdateList));
return await _paymentDetailRepository.SaveChangesAsync();
}
@@ -46,7 +46,7 @@ namespace IRaCIS.Application.Services
}
else
{
var success = await _exchangeRateRepository.BatchUpdateAsync(t => t.Id == model.Id, u => new ExchangeRate()
var success = await _exchangeRateRepository.BatchUpdateNoTrackingAsync(t => t.Id == model.Id, u => new ExchangeRate()
{
//YearMonth = model.YearMonth,
Rate = model.Rate,
@@ -72,7 +72,7 @@ namespace IRaCIS.Application.Services
}
var success = await _exchangeRateRepository.BatchDeleteAsync(t => t.Id == id);
var success = await _exchangeRateRepository.BatchDeleteNoTrackingAsync(t => t.Id == id);
return ResponseOutput.Ok(success);
}
@@ -1256,18 +1256,18 @@ namespace IRaCIS.Application.Services
var isLock = param.IsLock;
var paymentLockSuccess = await _paymentRepository.BatchUpdateAsync(u => reviewerIds.Contains(u.DoctorId) && u.YearMonth == yearMonth, t => new Payment
var paymentLockSuccess = await _paymentRepository.BatchUpdateNoTrackingAsync(u => reviewerIds.Contains(u.DoctorId) && u.YearMonth == yearMonth, t => new Payment
{
IsLock = isLock
});
var adjustmentLockSuccess = await _payAdjustmentRepository.BatchUpdateAsync(
var adjustmentLockSuccess = await _payAdjustmentRepository.BatchUpdateNoTrackingAsync(
t => t.YearMonth == yearMonth && reviewerIds.Contains(t.ReviewerId), u =>
new PaymentAdjustment()
{
IsLock = true
});
await _doctorWorkloadRepository.BatchUpdateAsync(u => reviewerIds.Contains(u.DoctorId) && u.YearMonth == yearMonth,
await _doctorWorkloadRepository.BatchUpdateNoTrackingAsync(u => reviewerIds.Contains(u.DoctorId) && u.YearMonth == yearMonth,
t => new Workload { IsLock = true });
return ResponseOutput.Result(paymentLockSuccess || adjustmentLockSuccess);
@@ -255,7 +255,7 @@ namespace IRaCIS.Application.Services
{
//如果是double 不会保留两位小数
await _payAdjustmentRepository.BatchUpdateAsync(u => u.YearMonth == yearMonth &&
await _payAdjustmentRepository.BatchUpdateNoTrackingAsync(u => u.YearMonth == yearMonth &&
!u.IsLock, t => new PaymentAdjustment
{
AdjustmentCNY = t.AdjustmentUSD * rate,
@@ -277,7 +277,7 @@ namespace IRaCIS.Application.Services
foreach (var reviewer in needUpdatePayment)
{
await _paymentRepository.BatchUpdateAsync(u => u.YearMonth == yearMonth &&
await _paymentRepository.BatchUpdateNoTrackingAsync(u => u.YearMonth == yearMonth &&
!u.IsLock && u.DoctorId == reviewer.ReviewerId, t => new Payment()
{
AdjustmentUSD = reviewer.AdjustUSD,
@@ -43,7 +43,7 @@ namespace IRaCIS.Application.Services
}
else
{
var success =await _rankPriceRepository.BatchUpdateAsync(t => t.Id == addOrUpdateModel.Id, u => new RankPrice()
var success =await _rankPriceRepository.BatchUpdateNoTrackingAsync(t => t.Id == addOrUpdateModel.Id, u => new RankPrice()
{
UpdateUserId = userId,
UpdateTime = DateTime.Now,
@@ -76,7 +76,7 @@ namespace IRaCIS.Application.Services
return ResponseOutput.NotOk("This title has been used by reviewer payment information");
}
var success = await _rankPriceRepository.BatchDeleteAsync(t => t.Id == id);
var success = await _rankPriceRepository.BatchDeleteNoTrackingAsync(t => t.Id == id);
return ResponseOutput.Result(success);
}
@@ -78,7 +78,7 @@ namespace IRaCIS.Application.Services
[HttpPost]
public async Task<IResponseOutput> DeleteTrialSOW(DeleteSowPathDTO trialSowPath)
{
var success = await _trialExtRepository.BatchUpdateAsync(u => u.TrialId == trialSowPath.TrialId, s => new TrialPaymentPrice
var success = await _trialExtRepository.BatchUpdateNoTrackingAsync(u => u.TrialId == trialSowPath.TrialId, s => new TrialPaymentPrice
{
SowPath = "",
SowName = "",
@@ -63,7 +63,7 @@ namespace IRaCIS.Application.Services
// 完善价格的 将对应的列设置为true 变更为有价格了
var aaa = await _trialRevenuesPriceVerificationRepository.BatchUpdateAsync(t => t.TrialId == model.TrialId, u => new TrialRevenuesPriceVerification()
var aaa = await _trialRevenuesPriceVerificationRepository.BatchUpdateNoTrackingAsync(t => t.TrialId == model.TrialId, u => new TrialRevenuesPriceVerification()
{
//有价格 则设置为true 否则 该列不变
Timepoint = model.Timepoint > 0 || u.Timepoint,
@@ -81,7 +81,7 @@ namespace IRaCIS.Application.Services
});
//删除所有有价格的记录 为true 表示有价格或者不需要价格 缺价格的为false
await _trialRevenuesPriceVerificationRepository.BatchDeleteAsync(t => t.TrialId == model.TrialId &&
await _trialRevenuesPriceVerificationRepository.BatchDeleteNoTrackingAsync(t => t.TrialId == model.TrialId &&
t.Timepoint&&
t.TimepointIn24H&&
t.TimepointIn48H &&
@@ -101,7 +101,7 @@ namespace IRaCIS.Application.Services
[NonDynamicMethod]
public async Task<bool> DeleteTrialCost(Guid id)
{
return await _trialRevenuesPriceRepository.BatchDeleteAsync(u => u.Id == id);
return await _trialRevenuesPriceRepository.BatchDeleteNoTrackingAsync(u => u.Id == id);
}
/// <summary>
@@ -28,7 +28,7 @@ namespace IRaCIS.Application.Services
[NonDynamicMethod]
public async Task<IResponseOutput> AddOrUpdateVolumeRewardPriceList(IEnumerable<AwardPriceCommand> addOrUpdateModel)
{
await _volumeRewardRepository.BatchDeleteAsync(t => t.Id != Guid.Empty);
await _volumeRewardRepository.BatchDeleteNoTrackingAsync(t => t.Id != Guid.Empty);
var temp = _mapper.Map<List<VolumeReward>>(addOrUpdateModel);
await _volumeRewardRepository.AddRangeAsync(temp);
@@ -57,7 +57,7 @@ namespace IRaCIS.Core.Application.Service
[HttpDelete("{systemAnonymizationId:guid}")]
public async Task<IResponseOutput> DeleteSystemAnonymization(Guid systemAnonymizationId)
{
var success = await systemAnonymizationRepository.BatchDeleteAsync(t => t.Id == systemAnonymizationId);
var success = await systemAnonymizationRepository.BatchDeleteNoTrackingAsync(t => t.Id == systemAnonymizationId);
return ResponseOutput.Result(success);
}
@@ -70,7 +70,7 @@ namespace IRaCIS.Application.Services
//{
// return ResponseOutput.NotOk("该CRO下存在用户,暂时无法删除。");
//}
var success = await _croRepository.BatchDeleteAsync(x=>x.Id== cROCompanyId);
var success = await _croRepository.BatchDeleteNoTrackingAsync(x=>x.Id== cROCompanyId);
return ResponseOutput.Result(success);
}
@@ -54,7 +54,7 @@ namespace IRaCIS.Application.Services
// return ResponseOutput.NotOk("该医院下存在用户,暂时无法删除。");
//}
var success = await _hospitalRepository.BatchDeleteAsync(x => x.Id == hospitalId);
var success = await _hospitalRepository.BatchDeleteNoTrackingAsync(x => x.Id == hospitalId);
return ResponseOutput.Result(success);
}
@@ -69,7 +69,7 @@ namespace IRaCIS.Application.Services
return ResponseOutput.NotOk("This site has participated in the trial and couldn't be deleted.");
}
var success = await _siteRepository.BatchDeleteAsync(x => x.Id == siteId);
var success = await _siteRepository.BatchDeleteNoTrackingAsync(x => x.Id == siteId);
return ResponseOutput.Result(success);
}
}
@@ -75,7 +75,7 @@ namespace IRaCIS.Application.Services
//}
var success = await _sponsorRepository.BatchDeleteAsync(x => x.Id == sponsorId);
var success = await _sponsorRepository.BatchDeleteNoTrackingAsync(x => x.Id == sponsorId);
return ResponseOutput.Result(success);
}
}
@@ -93,7 +93,7 @@ namespace IRaCIS.Application.Services
return ResponseOutput.NotOk("不允许直接删除父节点");
}
var success =await menuRepository.BatchDeleteAsync(u => u.Id == menuId);
var success =await menuRepository.BatchDeleteNoTrackingAsync(u => u.Id == menuId);
return ResponseOutput.Result(success);
}
@@ -73,7 +73,7 @@ namespace IRaCIS.Core.Application.Service
[HttpDelete("{systemNoticeId:guid}")]
public async Task<IResponseOutput> DeleteSystemNotice(Guid systemNoticeId)
{
var success = await _systemNoticeRepository.BatchDeleteAsync(t => t.Id == systemNoticeId);
var success = await _systemNoticeRepository.BatchDeleteNoTrackingAsync(t => t.Id == systemNoticeId);
return ResponseOutput.Result(success);
}
@@ -93,13 +93,13 @@ namespace IRaCIS.Application.Services
return ResponseOutput.NotOk("The mailbox for this user type already exists");
}
await _userRepository.UpdatePartialFieldsNowAsync(_userInfo.Id, u => new User()
await _userRepository.UpdateNowNoQueryAsync(_userInfo.Id, u => new User()
{
EMail = newEmail
});
//删除验证码历史记录
await _verificationCodeRepository.BatchDeleteAsync(t => t.UserId == _userInfo.Id && t.CodeType == 0);
await _verificationCodeRepository.BatchDeleteNoTrackingAsync(t => t.UserId == _userInfo.Id && t.CodeType == 0);
return ResponseOutput.Ok();
@@ -113,7 +113,7 @@ namespace IRaCIS.Application.Services
{
await _userRepository.UpdatePartialFieldsNowAsync(_userInfo.Id, u => new User()
await _userRepository.UpdateNowNoQueryAsync(_userInfo.Id, u => new User()
{
Phone = newPhone
});
@@ -130,7 +130,7 @@ namespace IRaCIS.Application.Services
{
return ResponseOutput.NotOk("UserId already exists");
}
await _userRepository.UpdatePartialFieldsNowAsync(_userInfo.Id, u => new User()
await _userRepository.UpdateNowNoQueryAsync(_userInfo.Id, u => new User()
{
UserName = newUserName
});
@@ -148,7 +148,7 @@ namespace IRaCIS.Application.Services
public async Task<IResponseOutput> ResetPassword(Guid userId)
{
await _userRepository.UpdatePartialFieldsNowAsync(userId, u => new User()
await _userRepository.UpdateNowNoQueryAsync(userId, u => new User()
{
Password = MD5Helper.Md5(StaticData.DefaultPassword),
IsFirstAdd = true
@@ -228,7 +228,7 @@ namespace IRaCIS.Application.Services
{
//删除验证码历史记录
await _verificationCodeRepository.BatchDeleteAsync(t => t.Id == verificationRecord.Id);
await _verificationCodeRepository.BatchDeleteNoTrackingAsync(t => t.Id == verificationRecord.Id);
}
}
@@ -260,7 +260,7 @@ namespace IRaCIS.Application.Services
return ResponseOutput.NotOk("password not change");
}
var success = await _userRepository.BatchUpdateAsync(t => t.Id == userId, u => new User()
var success = await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == userId, u => new User()
{
Password = newPwd,
IsFirstAdd = false
@@ -297,14 +297,14 @@ namespace IRaCIS.Application.Services
return ResponseOutput.NotOk("UserId already exists");
}
await _userRepository.BatchUpdateAsync(t => t.Id == _userInfo.Id, u => new User()
await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == _userInfo.Id, u => new User()
{
UserName = editPwModel.NewUserName,
});
}
var success = await _userRepository.BatchUpdateAsync(t => t.Id == _userInfo.Id, u => new User()
var success = await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == _userInfo.Id, u => new User()
{
Password = editPwModel.NewPassWord,
IsFirstAdd = false
@@ -318,7 +318,7 @@ namespace IRaCIS.Application.Services
//医生密码
if (await _doctorRepository.AnyAsync(t => t.Id == _userInfo.Id && t.Password == editPwModel.OldPassWord))
{
var success = await _doctorRepository.BatchUpdateAsync(t => t.Id == _userInfo.Id, u => new Doctor()
var success = await _doctorRepository.BatchUpdateNoTrackingAsync(t => t.Id == _userInfo.Id, u => new Doctor()
{
Password = editPwModel.NewPassWord
@@ -445,7 +445,7 @@ namespace IRaCIS.Application.Services
return ResponseOutput.NotOk("This user has participated in the trial and couldn't be deleted");
}
var success = await _userRepository.BatchDeleteAsync(t => t.Id == userId);
var success = await _userRepository.BatchDeleteNoTrackingAsync(t => t.Id == userId);
return ResponseOutput.Result(success);
}
@@ -460,7 +460,7 @@ namespace IRaCIS.Application.Services
[HttpPost("{userId:guid}/{state:int}")]
public async Task<IResponseOutput> UpdateUserState(Guid userId, UserStateEnum state)
{
var success = await _userRepository.BatchUpdateAsync(u => u.Id == userId, t => new User
var success = await _userRepository.BatchUpdateNoTrackingAsync(u => u.Id == userId, t => new User
{
Status = state
});
@@ -83,7 +83,7 @@ namespace IRaCIS.Core.Application.Contracts
return ResponseOutput.NotOk("该用户类型,被某些用户已使用,不能删除");
}
var success = await userTypeServiceRepository.BatchDeleteAsync(t => t.Id == userTypeId);
var success = await userTypeServiceRepository.BatchDeleteNoTrackingAsync(t => t.Id == userTypeId);
return ResponseOutput.Result(success);
}
@@ -166,7 +166,7 @@ namespace IRaCIS.Core.Application.Contracts
[HttpDelete("{trialId:guid}/{previousHistoryId:guid}")]
public async Task<IResponseOutput> DeletePreviousHistory(Guid previousHistoryId)
{
var success = await _previousHistoryRepository.BatchDeleteAsync(t => t.Id == previousHistoryId);
var success = await _previousHistoryRepository.BatchDeleteNoTrackingAsync(t => t.Id == previousHistoryId);
return ResponseOutput.Result(success);
}
@@ -191,7 +191,7 @@ namespace IRaCIS.Core.Application.Contracts
[HttpDelete("{trialId:guid}/{previousOtherId:guid}")]
public async Task<IResponseOutput> DeletePreviousOther(Guid previousOtherId)
{
var success = await _previousOtherRepository.BatchDeleteAsync(t => t.Id == previousOtherId);
var success = await _previousOtherRepository.BatchDeleteNoTrackingAsync(t => t.Id == previousOtherId);
return ResponseOutput.Result(success);
}
@@ -216,7 +216,7 @@ namespace IRaCIS.Core.Application.Contracts
[HttpDelete("{trialId:guid}/{previousSurgeryId:guid}")]
public async Task<IResponseOutput> DeletePreviousSurgery(Guid previousSurgeryId)
{
var success = await _previousSurgeryRepository.BatchDeleteAsync(t => t.Id == previousSurgeryId);
var success = await _previousSurgeryRepository.BatchDeleteNoTrackingAsync(t => t.Id == previousSurgeryId);
return ResponseOutput.Result(success);
}
@@ -242,7 +242,7 @@ namespace IRaCIS.Core.Application.Contracts
public async Task<IResponseOutput> DeletePreviousPDF(Guid previousPDFId)
{
var success = await _previousPdfRepository.BatchDeleteAsync(t => t.Id == previousPDFId);
var success = await _previousPdfRepository.BatchDeleteNoTrackingAsync(t => t.Id == previousPDFId);
return ResponseOutput.Result(success);
}
@@ -115,7 +115,7 @@ namespace IRaCIS.Core.Application.Contracts
await _noneDicomStudyRepository.DeleteAsync(noneDicomStudy);
await _noneDicomStudyFileRepository.BatchDeleteAsync(t => t.NoneDicomStudyId == noneDicomStudyId);
await _noneDicomStudyFileRepository.BatchDeleteNoTrackingAsync(t => t.NoneDicomStudyId == noneDicomStudyId);
await _repository.BatchDeleteAsync<StudyMonitor>(t => t.StudyId == noneDicomStudyId);
@@ -128,7 +128,7 @@ namespace IRaCIS.Core.Application.Contracts
{
var subjectVisitId = await _noneDicomStudyFileRepository.Where(t => t.Id == noneDicomStudyFileId).Select(t => t.NoneDicomStudy.SubjectVisitId).FirstOrDefaultAsync();
var success = await _noneDicomStudyFileRepository.BatchDeleteAsync(t => t.Id == noneDicomStudyFileId);
var success = await _noneDicomStudyFileRepository.BatchDeleteNoTrackingAsync(t => t.Id == noneDicomStudyFileId);
var subvisit = await _repository.GetQueryable<SubjectVisit>().FirstOrDefaultAsync(x => x.Id == subjectVisitId);
@@ -408,7 +408,7 @@ namespace IRaCIS.Core.Application.Image.QA
{
return ResponseOutput.NotOk("核查通过的数据不允许申请回退");
}
await _subjectVisitRepository.BatchUpdateAsync(t => t.Id == subjectVisitId, u => new SubjectVisit() { RequestBackState = RequestBackStateEnum.CRC_RequestBack });
await _subjectVisitRepository.BatchUpdateNoTrackingAsync(t => t.Id == subjectVisitId, u => new SubjectVisit() { RequestBackState = RequestBackStateEnum.CRC_RequestBack });
return ResponseOutput.Ok();
@@ -1685,7 +1685,7 @@ namespace IRaCIS.Core.Application.Image.QA
qcChallenge.LatestMsgTime = DateTime.Now;
qcChallenge.LatestReplyUserId = _userInfo.Id;
await _subjectVisitRepository.BatchUpdateAsync(t => t.Id == qcChallenge.SubjectVisitId, c => new SubjectVisit() { IsQCConfirmedReupload = true });
await _subjectVisitRepository.BatchUpdateNoTrackingAsync(t => t.Id == qcChallenge.SubjectVisitId, c => new SubjectVisit() { IsQCConfirmedReupload = true });
qcChallenge.DialogList.Add(new QCChallengeDialog()
{
@@ -1790,7 +1790,7 @@ namespace IRaCIS.Core.Application.Image.QA
var dbSubjectVisit = await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == qcChallenge.SubjectVisitId).IfNullThrowException();
await _subjectVisitRepository.BatchUpdateAsync(t => t.Id == qcChallenge.SubjectVisitId, c => new SubjectVisit() { IsQCConfirmedReupload = false });
await _subjectVisitRepository.BatchUpdateNoTrackingAsync(t => t.Id == qcChallenge.SubjectVisitId, c => new SubjectVisit() { IsQCConfirmedReupload = false });
qcChallenge.DialogList.Add(new QCChallengeDialog()
{
@@ -2023,7 +2023,7 @@ namespace IRaCIS.Core.Application.Image.QA
if (!result.IsSuccess)
{
await _subjectVisitRepository.BatchUpdateAsync(t => t.Id == subjectVisitId,
await _subjectVisitRepository.BatchUpdateNoTrackingAsync(t => t.Id == subjectVisitId,
u => new SubjectVisit() { ForwardState = ForwardStateEnum.ForwardFailed });
return ResponseOutput.NotOk("Forward Failed" + result.Failures.ToString() + result.ToJson());
@@ -2033,7 +2033,7 @@ namespace IRaCIS.Core.Application.Image.QA
}
}
await _subjectVisitRepository.BatchUpdateAsync(t => t.Id == subjectVisitId,
await _subjectVisitRepository.BatchUpdateNoTrackingAsync(t => t.Id == subjectVisitId,
u => new SubjectVisit() { ForwardState = ForwardStateEnum.Forwarded, ForwardUserId = _userInfo.Id, ForwardTime = DateTime.Now });
keyValuePairs["ForwardState"] = ForwardStateEnum.Forwarded;
@@ -2041,7 +2041,7 @@ namespace IRaCIS.Core.Application.Image.QA
catch (Exception e)
{
await _subjectVisitRepository.BatchUpdateAsync(t => t.Id == subjectVisitId,
await _subjectVisitRepository.BatchUpdateNoTrackingAsync(t => t.Id == subjectVisitId,
u => new SubjectVisit() { ForwardState = ForwardStateEnum.ForwardFailed });
keyValuePairs["ForwardState"] = ForwardStateEnum.ForwardFailed;
}
@@ -46,7 +46,7 @@ namespace IRaCIS.Core.Application.Contracts
[HttpDelete("{qCQuestionConfigureId:guid}")]
public async Task<IResponseOutput> DeleteQCQuestionConfigure(Guid qCQuestionConfigureId)
{
var success = await _qcQuestionRepository.BatchDeleteAsync(t => t.Id == qCQuestionConfigureId);
var success = await _qcQuestionRepository.BatchDeleteNoTrackingAsync(t => t.Id == qCQuestionConfigureId);
return ResponseOutput.Result(success);
}
@@ -151,7 +151,7 @@ namespace IRaCIS.Core.Application.Contracts
return ResponseOutput.NotOk("已有QC审核记录,不允许删除问题项");
}
var success = await _trialQcQuestionRepository.BatchDeleteAsync(t => t.Id == trialQCQuestionConfigureId);
var success = await _trialQcQuestionRepository.BatchDeleteNoTrackingAsync(t => t.Id == trialQCQuestionConfigureId);
return ResponseOutput.Result(success);
}
@@ -72,7 +72,7 @@ namespace IRaCIS.Core.Application.Contracts
{
return ResponseOutput.NotOk("已锁定,不允许操作");
}
var success = await _trialSiteEquipmentSurveyRepository.BatchDeleteAsync(t => t.Id == trialSiteEquipmentSurveyId);
var success = await _trialSiteEquipmentSurveyRepository.BatchDeleteNoTrackingAsync(t => t.Id == trialSiteEquipmentSurveyId);
return ResponseOutput.Result(success);
}
@@ -375,7 +375,7 @@ namespace IRaCIS.Core.Application.Contracts
return ResponseOutput.NotOk("已锁定,不允许操作");
}
var success = await _trialSiteSurveyRepository.BatchDeleteAsync(t => t.Id == trialSiteSurveyId);
var success = await _trialSiteSurveyRepository.BatchDeleteNoTrackingAsync(t => t.Id == trialSiteSurveyId);
return ResponseOutput.Result(success);
}
@@ -634,12 +634,12 @@ namespace IRaCIS.Core.Application.Contracts
if (hasSPMOrCPM)
{
await _trialSiteSurveyRepository.BatchUpdateAsync(t => t.Id == trialSiteSurveyId, u => new TrialSiteSurvey() { State = TrialSiteSurveyEnum.CRCSubmitted });
await _trialSiteSurveyRepository.BatchUpdateNoTrackingAsync(t => t.Id == trialSiteSurveyId, u => new TrialSiteSurvey() { State = TrialSiteSurveyEnum.CRCSubmitted });
}
else
{
await _trialSiteSurveyRepository.BatchUpdateAsync(t => t.Id == trialSiteSurveyId, u => new TrialSiteSurvey() { State = TrialSiteSurveyEnum.ToSubmit });
await _trialSiteSurveyRepository.BatchUpdateNoTrackingAsync(t => t.Id == trialSiteSurveyId, u => new TrialSiteSurvey() { State = TrialSiteSurveyEnum.ToSubmit });
}
}
return ResponseOutput.Ok();
@@ -751,7 +751,7 @@ namespace IRaCIS.Core.Application.Contracts
smtp.MessageSent += (sender, args) =>
{
_ = _trialSiteUserSurveyRepository.BatchUpdateAsync(t => t.Id == item.Id, u => new TrialSiteUserSurvey() { IsGenerateSuccess = true, InviteState = TrialSiteUserStateEnum.HasSend, IsJoin = null, ConfirmTime = null, RejectReason = String.Empty, SystemUserId = sysUserInfo.Id, ExpireTime = DateTime.Now.AddDays(7) }).Result;
_ = _trialSiteUserSurveyRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new TrialSiteUserSurvey() { IsGenerateSuccess = true, InviteState = TrialSiteUserStateEnum.HasSend, IsJoin = null, ConfirmTime = null, RejectReason = String.Empty, SystemUserId = sysUserInfo.Id, ExpireTime = DateTime.Now.AddDays(7) }).Result;
};
@@ -799,12 +799,12 @@ namespace IRaCIS.Core.Application.Contracts
if (hasSPMOrCPM)
{
await _trialSiteSurveyRepository.BatchUpdateAsync(t => t.Id == trialSiteSurveyId && t.State == TrialSiteSurveyEnum.ToSubmit, u => new TrialSiteSurvey() { State = TrialSiteSurveyEnum.CRCSubmitted });
await _trialSiteSurveyRepository.BatchUpdateNoTrackingAsync(t => t.Id == trialSiteSurveyId && t.State == TrialSiteSurveyEnum.ToSubmit, u => new TrialSiteSurvey() { State = TrialSiteSurveyEnum.CRCSubmitted });
}
else
{
await _trialSiteSurveyRepository.BatchUpdateAsync(t => t.Id == trialSiteSurveyId && t.State == TrialSiteSurveyEnum.ToSubmit, u => new TrialSiteSurvey() { State = TrialSiteSurveyEnum.SPMApproved });
await _trialSiteSurveyRepository.BatchUpdateNoTrackingAsync(t => t.Id == trialSiteSurveyId && t.State == TrialSiteSurveyEnum.ToSubmit, u => new TrialSiteSurvey() { State = TrialSiteSurveyEnum.SPMApproved });
}
@@ -812,7 +812,7 @@ namespace IRaCIS.Core.Application.Contracts
else if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM)
{
await _trialSiteSurveyRepository.BatchUpdateAsync(t => t.Id == trialSiteSurveyId && t.State == TrialSiteSurveyEnum.CRCSubmitted, u => new TrialSiteSurvey() { State = TrialSiteSurveyEnum.SPMApproved, PreliminaryUserId = _userInfo.Id, PreliminaryTime = DateTime.Now });
await _trialSiteSurveyRepository.BatchUpdateNoTrackingAsync(t => t.Id == trialSiteSurveyId && t.State == TrialSiteSurveyEnum.CRCSubmitted, u => new TrialSiteSurvey() { State = TrialSiteSurveyEnum.SPMApproved, PreliminaryUserId = _userInfo.Id, PreliminaryTime = DateTime.Now });
}
else if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.APM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager)
@@ -829,7 +829,7 @@ namespace IRaCIS.Core.Application.Contracts
await SendInviteEmail(new InviteEmailCommand() { TrialId = trialId, RouteUrl = siteSurvyeSubmit.RouteUrl, UserList = needGenerateList });
await _trialSiteSurveyRepository.BatchUpdateAsync(t => t.Id == trialSiteSurveyId && t.State == TrialSiteSurveyEnum.SPMApproved, u => new TrialSiteSurvey() { State = TrialSiteSurveyEnum.PMCreatedAndLock, ReviewerUserId = _userInfo.Id, ReviewerTime = DateTime.Now });
await _trialSiteSurveyRepository.BatchUpdateNoTrackingAsync(t => t.Id == trialSiteSurveyId && t.State == TrialSiteSurveyEnum.SPMApproved, u => new TrialSiteSurvey() { State = TrialSiteSurveyEnum.PMCreatedAndLock, ReviewerUserId = _userInfo.Id, ReviewerTime = DateTime.Now });
}
@@ -81,7 +81,7 @@ namespace IRaCIS.Core.Application.Contracts
return ResponseOutput.NotOk("已锁定,不允许操作");
}
var success = await _trialSiteUserSurveyRepository.BatchDeleteAsync(t => t.Id == trialSiteUserSurveyId);
var success = await _trialSiteUserSurveyRepository.BatchDeleteNoTrackingAsync(t => t.Id == trialSiteUserSurveyId);
return ResponseOutput.Result(success);
}
@@ -114,15 +114,15 @@ namespace IRaCIS.Core.Application
if (signConfirmDTO.SignCode == ((int)SignEnum.TrialLogicConfim).ToString())
{
await _trialRepository.BatchUpdateAsync(t => t.Id == signConfirmDTO.TrialId, u => new Trial() { IsTrialBasicLogicConfirmed = true });
await _trialRepository.BatchUpdateNoTrackingAsync(t => t.Id == signConfirmDTO.TrialId, u => new Trial() { IsTrialBasicLogicConfirmed = true });
}
else if (signConfirmDTO.SignCode == ((int)SignEnum.TrialProcessConfim).ToString())
{
await _trialRepository.BatchUpdateAsync(t => t.Id == signConfirmDTO.TrialId, u => new Trial() { IsTrialProcessConfirmed = true });
await _trialRepository.BatchUpdateNoTrackingAsync(t => t.Id == signConfirmDTO.TrialId, u => new Trial() { IsTrialProcessConfirmed = true });
}
else if (signConfirmDTO.SignCode == ((int)SignEnum.TrialUrgentConfim).ToString())
{
await _trialRepository.BatchUpdateAsync(t => t.Id == signConfirmDTO.TrialId, u => new Trial() { IsTrialUrgentConfirmed = true });
await _trialRepository.BatchUpdateNoTrackingAsync(t => t.Id == signConfirmDTO.TrialId, u => new Trial() { IsTrialUrgentConfirmed = true });
}
else if (signConfirmDTO.SignCode == ((int)SignEnum.TrialQCQuestionConfirm).ToString())
@@ -158,7 +158,7 @@ namespace IRaCIS.Core.Application
throw new BusinessValidationFailedException("父问题的序号要比子问题序号小,请确认");
}
await _trialRepository.BatchUpdateAsync(t => t.Id == signConfirmDTO.TrialId, u => new Trial() { QCQuestionConfirmedTime = DateTime.Now, QCQuestionConfirmedUserId = _userInfo.Id, IsQCQuestionConfirmed = true });
await _trialRepository.BatchUpdateNoTrackingAsync(t => t.Id == signConfirmDTO.TrialId, u => new Trial() { QCQuestionConfirmedTime = DateTime.Now, QCQuestionConfirmedUserId = _userInfo.Id, IsQCQuestionConfirmed = true });
}
@@ -241,7 +241,7 @@ namespace IRaCIS.Core.Application
EnrollStatus = (int)EnrollStatus.Finished
});
await _trialRepository.BatchUpdateAsync(u => u.Id == trialId, s => new Trial { TrialFinishedTime = DateTime.UtcNow.AddHours(8) });
await _trialRepository.BatchUpdateNoTrackingAsync(u => u.Id == trialId, s => new Trial { TrialFinishedTime = DateTime.UtcNow.AddHours(8) });
}
@@ -279,11 +279,9 @@ namespace IRaCIS.Core.Application
[HttpPut("{trialId:guid}/{isAbandon:bool}")]
public async Task<IResponseOutput> AbandonTrial(Guid trialId, /*Guid? signId,*/ bool isAbandon)
{
await _trialRepository.UpdateNowNoQueryAsync(trialId, u => new Trial() { IsDeleted = isAbandon });
await _trialRepository.UpdatePartialFieldsNowAsync(trialId, u => new Trial() { IsDeleted = isAbandon });
//var success = await _repository.BatchUpdateAsync<TrialSign>(t => t.Id == signId, u => new TrialSign() { IsCompleted = true });
return ResponseOutput.Ok();
@@ -193,11 +193,11 @@ namespace IRaCIS.Core.Application.Service
[HttpDelete("{trialExternalUserId:guid}/{isSystemUser:bool}/{systemUserId}")]
public async Task<IResponseOutput> DeleteTrialExternalUser(Guid trialExternalUserId, bool isSystemUser, Guid systemUserId)
{
var success = await _trialExternalUseRepository.BatchDeleteAsync(t => t.Id == trialExternalUserId);
var success = await _trialExternalUseRepository.BatchDeleteNoTrackingAsync(t => t.Id == trialExternalUserId);
if (isSystemUser == false)
{
await _userRepository.BatchDeleteAsync(t => t.Id == systemUserId);
await _userRepository.BatchDeleteNoTrackingAsync(t => t.Id == systemUserId);
}
return ResponseOutput.Result(success);
@@ -263,7 +263,7 @@ namespace IRaCIS.Core.Application.Service
smtp.MessageSent += (sender, args) =>
{
_ = _trialExternalUseRepository.BatchUpdateAsync(t => t.Id == userInfo.Id, u => new TrialExternalUser() { InviteState = TrialExternalUserStateEnum.HasSend, IsJoin = null, ConfirmTime = null, RejectReason = String.Empty, ExpireTime = DateTime.Now.AddDays(7) }).Result;
_ = _trialExternalUseRepository.BatchUpdateNoTrackingAsync(t => t.Id == userInfo.Id, u => new TrialExternalUser() { InviteState = TrialExternalUserStateEnum.HasSend, IsJoin = null, ConfirmTime = null, RejectReason = String.Empty, ExpireTime = DateTime.Now.AddDays(7) }).Result;
};
@@ -344,7 +344,7 @@ namespace IRaCIS.Core.Application.Service
if (sysUserInfo.IsFirstAdd)
{
await _userRepository.BatchUpdateAsync(t => t.Id == sysUserInfo.Id,
await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == sysUserInfo.Id,
u => new User() { Password = MD5Helper.Md5(verificationCode.ToString()) });
}
@@ -401,7 +401,7 @@ namespace IRaCIS.Core.Application.Service
await smtp.DisconnectAsync(true);
}
await _userRepository.BatchUpdateAsync(t => t.Id == userId, u => new User() { Status = UserStateEnum.Enable });
await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == userId, u => new User() { Status = UserStateEnum.Enable });
}
@@ -487,7 +487,7 @@ namespace IRaCIS.Core.Application.Service
await _trialSiteUserRepository.AddAsync(new TrialSiteUser() { TrialId = trialId, SiteId = siteId, UserId = userId });
await _userRepository.BatchUpdateAsync(t => t.Id == needUpdate.SystemUserId, u => new User() { Status = UserStateEnum.Enable });
await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == needUpdate.SystemUserId, u => new User() { Status = UserStateEnum.Enable });
}
@@ -515,7 +515,7 @@ namespace IRaCIS.Core.Application.Service
if (sysUserInfo.IsFirstAdd)
{
await _userRepository.BatchUpdateAsync(t => t.Id == sysUserInfo.Id,
await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == sysUserInfo.Id,
u => new User() { Password = MD5Helper.Md5(verificationCode.ToString()) });
}
@@ -666,10 +666,10 @@ namespace IRaCIS.Core.Application.Service
{
await _repository.AddAsync(new TrialUser() { TrialId = trialId, UserId = (Guid)externalUser.SystemUserId });
await _trialExternalUseRepository.BatchUpdateAsync(t => t.Id == trialExternalUserId,
await _trialExternalUseRepository.BatchUpdateNoTrackingAsync(t => t.Id == trialExternalUserId,
u => new TrialExternalUser() { InviteState = TrialExternalUserStateEnum.UserConfirmed });
await _userRepository.BatchUpdateAsync(t => t.Id == externalUser.SystemUserId, u => new User() { Status = UserStateEnum.Enable });
await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == externalUser.SystemUserId, u => new User() { Status = UserStateEnum.Enable });
await _userRepository.SaveChangesAsync();
}
@@ -204,7 +204,7 @@ namespace IRaCIS.Application.Services
await _repository.BatchUpdateAsync<SubjectVisit>(t => t.CurrentActionUserId == trialUser.UserId && t.TrialId == trialUser.TrialId && t.IsTake, u => new SubjectVisit() { CurrentActionUserId = null, CurrentActionUserExpireTime = null, IsTake = false });
}
await _trialUseRepository.BatchUpdateAsync(t => t.Id == id, u => new TrialUser() { IsDeleted = isDelete, RemoveTime = isDelete ? DateTime.Now : null });
await _trialUseRepository.BatchUpdateNoTrackingAsync(t => t.Id == id, u => new TrialUser() { IsDeleted = isDelete, RemoveTime = isDelete ? DateTime.Now : null });
await _repository.SaveChangesAsync();
@@ -438,7 +438,7 @@ namespace IRaCIS.Application.Services
}
}
await _trialRepository.BatchUpdateAsync(u => u.Id == trialId, t => new Trial() { VisitPlanConfirmed = confirmOrCancel });
await _trialRepository.BatchUpdateNoTrackingAsync(u => u.Id == trialId, t => new Trial() { VisitPlanConfirmed = confirmOrCancel });
await _repository.BatchUpdateAsync<VisitStage>(u => u.Id == trialId, t => new VisitStage() { IsConfirmed = true });
@@ -299,7 +299,7 @@ namespace IRaCIS.Core.Application.Services
{
var isSuccess = await _trialSiteUserRepository.BatchUpdateAsync(u => u.Id == id, u => new TrialSiteUser()
var isSuccess = await _trialSiteUserRepository.BatchUpdateNoTrackingAsync(u => u.Id == id, u => new TrialSiteUser()
{ IsDeleted = isDelete, DeletedTime = isDelete ? DateTime.Now : null });
return ResponseOutput.Ok(isSuccess);
@@ -100,7 +100,7 @@ namespace IRaCIS.Core.Application.Service
await _trialUserRepository.AddAsync(new TrialUser() { TrialId = trialId, UserId = userId });
await _trialExternalUseRepository.BatchUpdateAsync(t => t.TrialId == trialId && t.SystemUserId == userId,
await _trialExternalUseRepository.BatchUpdateNoTrackingAsync(t => t.TrialId == trialId && t.SystemUserId == userId,
u => new TrialExternalUser() { InviteState = TrialExternalUserStateEnum.UserConfirmed });
@@ -122,7 +122,7 @@ namespace IRaCIS.Core.Application.Service
}
}
await _userRepository.BatchUpdateAsync(t => t.Id == userId, u => new User() { Status = UserStateEnum.Enable });
await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == userId, u => new User() { Status = UserStateEnum.Enable });
return ResponseOutput.Ok();
@@ -190,8 +190,8 @@ namespace IRaCIS.Application.Services
return ResponseOutput.NotOk("This subject has executed a visit with uploading study images,and couldn't be deleted.");
}
var isSuccess = await _subjectRepository.BatchDeleteAsync(u => u.Id == id);
await _subjectVisitRepository.TrackingDeleteFromQueryAsync(u => u.SubjectId == id);
var isSuccess = await _subjectRepository.BatchDeleteNoTrackingAsync(u => u.Id == id);
await _subjectVisitRepository.DeleteFromQueryAsync(u => u.SubjectId == id);
var subvisit = await _subjectVisitRepository.Where(x => x.SubjectId == id).ToListAsync();
@@ -161,7 +161,7 @@ namespace IRaCIS.Core.Application.Services
[HttpPut("{trialId:guid}/{subjectVisitId:guid}/{isUrgent:bool}")]
public async Task<IResponseOutput> SetSubjectVisitUrgent(Guid subjectVisitId, bool isUrgent)
{
await _subjectVisitRepository.BatchUpdateAsync(t => t.Id == subjectVisitId, u => new SubjectVisit() { IsUrgent = isUrgent });
await _subjectVisitRepository.BatchUpdateNoTrackingAsync(t => t.Id == subjectVisitId, u => new SubjectVisit() { IsUrgent = isUrgent });
return ResponseOutput.Ok();
}
@@ -197,7 +197,7 @@ namespace IRaCIS.Core.Application.Services
[TypeFilter(typeof(TrialResourceFilter))]
public async Task<IResponseOutput> SetSVExecuted(Guid subjectVisitId)
{
return ResponseOutput.Result(await _subjectVisitRepository.BatchUpdateAsync(s => s.Id == subjectVisitId, u => new SubjectVisit() { VisitExecuted = VisitExecutedEnum.Executed }));
return ResponseOutput.Result(await _subjectVisitRepository.BatchUpdateNoTrackingAsync(s => s.Id == subjectVisitId, u => new SubjectVisit() { VisitExecuted = VisitExecutedEnum.Executed }));
}
@@ -248,7 +248,7 @@ namespace IRaCIS.Application.Services
//更新项目访视计划状态为已确认 必定生成更新的sql 通过状态改变 触发操作
await _trialRepository.UpdatePartialFieldsNowAsync(trialId, t => new Trial() { VisitPlanConfirmed = true });
await _trialRepository.UpdateNowNoQueryAsync(trialId, t => new Trial() { VisitPlanConfirmed = true });
//找到访视计划修改的Item
@@ -449,7 +449,7 @@ namespace IRaCIS.Application.Services
await _repository.AddRangeAsync(subjectVisits);
//访视计划 整体状态变更为 确认
await _visitStageRepository.BatchUpdateAsync(u => u.TrialId == trialId, t => new VisitStage() { IsConfirmed = true, IsHaveFirstConfirmed = true });
await _visitStageRepository.BatchUpdateNoTrackingAsync(u => u.TrialId == trialId, t => new VisitStage() { IsConfirmed = true, IsHaveFirstConfirmed = true });
await _repository.SaveChangesAsync();
return ResponseOutput.Ok();
@@ -504,7 +504,7 @@ namespace IRaCIS.Application.Services
await _repository.BatchDeleteAsync<SubjectVisit>(t => t.TrialId == visitPlan.TrialId && t.VisitName == visitPlan.VisitName);
var result = await _visitStageRepository.BatchDeleteAsync(u => u.Id == id);
var result = await _visitStageRepository.BatchDeleteNoTrackingAsync(u => u.Id == id);
return ResponseOutput.Result(result);
}
@@ -60,7 +60,7 @@ namespace IRaCIS.Application.Services
if (attachmentViewModel.Id != Guid.Empty)
{
await _attachmentRepository.BatchDeleteAsync(t => t.Id == attachmentViewModel.Id);
await _attachmentRepository.BatchDeleteNoTrackingAsync(t => t.Id == attachmentViewModel.Id);
}
var attach = _mapper.Map<Attachment>(attachmentViewModel);
@@ -83,8 +83,8 @@ namespace IRaCIS.Application.Services
[TypeFilter(typeof(TrialResourceFilter))]
public async Task<IResponseOutput> DeleteReviewerAckSOW(Guid trialId, Guid doctorId, Guid attachmentId)
{
var success1 = await _attachmentRepository.BatchDeleteAsync(a => a.Id == attachmentId);
var success2 = await _enrollRepository.BatchUpdateAsync(t => t.TrialId == trialId && t.DoctorId == doctorId, u =>
var success1 = await _attachmentRepository.BatchDeleteNoTrackingAsync(a => a.Id == attachmentId);
var success2 = await _enrollRepository.BatchUpdateNoTrackingAsync(t => t.TrialId == trialId && t.DoctorId == doctorId, u =>
new Enroll()
{
AttachmentId = Guid.Empty
@@ -100,7 +100,7 @@ namespace IRaCIS.Application.Services
[TypeFilter(typeof(TrialResourceFilter))]
public async Task<IResponseOutput> UpdateReviewerReadingType(Guid trialId, Guid doctorId, int type)
{
var success2 = await _enrollRepository.BatchUpdateAsync(t => t.TrialId == trialId && t.DoctorId == doctorId, u =>
var success2 = await _enrollRepository.BatchUpdateNoTrackingAsync(t => t.TrialId == trialId && t.DoctorId == doctorId, u =>
new Enroll()
{
ReviewerReadingType = type
@@ -625,7 +625,7 @@ namespace IRaCIS.Application.Services
await _doctorWorkloadRepository.AddAsync(workLoad);
await _enrollRepository.BatchUpdateAsync(
await _enrollRepository.BatchUpdateNoTrackingAsync(
t => t.DoctorId == workLoadAddOrUpdateModel.DoctorId && t.TrialId == workLoadAddOrUpdateModel.TrialId, u => new Enroll()
{
EnrollStatus = (int)EnrollStatus.DoctorReading,
@@ -648,7 +648,7 @@ namespace IRaCIS.Application.Services
}
var success = await _doctorWorkloadRepository.BatchUpdateAsync(t => t.Id == workLoadAddOrUpdateModel.Id,
var success = await _doctorWorkloadRepository.BatchUpdateNoTrackingAsync(t => t.Id == workLoadAddOrUpdateModel.Id,
u => new Workload()
{
Timepoint = workLoadAddOrUpdateModel.Timepoint,
@@ -678,7 +678,7 @@ namespace IRaCIS.Application.Services
/// </summary>
public async Task<IResponseOutput> DeleteWorkload(Guid workloadId)
{
return ResponseOutput.Result(await _doctorWorkloadRepository.BatchDeleteAsync(t => t.Id == workloadId));
return ResponseOutput.Result(await _doctorWorkloadRepository.BatchDeleteNoTrackingAsync(t => t.Id == workloadId));
}
/// <summary>