From aa87005eb3836be1a23921334ee5538a93076983 Mon Sep 17 00:00:00 2001 From: yhw0507 Date: Thu, 16 Nov 2023 10:44:28 +0800 Subject: [PATCH] 20231116 --- .../Project_HSSEData_HSSEService.cs | 69 ++++++++++++++++--- 1 file changed, 60 insertions(+), 9 deletions(-) diff --git a/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSEService.cs b/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSEService.cs index 023dcbe0..c2b0827a 100644 --- a/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSEService.cs +++ b/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSEService.cs @@ -1200,9 +1200,9 @@ namespace BLL (from x in Funs.DB.InApproveManager_GeneralEquipmentInItem join y in Funs.DB.InApproveManager_GeneralEquipmentIn on x.GeneralEquipmentInId equals y .GeneralEquipmentInId - where y.ProjectId == projectid + where y.ProjectId == projectid select x).Count(); - return 0; + return result; } /// @@ -1215,7 +1215,7 @@ namespace BLL join y in Funs.DB.InApproveManager_EquipmentIn on x.EquipmentInId equals y.EquipmentInId where y.ProjectId == projectid select x).Count(); - return 0; + return result; } /// @@ -1227,7 +1227,32 @@ namespace BLL var result = (from x in Funs.DB.License_LicenseManager where x.ProjectId == projectid && x.CompileDate > Const.DtmarkTime select x).Count(); - return 0; + var result1 = (from x in Funs.DB.License_BreakGround + where x.ProjectId == projectid && x.ValidityStartTime > Const.DtmarkTime + select x).Count(); + var result2 = (from x in Funs.DB.License_FireWork + where x.ProjectId == projectid && x.ValidityStartTime > Const.DtmarkTime + select x).Count(); + var result3 = (from x in Funs.DB.License_HeightWork + where x.ProjectId == projectid && x.ValidityStartTime > Const.DtmarkTime + select x).Count(); + var result4 = (from x in Funs.DB.License_LiftingWork + where x.ProjectId == projectid && x.ValidityStartTime > Const.DtmarkTime + select x).Count(); + var result5 = (from x in Funs.DB.License_LimitedSpace + where x.ProjectId == projectid && x.ValidityStartTime > Const.DtmarkTime + select x).Count(); + var result6 = (from x in Funs.DB.License_NightWork + where x.ProjectId == projectid && x.ValidityStartTime > Const.DtmarkTime + select x).Count(); + var result7 = (from x in Funs.DB.License_OpenCircuit + where x.ProjectId == projectid && x.ValidityStartTime > Const.DtmarkTime + select x).Count(); + var result8 = (from x in Funs.DB.License_RadialWork + where x.ProjectId == projectid && x.ValidityStartTime > Const.DtmarkTime + select x).Count(); + + return (result+ result1+ result2+ result3+ result4+ result5+ result6+ result7+ result8); } /// @@ -1240,7 +1265,33 @@ namespace BLL where x.ProjectId == projectid && x.WorkStates == "3" && x.CompileDate > Const.DtmarkTime select x).Count(); - return 0; + + var result1 = (from x in Funs.DB.License_BreakGround + where x.ProjectId == projectid && x.ValidityStartTime > Const.DtmarkTime && x.States == "3" + select x).Count(); + var result2 = (from x in Funs.DB.License_FireWork + where x.ProjectId == projectid && x.ValidityStartTime > Const.DtmarkTime && x.States == "3" + select x).Count(); + var result3 = (from x in Funs.DB.License_HeightWork + where x.ProjectId == projectid && x.ValidityStartTime > Const.DtmarkTime && x.States == "3" + select x).Count(); + var result4 = (from x in Funs.DB.License_LiftingWork + where x.ProjectId == projectid && x.ValidityStartTime > Const.DtmarkTime && x.States == "3" + select x).Count(); + var result5 = (from x in Funs.DB.License_LimitedSpace + where x.ProjectId == projectid && x.ValidityStartTime > Const.DtmarkTime && x.States == "3" + select x).Count(); + var result6 = (from x in Funs.DB.License_NightWork + where x.ProjectId == projectid && x.ValidityStartTime > Const.DtmarkTime && x.States == "3" + select x).Count(); + var result7 = (from x in Funs.DB.License_OpenCircuit + where x.ProjectId == projectid && x.ValidityStartTime > Const.DtmarkTime && x.States == "3" + select x).Count(); + var result8 = (from x in Funs.DB.License_RadialWork + where x.ProjectId == projectid && x.ValidityStartTime > Const.DtmarkTime && x.States == "3" + select x).Count(); + + return (result + result1 + result2 + result3 + result4 + result5 + result6 + result7 + result8); } /// @@ -1252,7 +1303,7 @@ namespace BLL var result = (from x in Funs.DB.HSSE_Hazard_HazardRegister where x.ProjectId == projectid && (x.HazardValue == "0.3" || x.HazardValue == "1" || x.HazardValue == null) && x.States == "3" && x.CheckTime > Const.DtmarkTime select x).Count(); - return 0; + return result; } /// @@ -1265,7 +1316,7 @@ namespace BLL where x.ProjectId == projectid && (x.HazardValue == "0.3" || x.HazardValue == "1" || x.HazardValue == null) && x.States != "3" && x.CheckTime > Const.DtmarkTime select x).Count(); - return 0; + return result; } /// @@ -1278,7 +1329,7 @@ namespace BLL where x.ProjectId == projectid && x.HazardValue == "3" && x.States == "3" && x.CheckTime > Const.DtmarkTime select x).Count(); - return 0; + return result; } /// @@ -1291,7 +1342,7 @@ namespace BLL where x.ProjectId == projectid && x.HazardValue == "3" && x.States != "3" && x.CheckTime > Const.DtmarkTime select x).Count(); - return 0; + return result; } ///