稽查配置数据整理
parent
14caef0203
commit
6cc56bc657
|
@ -336,7 +336,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
//后续移除 避免前端看到的不统一 因为采用了新的关联方式,之前数据在Data里面取 现在配置在CommonData 里取
|
//后续移除 避免前端看到的不统一 因为采用了新的关联方式,之前数据在Data里面取 现在配置在CommonData 里取
|
||||||
|
|
||||||
var dataDic = JsonConvert.DeserializeObject<IDictionary<string, object>>(str);
|
var dataDic = JsonConvert.DeserializeObject<IDictionary<string, object>>(str);
|
||||||
var commonDic= JsonConvert.DeserializeObject<IDictionary<string, object>>(str2);
|
var commonDic = JsonConvert.DeserializeObject<IDictionary<string, object>>(str2);
|
||||||
foreach (var valuePair in dataDic)
|
foreach (var valuePair in dataDic)
|
||||||
{
|
{
|
||||||
if (!commonDic.ContainsKey(valuePair.Key))
|
if (!commonDic.ContainsKey(valuePair.Key))
|
||||||
|
@ -1011,8 +1011,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public async Task<List<string>> GetModuleTypeDescriptionList(Guid moduleTypeId)
|
public async Task<List<string>> GetModuleTypeDescriptionList(Guid moduleTypeId)
|
||||||
{
|
{
|
||||||
var result = await _frontAuditConfigRepository.Where(x => x.ModuleTypeId == moduleTypeId && x.Description != string.Empty).Select(x => x.Description).Distinct().ToListAsync();
|
var result = await _frontAuditConfigRepository.Where(x => x.ModuleTypeId == moduleTypeId && x.ObjectTypeId != null && x.OptTypeId != null && x.Description.Length>0).Select(x => new { x.Description,x.Sort } ).OrderBy(t=>t.Sort).ToListAsync();
|
||||||
return result;
|
return result.Select(t=>t.Description).Distinct().ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1133,6 +1133,11 @@ namespace IRaCIS.Core.Application.Service
|
||||||
return ResponseOutput.NotOk("名称重复");
|
return ResponseOutput.NotOk("名称重复");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (addOrEditFrontAuditConfig.ConfigType == "C")
|
||||||
|
{
|
||||||
|
addOrEditFrontAuditConfig.Description = "";
|
||||||
|
}
|
||||||
|
|
||||||
var entity = await _frontAuditConfigRepository.InsertOrUpdateAsync(addOrEditFrontAuditConfig, true);
|
var entity = await _frontAuditConfigRepository.InsertOrUpdateAsync(addOrEditFrontAuditConfig, true);
|
||||||
|
|
||||||
return ResponseOutput.Ok(entity.Id.ToString());
|
return ResponseOutput.Ok(entity.Id.ToString());
|
||||||
|
|
|
@ -100,6 +100,33 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
|
|
||||||
#region 区分
|
#region 区分
|
||||||
|
|
||||||
|
// 项目
|
||||||
|
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(Trial)))
|
||||||
|
{
|
||||||
|
|
||||||
|
var entity = item.Entity as Trial;
|
||||||
|
List<string> trialDics = new List<string>();
|
||||||
|
var dictionaryIds = new List<Guid>();
|
||||||
|
if (entity.TrialDicList == null || entity.TrialDicList.Count == 0)
|
||||||
|
{
|
||||||
|
dictionaryIds = await this._dbContext.TrialDictionary.Where(x => x.TrialId == entity.Id && x.KeyName == "Criterion").Select(x => x.DictionaryId).ToListAsync();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dictionaryIds = entity.TrialDicList.Select(x => x.DictionaryId).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
trialDics = await this._dbContext.Dictionary.Where(x => dictionaryIds.Contains(x.Id)).Select(x => x.ValueCN).ToListAsync();
|
||||||
|
|
||||||
|
await InsertInspection<Trial>(item.Entity as Trial, type, x => new InspectionConvertDTO()
|
||||||
|
{
|
||||||
|
TrialId = x.Id,
|
||||||
|
}, new
|
||||||
|
{
|
||||||
|
TrialDicList = string.Join(",", trialDics)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 系统文件签署 父层级未记录稽查(系统文档初始数据)
|
// 系统文件签署 父层级未记录稽查(系统文档初始数据)
|
||||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(SystemDocConfirmedUser)))
|
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(SystemDocConfirmedUser)))
|
||||||
|
@ -418,36 +445,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//系统 Qc 问题
|
|
||||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(QCQuestion)))
|
|
||||||
{
|
|
||||||
var entity = item.Entity as QCQuestion;
|
|
||||||
|
|
||||||
var parentName = await _dbContext.QCQuestionConfigure.Where(x => x.Id == entity.ParentId).Select(x => x.QuestionName).FirstOrDefaultAsync();
|
|
||||||
|
|
||||||
await InsertInspection<QCQuestion>(entity, type, x => new InspectionConvertDTO()
|
|
||||||
{
|
|
||||||
IsDistinctionInterface = false
|
|
||||||
|
|
||||||
}, new { ParentName = parentName });
|
|
||||||
}
|
|
||||||
|
|
||||||
// 项目QC问题
|
|
||||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(TrialQCQuestion)))
|
|
||||||
{
|
|
||||||
var entity = item.Entity as TrialQCQuestion;
|
|
||||||
|
|
||||||
var parentName = await _dbContext.TrialQCQuestionConfigure.Where(x => x.Id == entity.ParentId).Select(x => x.QuestionName).FirstOrDefaultAsync();
|
|
||||||
|
|
||||||
await InsertInspection<TrialQCQuestion>(entity, type, x => new InspectionConvertDTO()
|
|
||||||
{
|
|
||||||
ObjectRelationParentId = x.TrialId,
|
|
||||||
IsDistinctionInterface = false
|
|
||||||
}, new
|
|
||||||
{
|
|
||||||
ParentName = parentName
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//系统文件
|
//系统文件
|
||||||
|
@ -510,15 +508,52 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//系统 Qc 问题
|
||||||
|
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(QCQuestion)))
|
||||||
|
{
|
||||||
|
var entity = item.Entity as QCQuestion;
|
||||||
|
|
||||||
|
var parentQuestionName = await _dbContext.QCQuestionConfigure.Where(x => x.Id == entity.ParentId).Select(x => x.QuestionName).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
await InsertInspection<QCQuestion>(entity, type, x => new InspectionConvertDTO()
|
||||||
|
{
|
||||||
|
IsDistinctionInterface = false
|
||||||
|
|
||||||
|
}, new { ParentQuestionName = parentQuestionName });
|
||||||
|
}
|
||||||
|
|
||||||
|
// 项目QC问题
|
||||||
|
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(TrialQCQuestion)))
|
||||||
|
{
|
||||||
|
var entity = item.Entity as TrialQCQuestion;
|
||||||
|
|
||||||
|
var parentQuestionName = await _dbContext.TrialQCQuestionConfigure.Where(x => x.Id == entity.ParentId).Select(x => x.QuestionName).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
await InsertInspection<TrialQCQuestion>(entity, type, x => new InspectionConvertDTO()
|
||||||
|
{
|
||||||
|
ObjectRelationParentId = x.TrialId,
|
||||||
|
IsDistinctionInterface = false
|
||||||
|
}, new
|
||||||
|
{
|
||||||
|
ParentQuestionName = parentQuestionName
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
//系统 医学审核问题
|
//系统 医学审核问题
|
||||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(ReadingMedicineSystemQuestion)))
|
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(ReadingMedicineSystemQuestion)))
|
||||||
{
|
{
|
||||||
var entity = item.Entity as ReadingMedicineSystemQuestion;
|
var entity = item.Entity as ReadingMedicineSystemQuestion;
|
||||||
|
|
||||||
|
var parentQuestionName = string.Empty;
|
||||||
|
if (entity.ParentId != null)
|
||||||
|
{
|
||||||
|
parentQuestionName = await _dbContext.ReadingMedicineSystemQuestion.Where(x => x.Id == entity.ParentId).Select(x => x.QuestionName).FirstOrDefaultAsync();
|
||||||
|
}
|
||||||
|
|
||||||
await InsertInspection<ReadingMedicineSystemQuestion>(entity, type, x => new InspectionConvertDTO()
|
await InsertInspection<ReadingMedicineSystemQuestion>(entity, type, x => new InspectionConvertDTO()
|
||||||
{
|
{
|
||||||
IsDistinctionInterface = false,
|
IsDistinctionInterface = false,
|
||||||
});
|
},new { ParentQuestionName = parentQuestionName });
|
||||||
}
|
}
|
||||||
|
|
||||||
//项目医学审核问题
|
//项目医学审核问题
|
||||||
|
@ -526,12 +561,18 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
{
|
{
|
||||||
var entity = item.Entity as ReadingMedicineTrialQuestion;
|
var entity = item.Entity as ReadingMedicineTrialQuestion;
|
||||||
|
|
||||||
|
var parentQuestionName = string.Empty;
|
||||||
|
if (entity.ParentId != null)
|
||||||
|
{
|
||||||
|
parentQuestionName = await _dbContext.ReadingMedicineTrialQuestion.Where(x => x.Id == entity.ParentId).Select(x => x.QuestionName).FirstOrDefaultAsync();
|
||||||
|
}
|
||||||
|
|
||||||
await InsertInspection<ReadingMedicineTrialQuestion>(entity, type, x => new InspectionConvertDTO()
|
await InsertInspection<ReadingMedicineTrialQuestion>(entity, type, x => new InspectionConvertDTO()
|
||||||
{
|
{
|
||||||
IsDistinctionInterface = false,
|
IsDistinctionInterface = false,
|
||||||
ObjectRelationParentId = x.TrialId
|
ObjectRelationParentId = x.TrialId
|
||||||
|
|
||||||
});
|
}, new { ParentQuestionName = parentQuestionName });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -544,32 +585,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 项目
|
|
||||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(Trial)))
|
|
||||||
{
|
|
||||||
|
|
||||||
var entity = item.Entity as Trial;
|
|
||||||
List<string> trialDics = new List<string>();
|
|
||||||
var dictionaryIds = new List<Guid>();
|
|
||||||
if (entity.TrialDicList == null || entity.TrialDicList.Count == 0)
|
|
||||||
{
|
|
||||||
dictionaryIds = await this._dbContext.TrialDictionary.Where(x => x.TrialId == entity.Id && x.KeyName == "Criterion").Select(x => x.DictionaryId).ToListAsync();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
dictionaryIds = entity.TrialDicList.Select(x => x.DictionaryId).ToList();
|
|
||||||
}
|
|
||||||
|
|
||||||
trialDics = await this._dbContext.Dictionary.Where(x => dictionaryIds.Contains(x.Id)).Select(x => x.ValueCN).ToListAsync();
|
|
||||||
|
|
||||||
await InsertInspection<Trial>(item.Entity as Trial, type, x => new InspectionConvertDTO()
|
|
||||||
{
|
|
||||||
TrialId = x.Id,
|
|
||||||
}, new
|
|
||||||
{
|
|
||||||
TrialDicList = string.Join(",", trialDics)
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// 项目中心 Site未稽查
|
// 项目中心 Site未稽查
|
||||||
|
|
Loading…
Reference in New Issue