From 4c8861f67bb4b7b6564116c9605585fd43ee9d17 Mon Sep 17 00:00:00 2001 From: 10191 <506754232@qq.com> Date: Tue, 28 Apr 2026 21:22:45 +0800 Subject: [PATCH] 11 --- SGGL/BLL/ZHGL/RealName/SynchroSetService.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs b/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs index 6b75c0a4..87318451 100644 --- a/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs +++ b/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs @@ -1,4 +1,5 @@ -using Newtonsoft.Json; +using Model; +using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System; using System.Collections; @@ -602,7 +603,16 @@ namespace BLL string pushContent = string.Empty; string contenttype = "application/json;charset=unicode"; string url = Funs.RealNameApiUrl + "/foreignApi/baseData/getCollTeam"; - var getProjects = from x in db.RealName_Project where proCode == null || x.ProCode == proCode select x; + List < RealName_Project > getProjects; + if (string.IsNullOrEmpty(proCode)) + { + List proCodes = Funs.DB.Base_Project.Where(x => x.ProjectState == "1" || x.ProjectState == null).Select(x => x.ProjectCode).ToList(); + getProjects = (from x in db.RealName_Project where proCodes.Contains(x.ProCode) select x).ToList(); + } + else + { + getProjects = (from x in db.RealName_Project where x.ProCode == proCode select x).ToList(); + } foreach (var citem in getProjects) { var getProject = new