修改任务生成代码

Uat_Study
hang 2022-07-15 09:40:48 +08:00
parent 2a91a9c7a9
commit f5cef1fa7a
3 changed files with 467 additions and 253 deletions

View File

@ -151,6 +151,7 @@ namespace IRaCIS.Core.Application.Service
if (allocateSubjectArmList.Count != 0) if (allocateSubjectArmList.Count != 0)
{ {
#region 验证历史任务 #region 验证历史任务
if (_taskAllocationRuleRepository.Where(t => t.TrialId == trialId && t.IsEnable && t.IsJudgeDoctor == false).Count() < 2) if (_taskAllocationRuleRepository.Where(t => t.TrialId == trialId && t.IsEnable && t.IsJudgeDoctor == false).Count() < 2)
{ {
throw new BusinessValidationFailedException("能参与读片的医生数量必须大于2,自动分配任务中止"); throw new BusinessValidationFailedException("能参与读片的医生数量必须大于2,自动分配任务中止");
@ -166,6 +167,7 @@ namespace IRaCIS.Core.Application.Service
{ {
throw new BusinessValidationFailedException("请确认是否改了配置或者手动分配时只分配了一个Arm "); throw new BusinessValidationFailedException("请确认是否改了配置或者手动分配时只分配了一个Arm ");
} }
#endregion #endregion
@ -184,6 +186,89 @@ namespace IRaCIS.Core.Application.Service
task1.AllocateTime = DateTime.Now; task1.AllocateTime = DateTime.Now;
task2.AllocateTime = DateTime.Now; task2.AllocateTime = DateTime.Now;
#region 重阅/退回的时候,需要将取消分配的访视类型的 任务重新分配
//后续未分配的访视 PM 有序退回 或者PM 有序 申请重阅
var notAllocateList = await _visitTaskRepository.Where(t => t.TrialId == trialId && t.SubjectId == subjectVisit.SubjectId && t.TaskState == TaskState.Effect && t.DoctorUserId == null
&& t.VisitTaskNum > subjectVisit.VisitNum && t.ReadingCategory == ReadingCategory.Visit, true).ToListAsync();
foreach (var notAllocate in notAllocateList)
{
notAllocate.TaskAllocationState = TaskAllocationState.Allocated;
notAllocate.AllocateTime = DateTime.Now;
notAllocate.DoctorUserId = notAllocate.ArmEnum == Arm.DoubleReadingArm1 ? task1.DoctorUserId : task2.DoctorUserId;
}
//后续 废弃的任务 重阅重置,或者失效的 访视 需要重新生成
var needAddTaskList = await _visitTaskRepository.Where(t => t.TrialId == trialId && t.SubjectId == subjectVisit.SubjectId && (t.TaskState == TaskState.Adbandon || t.TaskState == TaskState.HaveReturned) && t.VisitTaskNum > subjectVisit.VisitNum && t.ReadingCategory == ReadingCategory.Visit).ToListAsync();
//可能存在多次申请重阅 所以这里会有重复
foreach (var group in needAddTaskList.GroupBy(t => new { t.SubjectId, t.VisitTaskNum }))
{
var latestTask = group.OrderByDescending(t=>t.CreateTime).First();
var taskOne = await _visitTaskRepository.AddAsync(new VisitTask()
{
TrialId = trialId,
SubjectId = subjectVisit.SubjectId,
IsUrgent = subjectVisit.IsUrgent,
TaskBlindName = subjectVisit.BlindName,
TaskName = subjectVisit.VisitName,
VisitTaskNum = subjectVisit.VisitNum,
ArmEnum = Arm.DoubleReadingArm1,//特殊
Code = currentMaxCodeInt + 1,
SourceSubjectVisitId = subjectVisit.Id,
TaskCode = AppSettings.GetCodeStr(currentMaxCodeInt + 1, nameof(VisitTask)),
ReadingCategory = ReadingCategory.Visit,
IsAnalysisCreate= latestTask.IsAnalysisCreate,
IsSelfAnalysis= latestTask.IsSelfAnalysis,
TaskAllocationState=TaskAllocationState.Allocated,
AllocateTime=DateTime.Now,
DoctorUserId= task1.DoctorUserId
});
var taskTwo = await _visitTaskRepository.AddAsync(new VisitTask()
{
TrialId = trialId,
SubjectId = subjectVisit.SubjectId,
IsUrgent = subjectVisit.IsUrgent,
TaskBlindName = subjectVisit.BlindName,
TaskName = subjectVisit.VisitName,
VisitTaskNum = subjectVisit.VisitNum,
//CheckPassedTime = subjectVisit.CheckPassedTime,
ArmEnum = Arm.DoubleReadingArm2,//特殊
Code = currentMaxCodeInt + 2,
SourceSubjectVisitId = subjectVisit.Id,
TaskCode = AppSettings.GetCodeStr(currentMaxCodeInt + 2, nameof(VisitTask)),
ReadingCategory = ReadingCategory.Visit,
IsAnalysisCreate = latestTask.IsAnalysisCreate,
IsSelfAnalysis = latestTask.IsSelfAnalysis,
TaskAllocationState = TaskAllocationState.Allocated,
AllocateTime = DateTime.Now,
DoctorUserId = task2.DoctorUserId
});
currentMaxCodeInt = currentMaxCodeInt + 2;
_provider.Set<int>($"{trialId}_{StaticData.CacheKey.TaskMaxCode}", currentMaxCodeInt, TimeSpan.FromMinutes(30));
}
#endregion
} }
else else
//后续访视不自动分配,或者配置的医生数量不足,就不进行分配 //后续访视不自动分配,或者配置的医生数量不足,就不进行分配
@ -195,7 +280,7 @@ namespace IRaCIS.Core.Application.Service
else else
// 当前任务没有分配医生,初次分配 // 当前任务没有分配医生,初次分配
{ {
return; //return;
} }
} }
@ -205,30 +290,7 @@ namespace IRaCIS.Core.Application.Service
#endregion #endregion
if (assignConfigList.Count>0)
{
#region 重阅/退回的时候,需要将之前取消分配的访视类型的 任务重新分配
var arm1DoctorUserId = assignConfigList.FirstOrDefault(t => t.ArmEnum == Arm.DoubleReadingArm1).DoctorUserId;
var arm2DoctorUserId = assignConfigList.FirstOrDefault(t => t.ArmEnum == Arm.DoubleReadingArm2).DoctorUserId;
await _visitTaskRepository.UpdatePartialFromQueryAsync(t => t.TrialId == trialId && t.SubjectId == subjectVisit.SubjectId && t.TaskState == TaskState.Effect && t.DoctorUserId == null
&& t.VisitTaskNum > subjectVisit.VisitNum && t.ReadingCategory == ReadingCategory.Visit && t.ArmEnum == Arm.DoubleReadingArm1, u => new VisitTask()
{
TaskAllocationState = TaskAllocationState.Allocated,
DoctorUserId = arm1DoctorUserId,
AllocateTime = DateTime.Now,
});
await _visitTaskRepository.UpdatePartialFromQueryAsync(t => t.TrialId == trialId && t.SubjectId == subjectVisit.SubjectId && t.TaskState == TaskState.Effect && t.DoctorUserId == null && t.VisitTaskNum > subjectVisit.VisitNum && t.ReadingCategory == ReadingCategory.Visit && t.ArmEnum == Arm.DoubleReadingArm2, u => new VisitTask()
{
TaskAllocationState = TaskAllocationState.Allocated,
DoctorUserId = arm2DoctorUserId,
AllocateTime = DateTime.Now,
});
#endregion
}
@ -292,20 +354,81 @@ namespace IRaCIS.Core.Application.Service
singleTask.DoctorUserId = assignConfigList.FirstOrDefault(t => t.ArmEnum == 0).DoctorUserId; singleTask.DoctorUserId = assignConfigList.FirstOrDefault(t => t.ArmEnum == 0).DoctorUserId;
singleTask.AllocateTime = DateTime.Now;
#region 重阅/退回的时候,需要将取消分配的访视类型的 任务重新分配
//后续未分配的访视 PM 有序退回 或者PM 有序 申请重阅
var notAllocateList = await _visitTaskRepository.Where(t => t.TrialId == trialId && t.SubjectId == subjectVisit.SubjectId && t.TaskState == TaskState.Effect && t.DoctorUserId == null
&& t.VisitTaskNum > subjectVisit.VisitNum && t.ReadingCategory == ReadingCategory.Visit, true).ToListAsync();
foreach (var notAllocate in notAllocateList)
{
notAllocate.TaskAllocationState = TaskAllocationState.Allocated;
notAllocate.AllocateTime = DateTime.Now;
notAllocate.DoctorUserId = singleTask.DoctorUserId;
} }
//后续 废弃的任务 重阅重置,或者失效的 访视 需要重新生成
var needAddTaskList = await _visitTaskRepository.Where(t => t.TrialId == trialId && t.SubjectId == subjectVisit.SubjectId && (t.TaskState == TaskState.Adbandon || t.TaskState == TaskState.HaveReturned) && t.VisitTaskNum > subjectVisit.VisitNum && t.ReadingCategory == ReadingCategory.Visit).ToListAsync();
//可能存在多次申请重阅 所以这里会有重复
foreach (var group in needAddTaskList.GroupBy(t => new { t.SubjectId, t.VisitTaskNum }))
{
var latestTask = group.OrderByDescending(t => t.CreateTime).First();
var taskOne = await _visitTaskRepository.AddAsync(new VisitTask()
{
TrialId = trialId,
SubjectId = subjectVisit.SubjectId,
IsUrgent = subjectVisit.IsUrgent,
TaskBlindName = subjectVisit.BlindName,
TaskName = subjectVisit.VisitName,
VisitTaskNum = subjectVisit.VisitNum,
ArmEnum = Arm.DoubleReadingArm1,//特殊
Code = currentMaxCodeInt + 1,
SourceSubjectVisitId = subjectVisit.Id,
TaskCode = AppSettings.GetCodeStr(currentMaxCodeInt + 1, nameof(VisitTask)),
ReadingCategory = ReadingCategory.Visit,
IsAnalysisCreate = latestTask.IsAnalysisCreate,
IsSelfAnalysis = latestTask.IsSelfAnalysis,
TaskAllocationState = TaskAllocationState.Allocated,
AllocateTime = DateTime.Now,
DoctorUserId = singleTask.DoctorUserId
});
currentMaxCodeInt = currentMaxCodeInt + 1;
_provider.Set<int>($"{trialId}_{StaticData.CacheKey.TaskMaxCode}", currentMaxCodeInt, TimeSpan.FromMinutes(30));
} }
#endregion
}
}
} }
else else
{ {
//后续Subect 不自动分配 不处理 //后续Subect 不自动分配 不处理
return;
}
} }
singleTask.AllocateTime = DateTime.Now;
}
} }
#endregion #endregion
@ -398,8 +521,6 @@ namespace IRaCIS.Core.Application.Service
VisitTaskNum = task.VisitTaskNum, VisitTaskNum = task.VisitTaskNum,
ReadingCategory = task.ReadingCategory, ReadingCategory = task.ReadingCategory,
IsAnalysisCreate = true,
//TaskConsistentRuleId=task.TaskConsistentRuleId,
TaskState = TaskState.Effect, TaskState = TaskState.Effect,
Code = currentMaxCodeInt + 1, Code = currentMaxCodeInt + 1,
TaskCode = AppSettings.GetCodeStr(currentMaxCodeInt + 1, nameof(VisitTask)), TaskCode = AppSettings.GetCodeStr(currentMaxCodeInt + 1, nameof(VisitTask)),
@ -411,7 +532,7 @@ namespace IRaCIS.Core.Application.Service
BlindTrialSiteCode = task.BlindTrialSiteCode, BlindTrialSiteCode = task.BlindTrialSiteCode,
BlindSubjectCode = task.BlindSubjectCode, BlindSubjectCode = task.BlindSubjectCode,
ConsistentAnalysisOriginalTaskId = task.Id, ConsistentAnalysisOriginalTaskId = task.Id,
IsAnalysisCreate = true,
IsSelfAnalysis = true, IsSelfAnalysis = true,
}; };
@ -440,7 +561,6 @@ namespace IRaCIS.Core.Application.Service
VisitTaskNum = task.VisitTaskNum, VisitTaskNum = task.VisitTaskNum,
ReadingCategory = task.ReadingCategory, ReadingCategory = task.ReadingCategory,
IsAnalysisCreate = true,
TaskState = TaskState.Effect, TaskState = TaskState.Effect,
Code = currentMaxCodeInt + 1, Code = currentMaxCodeInt + 1,
TaskCode = AppSettings.GetCodeStr(currentMaxCodeInt + 1, nameof(VisitTask)), TaskCode = AppSettings.GetCodeStr(currentMaxCodeInt + 1, nameof(VisitTask)),
@ -450,7 +570,7 @@ namespace IRaCIS.Core.Application.Service
AllocateTime = DateTime.Now, AllocateTime = DateTime.Now,
IsAnalysisCreate = true,
IsSelfAnalysis = false, IsSelfAnalysis = false,
}; };
@ -487,6 +607,11 @@ namespace IRaCIS.Core.Application.Service
DoctorUserId = subjectUser == null ? null : subjectUser.Id, DoctorUserId = subjectUser == null ? null : subjectUser.Id,
TaskAllocationState = subjectUser == null ? TaskAllocationState.NotAllocate : TaskAllocationState.Allocated, TaskAllocationState = subjectUser == null ? TaskAllocationState.NotAllocate : TaskAllocationState.Allocated,
AllocateTime = subjectUser == null ? null : DateTime.Now, AllocateTime = subjectUser == null ? null : DateTime.Now,
BlindTrialSiteCode = firstTask.BlindTrialSiteCode,
BlindSubjectCode = firstTask.BlindSubjectCode,
IsAnalysisCreate = firstTask.IsAnalysisCreate,
IsSelfAnalysis = firstTask.IsSelfAnalysis,
}; };
await _visitTaskRepository.AddAsync(visitTask); await _visitTaskRepository.AddAsync(visitTask);
currentMaxCodeInt = currentMaxCodeInt + 1; currentMaxCodeInt = currentMaxCodeInt + 1;

