From 6a3b73007eca16d0f995a51699ef3938579bc74a Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 29 Aug 2022 17:22:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9QC=20=E8=B4=A8=E7=96=91?= =?UTF-8?q?=E5=AF=B9=E8=AF=9D=E7=A8=BD=E6=9F=A5=20=20=20=E5=92=8C=E4=B8=80?= =?UTF-8?q?=E8=87=B4=E6=80=A7=E6=A0=B8=E6=9F=A5=E7=A8=BD=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/QC/NoneDicomStudyService.cs | 2 +- .../Service/QC/QCCommon.cs | 24 +- .../SiteSurvey/TrialSiteSurvey.cs | 4 +- .../Common/AuditingData.cs | 421 +++++++++--------- 4 files changed, 238 insertions(+), 213 deletions(-) diff --git a/IRaCIS.Core.Application/Service/QC/NoneDicomStudyService.cs b/IRaCIS.Core.Application/Service/QC/NoneDicomStudyService.cs index 56e32619c..661eb90d8 100644 --- a/IRaCIS.Core.Application/Service/QC/NoneDicomStudyService.cs +++ b/IRaCIS.Core.Application/Service/QC/NoneDicomStudyService.cs @@ -51,7 +51,7 @@ namespace IRaCIS.Core.Application.Contracts public async Task> AddOrUpdateNoneDicomStudy(NoneDicomStudyAddOrEdit addOrEditNoneDicomStudy) { - await QCCommon.VerifyIsCRCSubmmitAsync(_repository, _userInfo, addOrEditNoneDicomStudy.SubjectVisitId); + await QCCommon.VerifyIsCRCSubmmitAsync(_repository, _userInfo, addOrEditNoneDicomStudy.SubjectVisitId); await QCCommon.VerifyStudyImageDataAsync(_repository, addOrEditNoneDicomStudy.SubjectId, addOrEditNoneDicomStudy.SubjectVisitId, addOrEditNoneDicomStudy.ImageDate); diff --git a/IRaCIS.Core.Application/Service/QC/QCCommon.cs b/IRaCIS.Core.Application/Service/QC/QCCommon.cs index 70cd3cdc4..c414e915b 100644 --- a/IRaCIS.Core.Application/Service/QC/QCCommon.cs +++ b/IRaCIS.Core.Application/Service/QC/QCCommon.cs @@ -14,18 +14,22 @@ namespace IRaCIS.Core.Application.Service /// /// /// - public static async Task VerifyIsCRCSubmmitAsync(IRepository _repository, IUserInfo _userInfo, Guid? subjectVisitId=null) + public static async Task VerifyIsCRCSubmmitAsync(IRepository _repository, IUserInfo _userInfo, Guid? subjectVisitId = null) { - //添加的时候不验证 - if (subjectVisitId != null) + if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator) { - if (await _repository.AnyAsync(t => t.Id == subjectVisitId && t.SubmitState == SubmitStateEnum.Submitted && - (!t.QCChallengeList.Any(u => u.ReuploadEnum == QCChanllengeReuploadEnum.QCAgreeUpload)))) + //添加的时候不验证 + if (subjectVisitId != null) { - throw new BusinessValidationFailedException("CRC 已提交影像,不能进行操作。"); + if (await _repository.AnyAsync(t => t.Id == subjectVisitId && t.SubmitState == SubmitStateEnum.Submitted && + (!t.QCChallengeList.Any(u => u.ReuploadEnum == QCChanllengeReuploadEnum.QCAgreeUpload)))) + { + throw new BusinessValidationFailedException("CRC 已提交影像,不能进行操作。"); + } } } + //IQC 的时候 验证是不是当前领取人 if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IQC) { @@ -36,7 +40,7 @@ namespace IRaCIS.Core.Application.Service } - public static async Task VerifyIsCanQCAsync(IRepository _repository,IUserInfo _userInfo, SubjectVisit? subjectVisit=null, Guid? subjectVisitId=null) + public static async Task VerifyIsCanQCAsync(IRepository _repository, IUserInfo _userInfo, SubjectVisit? subjectVisit = null, Guid? subjectVisitId = null) { if (subjectVisitId != null) { @@ -51,7 +55,7 @@ namespace IRaCIS.Core.Application.Service - public static async Task VerifyStudyImageDataAsync(IRepository _repository, Guid subjectId, Guid subjectVisitId,DateTime imageDate) + public static async Task VerifyStudyImageDataAsync(IRepository _repository, Guid subjectId, Guid subjectVisitId, DateTime imageDate) { var visitList = await _repository.Where(t => t.SubjectId == subjectId).Select(t => new { t.VisitNum, t.EarliestScanDate, t.LatestScanDate, t.Id }).ToListAsync(); @@ -109,7 +113,7 @@ namespace IRaCIS.Core.Application.Service svExpression = t => t.InPlan == false; } - + } @@ -216,7 +220,7 @@ namespace IRaCIS.Core.Application.Service svExpression = t => t.SubjectVisit.InPlan == false; } - + } diff --git a/IRaCIS.Core.Domain/SiteSurvey/TrialSiteSurvey.cs b/IRaCIS.Core.Domain/SiteSurvey/TrialSiteSurvey.cs index 71113d256..28308285b 100644 --- a/IRaCIS.Core.Domain/SiteSurvey/TrialSiteSurvey.cs +++ b/IRaCIS.Core.Domain/SiteSurvey/TrialSiteSurvey.cs @@ -16,7 +16,9 @@ namespace IRaCIS.Core.Domain.Models [Table("TrialSiteSurvey")] public class TrialSiteSurvey : Entity, IAuditUpdate, IAuditAdd,ISoftDelete { - //public bool IsLocked { get; set; }=false; + //public bool IsLocked { get; set; }=false; + + public TrialSiteSurveyEnum State { get; set; } = TrialSiteSurveyEnum.ToSubmit; diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs index 1abff5887..1fcf705a1 100644 --- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs +++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs @@ -143,79 +143,10 @@ namespace IRaCIS.Core.Infra.EFCore.Common } - // 中心调研表 - foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(TrialSiteSurvey))) - { - var entity = item.Entity as TrialSiteSurvey; - if (entity.TrialSite == null) - { - entity.TrialSite = await _dbContext.TrialSite.Where(x => x.SiteId == entity.SiteId && x.TrialId == entity.TrialId).FirstOrDefaultAsync(); - } - if (entity.PreliminaryUser == null) - { - entity.PreliminaryUser = await _dbContext.User.Where(x => x.Id == entity.PreliminaryUserId).FirstOrDefaultAsync(); - } - if (entity.ReviewerUser == null) - { - entity.ReviewerUser = await _dbContext.User.Where(x => x.Id == entity.ReviewerUserId).FirstOrDefaultAsync(); - } - await InsertInspection(item.Entity as TrialSiteSurvey, type, null, new - { - TrialSiteCode = entity.TrialSite.TrialSiteCode, - TrialSiteAliasName = entity.TrialSite.TrialSiteAliasName, - Phone = entity.Phone, - Email = entity.Email, - PreliminaryUser = entity.PreliminaryUser == null ? "" : entity.PreliminaryUser.LastName + " / " + entity.PreliminaryUser.FirstName, - ReviewerUser = entity.ReviewerUser == null ? "" : entity.ReviewerUser.LastName + " / " + entity.ReviewerUser.FirstName, - }); - } - - //质疑 - foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(QCChallenge))) - { - var entity = item.Entity as QCChallenge; - - var subjectvisit = await _dbContext.SubjectVisit.Where(x => x.Id == entity.SubjectVisitId).FirstOrDefaultAsync(); - subjectvisit = subjectvisit ?? new SubjectVisit(); - var content = string.Empty; - if (type == "Add") - { - content = entity.Content; - } - await InsertInspection(entity, type, x => new InspectionConvertDTO() - { - TrialId = x.TrialId, - SubjectVisitId = x.SubjectVisitId, - SiteId = subjectvisit.SiteId, - SubjectId = subjectvisit.SubjectId, - SubjectVisitName = subjectvisit.VisitName, - BlindName = subjectvisit.BlindName, - - ObjectRelationParentId = x.SubjectVisitId - }, new - { - ChallengeCode = entity.ChallengeCode, - AuditState = subjectvisit.AuditState, - TalkContent = content, - IsOverTime = entity.IsClosed ? entity.ClosedTime > entity.DeadlineTime : DateTime.Now > entity.DeadlineTime, - }); - } - - // 一致性核查文件 - foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(ConsistencyCheckFile))) - { - await InsertInspection(item.Entity as ConsistencyCheckFile, type, x => new InspectionConvertDTO() - { - CreateTime = x.CreateTime, - - ObjectRelationParentId = x.TrialId - - }); - } // Qc 问题答案 // 特殊GeneralId if (entitys.Any(x => x.Entity.GetType() == typeof(TrialQCQuestionAnswer))) @@ -286,85 +217,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common } - //一致性核查 // 特殊GeneralId - foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(CheckChallengeDialog))) - { - var entity = item.Entity as CheckChallengeDialog; - var subjectvisit = await _dbContext.SubjectVisit.Where(x => x.Id == entity.SubjectVisitId).FirstOrDefaultAsync(); - subjectvisit = subjectvisit ?? new SubjectVisit(); - var reason = string.Empty; - - switch (_userInfo.RequestUrl.ToLower()) - { - case "qcoperation/closecheckchallenge": - reason = entity.TalkContent.Substring(entity.TalkContent.LastIndexOf(':') + 1); - break; - } - await InsertInspection(entity, type, x => new InspectionConvertDTO() - { - GeneralId = entity.SubjectVisitId, - - TrialId = subjectvisit.TrialId, - SubjectVisitId = x.SubjectVisitId, - SiteId = subjectvisit.SiteId, - SubjectId = subjectvisit.SubjectId, - SubjectVisitName = subjectvisit.VisitName, - BlindName = subjectvisit.BlindName, - Reason = reason, - CreateTime = x.CreateTime, - - //byzhouhang - ObjectRelationParentId = entity.SubjectVisitId, - }, new - { - CheckState = subjectvisit.CheckState, - RequestBackState = subjectvisit.RequestBackState, - CheckChallengeState = subjectvisit.CheckChallengeState, - }); - } - - // 质疑信息 // 特殊GeneralId - foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(QCChallengeDialog))) - { - var reason = string.Empty; - var entity = item.Entity as QCChallengeDialog; - switch (_userInfo.RequestUrl.ToLower()) - { - case "qcoperation/closeqcchallenge": - reason = entity.TalkContent.Substring(entity.TalkContent.LastIndexOf(':') + 1); - break; - } - - var subjectvisit = await _dbContext.SubjectVisit.Where(x => x.Id == entity.SubjectVisitId).FirstOrDefaultAsync(); - var qCChallenge = await _dbContext.QCChallenge.Where(x => x.Id == entity.QCChallengeId).FirstOrDefaultAsync(); - subjectvisit = subjectvisit ?? new SubjectVisit(); - qCChallenge = qCChallenge ?? new QCChallenge(); - await InsertInspection(entity, type, x => new InspectionConvertDTO() - { - GeneralId = qCChallenge.Id, - - - TrialId = subjectvisit.TrialId, - SubjectVisitId = x.SubjectVisitId, - SiteId = subjectvisit.SiteId, - SubjectId = subjectvisit.SubjectId, - SubjectVisitName = subjectvisit.VisitName, - BlindName = subjectvisit.BlindName, - Reason = reason, - //byzhouhang - ObjectRelationParentId = qCChallenge.Id, - }, new - { - AuditState = subjectvisit.AuditState, - - ReuploadEnum = qCChallenge.ReuploadEnum, - Content = qCChallenge.Content, - DeadlineTime = qCChallenge.DeadlineTime, - IsOverTime = qCChallenge.IsClosed ? qCChallenge.ClosedTime > qCChallenge.DeadlineTime : DateTime.Now > qCChallenge.DeadlineTime, - IsClosed = qCChallenge.IsClosed - }); - } #endregion @@ -372,6 +225,123 @@ namespace IRaCIS.Core.Infra.EFCore.Common #region 已修改 + //QC 质疑 + foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(QCChallenge))) + { + var entity = item.Entity as QCChallenge; + + await InsertInspection(entity, type, x => new InspectionConvertDTO() + { + SubjectVisitId = x.SubjectVisitId, + + ObjectRelationParentId = x.SubjectVisitId + }, new + { + + IsOverTime = entity.IsClosed ? entity.ClosedTime > entity.DeadlineTime : DateTime.Now > entity.DeadlineTime, + }); + } + + // 质疑 对话 + foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(QCChallengeDialog))) + { + var entity = item.Entity as QCChallengeDialog; + + await InsertInspection(entity, type, x => new InspectionConvertDTO() + { + + SubjectVisitId = x.SubjectVisitId, + + + //byzhouhang + ObjectRelationParentId = entity.QCChallengeId, + + IsDistinctionInterface = false + + }); + } + //一致性核查 对话 + foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(CheckChallengeDialog))) + { + + var entity = item.Entity as CheckChallengeDialog; + //var subjectvisit = await _dbContext.SubjectVisit.Where(x => x.Id == entity.SubjectVisitId).FirstOrDefaultAsync(); + //subjectvisit = subjectvisit ?? new SubjectVisit(); + //var reason = string.Empty; + + //switch (_userInfo.RequestUrl.ToLower()) + //{ + // case "qcoperation/closecheckchallenge": + // reason = entity.TalkContent.Substring(entity.TalkContent.LastIndexOf(':') + 1); + // break; + //} + await InsertInspection(entity, type, x => new InspectionConvertDTO() + { + + SubjectVisitId = x.SubjectVisitId, + + //byzhouhang + IsDistinctionInterface = false, + + ObjectRelationParentId = entity.SubjectVisitId, + } + //, new + //{ + // CheckState = subjectvisit.CheckState, + // RequestBackState = subjectvisit.RequestBackState, + // CheckChallengeState = subjectvisit.CheckChallengeState, + //} + ); + } + + + // 一致性核查文件 是否需要单独一个表记录? + foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(ConsistencyCheckFile))) + { + await InsertInspection(item.Entity as ConsistencyCheckFile, type, x => new InspectionConvertDTO() + { + ObjectRelationParentId = x.TrialId + + }); + } + + // 中心调研表 + foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(TrialSiteSurvey))) + { + var entity = item.Entity as TrialSiteSurvey; + if (entity.TrialSite == null) + { + entity.TrialSite = await _dbContext.TrialSite.Where(x => x.SiteId == entity.SiteId && x.TrialId == entity.TrialId).FirstOrDefaultAsync(); + } + + if (entity.PreliminaryUser == null) + { + entity.PreliminaryUser = await _dbContext.User.Where(x => x.Id == entity.PreliminaryUserId).FirstOrDefaultAsync(); + } + + if (entity.ReviewerUser == null) + { + entity.ReviewerUser = await _dbContext.User.Where(x => x.Id == entity.ReviewerUserId).FirstOrDefaultAsync(); + } + + await InsertInspection(item.Entity as TrialSiteSurvey, type, x => new InspectionConvertDTO() + { + ObjectRelationParentId = entity.TrialSite.Id, + }, new + { + + //TrialSiteCode = entity.TrialSite.TrialSiteCode, + //TrialSiteAliasName = entity.TrialSite.TrialSiteAliasName, + //Phone = entity.Phone, + //Email = entity.Email, + + + PreliminaryUser = entity.PreliminaryUser == null ? "" : entity.PreliminaryUser.FullName, + ReviewerUser = entity.ReviewerUser == null ? "" : entity.ReviewerUser.FullName, + + }); + } + // 既往手术史 @@ -439,9 +409,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common } - - - //系统 Qc 问题 foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(QCQuestion))) { @@ -709,16 +676,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common { var entity = item.Entity as SubjectVisit; - - string reason = string.Empty; - - if (_userInfo.RequestUrl.ToLower() == "qcoperation/setcheckpass") - { - reason = entity.ManualPassReason; - } - - var subjectCode = entity.Subject?.Code; - await InsertInspection(item.Entity as SubjectVisit, type, x => new InspectionConvertDTO() { //Subject的信息 找离的最近的Subject稽查信息 @@ -727,7 +684,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common SubjectId = x.SubjectId, SubjectVisitId = x.Id, SiteId = x.SiteId, - Reason = reason, }, //兼容之前的配置名 @@ -769,18 +725,29 @@ namespace IRaCIS.Core.Infra.EFCore.Common }); } - if(entitys.Any(x => x.Entity.GetType() == typeof(NoneDicomStudyFile))) - { - var list = entitys.Where(x => x.Entity.GetType() == typeof(NoneDicomStudyFile)); + //if(entitys.Any(x => x.Entity.GetType() == typeof(NoneDicomStudyFile))) + //{ + // var list = entitys.Where(x => x.Entity.GetType() == typeof(NoneDicomStudyFile)).Select(t=>t.Entity); + + // var first = list.First() as NoneDicomStudyFile; + + // if(first.NoneDicomStudy == null) + // { + // first.NoneDicomStudy = _dbContext.NoneDicomStudy.Find(first.NoneDicomStudyId); + // } + + // await InsertInspection(first, type, x => new InspectionConvertDTO() + // { + // GeneralId=first.NoneDicomStudyId, + + // SubjectVisitId= first.NoneDicomStudy.SubjectVisitId, - //await InsertInspection(item.Entity as NoneDicomStudy, type, x => new InspectionConvertDTO() - //{ - // ObjectRelationParentId = x.SubjectVisitId, + // ObjectRelationParentId = x.NoneDicomStudyId, - //}); + // }); - } + //} @@ -1118,7 +1085,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common var generalId = (inspection.GeneralId != null && inspection.GeneralId != Guid.Empty) ? inspection.GeneralId : entityObj.Id; inspection.GeneralId = generalId; - inspection.Identification = await GetInspectionRecordIdentificationAsync(entityObj, type, inspection.IsDistinctionInterface); + inspection.Identification = await GetInspectionRecordIdentificationAsync(inspection, entityObj, type, inspection.IsDistinctionInterface); //将实体对象属性 映射到稽查实体 MapEntityPropertyToAuditEntity(entityObj, inspection); @@ -1311,7 +1278,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common /// 获取稽查记录的标识符 部分业务会进行特殊处理 /// /// - public async Task GetInspectionRecordIdentificationAsync(T entityObj, string type, bool IsDistinctionInterface = true) + public async Task GetInspectionRecordIdentificationAsync(InspectionConvertDTO inspection, T entityObj, string type, bool IsDistinctionInterface = true) { var entityTypeName = entityObj.GetType().Name; @@ -1323,30 +1290,23 @@ namespace IRaCIS.Core.Infra.EFCore.Common entityTypeName = "New/" + "UserSigned"; } - dynamic entity; + object entity; switch (entityObj.GetType().Name) { - case nameof(QCChallengeDialog): - case nameof(QCChallenge): - case nameof(CheckChallengeDialog): - type = type + "/(" + _userInfo.UserTypeShortName + ")"; - break; + //case nameof(QCChallengeDialog): + //case nameof(QCChallenge): + //case nameof(CheckChallengeDialog): + // type = type + "/(" + _userInfo.UserTypeShortName + ")"; + // break; + - case nameof(NoneDicomStudy): - switch (_userInfo.RequestUrl.ToLower()) - { - case "nonedicomstudy/addorupdatenonedicomstudy": - type = type + "/(" + _userInfo.UserTypeShortName + ")"; - break; - } - break; case nameof(SystemBasicData): - entity = entityObj as SystemBasicData; - type = type + (entity.ParentId == null ? "/parent" : string.Empty); + var basicData = entityObj as SystemBasicData; + type = type + (basicData.ParentId == null ? "/parent" : string.Empty); break; case nameof(Trial): - entity = entityObj as Trial; - Guid id = entity.Id; + var trial = entityObj as Trial; + Guid id = trial.Id; Trial oldentity = await _dbContext.Trial.Where(x => x.Id == id).FirstOrDefaultAsync(); switch (_userInfo.RequestUrl.ToLower()) { @@ -1361,21 +1321,60 @@ namespace IRaCIS.Core.Infra.EFCore.Common break; } break; - case nameof(SubjectVisit): - entity = entityObj as SubjectVisit; + + + // 对话消息区分用户类型 + case nameof(CheckChallengeDialog): + type = type + "/(" + _userInfo.UserTypeShortName + ")"; + + var checkDialog = entityObj as CheckChallengeDialog; + switch (_userInfo.RequestUrl.ToLower()) { - case "qcoperation/obtainorcancelqctask": - type = type + "/" + entity.IsTake.ToString(); + case "qcoperation/closecheckchallenge": + + inspection.Reason = checkDialog.TalkContent.Substring(checkDialog.TalkContent.LastIndexOf(':') + 1); break; + } + + break; + + // 对话消息区分用户类型 + case nameof(QCChallengeDialog): + type = type + "/(" + _userInfo.UserTypeShortName + ")"; + + var dialog= entityObj as QCChallengeDialog; + switch (_userInfo.RequestUrl.ToLower()) + { + case "qcoperation/closeqcchallenge": + + inspection.Reason = dialog.TalkContent.Substring(dialog.TalkContent.LastIndexOf(':') + 1); + break; + } + + break; + + + case nameof(SubjectVisit): + var sv = entityObj as SubjectVisit; + switch (_userInfo.RequestUrl.ToLower()) + { + //待处理? case "qcoperation/qcpassedorfailed": - try - { - type = type + "/" + (40 % (int)entity.AuditState).ToString(); - } - catch (Exception) - { - } + + type = type + "/" + (40 % (int)sv.AuditState).ToString(); + + break; + + //设置核查通过 + case "qcoperation/setcheckpass": + + inspection.Reason = sv.ManualPassReason; + break; + + //领取或者取消QC任务 + case "qcoperation/obtainorcancelqctask": + type = type + "/" + sv.IsTake.ToString(); break; //确认重阅 区分用户类型 @@ -1388,12 +1387,31 @@ namespace IRaCIS.Core.Infra.EFCore.Common } else { + //SPM type = type + "/" + 2; } break; } + + if(sv.CheckChallengeState==CheckChanllengeTypeEnum.CRCWaitPMReply|| sv.CheckChallengeState == CheckChanllengeTypeEnum.PMWaitCRCReply) + { + //发送对话 修改质疑状态 不需要区分接口 + IsDistinctionInterface = false; + + type = type + "/ModifyCheckChallengeState"; + } break; + case nameof(NoneDicomStudy): + switch (_userInfo.RequestUrl.ToLower()) + { + case "nonedicomstudy/addorupdatenonedicomstudy": + type = type + "/(" + _userInfo.UserTypeShortName + ")"; + break; + } + break; + + //任务表 case nameof(VisitTask): var visitTask = entityObj as VisitTask; @@ -1459,7 +1477,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common break; - + //重阅记录表 case nameof(VisitTaskReReading): var visitTaskReReading = entityObj as VisitTaskReReading; @@ -1496,6 +1514,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common break; + //一致性分析规则 case nameof(TaskConsistentRule): var taskConsistentRule = entityObj as TaskConsistentRule;