/// <summary> /// 分页获取数据列表(案卷类别表) /// </summary> public PeterPages GetSearch(FileBorrow FileBorrow, int PageIndex, int PageSize, string strCountyId) { PeterPages fy = null; string sqlwhere = " 1=1 "; if (FileBorrow.FileClassID > 0) { sqlwhere = sqlwhere + " and FileClassID like '%" + FileBorrow.FileClassID + "%' "; } if (!string.IsNullOrEmpty(FileBorrow.FileEnterName)) { sqlwhere = sqlwhere + " and FileEnterName like '%" + FileBorrow.FileEnterName + "%' "; } if (strCountyId != "") { sqlwhere = sqlwhere + " and SZQXDM ='" + strCountyId + "' "; } //数据类型 0默认全部[1未归还, 2已归还] if (FileBorrow.SJLX == 1) { sqlwhere = sqlwhere + " and ReturnDate ='' "; } else if (FileBorrow.SJLX == 2) { sqlwhere = sqlwhere + " and ReturnDate <>'' "; } PageInfoNew entity = new PageInfoNew(); entity.Sqlwhere = sqlwhere.Trim(); entity.Tablename = "[FileBorrow]"; //用户表,注意如果是多表可以写成视图进行查询,这里就为视图名称 entity.PageSize = PageSize; entity.Fieldkey = "id"; //主键 entity.Orderfield = " BorrowDate desc,ReturnDate asc"; //排序字段 entity.PageIndex = PageIndex; entity.Fields = "*"; fy = SqlPageList.GetPageLists(entity); return(fy); }
public async Task <NodeEntry> Borrow([FromRoute] FileBorrow input) { return(await _fileService.Borrow(input.NodeId, input.Body.Group, input.Body.User)); }