diff --git a/SGGL/BLL/ZHGL/DataSync/HSSEData_HSSEService.cs b/SGGL/BLL/ZHGL/DataSync/HSSEData_HSSEService.cs index 227bfe00..aee5f2fb 100644 --- a/SGGL/BLL/ZHGL/DataSync/HSSEData_HSSEService.cs +++ b/SGGL/BLL/ZHGL/DataSync/HSSEData_HSSEService.cs @@ -1,4 +1,8 @@ -using System; +using Aspose.Words.Lists; +using FineUIPro; +using Model; +using Newtonsoft.Json; +using System; using System.Collections; using System.Collections.Generic; using System.Linq; @@ -6,10 +10,6 @@ using System.Runtime.InteropServices.ComTypes; using System.Runtime.Remoting.Contexts; using System.Threading.Tasks; using System.Web.UI.WebControls; -using Aspose.Words.Lists; -using FineUIPro; -using Model; -using Newtonsoft.Json; namespace BLL { @@ -19,6 +19,8 @@ namespace BLL //public static List BeUnderConstructionList = ProjectService.GetProjectWorkList().Where(x => (x.ProjectAttribute == "GONGCHENG" || x.ProjectAttribute == null)).Select(x => x.ProjectId).ToList(); public static List BeUnderConstructionList = BaseDataService.BeUnderConstructionList; + + public static void AddHSSEData_HSSE(HSSEData_HSSE newtable) { using (var db = new SGGLDB(Funs.ConnString)) @@ -572,6 +574,7 @@ namespace BLL var beUnderConstructionTask = HSSEData_HSSEService.GetBeUnderConstructionAsync(); var shutdownTask = HSSEData_HSSEService.GetShutdownAsync(); var joinConstructionPersonTask = HSSEData_HSSEService.GetJoinConstructionPersonAsync(); + var joinConstructionPersonPushGroupTask = HSSEData_HSSEService.GetJoinConstructionPersonPushGroupAsync(); var majorProjectsUnderConstructionTask = HSSEData_HSSEService.GetMajorProjectsUnderConstructionAsync(); var totalWorkingHourTask = HSSEData_HSSEService.GetTotalWorkingHourAsync(); var lostWorkingHourTask = HSSEData_HSSEService.GetLostWorkingHourAsync(); @@ -639,7 +642,7 @@ namespace BLL qualityPersonNumTask, beUnderConstructionTask, shutdownTask, - joinConstructionPersonTask, + joinConstructionPersonTask, joinConstructionPersonPushGroupTask, majorProjectsUnderConstructionTask, totalWorkingHourTask, lostWorkingHourTask, @@ -708,6 +711,7 @@ namespace BLL var beUnderConstructionList = await beUnderConstructionTask; var shutdownList = await shutdownTask; var joinConstructionPersonList = await joinConstructionPersonTask; + var joinConstructionPersonPushGroupList = await joinConstructionPersonPushGroupTask; var majorProjectsUnderConstructionList = await majorProjectsUnderConstructionTask; var totalWorkingHour = await totalWorkingHourTask; var lostWorkingHour = await lostWorkingHourTask; @@ -778,7 +782,8 @@ namespace BLL CertificateBNum = certificateBList.Count(), CertificateCNum = certificateCList.Count(), QualityPersonNum = qualityPersonList.Count(), - JoinConstructionPersonNum = joinConstructionPersonList.Count(), + //JoinConstructionPersonNum = joinConstructionPersonList.Count(), + JoinConstructionPersonNum = joinConstructionPersonPushGroupList.Select(p => new { p.IdentityCard }).Distinct().Count(), MajorProjectsUnderConstructionNum = majorProjectsUnderConstructionList.Count(), TotalWorkingHour = totalWorkingHour, LostWorkingHour = lostWorkingHour, @@ -2931,6 +2936,70 @@ namespace BLL return await Task.Run(GetJoinConstructionPerson); } + /// + /// 获取集团二级单位名称list,排除本单位【集团下面二级责任单位】 + /// + /// + public static List GetNonLocalUnitNames() + { + List list = new List(); + list.Add("中国天辰工程有限公司"); + list.Add("赛鼎工程有限公司"); + list.Add("东华工程科技股份有限公司"); + //list.Add("中国五环工程有限公司"); + list.Add("华陆工程科技有限责任公司"); + list.Add("中国成达工程有限公司"); + list.Add("中化学土木工程有限公司"); + list.Add("中化二建集团有限公司"); + list.Add("中国化学工程第三建设有限公司"); + list.Add("中国化学工程第四建设有限公司"); + list.Add("中国化学工程第六建设有限公司"); + list.Add("中国化学工程第七建设有限公司"); + list.Add("中国化学工程第十一建设有限公司"); + list.Add("中国化学工程第十三建设有限公司"); + list.Add("中国化学工程第十四建设有限公司"); + list.Add("中国化学工程第十六建设有限公司"); + list.Add("中国化学工程重型机械化有限公司"); + list.Add("中化学交通建设集团有限公司"); + list.Add("中化学(北京)建设投资有限公司"); + list.Add("中化学南方建设投资有限公司"); + list.Add("中化学城市投资有限公司"); + list.Add("中化学生态环境有限公司"); + list.Add("中化学西南工程科技有限公司"); + list.Add("中化学装备科技集团有限公司"); + list.Add("中化学华谊工程科技集团有限公司"); + list.Add("中化学开发建设有限公司"); + + return list; + } + /// + /// 获取参建人数【推送集团】 + /// + /// + public static List GetJoinConstructionPersonPushGroup() + { + var NonLocalUnitNamesList = GetNonLocalUnitNames(); + var result = (from x in Funs.DB.SitePerson_Person + join unit in Funs.DB.Base_Unit on x.UnitId equals unit.UnitId into unitJoin + from unit in unitJoin.DefaultIfEmpty() + where BeUnderConstructionList.Contains(x.ProjectId) && x.IsUsed == true && NonLocalUnitNamesList.Contains(unit.UnitName) == false + select new Model.BaseEntities + { + Id = x.PersonId, + IdentityCard = x.IdentityCard, + ProjectId = x.ProjectId, + UnitId = x.UnitId, + }).ToList(); + return result; + } + /// + /// 获取参建人数(异步)【推送集团】 + /// + /// + public static async Task> GetJoinConstructionPersonPushGroupAsync() + { + return await Task.Run(GetJoinConstructionPersonPushGroup); + } /// /// 获取在施危大工程数 diff --git a/SGGL/Model/ZHGL/DataSync/BaseEntities.cs b/SGGL/Model/ZHGL/DataSync/BaseEntities.cs index 1f9b5084..519cf546 100644 --- a/SGGL/Model/ZHGL/DataSync/BaseEntities.cs +++ b/SGGL/Model/ZHGL/DataSync/BaseEntities.cs @@ -34,6 +34,11 @@ /// 单位编码 /// public string UnitCode { get; set; } + + /// + /// 身份证号码 + /// + public string IdentityCard { get; set; } } } diff --git a/SGGL/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user b/SGGL/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user index 2173f05b..627b67b7 100644 --- a/SGGL/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user +++ b/SGGL/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -86,22 +86,22 @@ 10/28/2024 14:02:50 - 12/24/2025 19:02:32 + 01/07/2026 10:21:13 - 12/24/2025 19:02:32 + 01/07/2026 10:21:13 12/06/2024 20:13:58 - 12/24/2025 19:02:12 + 01/07/2026 10:20:54 12/26/2024 09:46:52 - 12/24/2025 19:02:12 + 01/07/2026 10:20:54 12/18/2020 05:32:28 @@ -128,10 +128,10 @@ 07/25/2012 19:48:56 - 12/24/2025 19:02:06 + 01/07/2026 10:20:48 - 12/24/2025 19:02:06 + 01/07/2026 10:20:48 12/09/2025 18:19:15 @@ -389,13 +389,13 @@ 02/09/2013 00:42:28 - 12/24/2025 19:02:13 + 01/07/2026 10:20:55 - 12/24/2025 19:02:13 + 01/07/2026 10:20:55 - 12/24/2025 19:02:13 + 01/07/2026 10:20:55 01/23/2014 21:57:34 @@ -479,7 +479,7 @@ 10/28/2024 14:02:50 - 12/24/2025 19:02:14 + 01/07/2026 10:20:56 10/28/2024 14:02:50