@@ -246,8 +246,19 @@ namespace IRaCIS.Core.Application.Service
|
||||
await _doctorSummarizeRepository.InsertOrUpdateAsync(system, true);
|
||||
}
|
||||
}
|
||||
|
||||
if (inDto.TrialId == null)
|
||||
{
|
||||
var systemCount = await _doctorSummarizeRepository.Where(x => x.DoctorId == inDto.DoctorId && x.TrialId == null).CountAsync();
|
||||
if (systemCount == 0)
|
||||
{
|
||||
inDto.IsMain = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (inDto.TrialId == null && inDto.IsMain)
|
||||
{
|
||||
|
||||
await _doctorSummarizeRepository.BatchUpdateNoTrackingAsync(x => x.DoctorId == inDto.DoctorId && x.TrialId == null,
|
||||
x => new DoctorSummarize()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user