全量更新人员
This commit is contained in:
		
							parent
							
								
									2f9728e457
								
							
						
					
					
						commit
						303e103a68
					
				|  | @ -816,6 +816,48 @@ namespace WebAPI.Controllers | ||||||
|             } |             } | ||||||
|             return responeData; |             return responeData; | ||||||
|         } |         } | ||||||
|  |         public Model.ResponeData getAllPersonDataExchange(string projectId) | ||||||
|  |         { | ||||||
|  |             var responeData = new Model.ResponeData(); | ||||||
|  |             try | ||||||
|  |             { | ||||||
|  |                 responeData.data = (from x in Funs.DB.SitePerson_Person | ||||||
|  |                                     join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId | ||||||
|  |                                     where x.ProjectId == projectId | ||||||
|  |                                     && !x.ExchangeTime.HasValue | ||||||
|  |                                     && (!x.OutTime.HasValue || x.OutTime > DateTime.Now) && x.InTime.HasValue && x.InTime < DateTime.Now | ||||||
|  |                                     && x.PhotoUrl != null | ||||||
|  |                                     select new | ||||||
|  |                                     { | ||||||
|  |                                         x.PersonId, | ||||||
|  |                                         x.PersonName, | ||||||
|  |                                         x.CardNo, | ||||||
|  |                                         x.IdentityCard, | ||||||
|  |                                         x.UnitId, | ||||||
|  |                                         y.UnitCode, | ||||||
|  |                                         y.UnitName, | ||||||
|  |                                         y.ShortUnitName, | ||||||
|  |                                         Funs.DB.ProjectData_TeamGroup.First(z => z.TeamGroupId == x.TeamGroupId).TeamGroupName, | ||||||
|  |                                         Sex = x.Sex ?? "1", | ||||||
|  |                                         Funs.DB.Base_WorkPost.First(z => z.WorkPostId == x.WorkPostId).WorkPostName, | ||||||
|  |                                         x.Telephone, | ||||||
|  |                                         x.Address, | ||||||
|  |                                         x.InTime, | ||||||
|  |                                         x.AuditorDate, | ||||||
|  |                                         x.ExchangeTime, | ||||||
|  |                                         x.ExchangeTime2, | ||||||
|  |                                         x.PhotoUrl, | ||||||
|  |                                         x.IsUsed | ||||||
|  |                                     }).Take(400).ToList(); | ||||||
|  |             } | ||||||
|  |             catch (Exception ex) | ||||||
|  |             { | ||||||
|  |                 responeData.code = 0; | ||||||
|  |                 responeData.message = ex.Message; | ||||||
|  |                 ErrLogInfo.WriteLog(ex, "WX接口-获取人员下发门禁", "PersonController.getPersonDataExchange"); | ||||||
|  |             } | ||||||
|  |             return responeData; | ||||||
|  |         } | ||||||
|         #endregion |         #endregion | ||||||
| 
 | 
 | ||||||
|         #region 获取离场人员 |         #region 获取离场人员 | ||||||
|  |  | ||||||
|  | @ -132,6 +132,6 @@ namespace WebAPI.Filter | ||||||
|         /// <summary> |         /// <summary> | ||||||
|         ///  |         ///  | ||||||
|         /// </summary> |         /// </summary> | ||||||
|         public static List<string> listeds = new List<string> { "Person*getPersonDataExchange" }; |         public static List<string> listeds = new List<string> { "Person*getPersonDataExchange", "Person*getAllPersonDataExchange" }; | ||||||
|     } |     } | ||||||
| } | } | ||||||
		Loading…
	
		Reference in New Issue