View File

@ -1039,7 +1039,6 @@ namespace IRaCIS.Core.Application.Service
public async Task<IResponseOutput> ConfirmReReading(ConfirmReReadingCommand agreeReReadingCommand, [FromServices] IVisitTaskHelpeService _visitTaskCommonService) public async Task<IResponseOutput> ConfirmReReading(ConfirmReReadingCommand agreeReReadingCommand, [FromServices] IVisitTaskHelpeService _visitTaskCommonService)
{ {
throw new BusinessValidationFailedException("正在更新开发ing,不允许操作");
var trialId = agreeReReadingCommand.TrialId; var trialId = agreeReReadingCommand.TrialId;
@ -1065,51 +1064,81 @@ namespace IRaCIS.Core.Application.Service
if (agreeReReadingCommand.RequestReReadingResultEnum == RequestReReadingResult.Agree) if (agreeReReadingCommand.RequestReReadingResultEnum == RequestReReadingResult.Agree)
{ {
//裁判任务 同意重阅 #region 废弃
if (origenalTask.ReadingCategory == ReadingCategory.Judge) ////裁判任务 同意重阅
{ //if (origenalTask.ReadingCategory == ReadingCategory.Judge)
//{
//项目组 SPM同意 IR PM同意 // //项目组 SPM同意 IR PM同意
if ((visitTaskReReadingAppply.RequestReReadingType == RequestReReadingType.TrialGroupApply && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM) || // if ((visitTaskReReadingAppply.RequestReReadingType == RequestReReadingType.TrialGroupApply && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM) ||
(visitTaskReReadingAppply.RequestReReadingType == RequestReReadingType.DocotorApply && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager) // (visitTaskReReadingAppply.RequestReReadingType == RequestReReadingType.DocotorApply && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager)
) // )
{ // {
//产生的新任务 // //产生的新任务
await _visitTaskCommonService.AddTaskAsync(new GenerateTaskCommand() // await _visitTaskCommonService.AddTaskAsync(new GenerateTaskCommand()
{ // {
TrialId = trialId, // TrialId = trialId,
ReadingCategory = GenerateTaskCategory.ReReading, // ReadingCategory = GenerateTaskCategory.ReReading,
ReReadingTask = origenalTask, // ReReadingTask = origenalTask,
//同步才可以 // //同步才可以
Action = (newTask) => // Action = (newTask) =>
{ // {
//申请表 设置新任务Id // //申请表 设置新任务Id
visitTaskReReadingAppply.NewReReadingTaskId = newTask.Id; // visitTaskReReadingAppply.NewReReadingTaskId = newTask.Id;
//生成的任务分配给原始医生 // //生成的任务分配给原始医生
newTask.DoctorUserId = origenalTask.DoctorUserId; // newTask.DoctorUserId = origenalTask.DoctorUserId;
newTask.TaskAllocationState = TaskAllocationState.Allocated; // newTask.TaskAllocationState = TaskAllocationState.Allocated;
newTask.AllocateTime = DateTime.Now; // newTask.AllocateTime = DateTime.Now;
} // }
}); // });
} // }
} //}
//访视任务 同意重阅 ////访视任务 同意重阅
else //else
{ #endregion
//PM申请 SPM / CPM审批
//PM申请 SPM / CPM审批 回退访视,在此不生成访视任务
if (visitTaskReReadingAppply.RequestReReadingType == RequestReReadingType.TrialGroupApply && (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM)) if (visitTaskReReadingAppply.RequestReReadingType == RequestReReadingType.TrialGroupApply && (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM))
{ {
//有序阅片 //有序阅片
if (trialConfig.IsReadingTaskViewInOrder) if (trialConfig.IsReadingTaskViewInOrder)
{ {
Expression<Func<VisitTask, bool>> filterExpression = t => t.TrialId == trialId && t.SubjectId == origenalTask.SubjectId && t.TaskState == TaskState.Effect;
//是否是一致性分析任务
filterExpression = filterExpression.And(t => t.IsAnalysisCreate == origenalTask.IsAnalysisCreate);
//访视影响当前以及当前之后的 两个阅片人的
filterExpression = filterExpression.And(t => (t.VisitTaskNum > origenalTask.VisitTaskNum && t.DoctorUserId == origenalTask.DoctorUserId) || (t.VisitTaskNum >= origenalTask.VisitTaskNum && t.DoctorUserId != origenalTask.DoctorUserId));
#region 影响的任务(排除申请的任务)
var influenceTaskList = await _visitTaskRepository.Where(filterExpression, true).ToListAsync();
foreach (var influenceTask in influenceTaskList)
{
if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
{
influenceTask.TaskState = TaskState.HaveReturned;
}
else
{
influenceTask.TaskState = TaskState.Adbandon;
}
}
#endregion
} }
//无序阅片 //无序阅片
@ -1153,19 +1182,19 @@ namespace IRaCIS.Core.Application.Service
} }
//回退访视 // 无序阅片没有 全局 肿瘤学
}
// 不管有序 无序 都会 回退访视
if (origenalTask.ReadingCategory == ReadingCategory.Visit) if (origenalTask.ReadingCategory == ReadingCategory.Visit)
{ {
//执行类似一致性核查回退流程 //执行类似一致性核查回退流程
await VisitBackAsync(origenalTask.SourceSubjectVisitId); await VisitBackAsync(origenalTask.SourceSubjectVisitId);
} }
// 无序阅片没有 全局 肿瘤学
} }
} //IR申请 PM 审批 注意这里有一致性分析的申请同意 不会回退访视,在此要生成影响的访视任务
//IR申请 PM 审批 注意这里有一致性分析的申请同意
else if (visitTaskReReadingAppply.RequestReReadingType == RequestReReadingType.DocotorApply && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager) else if (visitTaskReReadingAppply.RequestReReadingType == RequestReReadingType.DocotorApply && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager)
{ {
@ -1173,6 +1202,9 @@ namespace IRaCIS.Core.Application.Service
//有序阅片 //有序阅片
if (trialConfig.IsReadingTaskViewInOrder) if (trialConfig.IsReadingTaskViewInOrder)
{ {
#region 有序 IR 申请 重阅 影响的其他访视查询
Expression<Func<VisitTask, bool>> filterExpression = t => t.TrialId == trialId && t.SubjectId == origenalTask.SubjectId && t.TaskState == TaskState.Effect; Expression<Func<VisitTask, bool>> filterExpression = t => t.TrialId == trialId && t.SubjectId == origenalTask.SubjectId && t.TaskState == TaskState.Effect;
//是否是一致性分析任务 //是否是一致性分析任务
@ -1210,7 +1242,6 @@ namespace IRaCIS.Core.Application.Service
case ReadingCategory.Judge: case ReadingCategory.Judge:
//裁判的影响自己 和后续肿瘤学阅片 //裁判的影响自己 和后续肿瘤学阅片
filterExpression = filterExpression.And(t => /*(t.Id == origenalTask.Id) ||*/ (t.VisitTaskNum > origenalTask.VisitTaskNum && t.DoctorUserId == origenalTask.DoctorUserId && t.ReadingCategory == ReadingCategory.Oncology)); filterExpression = filterExpression.And(t => /*(t.Id == origenalTask.Id) ||*/ (t.VisitTaskNum > origenalTask.VisitTaskNum && t.DoctorUserId == origenalTask.DoctorUserId && t.ReadingCategory == ReadingCategory.Oncology));
@ -1221,8 +1252,9 @@ namespace IRaCIS.Core.Application.Service
throw new BusinessValidationFailedException("不支持重阅的任务类型"); throw new BusinessValidationFailedException("不支持重阅的任务类型");
} }
#endregion
#region 这里时影响其他的任务 不包括申请的任务 申请的任务,在上面会统一处理
var influenceTaskList = await _visitTaskRepository.Where(filterExpression, true).ToListAsync(); var influenceTaskList = await _visitTaskRepository.Where(filterExpression, true).ToListAsync();
@ -1236,8 +1268,63 @@ namespace IRaCIS.Core.Application.Service
{ {
influenceTask.TaskState = TaskState.Adbandon; influenceTask.TaskState = TaskState.Adbandon;
} }
//影响其他的任务 如果是访视类型 需要重新生成
if (influenceTask.ReadingCategory == ReadingCategory.Visit)
{
await _visitTaskCommonService.AddTaskAsync(new GenerateTaskCommand()
{
TrialId = trialId,
ReadingCategory = GenerateTaskCategory.ReReading,
ReReadingTask = origenalTask,
//同步才可以
Action = (newTask) =>
{
//申请表 设置新任务Id
visitTaskReReadingAppply.NewReReadingTaskId = newTask.Id;
//生成的任务分配给原始医生
newTask.DoctorUserId = origenalTask.DoctorUserId;
newTask.TaskAllocationState = TaskAllocationState.Allocated;
newTask.AllocateTime = DateTime.Now;
}
});
}
} }
#endregion
#region 申请任务 重新生成
//申请的任务 重新生成
await _visitTaskCommonService.AddTaskAsync(new GenerateTaskCommand()
{
TrialId = trialId,
ReadingCategory = GenerateTaskCategory.ReReading,
ReReadingTask = origenalTask,
//同步才可以
Action = (newTask) =>
{
//申请表 设置新任务Id
visitTaskReReadingAppply.NewReReadingTaskId = newTask.Id;
//生成的任务分配给原始医生
newTask.DoctorUserId = origenalTask.DoctorUserId;
newTask.TaskAllocationState = TaskAllocationState.Allocated;
newTask.AllocateTime = DateTime.Now;
}
});
#endregion
} }
@ -1293,7 +1380,6 @@ namespace IRaCIS.Core.Application.Service
} }
} }
}
} }

