Uat_Study
parent
b03901b4aa
commit
3adf23f677
|
@ -355,7 +355,7 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
|
|||
|
||||
public string VisitName { get; set; } = string.Empty;
|
||||
|
||||
public string ParentJson { get; set; } = string.Empty;
|
||||
//public string ParentJson { get; set; } = string.Empty;
|
||||
|
||||
public string CreateUser { get; set; } = string.Empty;
|
||||
public string UserFirstName { get; set; } = string.Empty;
|
||||
|
|
|
@ -175,41 +175,55 @@ namespace IRaCIS.Core.Application.Service
|
|||
await _frontAuditConfigRepository.AddRangeAsync(fronts);
|
||||
}
|
||||
|
||||
///// <summary>
|
||||
///// 翻译稽查数据
|
||||
///// </summary>
|
||||
///// <param name="dto"></param>
|
||||
///// <returns></returns>
|
||||
//[HttpPost]
|
||||
//public async Task<List<string>> SetInspectionEnumValue(SetInspectionEnumValueDto dto)
|
||||
//{
|
||||
// return await SetInspectionEnumValueDataList(dto);
|
||||
//}
|
||||
/// <summary>
|
||||
/// 翻译稽查数据
|
||||
/// </summary>
|
||||
/// <param name="dto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<List<string>> SetInspectionEnumValue(SetInspectionEnumValueDto dto)
|
||||
{
|
||||
return await SetInspectionEnumValueDataList(dto);
|
||||
}
|
||||
|
||||
|
||||
|
||||
///// <summary>
|
||||
///// 翻译稽查数据
|
||||
///// </summary>
|
||||
///// <param name="dto">传入Dto</param>
|
||||
///// <returns></returns>
|
||||
//private async Task<List<string>> SetInspectionEnumValueDataList(SetInspectionEnumValueDto dto)
|
||||
//{
|
||||
// var audits= _dataInspectionRepository.Where(x= dto.AuditDataIds.Contains(OfficeOpenXml=>))
|
||||
/// <summary>
|
||||
/// 翻译稽查数据
|
||||
/// </summary>
|
||||
/// <param name="dto">传入Dto</param>
|
||||
/// <returns></returns>
|
||||
private async Task<List<string>> SetInspectionEnumValueDataList(SetInspectionEnumValueDto dto)
|
||||
{
|
||||
var auditDatas = _dataInspectionRepository.AsQueryable().Where(x => dto.AuditDataIds.Contains(x.Id)).Select(x=> new SetInspectionEnumDataDto() {
|
||||
Id=x.Id,
|
||||
JsonStr=x.JsonDetail,
|
||||
Identification=x.Identification
|
||||
});
|
||||
|
||||
// var listIdentification = dto.Items.Select(x => x.Identification).ToList();
|
||||
// foreach (var item in dto.Items)
|
||||
// {
|
||||
// if (item.Identification == string.Empty || item.Json == string.Empty)
|
||||
// {
|
||||
// continue;
|
||||
// }
|
||||
// item.Json = await GetInspectionEnumValue(listIdentification, item.Json);
|
||||
// item.Json = await SetEnum(dto.TrialId, listIdentification, item.Json);
|
||||
// item.Json = await SetDataInspectionDateType(listIdentification, item.Json);
|
||||
// }
|
||||
// return dto.Items.Select(x => x.Json).ToList();
|
||||
//}
|
||||
var listIdentification = auditDatas.Select(x => x.Identification).ToList();
|
||||
foreach (var item in auditDatas)
|
||||
{
|
||||
if (item.Identification == string.Empty || item.JsonStr == string.Empty)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
item.JsonStr = await GetInspectionEnumValue(listIdentification, item.JsonStr);
|
||||
item.JsonStr = await SetEnum(dto.TrialId, listIdentification, item.JsonStr);
|
||||
item.JsonStr = await SetDataInspectionDateType(listIdentification, item.JsonStr);
|
||||
}
|
||||
|
||||
var resultJsonStrList = new List<string>();
|
||||
|
||||
dto.AuditDataIds.ForEach(x =>
|
||||
{
|
||||
var auditData = auditDatas.FirstOrDefault(y => y.Id == x);
|
||||
resultJsonStrList.Add(auditData?.JsonStr);
|
||||
});
|
||||
|
||||
|
||||
return resultJsonStrList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -101,13 +101,13 @@ namespace IRaCIS.Core.Application.Service.Inspection
|
|||
SignId = data.SignId,
|
||||
ParentId = data.ParentId,
|
||||
ChildrenType = data.ChildrenType,
|
||||
JsonDetail = data.JsonDetail,
|
||||
//JsonDetail = data.JsonDetail,
|
||||
//SiteName = data.SiteName,
|
||||
//ExperimentName = data.TrialName,
|
||||
FirstName = leftsubject.FirstName,
|
||||
LastName = leftsubject.LastName,
|
||||
Id = data.Id,
|
||||
ParentJson = leftparent.JsonDetail,
|
||||
//ParentJson = leftparent.JsonDetail,
|
||||
VisitName = leftsubjectVisit.VisitName,
|
||||
CreateUser = leftuser.UserName,
|
||||
UserFirstName = leftuser.FirstName,
|
||||
|
|
|
@ -13,12 +13,25 @@ namespace IRaCIS.Core.Infra.EFCore.Common.Dto
|
|||
[NotDefault]
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
[NotDefault]
|
||||
public List<Guid> AuditDataIds { get; set; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class SetInspectionEnumDataDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public string Identification { get; set; }
|
||||
|
||||
public string JsonStr { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public class AddInterface
|
||||
{
|
||||
public Guid ParentId { get; set; }
|
||||
|
|
Loading…
Reference in New Issue