修改稽查国际化
parent
4f6225047e
commit
e1ddb5920f
|
@ -18,6 +18,7 @@ using IRaCIS.Core.Domain.Share.Management;
|
||||||
using System.Text.Json.Nodes;
|
using System.Text.Json.Nodes;
|
||||||
using IRaCIS.Application.Contracts;
|
using IRaCIS.Application.Contracts;
|
||||||
using IRaCIS.Core.Infrastructure.Extention;
|
using IRaCIS.Core.Infrastructure.Extention;
|
||||||
|
using OfficeOpenXml.FormulaParsing.Excel.Functions.Information;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Service
|
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);
|
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里面的信息也取过去 但是加上稽查对象的前缀
|
//避免对象信息记录 把 Data里面的信息也取过去 但是加上稽查对象的前缀
|
||||||
var dataDicObj = jsonDic[nameof(InspectionJsonDetail.Data)];
|
var dataDicObj = jsonDic[nameof(InspectionJsonDetail.Data)];
|
||||||
|
|
||||||
|
@ -450,112 +442,6 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
await AddJsonObjectToDic(id, objectRelationParentId3, createTime, batchId, objectLsit);
|
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;
|
return objectLsit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -812,13 +698,13 @@ namespace IRaCIS.Core.Application.Service
|
||||||
foreach (var translateInfo in translateInfoList)
|
foreach (var translateInfo in translateInfoList)
|
||||||
{
|
{
|
||||||
//Json 解析后 true 变为了True
|
//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)
|
foreach (var specialDynamicColumnValue in specialDynamicColumnValueList)
|
||||||
{
|
{
|
||||||
jsonObject[specialDynamicColumnValue] =
|
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))
|
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);
|
innberJsonList.Add(innerObject);
|
||||||
|
@ -869,7 +755,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
guids.Add(Guid.Parse(x.ToString()));
|
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())
|
else if (item.Type.ToLower() == FrontAudit.ChildGroup.GetDescription().ToLower())
|
||||||
{
|
{
|
||||||
|
@ -885,7 +771,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
parent = b
|
parent = b
|
||||||
}).SelectMany(a => a.parent, (m, n) => new
|
}).SelectMany(a => a.parent, (m, n) => new
|
||||||
{
|
{
|
||||||
value = n.ValueCN
|
value = _userInfo.IsEn_Us ? n.Value : n.ValueCN
|
||||||
}).Select(x => x.value).ToListAsync()
|
}).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
|
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();
|
}).Select(x => x.value).FirstOrDefaultAsync();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -951,13 +837,13 @@ namespace IRaCIS.Core.Application.Service
|
||||||
if (item.Type.ToLower() == FrontAudit.Id.GetDescription().ToLower())
|
if (item.Type.ToLower() == FrontAudit.Id.GetDescription().ToLower())
|
||||||
{
|
{
|
||||||
Guid guid = Guid.Parse(value.ToString());
|
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())
|
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
|
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();
|
}).Select(x => x.value).FirstOrDefaultAsync();
|
||||||
}
|
}
|
||||||
//通过字典项的code 翻译 枚举或者 bool
|
//通过字典项的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
|
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();
|
}).Select(x => x.value).FirstOrDefaultAsync();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,8 +105,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
public async Task InsertAddEntitys(List<EntityEntry> entitys)
|
public async Task InsertAddEntitys(List<EntityEntry> entitys)
|
||||||
{
|
{
|
||||||
|
|
||||||
#region 区分
|
|
||||||
|
|
||||||
// 项目
|
// 项目
|
||||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(Trial)))
|
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 已修改
|
||||||
|
|
||||||
#region 阅片单元配置
|
#region 阅片单元配置
|
||||||
|
@ -803,7 +794,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
|
|
||||||
CreateUserName = _userInfo.UserName,
|
CreateUserName = _userInfo.UserName,
|
||||||
UserType = _userInfo.UserTypeShortName,
|
UserType = _userInfo.UserTypeShortName,
|
||||||
IsSigned = true,// 是否签署 添加了就是签署了
|
IsSigned = entity.ConfirmTime!=null, // 是否签署 添加了就是签署了
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -843,8 +834,10 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
UploadTime = trialDoc.CreateTime,
|
UploadTime = trialDoc.CreateTime,
|
||||||
|
|
||||||
CreateUserName = _userInfo.UserName,
|
CreateUserName = _userInfo.UserName,
|
||||||
|
|
||||||
UserType = _userInfo.UserTypeShortName,
|
UserType = _userInfo.UserTypeShortName,
|
||||||
IsSigned = true
|
|
||||||
|
IsSigned = entity.ConfirmTime != null
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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
|
var quesionList = await _dbContext.ReadingQuestionTrial.Where(t => taskQuestionAnswerList.Select(k => k.ReadingQuestionTrialId).Contains(t.Id)).IgnoreQueryFilters().Select(t => new
|
||||||
{
|
{
|
||||||
t.QuestionName,
|
t.QuestionName,
|
||||||
|
t.QuestionEnName,
|
||||||
QuestionId = t.Id,
|
QuestionId = t.Id,
|
||||||
t.DictionaryCode,
|
t.DictionaryCode,
|
||||||
t.ShowOrder,
|
t.ShowOrder,
|
||||||
|
@ -2431,6 +2425,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
t.ReadingQuestionTrial.CustomUnit,
|
t.ReadingQuestionTrial.CustomUnit,
|
||||||
t.DictionaryCode,
|
t.DictionaryCode,
|
||||||
t.QuestionName,
|
t.QuestionName,
|
||||||
|
t.QuestionEnName,
|
||||||
QuestionId = t.Id,
|
QuestionId = t.Id,
|
||||||
t.ShowOrder,
|
t.ShowOrder,
|
||||||
AnswerType = t.Type,
|
AnswerType = t.Type,
|
||||||
|
@ -2443,6 +2438,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
//如果问题类型是附件 特殊处理 方便前端解析
|
//如果问题类型是附件 特殊处理 方便前端解析
|
||||||
Answer = u.AnswerType == "upload" ? "❄❅❆❇❈❉❊" + t.Answer : t.Answer,
|
Answer = u.AnswerType == "upload" ? "❄❅❆❇❈❉❊" + t.Answer : t.Answer,
|
||||||
u.QuestionName,
|
u.QuestionName,
|
||||||
|
u.QuestionEnName,
|
||||||
u.DictionaryCode,
|
u.DictionaryCode,
|
||||||
u.ShowOrder,
|
u.ShowOrder,
|
||||||
t.RowId
|
t.RowId
|
||||||
|
@ -2466,7 +2462,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
}, new
|
}, new
|
||||||
{
|
{
|
||||||
QuestionAnswerList = taskQuestionAnswerList.Join(quesionList, t => t.ReadingQuestionTrialId, u => u.QuestionId, (t, u) =>
|
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
|
TableQuestionAndAnswerList = tableQuesionAndAnswerList
|
||||||
}
|
}
|
||||||
|
@ -2500,6 +2496,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
t.ReadingQuestionTrial.CustomUnit,
|
t.ReadingQuestionTrial.CustomUnit,
|
||||||
t.DictionaryCode,
|
t.DictionaryCode,
|
||||||
t.QuestionName,
|
t.QuestionName,
|
||||||
|
t.QuestionEnName,
|
||||||
QuestionId = t.Id,
|
QuestionId = t.Id,
|
||||||
t.ShowOrder,
|
t.ShowOrder,
|
||||||
AnswerType = t.Type,
|
AnswerType = t.Type,
|
||||||
|
@ -2552,6 +2549,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
Answer = u.AnswerType == "upload" ? "❄❅❆❇❈❉❊" + t.Answer : t.Answer,
|
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)*/,
|
//t.Answer /*u.Unit==ValueUnit.Custom? t.Answer+u.CustomUnit:(u.Unit != ValueUnit.None|| u.Unit != null)*/,
|
||||||
u.QuestionName,
|
u.QuestionName,
|
||||||
|
u.QuestionEnName,
|
||||||
u.DictionaryCode,
|
u.DictionaryCode,
|
||||||
u.ShowOrder
|
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
|
var quesionList = await _dbContext.ReadingQuestionTrial.Where(t => questionIdList.Contains(t.Id)).Select(t => new
|
||||||
{
|
{
|
||||||
t.QuestionName,
|
t.QuestionName,
|
||||||
|
t.QuestionEnName,
|
||||||
QuestionId = t.Id,
|
QuestionId = t.Id,
|
||||||
t.DictionaryCode,
|
t.DictionaryCode,
|
||||||
t.ShowOrder
|
t.ShowOrder
|
||||||
|
@ -2689,6 +2688,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
TaskBlindName = u.VisitTask.TaskBlindName,
|
TaskBlindName = u.VisitTask.TaskBlindName,
|
||||||
QuestionId = u.ReadingQuestionTrialId,
|
QuestionId = u.ReadingQuestionTrialId,
|
||||||
u.ReadingQuestionTrial.QuestionName,
|
u.ReadingQuestionTrial.QuestionName,
|
||||||
|
u.ReadingQuestionTrial.QuestionEnName,
|
||||||
u.ReadingQuestionTrial.DictionaryCode,
|
u.ReadingQuestionTrial.DictionaryCode,
|
||||||
u.ReadingQuestionTrial.ShowOrder,
|
u.ReadingQuestionTrial.ShowOrder,
|
||||||
u.Answer
|
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,
|
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);
|
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,
|
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,
|
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,
|
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);
|
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;
|
var generalId = (inspection.GeneralId != null && inspection.GeneralId != Guid.Empty) ? inspection.GeneralId : entityObj.Id;
|
||||||
inspection.GeneralId = generalId;
|
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);
|
MapEntityPropertyToAuditEntity(entityObj, inspection);
|
||||||
|
@ -3203,7 +3203,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
/// 获取稽查记录的标识符 部分业务会进行特殊处理
|
/// 获取稽查记录的标识符 部分业务会进行特殊处理
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <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;
|
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
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue