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/ViewMode/DocumentTBXYFileDTO.cs            |  130 ++++++++++++++++++++++++++++++++
 DocumentServiceAPI.Application/ProjectInfo/ViewMode/DocumentProjectInfoDTO.cs         |    5 +
 DocumentServiceAPI.Application/ProjectInfo/ProjectInfoController.cs                   |   11 ++
 DocumentServiceAPI.Application/ProjectInfo/Services/ProjectInfoService.cs             |   32 ++++++-
 DocumentServiceAPI.Model/cyDocumentModel/Document_TBXYFile.cs                         |    8 +
 DocumentServiceAPI.Application/ProjectInfo/Services/Interfaces/IProjectInfoService.cs |    5 +
 6 files changed, 182 insertions(+), 9 deletions(-)

diff --git a/DocumentServiceAPI.Application/ProjectInfo/ProjectInfoController.cs b/DocumentServiceAPI.Application/ProjectInfo/ProjectInfoController.cs
index 1ce0cde..b217782 100644
--- a/DocumentServiceAPI.Application/ProjectInfo/ProjectInfoController.cs
+++ b/DocumentServiceAPI.Application/ProjectInfo/ProjectInfoController.cs
@@ -471,7 +471,7 @@
         /// </summary>
         /// <param name="page"></param>
         /// <returns></returns>
-        public PageResult<Document_TBXYFile> postDocumentTBXYFileList(DocumentProjectInfoPageSearch page)
+        public PageResult<DocumentTBXYFileDTO> postDocumentTBXYFileList(DocumentProjectInfoPageSearch page)
         {
             return _projectInfoService.postDocumentTBXYFileList(page);
         }
@@ -550,5 +550,14 @@
         {
             return _projectInfoService.SaveFileInfo(dp);
         }
+
+
+        /// <summary>
+        /// 鑾峰彇鏂规绫诲埆GetOtherCompanyTenderInfoList
+        /// </summary>
+        public List<Doc_Classification> GetDocClassificationList()
+        {
+            return _projectInfoService.GetDocClassificationList();
+        }
     }
 }
diff --git a/DocumentServiceAPI.Application/ProjectInfo/Services/Interfaces/IProjectInfoService.cs b/DocumentServiceAPI.Application/ProjectInfo/Services/Interfaces/IProjectInfoService.cs
index dce64ad..50ddd30 100644
--- a/DocumentServiceAPI.Application/ProjectInfo/Services/Interfaces/IProjectInfoService.cs
+++ b/DocumentServiceAPI.Application/ProjectInfo/Services/Interfaces/IProjectInfoService.cs
@@ -100,7 +100,7 @@
         public bool SaveDocumentZhaobiaoFileInfo(Document_ZhaobiaoFile dp);
 
 
-        public PageResult<Document_TBXYFile> postDocumentTBXYFileList(DocumentProjectInfoPageSearch page);
+        public PageResult<DocumentTBXYFileDTO> postDocumentTBXYFileList(DocumentProjectInfoPageSearch page);
 
         public Document_TBXYFile GetDocumentTBXYFileInfo(int ID);
 
@@ -116,5 +116,8 @@
         public int SaveDocInfo(Doc_Info dp);
 
         public bool SaveFileInfo(File_Info dp);
+
+
+        public List<Doc_Classification> GetDocClassificationList(); 
     }
 }
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;
+        }
+
     }
 }
diff --git a/DocumentServiceAPI.Application/ProjectInfo/ViewMode/DocumentProjectInfoDTO.cs b/DocumentServiceAPI.Application/ProjectInfo/ViewMode/DocumentProjectInfoDTO.cs
index 4725daa..4b92ef8 100644
--- a/DocumentServiceAPI.Application/ProjectInfo/ViewMode/DocumentProjectInfoDTO.cs
+++ b/DocumentServiceAPI.Application/ProjectInfo/ViewMode/DocumentProjectInfoDTO.cs
@@ -57,6 +57,9 @@
         public string txtEmployeeId { get; set; }
         public string projectName { get; set; }
         public string txtWorkItem { get; set; }
+        public int Classification { get; set; }
+
+        public string FilePath { get; set; }
 
     }
     public class DocumentProjectInfoDTO
