修改一版
parent
5adb4b16c1
commit
c8f71fa61b
|
@ -287,7 +287,6 @@ namespace IRaCIS.Core.Application.Service
|
||||||
ForeignKeyText = p.ForeignKeyText,
|
ForeignKeyText = p.ForeignKeyText,
|
||||||
ForeignKeyTable = p.ForeignKeyTable
|
ForeignKeyTable = p.ForeignKeyTable
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
|
|
||||||
list = list.GroupBy(x => new { x.Key }, (key, lst) => new
|
list = list.GroupBy(x => new { x.Key }, (key, lst) => new
|
||||||
{
|
{
|
||||||
Key = key.Key,
|
Key = key.Key,
|
||||||
|
@ -297,8 +296,6 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var JsonDataValue = JsonConvert.DeserializeObject<IDictionary<string, object>>(json);
|
var JsonDataValue = JsonConvert.DeserializeObject<IDictionary<string, object>>(json);
|
||||||
foreach (var item in list)
|
foreach (var item in list)
|
||||||
{
|
{
|
||||||
|
@ -333,27 +330,25 @@ namespace IRaCIS.Core.Application.Service
|
||||||
};
|
};
|
||||||
JsonDataValue[item.Key] = string.Join(",", _frontAuditConfigRepository._dbContext.Database.SqlQuery<ForeignKey>(sql, paravalue).Select(x => x.Text).ToList());
|
JsonDataValue[item.Key] = string.Join(",", _frontAuditConfigRepository._dbContext.Database.SqlQuery<ForeignKey>(sql, paravalue).Select(x => x.Text).ToList());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return JsonConvert.SerializeObject(JsonDataValue);
|
return JsonConvert.SerializeObject(JsonDataValue);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取枚举
|
/// 获取枚举
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="Identification">标识</param>
|
/// <param name="trialId">标识</param>
|
||||||
/// <param name="json">Json对象</param>
|
/// <param name="identifications">标识</param>
|
||||||
|
/// <param name="jsonStr">Json对象</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
/// <exception cref="BusinessValidationFailedException"></exception>
|
private async Task<string> SetEnum(Guid trialId, List<string> identifications, string jsonStr)
|
||||||
private async Task<string> SetEnum(Guid trilaid, List<string> identification, string json)
|
|
||||||
{
|
{
|
||||||
if (json == null || json == "null")
|
if (jsonStr == null || jsonStr == "null")
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
var list = await (from u in _frontAuditConfigRepository.Where(x => identification.Contains(x.Identification))
|
var list = await (from u in _frontAuditConfigRepository.Where(x => identifications.Contains(x.Identification))
|
||||||
join p in _frontAuditConfigRepository.Where(x => x.Code != "AuditState" && x.EnumType == "Dictionary" && x.IsEnable.HasValue && x.IsEnable.Value) on u.Id equals p.ParentId
|
join p in _frontAuditConfigRepository.Where(x => x.Code != "AuditState" && x.EnumType == "Dictionary" && x.IsEnable.HasValue && x.IsEnable.Value) on u.Id equals p.ParentId
|
||||||
select new
|
select new
|
||||||
{
|
{
|
||||||
|
@ -363,7 +358,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
|
|
||||||
// 添加单双审
|
// 添加单双审
|
||||||
var trialtype = await _trialRepository.AsQueryable().Where(x => x.Id == trilaid).Select(x => x.QCProcessEnum).FirstOrDefaultAsync();
|
var trialtype = await _trialRepository.AsQueryable().Where(x => x.Id == trialId).Select(x => x.QCProcessEnum).FirstOrDefaultAsync();
|
||||||
|
|
||||||
list.Add(new
|
list.Add(new
|
||||||
{
|
{
|
||||||
|
@ -381,7 +376,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
Type = lst.Max(x => x.Type),
|
Type = lst.Max(x => x.Type),
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
|
||||||
var JsonData = JsonConvert.DeserializeObject<IDictionary<string, object>>(json);
|
var JsonData = JsonConvert.DeserializeObject<IDictionary<string, object>>(jsonStr);
|
||||||
foreach (var item in list)
|
foreach (var item in list)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -461,24 +456,14 @@ namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
value = b.ValueCN
|
value = b.ValueCN
|
||||||
}).Select(x => x.value).FirstOrDefaultAsync();
|
}).Select(x => x.value).FirstOrDefaultAsync();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return JsonConvert.SerializeObject(JsonData);
|
return JsonConvert.SerializeObject(JsonData);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -694,7 +679,6 @@ namespace IRaCIS.Core.Application.Service
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<List<FrontAuditConfigView>> GetFrontAuditConfigList(FrontAuditConfigQuery iq)
|
public async Task<List<FrontAuditConfigView>> GetFrontAuditConfigList(FrontAuditConfigQuery iq)
|
||||||
{
|
{
|
||||||
|
|
||||||
var query = from data in _repository.GetQueryable<FrontAuditConfig>()
|
var query = from data in _repository.GetQueryable<FrontAuditConfig>()
|
||||||
join childrenType in _repository.GetQueryable<Dictionary>() on data.ChildrenTypeId equals childrenType.Id into childrenTypetemp
|
join childrenType in _repository.GetQueryable<Dictionary>() on data.ChildrenTypeId equals childrenType.Id into childrenTypetemp
|
||||||
from leftchildrenType in childrenTypetemp.DefaultIfEmpty()
|
from leftchildrenType in childrenTypetemp.DefaultIfEmpty()
|
||||||
|
@ -752,7 +736,6 @@ namespace IRaCIS.Core.Application.Service
|
||||||
DictionaryCode=data.DictionaryCode,
|
DictionaryCode=data.DictionaryCode,
|
||||||
DictionaryType=data.DictionaryType,
|
DictionaryType=data.DictionaryType,
|
||||||
InterfaceName=data.InterfaceName,
|
InterfaceName=data.InterfaceName,
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
query = query
|
query = query
|
||||||
|
|
|
@ -55,6 +55,26 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class VisitFinishReadingAddReadModuleInDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 项目ID
|
||||||
|
/// </summary>
|
||||||
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 受试者Id
|
||||||
|
/// </summary>
|
||||||
|
public Guid SubjectId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 访视Id
|
||||||
|
/// </summary>
|
||||||
|
public Guid SubjectVisitId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public class GetReadModuleSingleIndto
|
public class GetReadModuleSingleIndto
|
||||||
{
|
{
|
||||||
public Guid Id { get; set; }
|
public Guid Id { get; set; }
|
||||||
|
|
|
@ -31,7 +31,9 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region 历史 接口名暂未修改
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 新增或者修改
|
/// 新增或者修改
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -70,7 +72,7 @@ namespace IRaCIS.Application.Services
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -22,18 +22,21 @@ namespace IRaCIS.Application.Services
|
||||||
public IRepository<SubjectVisit> _subjectVisitRepository;
|
public IRepository<SubjectVisit> _subjectVisitRepository;
|
||||||
private readonly IRepository<Subject> _subjectRepository;
|
private readonly IRepository<Subject> _subjectRepository;
|
||||||
private readonly IRepository<VisitStage> _visitstageRepository;
|
private readonly IRepository<VisitStage> _visitstageRepository;
|
||||||
|
private readonly IRepository<ReadingPeriodSet> _readingPeriodSetRepository;
|
||||||
private readonly IRepository<ReadModule> _readModuleRepository;
|
private readonly IRepository<ReadModule> _readModuleRepository;
|
||||||
|
|
||||||
|
|
||||||
public ReadModuleService(IRepository<SubjectVisit> subjectVisitRepository,
|
public ReadModuleService(IRepository<SubjectVisit> subjectVisitRepository,
|
||||||
IRepository<Subject> subjectRepository,
|
IRepository<Subject> subjectRepository,
|
||||||
IRepository<VisitStage> visitstageRepository,
|
IRepository<VisitStage> visitstageRepository,
|
||||||
|
IRepository<ReadingPeriodSet> readingPeriodSetRepository,
|
||||||
IRepository<ReadModule> readModuleRepository
|
IRepository<ReadModule> readModuleRepository
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
_subjectVisitRepository = subjectVisitRepository;
|
_subjectVisitRepository = subjectVisitRepository;
|
||||||
this._subjectRepository = subjectRepository;
|
this._subjectRepository = subjectRepository;
|
||||||
this._visitstageRepository = visitstageRepository;
|
this._visitstageRepository = visitstageRepository;
|
||||||
|
this._readingPeriodSetRepository = readingPeriodSetRepository;
|
||||||
this._readModuleRepository = readModuleRepository;
|
this._readModuleRepository = readModuleRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,7 +69,6 @@ namespace IRaCIS.Application.Services
|
||||||
SubjectCode = y.Subject.Code, // 受试者code
|
SubjectCode = y.Subject.Code, // 受试者code
|
||||||
SiteCode = x.Site.SiteCode, // 中心Code
|
SiteCode = x.Site.SiteCode, // 中心Code
|
||||||
|
|
||||||
|
|
||||||
IsFinalVisit=y.IsFinalVisit, // 是否为末次评估
|
IsFinalVisit=y.IsFinalVisit, // 是否为末次评估
|
||||||
OutPlanPreviousVisitId = y.OutPlanPreviousVisitId, // 上一访视
|
OutPlanPreviousVisitId = y.OutPlanPreviousVisitId, // 上一访视
|
||||||
OutPlanPreviousVisitName = y.OutPlanPreviousVisit.VisitName, // 上一访视名称
|
OutPlanPreviousVisitName = y.OutPlanPreviousVisit.VisitName, // 上一访视名称
|
||||||
|
@ -118,6 +120,16 @@ namespace IRaCIS.Application.Services
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///// <summary>
|
||||||
|
///// 访视阅片完成添加阅片期模块
|
||||||
|
///// </summary>
|
||||||
|
///// <returns></returns>
|
||||||
|
//public async Task<IResponseOutput> VisitFinishReadingAddReadModule(VisitFinishReadingAddReadModuleInDto inDto)
|
||||||
|
//{
|
||||||
|
// var subjectVisit = await _subjectRepository.FirstOrDefaultNoTrackingAsync(x => x.Id == inDto.SubjectVisitId);
|
||||||
|
// List<ReadingPeriodSet> readingPeriodSets= _readingPeriodSetRepository.Where(x=>x.TrialId==inDto.TrialId&&x.IsTakeEffect=&&(x.ReadingScope==ReadingScopeEnum.All||(x.ReadingScope==ReadingScopeEnum.Site&&x.ReadingPeriodSites.Select(y=>y.SiteId).Contains(subjectVisit.SiteId))))
|
||||||
|
//}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取单条信息
|
/// 获取单条信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -73,5 +73,10 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public enum ReadingPeriodSetTakeEffectEnum
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue