修改稽查国际化

Uat_Study
hang 2023-06-01 10:15:23 +08:00
parent 4f6225047e
commit e1ddb5920f
2 changed files with 38 additions and 460 deletions

View File

@ -18,6 +18,7 @@ using IRaCIS.Core.Domain.Share.Management;
using System.Text.Json.Nodes;
using IRaCIS.Application.Contracts;
using IRaCIS.Core.Infrastructure.Extention;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Information;
namespace IRaCIS.Core.Application.Service
{
@ -388,15 +389,6 @@ namespace IRaCIS.Core.Application.Service
Dictionary<string, object> jsonDic = JsonConvert.DeserializeObject<Dictionary<string, object>>(relationParentInspection.JsonDetail);
// //CommonData 仅仅存放关联对象的 Data里面的数据
//if (jsonDic.ContainsKey(nameof(InspectionJsonDetail.CommonData)))
//{
// var commonDataDicObj = jsonDic[nameof(InspectionJsonDetail.CommonData)];
// objectLsit.Add(commonDataDicObj);
//}
//避免对象信息记录 把 Data里面的信息也取过去 但是加上稽查对象的前缀
var dataDicObj = jsonDic[nameof(InspectionJsonDetail.Data)];
@ -450,112 +442,6 @@ namespace IRaCIS.Core.Application.Service
await AddJsonObjectToDic(id, objectRelationParentId3, createTime, batchId, objectLsit);
#region 废弃
//if (objectRelationParentId != null)
//{
// //父子层级的数据可能在同一个批次 进行更新 但是后插入的是父层级的数据 找父层级的稽查应该优先同一批次的
// var relationParentInspection = await _dataInspectionRepository.Where(t => t.GeneralId == objectRelationParentId && (t.CreateTime <= createTime || t.BatchId == batchId)).OrderByDescending(x => x.CreateTime).Select(t => new { t.ObjectRelationParentId, t.CreateTime, t.JsonDetail, t.BatchId, t.ObjectRelationParentId2, t.EntityName }).FirstOrDefaultAsync();
// if (relationParentInspection != null)
// {
// Dictionary<string, object> jsonDic = JsonConvert.DeserializeObject<Dictionary<string, object>>(relationParentInspection.JsonDetail);
// var commonDataDicObj = jsonDic[nameof(InspectionJsonDetail.CommonData)];
// objectLsit.Add(commonDataDicObj);
// //避免对象信息记录 把 Data里面的信息也取过去 但是加上稽查对象的前缀
// var dataDicObj = jsonDic[nameof(InspectionJsonDetail.Data)];
// if (dataDicObj != null)
// {
// var entityName = relationParentInspection.EntityName;
// IDictionary<string, object> newNamepDic = new Dictionary<string, object>();
// var tempDic = JsonConvert.DeserializeObject<Dictionary<string, object>>(dataDicObj.ToJsonStr());
// foreach (var valuePair in tempDic)
// {
// newNamepDic.Add(entityName + "_" + valuePair.Key, valuePair.Value);
// }
// objectLsit.Add(newNamepDic);
// }
// await GetRelationParentData(relationParentInspection.ObjectRelationParentId, relationParentInspection.ObjectRelationParentId2, relationParentInspection.CreateTime, relationParentInspection.BatchId, objectLsit);
// }
//}
//if (objectRelationParentId2 != null)
//{
// //父子层级的数据可能在同一个批次 进行更新 但是后插入的是父层级的数据 找父层级的稽查应该优先同一批次的
// var relationParentInspection = await _dataInspectionRepository.Where(t => t.GeneralId == objectRelationParentId2 && (t.CreateTime <= createTime || t.BatchId == batchId)).OrderByDescending(x => x.CreateTime).Select(t => new { t.ObjectRelationParentId, t.CreateTime, t.JsonDetail, t.BatchId, t.ObjectRelationParentId2, t.EntityName }).FirstOrDefaultAsync();
// if (relationParentInspection != null)
// {
// Dictionary<string, object> jsonDic = JsonConvert.DeserializeObject<Dictionary<string, object>>(relationParentInspection.JsonDetail);
// var commonDataDicObj = jsonDic[nameof(InspectionJsonDetail.CommonData)];
// objectLsit.Add(commonDataDicObj);
// //避免对象信息记录 把 Data里面的信息也取过去 但是加上稽查对象的前缀
// var dataDicObj = jsonDic[nameof(InspectionJsonDetail.Data)];
// if (dataDicObj != null)
// {
// var entityName = relationParentInspection.EntityName;
// IDictionary<string, object> newNamepDic = new Dictionary<string, object>();
// var tempDic = JsonConvert.DeserializeObject<Dictionary<string, object>>(dataDicObj.ToJsonStr());
// foreach (var valuePair in tempDic)
// {
// newNamepDic.Add(entityName + "_" + valuePair.Key, valuePair.Value);
// }
// objectLsit.Add(newNamepDic);
// }
// await GetRelationParentData(relationParentInspection.ObjectRelationParentId, relationParentInspection.ObjectRelationParentId2, relationParentInspection.CreateTime, relationParentInspection.BatchId, objectLsit);
// }
// else
// {
// //用户的数据稽查没有 临时处理
// var userObj = await _repository.Where<User>(t => t.Id == objectRelationParentId2).Select(t => new { UserRealName = t.FullName, t.Phone, t.UserName, UserType = t.UserTypeRole.UserTypeShortName, t.EMail, t.OrganizationName }).FirstOrDefaultAsync();
// objectLsit.Add(userObj);
// }
//}
#endregion
return objectLsit;
}
@ -812,13 +698,13 @@ namespace IRaCIS.Core.Application.Service
foreach (var translateInfo in translateInfoList)
{
//Json 解析后 true 变为了True
jsonObject[translateInfo.ColumnValue] = translateDataList[translateInfo.TranslateDictionaryName].Where(t => t.Code.ToLower() == jsonObject[translateInfo.ColumnValue]?.ToString().ToLower()).Select(t => t.ValueCN).FirstOrDefault();
jsonObject[translateInfo.ColumnValue] = translateDataList[translateInfo.TranslateDictionaryName].Where(t => t.Code.ToLower() == jsonObject[translateInfo.ColumnValue]?.ToString().ToLower()).Select(t => _userInfo.IsEn_Us?t.Value: t.ValueCN).FirstOrDefault();
}
foreach (var specialDynamicColumnValue in specialDynamicColumnValueList)
{
jsonObject[specialDynamicColumnValue] =
translateDataList[jsonObject["DictionaryCode"].ToString()].Where(t => t.Code.ToLower() == jsonObject[specialDynamicColumnValue]?.ToString().ToLower()).Select(t => t.ValueCN).FirstOrDefault();
translateDataList[jsonObject["DictionaryCode"].ToString()].Where(t => t.Code.ToLower() == jsonObject[specialDynamicColumnValue]?.ToString().ToLower()).Select(t => _userInfo.IsEn_Us ? t.Value : t.ValueCN).FirstOrDefault();
}
//处理动态翻译
@ -840,7 +726,7 @@ namespace IRaCIS.Core.Application.Service
if (dicName != null && !string.IsNullOrEmpty(dicName))
{
innerObject[dynamicTranslateInfo.ColumnValue] = translateDataList[dicName].Where(t => t.Code.ToLower() == innerObject[dynamicTranslateInfo.ColumnValue].ToString().ToLower()).Select(t => t.ValueCN).FirstOrDefault();
innerObject[dynamicTranslateInfo.ColumnValue] = translateDataList[dicName].Where(t => t.Code.ToLower() == innerObject[dynamicTranslateInfo.ColumnValue].ToString().ToLower()).Select(t => _userInfo.IsEn_Us ? t.Value : t.ValueCN).FirstOrDefault();
}
innberJsonList.Add(innerObject);
@ -869,7 +755,7 @@ namespace IRaCIS.Core.Application.Service
{
guids.Add(Guid.Parse(x.ToString()));
});
jsonDataDic[item.Key] = string.Join(',', await _dictionaryRepository.Where(x => guids.Contains(x.Id)).Select(x => x.ValueCN).ToListAsync());
jsonDataDic[item.Key] = string.Join(',', await _dictionaryRepository.Where(x => guids.Contains(x.Id)).Select(x => _userInfo.IsEn_Us ? x.Value : x.ValueCN).ToListAsync());
}
else if (item.Type.ToLower() == FrontAudit.ChildGroup.GetDescription().ToLower())
{
@ -885,7 +771,7 @@ namespace IRaCIS.Core.Application.Service
parent = b
}).SelectMany(a => a.parent, (m, n) => new
{
value = n.ValueCN
value = _userInfo.IsEn_Us ? n.Value : n.ValueCN
}).Select(x => x.value).ToListAsync()
);
}
@ -906,7 +792,7 @@ namespace IRaCIS.Core.Application.Service
jsonObject[item.Code] = await _dictionaryRepository.Where(x => x.Code == jsonObject["DictionaryCode"].ToString()).Join(_dictionaryRepository.Where(x => x.Code == jsonObject[item.Code].ToString()), a => a.Id, b => b.ParentId, (a, b) => new
{
value = b.ValueCN
value = _userInfo.IsEn_Us ? b.Value : b.ValueCN
}).Select(x => x.value).FirstOrDefaultAsync();
}
@ -951,13 +837,13 @@ namespace IRaCIS.Core.Application.Service
if (item.Type.ToLower() == FrontAudit.Id.GetDescription().ToLower())
{
Guid guid = Guid.Parse(value.ToString());
jsonDataDic[item.Key] = await _dictionaryRepository.Where(x => x.Id == guid).Select(x => x.ValueCN).FirstOrDefaultAsync();
jsonDataDic[item.Key] = await _dictionaryRepository.Where(x => x.Id == guid).Select(x => _userInfo.IsEn_Us ? x.Value : x.ValueCN).FirstOrDefaultAsync();
}
else if (item.Type.ToLower() == FrontAudit.ChildGroup.GetDescription().ToLower())
{
jsonDataDic[item.Key] = await _dictionaryRepository.Where(x => x.Code == item.Code).Join(_dictionaryRepository.Where(x => x.ChildGroup == value.ToString()), a => a.Id, b => b.ParentId, (a, b) => new
{
value = b.ValueCN
value = _userInfo.IsEn_Us ? b.Value : b.ValueCN
}).Select(x => x.value).FirstOrDefaultAsync();
}
//通过字典项的code 翻译 枚举或者 bool
@ -965,7 +851,7 @@ namespace IRaCIS.Core.Application.Service
{
jsonDataDic[item.Key] = await _dictionaryRepository.Where(x => x.Code == item.Code).Join(_dictionaryRepository.Where(x => x.Code == value.ToString()), a => a.Id, b => b.ParentId, (a, b) => new
{
value = b.ValueCN
value = _userInfo.IsEn_Us ? b.Value : b.ValueCN
}).Select(x => x.value).FirstOrDefaultAsync();
}
}