@@ -449,5 +452,7 @@
         /// </summary>           
         public int CountyId { get; set; }
 
+     
+
     }
 }
diff --git a/DocumentServiceAPI.Application/ProjectInfo/ViewMode/DocumentTBXYFileDTO.cs b/DocumentServiceAPI.Application/ProjectInfo/ViewMode/DocumentTBXYFileDTO.cs
new file mode 100644
index 0000000..7ddf2c2
--- /dev/null
+++ b/DocumentServiceAPI.Application/ProjectInfo/ViewMode/DocumentTBXYFileDTO.cs
@@ -0,0 +1,130 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace DocumentServiceAPI.Application.ProjectInfo.ViewMode
+{
+    public class DocumentTBXYFileDTO
+    {
+        public DocumentTBXYFileDTO()
+        {
+
+
+        }
+        /// <summary>
+        /// Desc:
+        /// Default:
+        /// Nullable:False
+        /// </summary>           
+        public int Id { get; set; }
+
+        /// <summary>
+        /// Desc:
+        /// Default:
+        /// Nullable:False
+        /// </summary>           
+        public string FileName { get; set; }
+
+        /// <summary>
+        /// Desc:
+        /// Default:
+        /// Nullable:False
+        /// </summary>           
+        public string FilePath { get; set; }
+
+        /// <summary>
+        /// Desc:
+        /// Default:
+        /// Nullable:True
+        /// </summary>           
+        public string FileVersionNo { get; set; }
+
+        /// <summary>
+        /// Desc:
+        /// Default:
+        /// Nullable:True
+        /// </summary>           
+        public int? FileSize { get; set; }
+
+        /// <summary>
+        /// Desc:
+        /// Default:
+        /// Nullable:False
+        /// </summary>           
+        public int UnitId { get; set; }
+
+        /// <summary>
+        /// Desc:
+        /// Default:
+        /// Nullable:True
+        /// </summary>           
+        public DateTime? LastUpdateTime { get; set; }
+
+        /// <summary>
+        /// Desc:
+        /// Default:
+        /// Nullable:True
+        /// </summary>           
+        public string LastUpdateName { get; set; }
+
+        /// <summary>
+        /// Desc:
+        /// Default:
+        /// Nullable:True
+        /// </summary>           
+        public int? AdviseFlag { get; set; }
+
+        /// <summary>
+        /// Desc:
+        /// Default:
+        /// Nullable:True
+        /// </summary>           
+        public int? UserId { get; set; }
+
+        /// <summary>
+        /// Desc:
+        /// Default:
+        /// Nullable:True
+        /// </summary>           
+        public int? ProjectId { get; set; }
+
+        /// <summary>
+        /// Desc:
+        /// Default:
+        /// Nullable:True
+        /// </summary>           
+        public string FileContent { get; set; }
+
+        /// <summary>
+        /// Desc:
+        /// Default:
+        /// Nullable:True
+        /// </summary>           
+        public int? Sort { get; set; }
+
+        /// <summary>
+        /// Desc:
+        /// Default:
+        /// Nullable:True
+        /// </summary>           
+        public string FileContentRTF { get; set; }
+
+        /// <summary>
+        /// Desc:
+        /// Default:
+        /// Nullable:True
+        /// </summary>           
+        public int? SaveFlag { get; set; }
+
+        /// <summary>
+        /// Desc:
+        /// Default:
+        /// Nullable:True
+        /// </summary>           
+        public int? Classification { get; set; }
+
+        public string ClassificationName { get; set; }
+    }
+}
diff --git a/DocumentServiceAPI.Model/cyDocumentModel/Document_TBXYFile.cs b/DocumentServiceAPI.Model/cyDocumentModel/Document_TBXYFile.cs
index 3c7feb3..a17d7ec 100644
--- a/DocumentServiceAPI.Model/cyDocumentModel/Document_TBXYFile.cs
+++ b/DocumentServiceAPI.Model/cyDocumentModel/Document_TBXYFile.cs
@@ -126,7 +126,11 @@
         /// </summary>           
         public int? SaveFlag { get; set; }
 
-        
-
+        /// <summary>
+        /// Desc:
+        /// Default:
+        /// Nullable:True
+        /// </summary>           
+        public int? Classification { get; set; }
     }
 }

--
Gitblit v1.9.1