3、安全生产看板,现场人员、机具设备数据穿透只看在建项目数据

This commit is contained in:
2025-04-23 15:19:37 +08:00
parent e84ccc038a
commit 52638d8b10
3 changed files with 10 additions and 3 deletions
@@ -40,14 +40,14 @@ namespace FineUIPro.Web.DataShow
strSql = @"SELECT ID,ProjectId,ProjectCode,ProjectName,UnitId,UnitName,SpecialEquipmentId,SpecialEquipmentName,SizeModel,OwnerCheck,CertificateNum,IsUsed,CompileDate,EQType
FROM (SELECT Item.EquipmentInItemId AS ID,EQ.ProjectId,P.ProjectCode,P.ProjectName,EQ.UnitId,Unit.UnitName,Item.SpecialEquipmentId
,SPE.SpecialEquipmentName,Item.SizeModel,Item.OwnerCheck,Item.CertificateNum,Item.IsUsed,EQ.CompileDate,'特种设备' AS EQType
,SPE.SpecialEquipmentName,Item.SizeModel,Item.OwnerCheck,Item.CertificateNum,Item.IsUsed,EQ.CompileDate,'特种设备' AS EQType,P.ProjectState
FROM InApproveManager_EquipmentInItem AS Item
LEFT JOIN InApproveManager_EquipmentIn AS EQ ON EQ.EquipmentInId = Item.EquipmentInId
LEFT JOIN Base_SpecialEquipment AS SPE ON Item.SpecialEquipmentId = SPE.SpecialEquipmentId
LEFT JOIN Base_Project AS P ON EQ.ProjectId = P.ProjectId
LEFT JOIN Base_Unit AS Unit ON Unit.UnitId = EQ.UnitId
UNION ALL SELECT Item.GeneralEquipmentInItemId AS ID,EQ.ProjectId,P.ProjectCode,P.ProjectName,EQ.UnitId,Unit.UnitName,Item.SpecialEquipmentId
,SPE.SpecialEquipmentName,Item.SizeModel,Item.OwnerCheck,Item.CertificateNum,Item.IsUsed,EQ.CompileDate,'一般设备' AS EQType
,SPE.SpecialEquipmentName,Item.SizeModel,Item.OwnerCheck,Item.CertificateNum,Item.IsUsed,EQ.CompileDate,'一般设备' AS EQType,P.ProjectState
FROM InApproveManager_GeneralEquipmentInItem AS Item
LEFT JOIN InApproveManager_GeneralEquipmentIn AS EQ ON EQ.GeneralEquipmentInId = Item.GeneralEquipmentInId
LEFT JOIN Base_SpecialEquipment AS SPE ON Item.SpecialEquipmentId = SPE.SpecialEquipmentId
@@ -56,6 +56,8 @@ namespace FineUIPro.Web.DataShow
WHERE 1=1 ";
strSql += " AND V.IsUsed = @IsUsed";
//在建项目数据
strSql += " AND (V.ProjectState = '1' OR V.ProjectState IS NULL)";
listStr.Add(new SqlParameter("@IsUsed", "1"));
if (this.rbType.SelectedValue == "2")
{