From 38aff235316e8d49bf3558bfaa44f4c6ab2b78a4 Mon Sep 17 00:00:00 2001
From: liaoxujun@qq.com <liaoxujun@qq.com>
Date: 星期五, 15 九月 2023 17:26:58 +0800
Subject: [PATCH] 修改权限体系,增加标书信息管理权限分离,分为标书信息管理平台使用,和标书制作管理使用,修改权限表,订单表
---
DocumentServiceAPI.Application/ProjectInfo/Services/ProjectInfoService.cs | 47 ++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 42 insertions(+), 5 deletions(-)
diff --git a/DocumentServiceAPI.Application/ProjectInfo/Services/ProjectInfoService.cs b/DocumentServiceAPI.Application/ProjectInfo/Services/ProjectInfoService.cs
index 85207de..8f1b6d1 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,27 @@
return true;
}
+
+ public List<Doc_Classification> GetDocClassificationList()
+ {
+ var ret = _db.Queryable<Doc_Classification>().Where(x => x.parent_code =="003" && x.status == 1 && x.is_system == true).ToList();
+ return ret;
+ }
+
+ public bool SaveDocumentTBXYFileInfoNotRep(Document_TBXYFile dp)
+ {
+
+ if (dp.Id > 0)
+ {
+ _db.Updateable<Document_TBXYFile>(dp).ExecuteCommand();
+ }
+ else
+ {
+ _db.Insertable<Document_TBXYFile>(dp).ExecuteCommand();
+ }
+
+ return true;
+ }
+
}
}
--
Gitblit v1.9.1