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