| | |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_DTO.Telescopic; |
| | | using WIDESEAWCS_ITelescopicService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | |
| | | // return base.GetPageData(options); |
| | | //} |
| | | |
| | | <<<<<<< Updated upstream |
| | | ======= |
| | | public WebResponseContent LoginRecord(PaginationDTO pagination) |
| | | { |
| | | try |
| | | { |
| | | int totalCount = 0; |
| | | |
| | | var sys = _user.Db.Queryable<Sys_User>(); |
| | | var main = Db.Queryable<Dt_Loginhsy>(); |
| | | |
| | | var query = sys.InnerJoin<Dt_Loginhsy>((a, b) => a.UserName == b.UserName); |
| | | if (!string.IsNullOrEmpty(pagination.searchKeyword)) |
| | | { |
| | | query = query.Where((a, b) => |
| | | a.UserTrueName.Contains(pagination.searchKeyword) || |
| | | a.Userteam.Contains(pagination.searchKeyword) || |
| | | b.OpCenten.Contains(pagination.searchKeyword) |
| | | ); |
| | | } |
| | | if (pagination.startDate.HasValue && pagination.endDate.HasValue) |
| | | { |
| | | query = query.Where((a, b) => b.LoginTiem >= pagination.startDate.Value && b.LoginTiem <= pagination.endDate.Value);//ç»å
¥æ¶é´ |
| | | } |
| | | var result=query |
| | | .Select((a, b) => new |
| | | { |
| | | a.User_Id, |
| | | a.UserTrueName, |
| | | a.Userteam, |
| | | a.HeadImageUrl, |
| | | b.LoginTiem, |
| | | b.OutTiem, |
| | | b.OpCenten, |
| | | }).ToPageList(pagination.pageIndex, pagination.pageSize, ref totalCount); |
| | | return new WebResponseContent |
| | | { |
| | | Status = true, |
| | | Data = new |
| | | { |
| | | TotalCount = totalCount,//æ»æ° |
| | | PageIndex = pagination.pageIndex,//é¡µæ° |
| | | PageSize = pagination.pageSize,//ä¸é¡µå¤å°ä¸ªæ°æ® |
| | | Items = result |
| | | } |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | |
| | | return new WebResponseContent { Status = true, Message = "é误" + ex }; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | public WebResponseContent OutLoginTime(int id) |
| | | { |
| | | try |
| | | { |
| | | var log = BaseDal.QueryFirst(x => x.ID == id); |
| | | if (log==null) |
| | | { |
| | | return new WebResponseContent { Status = false, Message = "失败" }; |
| | | } |
| | | log.OutTiem = DateTime.Now; |
| | | BaseDal.UpdateData(log); |
| | | return new WebResponseContent { Status = true, Data = log.OutTiem }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | |
| | | return new WebResponseContent { Status = false, Message = "é误信æ¯"+ex }; |
| | | } |
| | | } |
| | | >>>>>>> Stashed changes |
| | | } |
| | | |
| | | } |