View File

@ -105,8 +105,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common
public async Task InsertAddEntitys(List<EntityEntry> entitys)
{
#region 区分
// 项目
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(Trial)))
{
@ -171,13 +169,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common
}); ;
}
#endregion
#region 已修改
#region 阅片单元配置
@ -803,7 +794,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
CreateUserName = _userInfo.UserName,
UserType = _userInfo.UserTypeShortName,
IsSigned = true,// 是否签署 添加了就是签署了
IsSigned = entity.ConfirmTime!=null, // 是否签署 添加了就是签署了
});
}
@ -843,8 +834,10 @@ namespace IRaCIS.Core.Infra.EFCore.Common
UploadTime = trialDoc.CreateTime,
CreateUserName = _userInfo.UserName,
UserType = _userInfo.UserTypeShortName,
IsSigned = true
IsSigned = entity.ConfirmTime != null
});
}
@ -957,7 +950,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var list = entitys.Where(x => x.Entity.GetType() == typeof(ShortcutKey)).Select(t => t.Entity as ShortcutKey);
var firstEntity = list.FirstOrDefault();
var cloneEntity = firstEntity.Clone();
@ -967,7 +960,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
await InsertInspection(cloneEntity, type, x => new InspectionConvertDTO()
{
//byzhouhang
ObjectRelationParentId = x.UserId,
@ -986,22 +979,22 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var extraIdentification = string.Empty;
await InsertInspection<UserWLTemplate>(entity, type, x => new InspectionConvertDTO()
{
IsDistinctionInterface = false,
ObjectRelationParentId = entity.UserId
});
}
#endregion
#endregion
#region 附加评估
// 是否参与附加评估记录表
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(SubjectCriteriaEvaluation)))
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(SubjectCriteriaEvaluation)))
{
var type = GetEntityAuditOpt(item);
@ -1081,8 +1074,8 @@ namespace IRaCIS.Core.Infra.EFCore.Common
await InsertInspection<SubjectCriteriaEvaluationVisitFilter>(entity, type, x => new InspectionConvertDTO()
{
IsDistinctionInterface = false,
IsSelfDefine=true,
ExtraIndentification=extraIdentification,
IsSelfDefine = true,
ExtraIndentification = extraIdentification,
ObjectRelationParentId = x.SubjectVisitId,
ObjectRelationParentId2 = x.TrialReadingCriterionId,
@ -1141,7 +1134,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var questionIdList = list.Select(t => t.ReadingMedicineQuestionId).ToList();
var questionNameList = await _dbContext.ReadingMedicineTrialQuestion.Where(x => questionIdList.Contains(x.Id)).Select(t => new { t.QuestionName, ReadingMedicineQuestionId = t.Id, t.ShowOrder }).ToListAsync();
var questionNameList = await _dbContext.ReadingMedicineTrialQuestion.Where(x => questionIdList.Contains(x.Id)).Select(t => new { t.QuestionName, ReadingMedicineQuestionId = t.Id, t.ShowOrder }).ToListAsync();
var firstEntity = list.FirstOrDefault();
@ -1290,7 +1283,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var trialQuestionIdList = list.Select(t => t.TrialQCQuestionConfigureId);
var trialQuestionNameList = await _dbContext.TrialQCQuestionConfigure.Where(x => x.TrialId == firstEntity.TrialId).Select(t => new { t.QuestionName, TrialQCQuestionConfigureId = t.Id, t.ShowOrder }).ToListAsync();
var trialQuestionNameList = await _dbContext.TrialQCQuestionConfigure.Where(x => x.TrialId == firstEntity.TrialId).Select(t => new { t.QuestionName, TrialQCQuestionConfigureId = t.Id, t.ShowOrder }).ToListAsync();
var beforeAnswerList = await _dbContext.TrialQCQuestionAnswer.Where(x => x.SubjectVisitId == firstEntity.SubjectVisitId && x.CurrentQCEnum == firstEntity.CurrentQCEnum && x.QCProcessEnum == firstEntity.QCProcessEnum)
.Select(u => new { u.TrialQCQuestionConfigureId, u.Answer }).ToListAsync();
@ -2220,7 +2213,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
await InsertInspection<User>(entity, type, x => new InspectionConvertDTO()
{
IsDistinctionInterface = false,
ExtraIndentification= extraIdentification
ExtraIndentification = extraIdentification
}, new
{
UserRealName = entity.FullName,
@ -2393,6 +2386,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var quesionList = await _dbContext.ReadingQuestionTrial.Where(t => taskQuestionAnswerList.Select(k => k.ReadingQuestionTrialId).Contains(t.Id)).IgnoreQueryFilters().Select(t => new
{
t.QuestionName,
t.QuestionEnName,
QuestionId = t.Id,
t.DictionaryCode,
t.ShowOrder,
@ -2431,6 +2425,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
t.ReadingQuestionTrial.CustomUnit,
t.DictionaryCode,
t.QuestionName,
t.QuestionEnName,
QuestionId = t.Id,
t.ShowOrder,
AnswerType = t.Type,
@ -2443,6 +2438,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
//如果问题类型是附件 特殊处理 方便前端解析
Answer = u.AnswerType == "upload" ? "❄❅❆❇❈❉❊" + t.Answer : t.Answer,
u.QuestionName,
u.QuestionEnName,
u.DictionaryCode,
u.ShowOrder,
t.RowId
@ -2466,7 +2462,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
}, new
{
QuestionAnswerList = taskQuestionAnswerList.Join(quesionList, t => t.ReadingQuestionTrialId, u => u.QuestionId, (t, u) =>
new { Answer = u.AnswerType == "upload" ? "❄❅❆❇❈❉❊" + t.Answer : t.Answer, u.DictionaryCode, u.QuestionName, u.ShowOrder }).OrderBy(t => t.ShowOrder).ToList()
new { Answer = u.AnswerType == "upload" ? "❄❅❆❇❈❉❊" + t.Answer : t.Answer, u.DictionaryCode, u.QuestionName, u.QuestionEnName, u.ShowOrder }).OrderBy(t => t.ShowOrder).ToList()
,
TableQuestionAndAnswerList = tableQuesionAndAnswerList
}
@ -2500,6 +2496,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
t.ReadingQuestionTrial.CustomUnit,
t.DictionaryCode,
t.QuestionName,
t.QuestionEnName,
QuestionId = t.Id,
t.ShowOrder,
AnswerType = t.Type,
@ -2552,6 +2549,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
Answer = u.AnswerType == "upload" ? "❄❅❆❇❈❉❊" + t.Answer : t.Answer,
//t.Answer /*u.Unit==ValueUnit.Custom? t.Answer+u.CustomUnit:(u.Unit != ValueUnit.None|| u.Unit != null)*/,
u.QuestionName,
u.QuestionEnName,
u.DictionaryCode,
u.ShowOrder
}
@ -2672,6 +2670,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var quesionList = await _dbContext.ReadingQuestionTrial.Where(t => questionIdList.Contains(t.Id)).Select(t => new
{
t.QuestionName,
t.QuestionEnName,
QuestionId = t.Id,
t.DictionaryCode,
t.ShowOrder
@ -2689,6 +2688,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
TaskBlindName = u.VisitTask.TaskBlindName,
QuestionId = u.ReadingQuestionTrialId,
u.ReadingQuestionTrial.QuestionName,
u.ReadingQuestionTrial.QuestionEnName,
u.ReadingQuestionTrial.DictionaryCode,
u.ReadingQuestionTrial.ShowOrder,
u.Answer
@ -2703,7 +2703,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
Reason = group.Where(t => t.QuestionId == null && t.GlobalAnswerType == GlobalAnswerType.Reason).FirstOrDefault()?.Answer,
QuestionAnswerList = questionAnswerList.Join(quesionList, t => t.QuestionId, u => u.QuestionId, (t, u) => new { t.Answer, u.QuestionName, u.DictionaryCode, u.ShowOrder }).OrderBy(t => t.ShowOrder).ToList()
QuestionAnswerList = questionAnswerList.Join(quesionList, t => t.QuestionId, u => u.QuestionId, (t, u) => new { t.Answer, u.QuestionName, u.QuestionEnName, u.DictionaryCode, u.ShowOrder }).OrderBy(t => t.ShowOrder).ToList()
};
objList.Add(obj);
@ -2729,7 +2729,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
Reason = group.Where(t => t.QuestionId == null && t.GlobalAnswerType == GlobalAnswerType.Reason).FirstOrDefault()?.Answer,
AgreeOrNot = group.Where(t => t.QuestionId == null && t.GlobalAnswerType == GlobalAnswerType.AgreeOrNot).FirstOrDefault()?.Answer,
UpdateType = group.Where(t => t.QuestionId == null && t.GlobalAnswerType == GlobalAnswerType.UpdateType).FirstOrDefault()?.Answer,
QuestionAnswerList = questionAnswerList.Join(quesionList, t => t.QuestionId, u => u.QuestionId, (t, u) => new { t.Answer, u.QuestionName, u.DictionaryCode, u.ShowOrder }).OrderBy(t => t.ShowOrder).ToList()
QuestionAnswerList = questionAnswerList.Join(quesionList, t => t.QuestionId, u => u.QuestionId, (t, u) => new { t.Answer, u.QuestionName, u.QuestionEnName, u.DictionaryCode, u.ShowOrder }).OrderBy(t => t.ShowOrder).ToList()
};
objList.Add(obj);
@ -2994,7 +2994,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.IsSelfDefine) + inspection.ExtraIndentification;
inspection.Identification = GetInspectionRecordIdentification(entityObj, type, inspection.IsDistinctionInterface, inspection.IsSelfDefine) + inspection.ExtraIndentification;
//将实体对象属性 映射到稽查实体
MapEntityPropertyToAuditEntity(entityObj, inspection);
@ -3203,7 +3203,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
/// 获取稽查记录的标识符 部分业务会进行特殊处理
/// </summary>
/// <returns></returns>
public async Task<string> GetInspectionRecordIdentificationAsync<T>(T entityObj, string type, bool IsDistinctionInterface = true, bool isSelfDefine = false)
public string GetInspectionRecordIdentification<T>(T entityObj, string type, bool IsDistinctionInterface = true, bool isSelfDefine = false)
{
var entityTypeName = entityObj.GetType().Name;
@ -3242,314 +3242,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common
}
#region 标识符特殊处理 废弃
//switch (entityObj.GetType().Name)
//{
//case nameof(TrialDocConfirmedUser):
//case nameof(SystemDocConfirmedUser):
// var softDelete = entityObj as ISoftDelete;
// if (type == AuditOpt.Update)
// {
// if (softDelete.IsDeleted == true)
// {
// type = type + "/" + 2;
// }
// else
// {
// type = type + "/" + 1;
// }
// }
// break;
//case nameof(SystemBasicData):
// var basicData = entityObj as SystemBasicData;
// type = type + (basicData.ParentId == null ? "/parent" : string.Empty);
// break;
//case nameof(Trial):
// var trial = entityObj as Trial;
// Guid id = trial.Id;
// var oldentity = await _dbContext.Trial.Where(x => x.Id == id).Select(t => new { t.IsTrialBasicLogicConfirmed, t.IsTrialProcessConfirmed, t.IsTrialUrgentConfirmed }).FirstOrDefaultAsync();
// switch (_userInfo.RequestUrl.ToLower())
// {
// case "configtrialbasicinfo/configtrialbasicinfoconfirm":
// type = type + "/" + oldentity.IsTrialBasicLogicConfirmed.ToString();
// break;
// //case "configtrialbasicinfo/configtrialprocessinfoconfirm":
// // type = type + "/" + oldentity.IsTrialProcessConfirmed.ToString();
// // break;
// case "configtrialbasicinfo/configtrialurgentinfoconfirm":
// type = type + "/" + oldentity.IsTrialUrgentConfirmed.ToString();
// break;
// }
// break;
//case nameof(ReadingQuestionTrial):
// var trialReadingQuestion = entityObj as ReadingQuestionTrial;
// switch (_userInfo.RequestUrl)
// {
// case "ReadingImageTask/setTrialCriterionJudgeQuestionAnswerGroup":
// if (trialReadingQuestion.JudgeType == JudgeTypeEnum.None)
// {
// type = type + "/" + "Reset";
// }
// break;
// }
// break;
#region 访视相关
//// 对话消息区分用户类型
//case nameof(CheckChallengeDialog):
// type = type + "/(" + _userInfo.UserTypeShortName + ")";
// var checkDialog = entityObj as CheckChallengeDialog;
// switch (_userInfo.RequestUrl.ToLower())
// {
// case "qcoperation/closecheckchallenge":
// inspection.Reason = checkDialog.TalkContent.Substring(checkDialog.TalkContent.LastIndexOf(':') + 1);
// break;
// }
// break;
//case nameof(SubjectVisit):
// var sv = entityObj as SubjectVisit;
// switch (_userInfo.RequestUrl.ToLower())
// {
// //待处理?
// case "qcoperation/qcpassedorfailed":
// 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;
// //确认重阅 区分用户类型
// case "visittask/confirmrereading":
// if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.APM)
// {
// type = type + "/" + 1;
// }
// 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;
#endregion
#region 阅片任务相关
////任务表
//case nameof(VisitTask):
// var visitTask = entityObj as VisitTask;
// #region 标识区分
// if (type == AuditOpt.Add)
// {
// //生成一致性分析任务
// if (visitTask.IsSelfAnalysis == true)
// {
// type = type + "/" + "SelfAnalysis";
// }
// else if (visitTask.IsSelfAnalysis == false)
// {
// type = type + "/" + "GroupAnalysis";
// }
// else
// {
// type = type + "/" + "NotAnalysis";
// }
// //区分任务类型
// type = type + "/" + (int)visitTask.ReadingCategory;
// }
// else
// {
// switch (_userInfo.RequestUrl)
// {
// //申请重阅
// case "VisitTask/applyReReading":
// type = type + "/" + (int)visitTask.ReReadingApplyState;
// break;
// //同意重阅
// case "VisitTask/ConfirmReReading":
// if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.APM)
// {
// type = type + "/" + 1;
// }
// else
// {
// type = type + "/" + 2;
// }
// break;
// }
// }
// #endregion
// break;
////重阅记录表
//case nameof(VisitTaskReReading):
// var visitTaskReReading = entityObj as VisitTaskReReading;
// switch (_userInfo.RequestUrl)
// {
// case "VisitTask/applyReReading":
// type = type + "/" + (int)visitTaskReReading.RequestReReadingType;
// break;
// case "VisitTask/ConfirmReReading":
// if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.APM)
// {
// type = type + "/" + 1;
// }
// else
// {
// type = type + "/" + 2;
// }
// if (visitTaskReReading.RequestReReadingResultEnum == RequestReReadingResult.Agree)
// {
// type = type + "/" + 1;
// }
// else if (visitTaskReReading.RequestReReadingResultEnum == RequestReReadingResult.Reject)
// {
// type = type + "/" + 2;
// }
// break;
// }
// break;
////一致性分析规则
//case nameof(TaskConsistentRule):
// var taskConsistentRule = entityObj as TaskConsistentRule;
// //自身一致性分析
// if (taskConsistentRule.IsSelfAnalysis == true)
// {
// type = type + "/" + 1;
// }
// //组件一致性分析
// else
// {
// type = type + "/" + 2;
// }
// break;
#endregion
////标准 器官病灶表
//case nameof(CriterionNidus):
// var criterionNidus = entityObj as CriterionNidus;
// if (criterionNidus.IsSystemCriterion == false)
// {
// type = type + "/IsTrial";
// }
// break;
////系统 项目公用
//case nameof(ReadingCriterionDictionary):
// var readingCriterionDictionary = entityObj as ReadingCriterionDictionary;
// if (readingCriterionDictionary.IsSystemCriterion)
// {
// type = $"{type}/{readingCriterionDictionary.ParentCode}";
// }
// break;
//}
#endregion
}