307 lines
		
	
	
		
			19 KiB
		
	
	
	
		
			C#
		
	
	
	
		
		
			
		
	
	
			307 lines
		
	
	
		
			19 KiB
		
	
	
	
		
			C#
		
	
	
	
|  | using Model; | |||
|  | using System; | |||
|  | using System.Collections.Generic; | |||
|  | using System.Linq; | |||
|  | using System.Text; | |||
|  | using System.Threading.Tasks; | |||
|  | 
 | |||
|  | namespace BLL | |||
|  | { | |||
|  |     public class SubPackSubPackPersonnelService | |||
|  |     { | |||
|  | 
 | |||
|  |         /// <summary> | |||
|  |         /// 劳务班组 下拉框绑定 | |||
|  |         /// </summary> | |||
|  |         public static void DropSelectTeam(FineUIPro.DropDownList dropName, string unitId, string branchTeamListId, string laborTeamId, string projectId, bool isShowPlease) | |||
|  |         { | |||
|  |             Model.SGGLDB db = Funs.DB; | |||
|  |             var unitWorkList = (from x in db.SubPack_BranchTeamListTeam | |||
|  |                                 where x.ProjectId == projectId && (x.UnitId == unitId || unitId == null) && (x.BranchTeamListId == branchTeamListId || branchTeamListId == null) && (x.LaborTeamId == laborTeamId || laborTeamId == null) && (x.State == null || x.State == "" || x.State == "0") | |||
|  |                                 select new | |||
|  |                                 { | |||
|  |                                     BranchTeamListTeamName = x.BranchTeamListTeamName, | |||
|  |                                     BranchTeamListTeamId = x.BranchTeamListTeamId, | |||
|  |                                 }).ToList(); | |||
|  |             dropName.DataValueField = "BranchTeamListTeamId"; | |||
|  |             dropName.DataTextField = "BranchTeamListTeamName"; | |||
|  |             dropName.DataSource = unitWorkList; | |||
|  |             dropName.DataBind(); | |||
|  |             if (isShowPlease) | |||
|  |                 BLL.Funs.FineUIPleaseSelect(dropName); | |||
|  |         } | |||
|  |         /// <summary> | |||
|  |         /// 劳务班组 下拉框绑定 | |||
|  |         /// </summary> | |||
|  |         public static void DropSelectTeamUpdate(FineUIPro.DropDownList dropName, string unitId, string branchTeamListId, string laborTeamId, string projectId, bool isShowPlease) | |||
|  |         { | |||
|  |             Model.SGGLDB db = Funs.DB; | |||
|  |             var unitWorkList = (from x in db.SubPack_BranchTeamListTeam | |||
|  |                                 where x.ProjectId == projectId && (x.UnitId == unitId || unitId == null) && (x.BranchTeamListId == branchTeamListId || branchTeamListId == null) && (x.LaborTeamId == laborTeamId || laborTeamId == null) | |||
|  |                                 select new | |||
|  |                                 { | |||
|  |                                     BranchTeamListTeamName = x.BranchTeamListTeamName, | |||
|  |                                     BranchTeamListTeamId = x.BranchTeamListTeamId, | |||
|  |                                 }).ToList(); | |||
|  |             dropName.DataValueField = "BranchTeamListTeamId"; | |||
|  |             dropName.DataTextField = "BranchTeamListTeamName"; | |||
|  |             dropName.DataSource = unitWorkList; | |||
|  |             dropName.DataBind(); | |||
|  |             if (isShowPlease) | |||
|  |                 BLL.Funs.FineUIPleaseSelect(dropName); | |||
|  |         } | |||
|  |         /// <summary> | |||
|  |         /// 新增 | |||
|  |         /// </summary> | |||
|  |         /// <param name="subPackSubPackPersonnel">劳务人员信息</param> | |||
|  |         public static void AddSubPackSubPackPersonnel(Model.SubPack_SubPackPersonnel subPackSubPackPersonnel) | |||
|  |         { | |||
|  |             Model.SGGLDB db = Funs.DB; | |||
|  |             db.SubPack_SubPackPersonnel.InsertOnSubmit(subPackSubPackPersonnel); | |||
|  | 
 | |||
|  |             //往公司级base_SubPackPersonnel表写入数据 | |||
|  |             var v_subPackTeamList = db.View_SubPack_TeamList.FirstOrDefault(p => p.SubPackTeamListDetailID == subPackSubPackPersonnel.BranchTeamListId); | |||
|  |             //通过身份证找到公司级劳务公司的对象 | |||
|  |             var branchTeamList = db.Base_BranchTeamList.FirstOrDefault(p => p.CorporateIDCard == v_subPackTeamList.CorporateIDCard); | |||
|  |             //通过项目级劳务队伍找到项目级劳务队伍对象 | |||
|  |             var SubPackLaborTeam = db.SubPack_LaborTeam.FirstOrDefault(p => p.LaborTeamId == subPackSubPackPersonnel.LaborTeamId); | |||
|  |             //通过项目级劳务队伍对象中的身份证找到公司级劳务队伍对象 | |||
|  |             var basePackLaborTeam = db.Base_LaborTeam.FirstOrDefault(p => p.CaptainIDCard == SubPackLaborTeam.CaptainIDCard); | |||
|  |             //先找到项目级劳务班组对象 | |||
|  |             var subPackBz = db.SubPack_BranchTeamListTeam.FirstOrDefault(p => p.BranchTeamListTeamId == subPackSubPackPersonnel.BranchTeamListTeamId); | |||
|  |             //通过项目级劳务班组对象的身份证找公司级劳务班组对象 | |||
|  |             var baseBz = db.Base_BranchTeamListTeam.FirstOrDefault(p => p.MonitorIDCard == subPackBz.MonitorIDCard); | |||
|  | 
 | |||
|  |             //项通过项目级劳务人员身份证号查询公司级劳务人员是否存在,存在修改,不存在添加 | |||
|  |             var baseSubPackPersonnel = db.Base_SubPackPersonnel.FirstOrDefault(p => p.IdentityCard == subPackSubPackPersonnel.IdentityCard); | |||
|  |             if (baseSubPackPersonnel == null) | |||
|  |             { | |||
|  |                 Model.Base_SubPackPersonnel newBaseSubPackPersonnel = new Model.Base_SubPackPersonnel(); | |||
|  |                 newBaseSubPackPersonnel.SubPackPersonnelID = SQLHelper.GetNewID(typeof(Model.Base_SubPackPersonnel)); | |||
|  |                 newBaseSubPackPersonnel.PersonName = subPackSubPackPersonnel.PersonName; | |||
|  |                 newBaseSubPackPersonnel.IdentityCard = subPackSubPackPersonnel.IdentityCard; | |||
|  |                 newBaseSubPackPersonnel.LaborServicesCompany = subPackSubPackPersonnel.LaborServicesCompany; | |||
|  |                 newBaseSubPackPersonnel.UnitId = subPackSubPackPersonnel.UnitId; | |||
|  |                 if (branchTeamList != null) | |||
|  |                     newBaseSubPackPersonnel.BranchTeamListId = branchTeamList.BranchTeamListId; | |||
|  |                 if (baseBz != null) | |||
|  |                     newBaseSubPackPersonnel.BranchTeamListTeamId = baseBz.BranchTeamListTeamId; | |||
|  |                 newBaseSubPackPersonnel.Remark = subPackSubPackPersonnel.Remark; | |||
|  |                 newBaseSubPackPersonnel.SortIndex = subPackSubPackPersonnel.SortIndex; | |||
|  |                 if (basePackLaborTeam != null) | |||
|  |                     newBaseSubPackPersonnel.LaborTeamId = basePackLaborTeam.LaborTeamId; | |||
|  |                 db.Base_SubPackPersonnel.InsertOnSubmit(newBaseSubPackPersonnel);                 | |||
|  |             } | |||
|  |             //else | |||
|  |             //{ | |||
|  |             //    baseSubPackPersonnel.PersonName = subPackSubPackPersonnel.PersonName; | |||
|  |             //    baseSubPackPersonnel.IdentityCard = subPackSubPackPersonnel.IdentityCard; | |||
|  |             //    baseSubPackPersonnel.LaborServicesCompany = subPackSubPackPersonnel.LaborServicesCompany; | |||
|  |             //    baseSubPackPersonnel.UnitId = subPackSubPackPersonnel.UnitId; | |||
|  |             //    if (branchTeamList != null) | |||
|  |             //        baseSubPackPersonnel.BranchTeamListId = branchTeamList.BranchTeamListId; | |||
|  |             //    if (baseBz != null) | |||
|  |             //        baseSubPackPersonnel.BranchTeamListTeamId = baseBz.BranchTeamListTeamId; | |||
|  |             //    baseSubPackPersonnel.Remark = subPackSubPackPersonnel.Remark; | |||
|  |             //    baseSubPackPersonnel.SortIndex = subPackSubPackPersonnel.SortIndex; | |||
|  |             //    if (basePackLaborTeam != null) | |||
|  |             //        baseSubPackPersonnel.LaborTeamId = basePackLaborTeam.LaborTeamId; | |||
|  |             //} | |||
|  | 
 | |||
|  |             db.SubmitChanges(); | |||
|  |         } | |||
|  | 
 | |||
|  |         /// <summary> | |||
|  |         /// 批量新增 | |||
|  |         /// </summary> | |||
|  |         /// <param name="subPackSubPackPersonnels">劳务人员信息列表</param> | |||
|  |         public static void AddSubPackSubPackPersonnel(List<Model.SubPack_SubPackPersonnel> subPackSubPackPersonnels) | |||
|  |         { | |||
|  |             Model.SGGLDB db = Funs.DB; | |||
|  |             db.SubPack_SubPackPersonnel.InsertAllOnSubmit(subPackSubPackPersonnels); | |||
|  | 
 | |||
|  |             List<Model.Base_SubPackPersonnel> AddBaseSubPackPersonnelList = new List<Model.Base_SubPackPersonnel>(); | |||
|  |             foreach (var subPackSubPackPersonnel in subPackSubPackPersonnels) | |||
|  |             { | |||
|  |                 //往公司级base_SubPackPersonnel表写入数据 | |||
|  |                 var v_subPackTeamList = db.View_SubPack_TeamList.FirstOrDefault(p => p.SubPackTeamListDetailID == subPackSubPackPersonnel.BranchTeamListId); | |||
|  |                 //通过身份证找到公司级劳务公司的对象 | |||
|  |                 var branchTeamList = db.Base_BranchTeamList.FirstOrDefault(p => p.CorporateIDCard == v_subPackTeamList.CorporateIDCard); | |||
|  |                 //通过项目级劳务队伍找到项目级劳务队伍对象 | |||
|  |                 var SubPackLaborTeam = db.SubPack_LaborTeam.FirstOrDefault(p => p.LaborTeamId == subPackSubPackPersonnel.LaborTeamId); | |||
|  |                 //通过项目级劳务队伍对象中的身份证找到公司级劳务队伍对象 | |||
|  |                 var basePackLaborTeam = db.Base_LaborTeam.FirstOrDefault(p => p.CaptainIDCard == SubPackLaborTeam.CaptainIDCard); | |||
|  |                 //先找到项目级劳务班组对象 | |||
|  |                 var subPackBz = db.SubPack_BranchTeamListTeam.FirstOrDefault(p => p.BranchTeamListTeamId == subPackSubPackPersonnel.BranchTeamListTeamId); | |||
|  |                 //通过项目级劳务班组对象的身份证找公司级劳务班组对象 | |||
|  |                 var baseBz = db.Base_BranchTeamListTeam.FirstOrDefault(p => p.MonitorIDCard == subPackBz.MonitorIDCard); | |||
|  | 
 | |||
|  |                 //项通过项目级劳务人员身份证号查询公司级劳务人员是否存在,存在修改,不存在添加 | |||
|  |                 var baseSubPackPersonnel = db.Base_SubPackPersonnel.FirstOrDefault(p => p.IdentityCard == subPackSubPackPersonnel.IdentityCard); | |||
|  |                 if (baseSubPackPersonnel == null) | |||
|  |                 { | |||
|  |                     Model.Base_SubPackPersonnel newBaseSubPackPersonnel = new Model.Base_SubPackPersonnel(); | |||
|  |                     newBaseSubPackPersonnel.SubPackPersonnelID = SQLHelper.GetNewID(typeof(Model.Base_SubPackPersonnel)); | |||
|  |                     newBaseSubPackPersonnel.PersonName = subPackSubPackPersonnel.PersonName; | |||
|  |                     newBaseSubPackPersonnel.IdentityCard = subPackSubPackPersonnel.IdentityCard; | |||
|  |                     newBaseSubPackPersonnel.LaborServicesCompany = subPackSubPackPersonnel.LaborServicesCompany; | |||
|  |                     newBaseSubPackPersonnel.UnitId = subPackSubPackPersonnel.UnitId; | |||
|  |                     if (branchTeamList != null) | |||
|  |                         newBaseSubPackPersonnel.BranchTeamListId = branchTeamList.BranchTeamListId; | |||
|  |                     if (baseBz != null) | |||
|  |                         newBaseSubPackPersonnel.BranchTeamListTeamId = baseBz.BranchTeamListTeamId; | |||
|  |                     newBaseSubPackPersonnel.Remark = subPackSubPackPersonnel.Remark; | |||
|  |                     newBaseSubPackPersonnel.SortIndex = subPackSubPackPersonnel.SortIndex; | |||
|  |                     if (basePackLaborTeam != null) | |||
|  |                         newBaseSubPackPersonnel.LaborTeamId = basePackLaborTeam.LaborTeamId; | |||
|  | 
 | |||
|  |                     AddBaseSubPackPersonnelList.Add(newBaseSubPackPersonnel);                    | |||
|  |                 } | |||
|  |                 //else | |||
|  |                 //{ | |||
|  |                 //    baseSubPackPersonnel.PersonName = subPackSubPackPersonnel.PersonName; | |||
|  |                 //    baseSubPackPersonnel.IdentityCard = subPackSubPackPersonnel.IdentityCard; | |||
|  |                 //    baseSubPackPersonnel.LaborServicesCompany = subPackSubPackPersonnel.LaborServicesCompany; | |||
|  |                 //    baseSubPackPersonnel.UnitId = subPackSubPackPersonnel.UnitId; | |||
|  |                 //    if (branchTeamList != null) | |||
|  |                 //        baseSubPackPersonnel.BranchTeamListId = branchTeamList.BranchTeamListId; | |||
|  |                 //    if (baseBz != null) | |||
|  |                 //        baseSubPackPersonnel.BranchTeamListTeamId = baseBz.BranchTeamListTeamId; | |||
|  |                 //    baseSubPackPersonnel.Remark = subPackSubPackPersonnel.Remark; | |||
|  |                 //    baseSubPackPersonnel.SortIndex = subPackSubPackPersonnel.SortIndex; | |||
|  |                 //    if (basePackLaborTeam != null) | |||
|  |                 //        baseSubPackPersonnel.LaborTeamId = basePackLaborTeam.LaborTeamId; | |||
|  |                 //} | |||
|  |             } | |||
|  |             if (AddBaseSubPackPersonnelList.Count > 0) | |||
|  |                 db.Base_SubPackPersonnel.InsertAllOnSubmit(AddBaseSubPackPersonnelList); | |||
|  |             db.SubmitChanges(); | |||
|  |         } | |||
|  | 
 | |||
|  |         /// <summary> | |||
|  |         /// 修改 | |||
|  |         /// </summary> | |||
|  |         /// <param name="subPackSubPackPersonnel">劳务人员信息</param> | |||
|  |         public static void UpdateSubPackSubPackPersonnel(Model.SubPack_SubPackPersonnel subPackSubPackPersonnel) | |||
|  |         { | |||
|  |             Model.SGGLDB db = Funs.DB; | |||
|  |             var updateItem = db.SubPack_SubPackPersonnel.FirstOrDefault(p => p.SubPackPersonnelID == subPackSubPackPersonnel.SubPackPersonnelID); | |||
|  |             updateItem.ProjectId = subPackSubPackPersonnel.ProjectId; | |||
|  |             updateItem.PersonName = subPackSubPackPersonnel.PersonName; | |||
|  |             updateItem.IdentityCard = subPackSubPackPersonnel.IdentityCard; | |||
|  |             updateItem.LaborServicesCompany = subPackSubPackPersonnel.LaborServicesCompany; | |||
|  |             updateItem.UnitId = subPackSubPackPersonnel.UnitId; | |||
|  |             updateItem.BranchTeamListId = subPackSubPackPersonnel.BranchTeamListId; | |||
|  |             updateItem.BranchTeamListTeamId = subPackSubPackPersonnel.BranchTeamListTeamId; | |||
|  |             updateItem.Remark = subPackSubPackPersonnel.Remark; | |||
|  |             updateItem.SortIndex = subPackSubPackPersonnel.SortIndex; | |||
|  |             updateItem.State = subPackSubPackPersonnel.State; | |||
|  | 
 | |||
|  |             //往公司级base_SubPackPersonnel表写入数据 | |||
|  |             var v_subPackTeamList = db.View_SubPack_TeamList.FirstOrDefault(p => p.SubPackTeamListDetailID == subPackSubPackPersonnel.BranchTeamListId); | |||
|  |             //通过身份证找到公司级劳务公司的对象 | |||
|  |             var branchTeamList = db.Base_BranchTeamList.FirstOrDefault(p => p.CorporateIDCard == v_subPackTeamList.CorporateIDCard); | |||
|  |             //通过项目级劳务队伍找到项目级劳务队伍对象 | |||
|  |             var SubPackLaborTeam = db.SubPack_LaborTeam.FirstOrDefault(p => p.LaborTeamId == subPackSubPackPersonnel.LaborTeamId); | |||
|  |             //通过项目级劳务队伍对象中的身份证找到公司级劳务队伍对象 | |||
|  |             var basePackLaborTeam = db.Base_LaborTeam.FirstOrDefault(p => p.CaptainIDCard == SubPackLaborTeam.CaptainIDCard); | |||
|  |             //先找到项目级劳务班组对象 | |||
|  |             var subPackBz = db.SubPack_BranchTeamListTeam.FirstOrDefault(p => p.BranchTeamListTeamId == subPackSubPackPersonnel.BranchTeamListTeamId); | |||
|  |             //通过项目级劳务班组对象的身份证找公司级劳务班组对象 | |||
|  |             var baseBz = db.Base_BranchTeamListTeam.FirstOrDefault(p => p.MonitorIDCard == subPackBz.MonitorIDCard); | |||
|  | 
 | |||
|  |             //项通过项目级劳务人员身份证号查询公司级劳务人员是否存在,存在修改,不存在添加 | |||
|  |             var baseSubPackPersonnel = db.Base_SubPackPersonnel.FirstOrDefault(p => p.IdentityCard == subPackSubPackPersonnel.IdentityCard); | |||
|  |             if (baseSubPackPersonnel == null) | |||
|  |             { | |||
|  |                 Model.Base_SubPackPersonnel newBaseSubPackPersonnel = new Model.Base_SubPackPersonnel(); | |||
|  |                 newBaseSubPackPersonnel.SubPackPersonnelID = SQLHelper.GetNewID(typeof(Model.Base_SubPackPersonnel)); | |||
|  |                 newBaseSubPackPersonnel.PersonName = subPackSubPackPersonnel.PersonName; | |||
|  |                 newBaseSubPackPersonnel.IdentityCard = subPackSubPackPersonnel.IdentityCard; | |||
|  |                 newBaseSubPackPersonnel.LaborServicesCompany = subPackSubPackPersonnel.LaborServicesCompany; | |||
|  |                 newBaseSubPackPersonnel.UnitId = subPackSubPackPersonnel.UnitId; | |||
|  |                 if (branchTeamList != null) | |||
|  |                     newBaseSubPackPersonnel.BranchTeamListId = branchTeamList.BranchTeamListId; | |||
|  |                 if (baseBz != null) | |||
|  |                     newBaseSubPackPersonnel.BranchTeamListTeamId = baseBz.BranchTeamListTeamId; | |||
|  |                 newBaseSubPackPersonnel.Remark = subPackSubPackPersonnel.Remark; | |||
|  |                 newBaseSubPackPersonnel.SortIndex = subPackSubPackPersonnel.SortIndex; | |||
|  |                 if (basePackLaborTeam != null) | |||
|  |                     newBaseSubPackPersonnel.LaborTeamId = basePackLaborTeam.LaborTeamId; | |||
|  |                 db.Base_SubPackPersonnel.InsertOnSubmit(newBaseSubPackPersonnel);                | |||
|  |             } | |||
|  |             //else | |||
|  |             //{ | |||
|  |             //    baseSubPackPersonnel.PersonName = subPackSubPackPersonnel.PersonName; | |||
|  |             //    baseSubPackPersonnel.IdentityCard = subPackSubPackPersonnel.IdentityCard; | |||
|  |             //    baseSubPackPersonnel.LaborServicesCompany = subPackSubPackPersonnel.LaborServicesCompany; | |||
|  |             //    baseSubPackPersonnel.UnitId = subPackSubPackPersonnel.UnitId; | |||
|  |             //    if (branchTeamList != null) | |||
|  |             //        baseSubPackPersonnel.BranchTeamListId = branchTeamList.BranchTeamListId; | |||
|  |             //    if (baseBz != null) | |||
|  |             //        baseSubPackPersonnel.BranchTeamListTeamId = baseBz.BranchTeamListTeamId; | |||
|  |             //    baseSubPackPersonnel.Remark = subPackSubPackPersonnel.Remark; | |||
|  |             //    baseSubPackPersonnel.SortIndex = subPackSubPackPersonnel.SortIndex; | |||
|  |             //    if (basePackLaborTeam != null) | |||
|  |             //        baseSubPackPersonnel.LaborTeamId = basePackLaborTeam.LaborTeamId; | |||
|  |             //} | |||
|  | 
 | |||
|  |             db.SubmitChanges(); | |||
|  |         } | |||
|  | 
 | |||
|  |         /// <summary> | |||
|  |         /// 删除 | |||
|  |         /// </summary> | |||
|  |         /// <param name="subPackPersonnelID">主表主键</param> | |||
|  |         public static void DeleteSubPackSubPackPersonnel(string subPackPersonnelID) | |||
|  |         { | |||
|  |             Model.SGGLDB db = Funs.DB; | |||
|  |             var deleteItem = db.SubPack_SubPackPersonnel.FirstOrDefault(p => p.SubPackPersonnelID == subPackPersonnelID); | |||
|  |             string identityCard = deleteItem.IdentityCard; | |||
|  |             //删除主表 | |||
|  |             db.SubPack_SubPackPersonnel.DeleteOnSubmit(deleteItem); | |||
|  |             db.SubmitChanges(); | |||
|  | 
 | |||
|  |             //删除黑名单 | |||
|  |             var backItems = db.SubPack_Blacklist.Where(p => p.BlackForeignKey == subPackPersonnelID && p.BlackType == Const.SubPackBlackListPersonnel && p.IDCard == identityCard); | |||
|  |             if (backItems.Count() > 0) | |||
|  |             { | |||
|  |                 db.SubPack_Blacklist.DeleteAllOnSubmit(backItems); | |||
|  |                 db.SubmitChanges(); | |||
|  |             } | |||
|  | 
 | |||
|  | 
 | |||
|  |             //删除公司级的劳务人员信息 | |||
|  |             if (db.SubPack_SubPackPersonnel.Where(p => p.IdentityCard == identityCard).Count() <= 0) { | |||
|  |                 var deleteBaseItems = db.Base_SubPackPersonnel.Where(p => p.IdentityCard == identityCard); | |||
|  |                 if (deleteBaseItems.Count() > 0) { | |||
|  |                     db.Base_SubPackPersonnel.DeleteAllOnSubmit(deleteBaseItems); | |||
|  |                     db.SubmitChanges(); | |||
|  |                 } | |||
|  |             } | |||
|  |         } | |||
|  | 
 | |||
|  |         /// <summary> | |||
|  |         /// 根据身份证号Id获取人员数量 | |||
|  |         /// </summary> | |||
|  |         /// <param name="identityCard">身份证号</param> | |||
|  |         /// <returns>人员数量</returns> | |||
|  |         public static int GetPersonCountByIdentityCard(string identityCard, string projectId) | |||
|  |         { | |||
|  |             var q = Funs.DB.SubPack_SubPackPersonnel.Where(x => x.IdentityCard == identityCard && x.ProjectId == projectId).ToList(); | |||
|  |             return q.Count; | |||
|  |         } | |||
|  | 
 | |||
|  |         /// <summary> | |||
|  |         /// 修改时判断根据身份证号Id获取人员数量 | |||
|  |         /// </summary> | |||
|  |         /// <param name="identityCard">身份证号</param> | |||
|  |         /// <returns>人员数量</returns> | |||
|  |         public static int GetPersonCountByIdentityCard(string identityCard, string subPackPersonnelID, string projectId) | |||
|  |         { | |||
|  |             var q = Funs.DB.SubPack_SubPackPersonnel.Where(x => x.IdentityCard == identityCard && x.ProjectId == projectId && x.SubPackPersonnelID != subPackPersonnelID).ToList(); | |||
|  |             return q.Count; | |||
|  |         } | |||
|  |     } | |||
|  | } |