View File

@ -22,28 +22,31 @@ namespace IRaCIS.Application.Services
public async Task<string> Get() public async Task<string> Get()
{ {
var subject1 = Guid.Parse("431D0C58-ABC5-4166-B9BC-08DA0E391693"); //var subject1 = Guid.Parse("431D0C58-ABC5-4166-B9BC-08DA0E391693");
var subject2 = Guid.Parse("431D0C58-ABC5-4166-B9BC-08DA0E391694"); //var subject2 = Guid.Parse("431D0C58-ABC5-4166-B9BC-08DA0E391694");
var subjectList = new List<Guid>() { Guid.Parse("431D0C58-ABC5-4166-B9BC-08DA0E391693") , // var subjectList = new List<Guid>() { Guid.Parse("431D0C58-ABC5-4166-B9BC-08DA0E391693") ,
Guid.Parse("431D0C58-ABC5-4166-B9BC-08DA0E391694") , // Guid.Parse("431D0C58-ABC5-4166-B9BC-08DA0E391694") ,
Guid.Parse("431D0C58-ABC5-4166-B9BC-08DA0E391695") // Guid.Parse("431D0C58-ABC5-4166-B9BC-08DA0E391695")
}; // };
string[] citys = new string[] { "广州", "深圳", "上海", "北京" }; //string[] citys = new string[] { "广州", "深圳", "上海", "北京" };
foreach (var item in subjectList) //foreach (var item in subjectList)
{ //{
Console.WriteLine(await BNRFactory.Default.Create($"[CN:{item}][N:[CN:{item}]/0000000]")); // Console.WriteLine(await BNRFactory.Default.Create($"[CN:{item}][N:[CN:{item}]/0000000]"));
} //}
foreach (var item in subjectList) //foreach (var item in subjectList)
{ //{
Console.WriteLine(await BNRFactory.Default.Create($"[N:[CN:{item}]/0000000]")); // Console.WriteLine(await BNRFactory.Default.Create($"[N:[CN:{item}]/0000000]"));
} //}
//foreach (var item in subjectList)
//{
// Console.WriteLine(await BNRFactory.Default.Create($"[CN:{item}][redis:city/0000000]"));
//}
var needAddVisitList = await _repository.Where<VisitTask>(t => t.TrialId == Guid.Empty).DistinctBy(t => t.VisitTaskNum).ToListAsync();
foreach (var item in subjectList)
{
Console.WriteLine(await BNRFactory.Default.Create($"[CN:{item}][redis:city/0000000]"));
}
return _userInfo.LocalIp; return _userInfo.LocalIp;
} }