查询修改
parent
cee10f18ff
commit
9d2455a898
|
@ -50,6 +50,10 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
|
|
||||||
public string ObjectTypeId { get; set; } = string.Empty;
|
public string ObjectTypeId { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string ObjectTypeValue { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string ObjectTypeValueCN { get; set; } = string.Empty;
|
||||||
|
|
||||||
public bool? IsShowByTrialConfig { get; set; }
|
public bool? IsShowByTrialConfig { get; set; }
|
||||||
|
|
||||||
public string ByTrialConfig { get; set; } = string.Empty;
|
public string ByTrialConfig { get; set; } = string.Empty;
|
||||||
|
|
|
@ -43,6 +43,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
from leftModuleType in ModuleTypetemp.DefaultIfEmpty()
|
from leftModuleType in ModuleTypetemp.DefaultIfEmpty()
|
||||||
join OptTypeId in _repository.GetQueryable<Dictionary>() on data.OptTypeId equals OptTypeId.Id.ToString() into OptTypeIdtemp
|
join OptTypeId in _repository.GetQueryable<Dictionary>() on data.OptTypeId equals OptTypeId.Id.ToString() into OptTypeIdtemp
|
||||||
from leftOptTypeId in OptTypeIdtemp.DefaultIfEmpty()
|
from leftOptTypeId in OptTypeIdtemp.DefaultIfEmpty()
|
||||||
|
join ObjectTypeId in _repository.GetQueryable<Dictionary>() on data.ObjectTypeId equals ObjectTypeId.Id.ToString() into ObjectTypeIdtemp
|
||||||
|
from leftObjectTypeIdtemp in ObjectTypeIdtemp.DefaultIfEmpty()
|
||||||
select new FrontAuditConfigView()
|
select new FrontAuditConfigView()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -74,6 +76,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
DictionaryKey=data.DictionaryKey,
|
DictionaryKey=data.DictionaryKey,
|
||||||
EnumType=data.EnumType,
|
EnumType=data.EnumType,
|
||||||
ObjectTypeId=data.ObjectTypeId,
|
ObjectTypeId=data.ObjectTypeId,
|
||||||
|
ObjectTypeValue = leftObjectTypeIdtemp.Value,
|
||||||
|
ObjectTypeValueCN = leftObjectTypeIdtemp.ValueCN,
|
||||||
IsShowByTrialConfig =data.IsShowByTrialConfig,
|
IsShowByTrialConfig =data.IsShowByTrialConfig,
|
||||||
ByTrialConfig=data.ByTrialConfig,
|
ByTrialConfig=data.ByTrialConfig,
|
||||||
};
|
};
|
||||||
|
|
|
@ -204,7 +204,10 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
|
||||||
public string UserFirstName { get; set; } = string.Empty;
|
public string UserFirstName { get; set; } = string.Empty;
|
||||||
public string UserLastName { get; set; } = string.Empty;
|
public string UserLastName { get; set; } = string.Empty;
|
||||||
|
|
||||||
public string SubjectCode { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
|
|
||||||
|
public string Description { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -46,9 +46,33 @@ namespace IRaCIS.Core.Application.Service.Inspection
|
||||||
join moduleTypec in _repository.GetQueryable<Dictionary>() on new { ParentId = moduleTyped.Id, ModuleType = data.ModuleType } equals new { ParentId = moduleTypec.ParentId.Value, ModuleType = moduleTypec.Value } into moduleTypectemp
|
join moduleTypec in _repository.GetQueryable<Dictionary>() on new { ParentId = moduleTyped.Id, ModuleType = data.ModuleType } equals new { ParentId = moduleTypec.ParentId.Value, ModuleType = moduleTypec.Value } into moduleTypectemp
|
||||||
from leftmoduleTypec in moduleTypectemp.DefaultIfEmpty()
|
from leftmoduleTypec in moduleTypectemp.DefaultIfEmpty()
|
||||||
|
|
||||||
|
join childrenTyped in _repository.GetQueryable<Dictionary>().Where(x => x.Code == "ChildrenType") on 1 equals 1
|
||||||
|
join childrenTypec in _repository.GetQueryable<Dictionary>() on new { ParentId = childrenTyped.Id, ModuleType = data.ChildrenType } equals new { ParentId = childrenTypec.ParentId.Value, ModuleType = childrenTypec.Value } into childrenTypectemp
|
||||||
|
from leftchildrenTypec in childrenTypectemp.DefaultIfEmpty()
|
||||||
|
|
||||||
|
join ObjectTyped in _repository.GetQueryable<Dictionary>().Where(x => x.Code == "ObjectType") on 1 equals 1
|
||||||
|
join ObjectTypec in _repository.GetQueryable<Dictionary>() on new { ParentId = ObjectTyped.Id, ModuleType = data.ObjectType } equals new { ParentId = ObjectTypec.ParentId.Value, ModuleType = ObjectTypec.Value } into objectTypetemp
|
||||||
|
from leftObjectType in objectTypetemp.DefaultIfEmpty()
|
||||||
|
|
||||||
|
join OptTyped in _repository.GetQueryable<Dictionary>().Where(x => x.Code == "OptType") on 1 equals 1
|
||||||
|
join OptTypec in _repository.GetQueryable<Dictionary>() on new { ParentId = OptTyped.Id, ModuleType = data.OptType } equals new { ParentId = OptTypec.ParentId.Value, ModuleType = OptTypec.Value } into optTypetemp
|
||||||
|
from leftOptType in optTypetemp.DefaultIfEmpty()
|
||||||
|
|
||||||
|
join frontAuditConfig in _repository.GetQueryable<FrontAuditConfig>().Where(x=>x.ObjectTypeId!=null) on new
|
||||||
|
{
|
||||||
|
ModuleTypeId = leftmoduleTypec.Id.ToString(),
|
||||||
|
ChildrenTypeId = leftchildrenTypec.Id.ToString(),
|
||||||
|
ObjectTypeId = leftObjectType.Id.ToString(),
|
||||||
|
OptTypeId = leftOptType.Id.ToString(),
|
||||||
|
} equals new
|
||||||
|
{
|
||||||
|
frontAuditConfig.ModuleTypeId,
|
||||||
|
frontAuditConfig.ChildrenTypeId,
|
||||||
|
frontAuditConfig.ObjectTypeId,
|
||||||
|
frontAuditConfig.OptTypeId,
|
||||||
|
|
||||||
|
} into frontAuditConfigtemp
|
||||||
|
from leftfrontAuditConfig in frontAuditConfigtemp.DefaultIfEmpty()
|
||||||
select new GetDataInspectionOutDto()
|
select new GetDataInspectionOutDto()
|
||||||
{
|
{
|
||||||
CreateTime = data.CreateTime,
|
CreateTime = data.CreateTime,
|
||||||
|
@ -86,6 +110,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
|
||||||
SiteCode=data.SiteCode,
|
SiteCode=data.SiteCode,
|
||||||
ResearchProgramNo=data.ResearchProgramNo,
|
ResearchProgramNo=data.ResearchProgramNo,
|
||||||
ObjectType=data.ObjectType,
|
ObjectType=data.ObjectType,
|
||||||
|
Description=leftfrontAuditConfig.Description,
|
||||||
};
|
};
|
||||||
|
|
||||||
query = query.WhereIf(!dto.BlindName.IsNullOrEmpty(), x => x.BlindName == dto.BlindName)
|
query = query.WhereIf(!dto.BlindName.IsNullOrEmpty(), x => x.BlindName == dto.BlindName)
|
||||||
|
|
Loading…
Reference in New Issue