修改一版

This commit is contained in:
he
2022-05-06 17:37:54 +08:00
parent 7afe552061
commit d21b8c024c
6 changed files with 56 additions and 22 deletions
@@ -594,7 +594,6 @@ namespace IRaCIS.Core.Infra.EFCore
item.Json = await SetEnum(dto.TrialId, item.Identification, item.Json);
item.Json = await SetDataInspectionDateType(item.Identification, item.Json);
}
return dto.Items.Select(x => x.Json).ToList();
}
@@ -610,7 +609,7 @@ namespace IRaCIS.Core.Infra.EFCore
public async Task<string> SetDataInspectionDateType(string identification, string json)
{
var list = await (from parent in _dbContext.FrontAuditConfig.AsQueryable().Where(x => x.Identification == identification)
join child in _dbContext.FrontAuditConfig.AsQueryable().Where(x => x.EnumType == "Date") on parent.Id equals child.ParentId
join child in _dbContext.FrontAuditConfig.AsQueryable().Where(x => x.EnumType == "Date" && x.IsEnable.HasValue && x.IsEnable.Value) on parent.Id equals child.ParentId
select new DateDto()
{
Code = child.Code,
@@ -665,7 +664,7 @@ namespace IRaCIS.Core.Infra.EFCore
public async Task<string> GetInspectionEnumValue(string identification, string json)
{
var list = await (from u in _dbContext.FrontAuditConfig.Where(x => x.Identification == identification)
join p in _dbContext.FrontAuditConfig.Where(x => x.EnumType == "Foreign") on u.Id equals p.ParentId
join p in _dbContext.FrontAuditConfig.Where(x => x.EnumType == "Foreign" && x.IsEnable.HasValue && x.IsEnable.Value) on u.Id equals p.ParentId
select new
{
Key = p.Code,
@@ -721,7 +720,7 @@ namespace IRaCIS.Core.Infra.EFCore
public async Task<string> SetEnum(Guid trilaid, string identification, string json)
{
var list = await (from u in _dbContext.FrontAuditConfig.Where(x => x.Identification == identification)
join p in _dbContext.FrontAuditConfig.Where(x => x.Code != "AuditState" && x.EnumType == "Dictionary") on u.Id equals p.ParentId
join p in _dbContext.FrontAuditConfig.Where(x => x.Code != "AuditState" && x.EnumType == "Dictionary"&&x.IsEnable.HasValue&& x.IsEnable.Value) on u.Id equals p.ParentId
select new
{
Key = p.Code,