对接集团大屏数据
This commit is contained in:
@@ -3709,6 +3709,61 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static List<Model.ConstructionEquipmentOutput> GetUseEquipment()
|
||||
{
|
||||
var query = (from item in Funs.DB.QualityAudit_EquipmentQuality
|
||||
//join eq in Funs.DB.InApproveManager_EquipmentIn on item.EquipmentInId equals eq.EquipmentInId into eqGroup
|
||||
//from eq in eqGroup.DefaultIfEmpty()
|
||||
//join spe in Funs.DB.Base_SpecialEquipment on item.SpecialEquipmentId equals spe.SpecialEquipmentId into speGroup
|
||||
//from spe in speGroup.DefaultIfEmpty()
|
||||
join p in Funs.DB.Base_Project on item.ProjectId equals p.ProjectId into pGroup
|
||||
from p in pGroup.DefaultIfEmpty()
|
||||
join unit in Funs.DB.Base_Unit on item.UnitId equals unit.UnitId into unitGroup
|
||||
from unit in unitGroup.DefaultIfEmpty()
|
||||
where BeUnderConstructionList.Contains(item.ProjectId)
|
||||
select new ConstructionEquipmentOutput
|
||||
{
|
||||
Id = item.EquipmentQualityId,
|
||||
ProjectId = item.ProjectId,
|
||||
//ProjectCode = p.ProjectCode,
|
||||
ProjectName = p.ProjectName,
|
||||
//UnitId = item.UnitId,
|
||||
UnitName = unit.UnitName,
|
||||
SpecialEquipmentName = item.EquipmentQualityName,
|
||||
SizeModel = item.SizeModel,
|
||||
CertificateNum = item.CertificateCode,
|
||||
CompileDate = item.CompileDate,
|
||||
EQType = "特种设备"
|
||||
})
|
||||
.Union(
|
||||
from item in Funs.DB.QualityAudit_GeneralEquipmentQuality
|
||||
join eq in Funs.DB.Base_SpecialEquipment on item.GeneralEquipmentQualityId equals eq.SpecialEquipmentId into eqGroup
|
||||
from eq in eqGroup.DefaultIfEmpty()
|
||||
//join spe in Funs.DB.Base_SpecialEquipment on item.SpecialEquipmentId equals spe.SpecialEquipmentId into speGroup
|
||||
//from spe in speGroup.DefaultIfEmpty()
|
||||
join p in Funs.DB.Base_Project on item.ProjectId equals p.ProjectId into pGroup
|
||||
from p in pGroup.DefaultIfEmpty()
|
||||
join unit in Funs.DB.Base_Unit on item.UnitId equals unit.UnitId into unitGroup
|
||||
from unit in unitGroup.DefaultIfEmpty()
|
||||
where BeUnderConstructionList.Contains(item.ProjectId)
|
||||
select new ConstructionEquipmentOutput
|
||||
{
|
||||
Id = item.GeneralEquipmentQualityId,
|
||||
ProjectId = item.ProjectId,
|
||||
// ProjectCode = p.ProjectCode,
|
||||
ProjectName = p.ProjectName,
|
||||
// UnitId = item.UnitId,
|
||||
UnitName = unit.UnitName,
|
||||
// SpecialEquipmentId = item.SpecialEquipmentId,
|
||||
SpecialEquipmentName = eq.SpecialEquipmentName,
|
||||
//SizeModel = eq.SizeModel,
|
||||
//OwnerCheck = item.OwnerCheck,
|
||||
CertificateNum = item.GeneralEquipmentQualityCode,
|
||||
//IsUsed = item.IsUsed,
|
||||
CompileDate = item.CompileDate,
|
||||
EQType = "一般设备"
|
||||
}
|
||||
);
|
||||
|
||||
/* 通用版业务逻辑【弃用】
|
||||
var query = (from item in Funs.DB.InApproveManager_EquipmentInItem
|
||||
join eq in Funs.DB.InApproveManager_EquipmentIn on item.EquipmentInId equals eq.EquipmentInId into eqGroup
|
||||
from eq in eqGroup.DefaultIfEmpty()
|
||||
@@ -3765,6 +3820,7 @@ namespace BLL
|
||||
EQType = "一般设备"
|
||||
}
|
||||
);
|
||||
*/
|
||||
|
||||
return query.ToList();
|
||||
}
|
||||
@@ -3781,6 +3837,31 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static List<Model.ConstructionEquipmentOutput> GetSpecialEquipment()
|
||||
{
|
||||
var query = (from item in Funs.DB.QualityAudit_EquipmentQuality
|
||||
//join eq in Funs.DB.InApproveManager_EquipmentIn on item.EquipmentInId equals eq.EquipmentInId into eqGroup
|
||||
//from eq in eqGroup.DefaultIfEmpty()
|
||||
//join spe in Funs.DB.Base_SpecialEquipment on item.SpecialEquipmentId equals spe.SpecialEquipmentId into speGroup
|
||||
//from spe in speGroup.DefaultIfEmpty()
|
||||
join p in Funs.DB.Base_Project on item.ProjectId equals p.ProjectId into pGroup
|
||||
from p in pGroup.DefaultIfEmpty()
|
||||
join unit in Funs.DB.Base_Unit on item.UnitId equals unit.UnitId into unitGroup
|
||||
from unit in unitGroup.DefaultIfEmpty()
|
||||
where BeUnderConstructionList.Contains(item.ProjectId)
|
||||
select new ConstructionEquipmentOutput
|
||||
{
|
||||
Id = item.EquipmentQualityId,
|
||||
ProjectId = item.ProjectId,
|
||||
//ProjectCode = p.ProjectCode,
|
||||
ProjectName = p.ProjectName,
|
||||
//UnitId = item.UnitId,
|
||||
UnitName = unit.UnitName,
|
||||
SpecialEquipmentName = item.EquipmentQualityName,
|
||||
SizeModel = item.SizeModel,
|
||||
CertificateNum = item.CertificateCode,
|
||||
CompileDate = item.CompileDate,
|
||||
EQType = "特种设备"
|
||||
});
|
||||
/* 通用版业务逻辑【弃用】
|
||||
var query = (from item in Funs.DB.InApproveManager_EquipmentInItem
|
||||
join eq in Funs.DB.InApproveManager_EquipmentIn on item.EquipmentInId equals eq.EquipmentInId into
|
||||
eqGroup
|
||||
@@ -3810,6 +3891,7 @@ namespace BLL
|
||||
CompileDate = eq.CompileDate,
|
||||
EQType = "特种设备"
|
||||
});
|
||||
*/
|
||||
return query.ToList();
|
||||
}
|
||||
public static async Task<List<Model.ConstructionEquipmentOutput>> GetSpecialEquipmentAsync()
|
||||
|
||||
Reference in New Issue
Block a user