diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index 2d418714d..3950e6f79 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -8212,6 +8212,11 @@
任务展示访视 读片任务显示是否顺序
+
+
+ 是否存在未处理的反馈
+
+
是否是转变的任务(转为IRECIST)
@@ -12081,7 +12086,7 @@
-
+
IR影像阅片
@@ -13237,6 +13242,14 @@
+
+
+ 项目退出历史数据维护
+
+
+
+
+
用户多账号,初次维护数据
@@ -13794,11 +13807,21 @@
是否是一致性分析产生
+
+
+ 是否存在未处理的反馈
+
+
是否是一致性分析产生
+
+
+ 是否存在未处理的反馈
+
+
未完成阅片量
diff --git a/IRaCIS.Core.Application/TestService.cs b/IRaCIS.Core.Application/TestService.cs
index 8558b55bf..44e6cfcbe 100644
--- a/IRaCIS.Core.Application/TestService.cs
+++ b/IRaCIS.Core.Application/TestService.cs
@@ -154,6 +154,58 @@ namespace IRaCIS.Core.Application.Service
return ResponseOutput.Ok();
}
+ ///
+ /// 项目退出历史数据维护
+ ///
+ ///
+ ///
+ ///
+ [AllowAnonymous]
+ public async Task OldTrialDeleteUser([FromServices] IRepository _trialIdentityUserRepository, [FromServices] IRepository _trialUserRoleReposiotry)
+ {
+ _userInfo.IsNotNeedInspection = true;
+
+
+ if (_trialUserRoleReposiotry.Any(t => t.TrialUserId == Guid.Empty))
+ {
+ var list = _trialUserRoleReposiotry.Where(t => t.IsDeleted == true, false, true).Select(t => new { t.TrialId, t.UserRole.IdentityUserId, t.UserId, t.JoinTime, t.RemoveTime, t.DeletedTime, t.DeleteUserId }).ToList();
+
+
+ foreach (var item in list.GroupBy(t => new { t.IdentityUserId, t.TrialId }))
+ {
+
+ var id = NewId.NextSequentialGuid();
+
+ var userRoleList = item.ToList();
+
+ var userIdList = item.Select(t => t.UserId).ToList();
+
+ var first = userRoleList.OrderByDescending(t => t.RemoveTime).FirstOrDefault();
+
+
+ await _trialIdentityUserRepository.AddAsync(new TrialIdentityUser()
+ {
+ Id = id,
+ IdentityUserId = item.Key.IdentityUserId,
+ TrialId = item.Key.TrialId,
+ RemoveTime = first.RemoveTime,
+ IsDeleted = true,
+ DeletedTime = first.DeletedTime,
+ DeleteUserId = first.DeleteUserId,
+ });
+
+
+ await _trialUserRoleReposiotry.BatchUpdateNoTrackingAsync(t => t.TrialId == item.Key.TrialId && userIdList.Contains(t.UserId), u => new TrialUserRole() { TrialUserId = id });
+
+ }
+
+ await _trialIdentityUserRepository.SaveChangesAsync();
+ }
+
+
+
+ return ResponseOutput.Ok();
+ }
///
/// 用户多账号,初次维护数据
@@ -173,7 +225,7 @@ namespace IRaCIS.Core.Application.Service
var identityUserId = NewId.NextSequentialGuid();
- var selectUser = item.OrderByDescending(t => t.Status).ThenBy(t=>t.CreateTime).FirstOrDefault();
+ var selectUser = item.OrderByDescending(t => t.Status).ThenBy(t => t.CreateTime).FirstOrDefault();
var identityUser = _mapper.Map(selectUser);