查询修改
This commit is contained in:
@@ -204,7 +204,10 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
|
||||
public string UserFirstName { 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;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -43,12 +43,36 @@ namespace IRaCIS.Core.Application.Service.Inspection
|
||||
|
||||
|
||||
join moduleTyped in _repository.GetQueryable<Dictionary>().Where(x => x.Code == "ModuleType") on 1 equals 1
|
||||
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()
|
||||
|
||||
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()
|
||||
{
|
||||
CreateTime = data.CreateTime,
|
||||
@@ -86,6 +110,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
|
||||
SiteCode=data.SiteCode,
|
||||
ResearchProgramNo=data.ResearchProgramNo,
|
||||
ObjectType=data.ObjectType,
|
||||
Description=leftfrontAuditConfig.Description,
|
||||
};
|
||||
|
||||
query = query.WhereIf(!dto.BlindName.IsNullOrEmpty(), x => x.BlindName == dto.BlindName)
|
||||
|
||||
Reference in New Issue
Block a user