修改稽查

This commit is contained in:
2022-08-25 14:19:57 +08:00
parent 5a046da4d0
commit 7c08e7606c
5 changed files with 130 additions and 98 deletions
@@ -121,7 +121,16 @@ namespace IRaCIS.Application.Services
}
await _enrollReadingCategoryRepository.BatchDeleteNoTrackingAsync(x => x.EnrollId == inDto.EnrollId);
if (inDto.ReadingCategorys.Count > 0)
{
await _enrollReadingCategoryRepository.BatchDeleteNoTrackingAsync(x => x.EnrollId == inDto.EnrollId);
}
else
{
await _enrollReadingCategoryRepository.DeleteFromQueryAsync(x => x.EnrollId == inDto.EnrollId);
}
List<EnrollReadingCategory> enrollReadings = inDto.ReadingCategorys.Select(x => new EnrollReadingCategory()
{