From 633193b38b094ee2e0651cf64b95fb5b559c8714 Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期四, 31 八月 2023 13:13:11 +0800 Subject: [PATCH] 提交 --- DocumentServiceAPI.Application/ProjectInfo/Services/ProjectInfoService.cs | 32 +++++++++++++++++++++++++++----- 1 files changed, 27 insertions(+), 5 deletions(-) diff --git a/DocumentServiceAPI.Application/ProjectInfo/Services/ProjectInfoService.cs b/DocumentServiceAPI.Application/ProjectInfo/Services/ProjectInfoService.cs index 85207de..f54364c 100644 --- a/DocumentServiceAPI.Application/ProjectInfo/Services/ProjectInfoService.cs +++ b/DocumentServiceAPI.Application/ProjectInfo/Services/ProjectInfoService.cs @@ -1642,7 +1642,7 @@ - public PageResult<Document_TBXYFile> postDocumentTBXYFileList(DocumentProjectInfoPageSearch page) + public PageResult<DocumentTBXYFileDTO> postDocumentTBXYFileList(DocumentProjectInfoPageSearch page) { var aaa = GetJwtInfo(); @@ -1651,7 +1651,7 @@ pg.PageIndex = page.PageIndex; //page.ToEmployeeId = a.EID; int total = 0; - PageResult<Document_TBXYFile> result = new PageResult<Document_TBXYFile>(); + PageResult<DocumentTBXYFileDTO> result = new PageResult<DocumentTBXYFileDTO>(); @@ -1659,8 +1659,10 @@ .Where(a => a.UnitId == page.UnitId && a.ProjectId == page.ProjectId) //鏂囦欢鍚嶇О .WhereIF(!string.IsNullOrEmpty(page.FileName), a => a.FileName.Contains(page.FileName)) + .WhereIF(page.Classification>0, a => a.Classification == page.Classification) + .WhereIF(!string.IsNullOrEmpty(page.FilePath), a => ( a.FilePath !=null && a.FilePath != "")) - .Select(a => new Document_TBXYFile + .Select(a => new DocumentTBXYFileDTO { Id = a.Id, FileName = a.FileName, @@ -1673,11 +1675,24 @@ AdviseFlag = a.AdviseFlag, UserId = a.UserId, Sort = a.Sort, - + Classification = a.Classification, } ) .OrderBy(a => a.Sort).ToPageList(page.PageIndex, page.PageSize, ref total); + + if(result.Items !=null&& result.Items.Count > 0) + { + var doc_Classifications = _db.Queryable<Doc_Classification>().Where(x => x.parent_code == "003").ToList();//鎵ц鏌ヨ + foreach (var item in result.Items) + { + var doc_Classification = doc_Classifications.Where(x => x.id == item.Classification).FirstOrDefault(); + if (doc_Classification != null) + { + item.ClassificationName = doc_Classification.doc_classification; + } + } + } result.TotalCount = total; result.TotalPage = total % page.PageSize == 0 ? total / page.PageSize : total / page.PageSize + 1; @@ -1745,7 +1760,7 @@ UserId = a.UserId, Sort = a.Sort, SaveFlag = a.SaveFlag, - + Classification = a.Classification, }).OrderBy(a => a.Sort).ToList(); return ret; } @@ -1785,5 +1800,12 @@ return true; } + + public List<Doc_Classification> GetDocClassificationList() + { + var ret = _db.Queryable<Doc_Classification>().Where(x => x.parent_code =="003" && x.status == 1).ToList(); + return ret; + } + } } -- Gitblit v1.9.1