From 3f4013e9283d1fe29ef40cc8b4d7ee7a590a1590 Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期二, 17 十月 2023 09:26:40 +0800 Subject: [PATCH] 最新代码 --- DocumentServiceAPI.Model/cyDocumentModel/Doc_Info.cs | 5 DocumentServiceAPI.Application/WorkRemind/ViewMode/DocumentWorkRemindDTO.cs | 21 + DocumentServiceAPI.Application/DocManage/Services/DocumentManageService.cs | 12 DocumentServiceAPI.Application/DocManage/Dtos/Document_List_Dto.cs | 12 DocumentServiceAPI.Application/ProjectInfo/ViewMode/DocumentProjectInfoDTO.cs | 4 DocumentServiceAPI.Application/DocManage/DocumentManageAppService.cs | 317 +++++++++++++++- DocumentServiceAPI.Application/WorkRemind/WorkRemindController.cs | 2 DocumentServiceAPI.Application/WorkRemind/dto/Mapper.cs | 7 DocumentServiceAPI.Model/cyDocumentModel/Document_WorkRemind.cs | 14 DocumentServiceAPI.Application/WorkRemind/Services/Interfaces/IWorkRemindService.cs | 2 DocumentServiceAPI.Application/WorkRemind/Services/WorkRemindService.cs | 53 ++ DocumentServiceAPI.Application/ProjectInfo/ProjectInfoController.cs | 141 +++++++ DocumentServiceAPI.Application/ProjectInfo/Services/ProjectInfoService.cs | 301 ++++++++++++++++ DocumentServiceAPI.Model/cyDocumentModel/Doc_ClassDel.cs | 41 ++ DocumentServiceAPI.Application/DocManage/Dtos/Achievement_Submit_Dto.cs | 11 DocumentServiceAPI.Model/cyDocumentModel/Doc_Achievement.cs | 5 DocumentServiceAPI.Application/ProjectInfo/Services/Interfaces/IProjectInfoService.cs | 32 + DocumentServiceAPI.Application/DocManage/DocClassificationManageAppService.cs | 10 DocumentServiceAPI.Application/ProjectInfo/ViewMode/DocClassificationDTO.cs | 65 +++ DocumentServiceAPI.Application/ProjectInfo/Services/SheZhiService.cs | 2 20 files changed, 992 insertions(+), 65 deletions(-) diff --git a/DocumentServiceAPI.Application/DocManage/DocClassificationManageAppService.cs b/DocumentServiceAPI.Application/DocManage/DocClassificationManageAppService.cs index 7aebb93..71e816c 100644 --- a/DocumentServiceAPI.Application/DocManage/DocClassificationManageAppService.cs +++ b/DocumentServiceAPI.Application/DocManage/DocClassificationManageAppService.cs @@ -1,5 +1,6 @@ 锘縰sing DocumentServiceAPI.Application.DocManage.Dtos; using DocumentServiceAPI.Application.DocManage.Services; +using DocumentServiceAPI.Application.ProjectInfo.Services.Interfaces; using DocumentServiceAPI.Model.cyDocumentModel; using DocumentServiceAPI.Utility; @@ -11,10 +12,11 @@ public class DocClassificationManageAppService : IDynamicApiController { private readonly DocClassificationService _classificationService; - - public DocClassificationManageAppService(DocClassificationService classificationService) + private readonly IProjectInfoService _projectInfoService; + public DocClassificationManageAppService(DocClassificationService classificationService, IProjectInfoService projectInfoService) { _classificationService = classificationService; + _projectInfoService = projectInfoService; } /// <summary> @@ -113,9 +115,9 @@ /// </summary> /// <param name="id"></param> /// <returns></returns> - public async Task<IActionResult> PostDelInfo(int id) + public IActionResult PostDelInfo(int id) { - var msg = await _classificationService.DeleteByIdAsync(id); + var msg = _projectInfoService.GetDeleteDocClassification(id); return new JsonResult(msg); } } diff --git a/DocumentServiceAPI.Application/DocManage/DocumentManageAppService.cs b/DocumentServiceAPI.Application/DocManage/DocumentManageAppService.cs index 7a19cf5..d1486e9 100644 --- a/DocumentServiceAPI.Application/DocManage/DocumentManageAppService.cs +++ b/DocumentServiceAPI.Application/DocManage/DocumentManageAppService.cs @@ -96,13 +96,27 @@ /// <returns></returns> public async Task<IActionResult> PostDocumentItemList(DocumentSearch search) { - var data = await _docManageService.GetListAsync(c => c.is_del == false && c.doc_code == search.Code && c.tenant_code == search.TenantID); - if (search.class_id > 0) + if(search.Code == "002") { - data = data.Where(c => c.classification_id == search.class_id).ToList(); - } + var data = await _achievementService.GetListAsync(c => c.status == 1 && c.tenant_code == search.TenantID); + if (search.class_id > 0) + { + data = data.Where(c => c.classification_id == search.class_id).ToList(); + } - return new JsonResult(data.Select(c => new { name= c.doc_name, c.id }).ToList()); + return new JsonResult(data.OrderBy(x => x.sort).Select(c => new { name = c.achievement_name, idcode = c.id+ "/002" }).ToList()); + } + else + { + var data = await _docManageService.GetListAsync(c => c.status == 1 && c.is_del == false && c.doc_code == search.Code && c.org_id == search.TenantID); + if (search.class_id > 0) + { + data = data.Where(c => c.classification_id == search.class_id).ToList(); + } + + return new JsonResult(data.OrderBy(x => x.sort).Select(c => new { name = c.doc_name , idcode = c.id + "/" + c.doc_code }).ToList()); + } + } /// <summary> @@ -114,7 +128,7 @@ { var msg = false; Expression<Func<Doc_Info, bool>> expression = t => true; - expression = expression.And(c => c.tenant_code == model.tenant_id && c.doc_name == model.name && c.doc_code == model.code ); + expression = expression.And(c => c.tenant_code == model.tenant_id && c.doc_name == model.name && c.doc_code == model.code && c.is_del == false ); if (model.class_id.HasValue && model.class_id!=0) { expression = expression.And(t => t.classification_id == model.class_id); @@ -172,7 +186,7 @@ .Includes(c=>c.DocOrganization) .Includes(c=>c.DocProject) .Where(expression) - .OrderByDescending(c=>c.id) + .OrderBy(c=>c.sort) .ToPageListAsync(page.PageIndex, page.PageSize, total); if (data != null && total > 0) @@ -188,7 +202,8 @@ org_name = c.DocOrganization?.UnitName, project_id = c.project_id, project_name = c.DocProject?.ProjectName, - status = c.status + status = c.status, + sort = c.sort, }).ToList(); } @@ -240,7 +255,8 @@ doc.org_id = info.org_id; doc.status = info.status; doc.tenant_code = info.tenant_id; - + doc.sort = info.sort; + var id =await _docManageService.InsertReturnIdentityAsync(doc); if (id > 0) { @@ -287,7 +303,7 @@ doc.doc_name = info.name; doc.org_id = info.org_id; doc.status = info.status; - + doc.sort = info.sort; if (await _docManageService.UpdateAsync(doc)) { //鏂版彁浜ょ殑鏂囦欢 @@ -380,12 +396,84 @@ /// </summary> /// <param name="id"></param> /// <returns></returns> - public async Task<IActionResult> GetDocumentFilesList(int id) + public async Task<IActionResult> GetDocumentFilesList(int id,string code) { - var data = await _fileManageService.GetListAsync(c => c.status == 1 && c.doc_id == id); - var list = data.Select(c => new FileInfo_List_Dto(c)).OrderBy(c => c.sort).ToList(); + if (code == "002") + { + var data = await _achievementService.GetByIdAsync(id); + List<FileInfo_List_Dto> list_Dtos = new List<FileInfo_List_Dto> (); + if (data != null) + { + if (!string.IsNullOrEmpty(data.zbtzs_url)) + { + FileInfo_List_Dto fileInfo_List_Dto = new FileInfo_List_Dto(); + fileInfo_List_Dto.filePath = data.zbtzs_url; + fileInfo_List_Dto.fileNewName = "涓爣閫氱煡涔�"; + fileInfo_List_Dto.suffix = Path.GetExtension(data.zbtzs_url); + list_Dtos.Add(fileInfo_List_Dto); + } - return new JsonResult(list); + if (!string.IsNullOrEmpty(data.ht_url)) + { + FileInfo_List_Dto fileInfo_List_Dto = new FileInfo_List_Dto(); + fileInfo_List_Dto.filePath = data.ht_url; + fileInfo_List_Dto.fileNewName = "鍚堝悓"; + fileInfo_List_Dto.suffix = Path.GetExtension(data.ht_url); + list_Dtos.Add(fileInfo_List_Dto); + } + + if (!string.IsNullOrEmpty(data.ysbg_url)) + { + FileInfo_List_Dto fileInfo_List_Dto = new FileInfo_List_Dto(); + fileInfo_List_Dto.filePath = data.ysbg_url; + fileInfo_List_Dto.fileNewName = "楠屾敹鎶ュ憡"; + fileInfo_List_Dto.suffix = Path.GetExtension(data.ysbg_url); + list_Dtos.Add(fileInfo_List_Dto); + } + + if (!string.IsNullOrEmpty(data.fkpz_url)) + { + FileInfo_List_Dto fileInfo_List_Dto = new FileInfo_List_Dto(); + fileInfo_List_Dto.filePath = data.fkpz_url; + fileInfo_List_Dto.fileNewName = "浠樻鍑瘉"; + fileInfo_List_Dto.suffix = Path.GetExtension(data.fkpz_url); + list_Dtos.Add(fileInfo_List_Dto); + } + + if (!string.IsNullOrEmpty(data.yhpj_url)) + { + FileInfo_List_Dto fileInfo_List_Dto = new FileInfo_List_Dto(); + fileInfo_List_Dto.filePath = data.yhpj_url; + fileInfo_List_Dto.fileNewName = "鐢ㄦ埛璇勪环"; + fileInfo_List_Dto.suffix = Path.GetExtension(data.yhpj_url); + list_Dtos.Add(fileInfo_List_Dto); + } + + if (!string.IsNullOrEmpty(data.hjzs_url)) + { + FileInfo_List_Dto fileInfo_List_Dto = new FileInfo_List_Dto(); + fileInfo_List_Dto.filePath = data.hjzs_url; + fileInfo_List_Dto.fileNewName = "鑾峰璇佷功"; + fileInfo_List_Dto.suffix = Path.GetExtension(data.hjzs_url); + list_Dtos.Add(fileInfo_List_Dto); + } + + } + + + + return new JsonResult(list_Dtos); + } + else + { + var data = await _fileManageService.GetListAsync(c => c.status == 1 && c.doc_id == id); + + var list = data.Select(c => new FileInfo_List_Dto(c)).OrderBy(c => c.sort).ToList(); + + return new JsonResult(list); + } + + } #endregion @@ -414,13 +502,89 @@ { expression = expression.And(t => t.achievement_name.Contains(page.Name)); } - + if (page.zbtzs.HasValue) + { + if (page.zbtzs == 1) + { + expression = expression.And(t => t.zbtzs_url != null); + } + else + { + expression = expression.And(t => t.zbtzs_url == null); + } + + } + if (page.ht.HasValue) + { + if (page.ht == 1) + { + expression = expression.And(t => t.ht_url != null); + } + else + { + expression = expression.And(t => t.ht_url == null); + } + + } + + if (page.ysbg.HasValue) + { + if (page.ysbg == 1) + { + expression = expression.And(t => t.ysbg_url != null); + } + else + { + expression = expression.And(t => t.ysbg_url == null); + } + + } + + if (page.fkpz.HasValue) + { + if (page.fkpz == 1) + { + expression = expression.And(t => t.fkpz_url != null); + } + else + { + expression = expression.And(t => t.fkpz_url == null); + } + + } + + if (page.yhpj.HasValue) + { + if (page.yhpj == 1) + { + expression = expression.And(t => t.yhpj_url != null); + } + else + { + expression = expression.And(t => t.yhpj_url == null); + } + + } + + if (page.hjzs.HasValue) + { + if (page.hjzs == 1) + { + expression = expression.And(t => t.hjzs_url != null); + } + else + { + expression = expression.And(t => t.hjzs_url == null); + } + + } + RefAsync<int> total = 0; var data = await _achievementService.Context.Queryable<Doc_Achievement>() .Includes(c => c.DocClassification) .Includes(c => c.DocProject) .Where(expression) - .OrderByDescending(c => c.id) + .OrderBy(c => c.sort) .ToPageListAsync(page.PageIndex, page.PageSize, total); if (data != null && total > 0) @@ -432,14 +596,15 @@ class_name = c.DocClassification?.doc_classification, id = c.id, project_id = c.project_id, - project_name = c.DocProject?.ProjectName, + project_name = c.achievement_name,//c.DocProject?.ProjectName, fkpz=c.fkpz_url, hjzs=c.hjzs_url, ht=c.ht_url, yhpj=c.yhpj_url, ysbg=c.ysbg_url, zbtzs=c.zbtzs_url, - status = c.status + status = c.status, + sort = c.sort, }).ToList(); } @@ -464,10 +629,18 @@ { var msg = false; var ck = await _achievementService.GetFirstAsync(c=>c.status==1 && c.tenant_code==model.tenant_id - && c.project_id==model.project_id && c.classification_id==c.classification_id); + && c.achievement_name==model.name && c.classification_id==c.classification_id); if (ck != null) { - msg = true; + if(model.id>0 && model.id != ck.id) + { + msg = true; + } + else + { + msg = false; + } + } return msg; } @@ -479,23 +652,99 @@ /// <returns></returns> public async Task<bool> PostAddDocAchievement(Achievement_Submit_Dto info) { - Doc_Achievement doc = new Doc_Achievement(); - doc.add_time = DateTime.Now; - doc.classification_id = info.class_id; - doc.project_id = info.project_id; - doc.achievement_name = info.name; + if (info.id > 0) + { + Doc_Achievement doc = new Doc_Achievement(); + doc.id = info.id; + doc.add_time = DateTime.Now; + doc.classification_id = info.class_id; + doc.project_id = info.project_id; + doc.achievement_name = info.name; - doc.fkpz_url = info.fkpz; - doc.hjzs_url = info.hjzs; - doc.ht_url = info.ht; - doc.yhpj_url = info.yhpj; - doc.ysbg_url = info.ysbg; - doc.zbtzs_url = info.zbtzs; + doc.fkpz_url = info.fkpz; + doc.hjzs_url = info.hjzs; + doc.ht_url = info.ht; + doc.yhpj_url = info.yhpj; + doc.ysbg_url = info.ysbg; + doc.zbtzs_url = info.zbtzs; - doc.status = 1; - doc.tenant_code = info.tenant_id; + doc.status = 1; + doc.tenant_code = info.tenant_id; + doc.sort = info.sort; + return await _achievementService.UpdateAsync(doc); + } + else + { + Doc_Achievement doc = new Doc_Achievement(); + doc.add_time = DateTime.Now; + doc.classification_id = info.class_id; + doc.project_id = info.project_id; + doc.achievement_name = info.name; - return await _achievementService.InsertAsync(doc); + doc.fkpz_url = info.fkpz; + doc.hjzs_url = info.hjzs; + doc.ht_url = info.ht; + doc.yhpj_url = info.yhpj; + doc.ysbg_url = info.ysbg; + doc.zbtzs_url = info.zbtzs; + + doc.status = 1; + doc.tenant_code = info.tenant_id; + doc.sort = info.sort; + + return await _achievementService.InsertAsync(doc); + } + + } + + + + /// <summary> + /// 鍒犻櫎鏂囨。鏁版嵁 + /// </summary> + /// <param name="doc"></param> + /// <returns></returns> + public async Task<IActionResult> PostDelAchievement(Achievement_Submit_Dto doc) + { + bool msg = false; + var sss = new Doc_Achievement(); + sss.id = doc.id; + + msg = await _achievementService.DeleteAsync(sss); + return new JsonResult(msg); + } + + + /// <summary> + /// 鏍规嵁鏂囨。鍙锋煡璇� + /// </summary> + /// <param name="search"></param> + /// <returns></returns> + public async Task<IActionResult> PostAchievementInfo(DocumentSearch search) + { + var data = await _achievementService.GetFirstAsync(c => c.id == search.ID && c.tenant_code == search.TenantID); + if (data != null) + { + Achievement_Submit_Dto achievement_Submit_Dto = new Achievement_Submit_Dto(); + achievement_Submit_Dto.id = data.id; + achievement_Submit_Dto.class_id = data.classification_id.Value; + //achievement_Submit_Dto.project_id = data.project_id.Value; + achievement_Submit_Dto.name = data.achievement_name; + achievement_Submit_Dto.zbtzs = data.zbtzs_url; + achievement_Submit_Dto.ht = data.ht_url; + achievement_Submit_Dto.ysbg = data.ysbg_url; + achievement_Submit_Dto.fkpz = data.fkpz_url; + achievement_Submit_Dto.yhpj = data.yhpj_url; + achievement_Submit_Dto.hjzs = data.hjzs_url; + achievement_Submit_Dto.tenant_id = data.tenant_code; + achievement_Submit_Dto.status = data.status; + achievement_Submit_Dto.sort = data.sort; + + + return new JsonResult(achievement_Submit_Dto); + } + + return null; } #endregion diff --git a/DocumentServiceAPI.Application/DocManage/Dtos/Achievement_Submit_Dto.cs b/DocumentServiceAPI.Application/DocManage/Dtos/Achievement_Submit_Dto.cs index 8e955cd..6048213 100644 --- a/DocumentServiceAPI.Application/DocManage/Dtos/Achievement_Submit_Dto.cs +++ b/DocumentServiceAPI.Application/DocManage/Dtos/Achievement_Submit_Dto.cs @@ -31,6 +31,12 @@ public string yhpj { get; set; } public string hjzs { get; set; } + public int status { get; set; } + + /// <summary> + /// 鎺掑簭 + /// </summary> + public int? sort { get; set; } } public class Achievement_List_Dto @@ -77,5 +83,10 @@ public string yhpj { get; set; } public string hjzs { get; set; } + + /// <summary> + /// 鎺掑簭 + /// </summary> + public int? sort { get; set; } } } diff --git a/DocumentServiceAPI.Application/DocManage/Dtos/Document_List_Dto.cs b/DocumentServiceAPI.Application/DocManage/Dtos/Document_List_Dto.cs index ad86c15..2e6cb9b 100644 --- a/DocumentServiceAPI.Application/DocManage/Dtos/Document_List_Dto.cs +++ b/DocumentServiceAPI.Application/DocManage/Dtos/Document_List_Dto.cs @@ -49,6 +49,10 @@ public int? project_id { get; set; } public string project_name { get; set; } + /// <summary> + /// 鎺掑簭 + /// </summary> + public int? sort { get; set; } } /// <summary> @@ -83,6 +87,11 @@ public int status { get; set; } + /// <summary> + /// 鎺掑簭 + /// </summary> + public int? sort { get; set; } + public List<DocumentFile_Submit_Dto> newfiles { get; set; } public List<DocumentFile_Submit_Dto> editfiles { get; set; } @@ -111,6 +120,7 @@ } this.status = doc.status; this.files = filelist; + this.sort = doc.sort; } public int id { get; set; } @@ -128,6 +138,8 @@ public int status { get; set; } + public int? sort { get; set; } + public List<FileInfo_List_Dto> files { get; set; } } diff --git a/DocumentServiceAPI.Application/DocManage/Services/DocumentManageService.cs b/DocumentServiceAPI.Application/DocManage/Services/DocumentManageService.cs index 22fc21f..c876905 100644 --- a/DocumentServiceAPI.Application/DocManage/Services/DocumentManageService.cs +++ b/DocumentServiceAPI.Application/DocManage/Services/DocumentManageService.cs @@ -33,6 +33,18 @@ /// 鐘舵�� /// </summary> public int? Status { get; set; } + + public int? zbtzs { get; set; } + + public int? ht { get; set; } + + public int? ysbg { get; set; } + + public int? fkpz { get; set; } + + public int? yhpj { get; set; } + + public int? hjzs { get; set; } } public class DocumentSearch : BaseSearch diff --git a/DocumentServiceAPI.Application/ProjectInfo/ProjectInfoController.cs b/DocumentServiceAPI.Application/ProjectInfo/ProjectInfoController.cs index b217782..b43624d 100644 --- a/DocumentServiceAPI.Application/ProjectInfo/ProjectInfoController.cs +++ b/DocumentServiceAPI.Application/ProjectInfo/ProjectInfoController.cs @@ -6,6 +6,7 @@ using DocumentServiceAPI.Application.WorkRemind.ViewMode; using DocumentServiceAPI.Model.cyDocumentModel; using DocumentServiceAPI.Utility; +using Microsoft.AspNetCore.Mvc.RazorPages; using System; using System.Collections.Generic; using System.Linq; @@ -559,5 +560,145 @@ { return _projectInfoService.GetDocClassificationList(); } + + + + + + + /// <summary> + /// 鑾峰彇鍒嗙被鍒楄〃postDocClassificationList + /// </summary> + /// <param name="page"></param> + /// <returns></returns> + public PageResult<DocClassificationDTO> postDocClassificationList(DocumentProjectInfoPageSearch page) + { + return _projectInfoService.postDocClassificationList(page); + } + + /// <summary> + /// 鑾峰彇鍒嗙被GetDocClassificationInfo + /// </summary> + /// <param name="ID"></param> + /// <returns></returns> + public Doc_Classification GetDocClassificationInfo(int ID) + { + return _projectInfoService.GetDocClassificationInfo(ID); + } + + + /// <summary> + /// 鍒犻櫎绯荤粺鍒嗙被鍒犻櫎GetDeleteDocClassDel + /// </summary> + /// <param name="ID"></param> + /// <param name="tenantId"></param> + /// <returns></returns> + public bool GetDeleteDocClassDel(int ID, int tenantId) + { + return _projectInfoService.GetDeleteDocClassDel(ID, tenantId); + } + + /// <summary> + ///鍒犻櫎鍒嗙被GetDeleteDocClassification + /// </summary> + /// <param name="ID"></param> + /// <returns></returns> + public bool GetDeleteDocClassification(int ID) + { + return _projectInfoService.GetDeleteDocClassification(ID); + } + + + /// <summary> + /// 淇濆瓨绯荤粺鍒嗙被SaveDocClassDelInfo + /// </summary> + /// <param name="dp"></param> + /// <returns></returns> + public bool SaveDocClassificationInfo(Doc_Classification dp) + { + return _projectInfoService.SaveDocClassificationInfo(dp); + } + + /// <summary> + /// 淇濆瓨绯荤粺鍒嗙被鍒犻櫎SaveDocClassDelInfo + /// </summary> + /// <param name="dp"></param> + /// <returns></returns> + public bool SaveDocClassDelInfo(Doc_ClassDel dp) + { + return _projectInfoService.SaveDocClassDelInfo(dp); + } + + + /// <summary> + /// 鑾峰彇鍒嗙被鍒楄〃GetDocClassificationList + /// </summary> + /// <param name="tenantId"></param> + /// <returns></returns> + public List<Doc_Classification> GetDocClassificationList(int tenantId) + { + return _projectInfoService.GetDocClassificationList(tenantId); + } + + /// <summary> + /// 鑾峰彇鍒嗙被GetDocClassificationByFileName + /// </summary> + /// <param name="tenantId"></param> + /// <param name="FileName"></param> + /// <param name="parent_code"></param> + /// <returns></returns> + public Doc_Classification GetDocClassificationByFileName(int tenantId, string FileName, string parent_code) + { + return _projectInfoService.GetDocClassificationByFileName(tenantId, FileName, parent_code); + } + /// <summary> + /// 鑾峰彇鏈�鏂板垎绫荤紪鐮� + /// </summary> + /// <param name="tenantId"></param> + /// <param name="parent_code"></param> + /// <returns></returns> + public Doc_Classification GetDocClassificationcode(int tenantId, string parent_code) + { + return _projectInfoService.GetDocClassificationcode(tenantId, parent_code); + + } + + + + /// <summary> + /// 鑾峰彇鏈�澶ф帓搴� + /// </summary> + /// <param name="tenantId"></param> + /// <param name="docclassificationcode"></param> + /// <returns></returns> + public Doc_Classification GetDocClassificationInfoMaxSortId(int tenantId, string docclassificationcode) + { + return _projectInfoService.GetDocClassificationInfoMaxSortId(tenantId, docclassificationcode); + + } + + + /// <summary> + /// 鑾峰彇鏈�澶ф帓搴� + /// </summary> + /// <param name="unitId"></param> + /// <param name="doccode"></param> + /// <returns></returns> + public Doc_Classification GetDocumentInfoMaxSortId(int unitId, string doccode) + { + return _projectInfoService.GetDocumentInfoMaxSortId(unitId, doccode); + + } + + /// <summary> + /// 鑾峰彇鏈�澶ф帓搴� + /// </summary> + /// <param name="unitId"></param> + /// <returns></returns> + public Doc_Classification GetAchievementInfoMaxSortId(int unitId) + { + return _projectInfoService.GetAchievementInfoMaxSortId(unitId); + + } } } diff --git a/DocumentServiceAPI.Application/ProjectInfo/Services/Interfaces/IProjectInfoService.cs b/DocumentServiceAPI.Application/ProjectInfo/Services/Interfaces/IProjectInfoService.cs index 1b33fe7..454d504 100644 --- a/DocumentServiceAPI.Application/ProjectInfo/Services/Interfaces/IProjectInfoService.cs +++ b/DocumentServiceAPI.Application/ProjectInfo/Services/Interfaces/IProjectInfoService.cs @@ -121,5 +121,37 @@ public List<Doc_Classification> GetDocClassificationList(); public bool SaveDocumentTBXYFileInfoNotRep(Document_TBXYFile dp); + + + + + + + public PageResult<DocClassificationDTO> postDocClassificationList(DocumentProjectInfoPageSearch page); + + public Doc_Classification GetDocClassificationInfo(int ID); + + + public bool GetDeleteDocClassDel(int ID, int tenantId); + + public bool GetDeleteDocClassification(int ID); + + public bool SaveDocClassificationInfo(Doc_Classification dp); + + public bool SaveDocClassDelInfo(Doc_ClassDel dp); + + public List<Doc_Classification> GetDocClassificationList(int tenantId ); + + public Doc_Classification GetDocClassificationByFileName(int tenantId , string FileName, string parent_code); + + + public Doc_Classification GetDocClassificationcode(int tenantId, string parent_code); + + + public Doc_Classification GetDocClassificationInfoMaxSortId(int tenantId, string docclassificationcode); + + public Doc_Classification GetDocumentInfoMaxSortId(int unitId, string doccode); + + public Doc_Classification GetAchievementInfoMaxSortId(int unitId); } } diff --git a/DocumentServiceAPI.Application/ProjectInfo/Services/ProjectInfoService.cs b/DocumentServiceAPI.Application/ProjectInfo/Services/ProjectInfoService.cs index 8f1b6d1..f1ddd59 100644 --- a/DocumentServiceAPI.Application/ProjectInfo/Services/ProjectInfoService.cs +++ b/DocumentServiceAPI.Application/ProjectInfo/Services/ProjectInfoService.cs @@ -27,6 +27,7 @@ using System.Data; using System.Diagnostics.Metrics; using System.Linq; +using System.Reflection.Emit; using System.Reflection.Metadata; using System.Runtime.Intrinsics.Arm; using System.Runtime.Intrinsics.X86; @@ -614,8 +615,8 @@ //page.ToEmployeeId = a.EID; int total = 0; PageResult<DocumentProjectInfoDTO> result = new PageResult<DocumentProjectInfoDTO>(); - + //var document_OtherCompanyTenderInfos = _db.Queryable<Document_OtherCompanyTenderInfo>().Where(x => x.TenantID == aaa.TEID).ToList(); result.Items = _db.Queryable<Document_ProjectInfo, Document_ProjectExpand, Document_ProjectOppugnInfo, Document_ProjectComplainInfo, Document_ProjectReviewInfo, Document_ProjectLitigationInfo, Document_AdviseInfo, Document_ProjectComplainInfo, Document_ProjectOppugnInfo, Document_ProjectLitigationInfo, Document_ProjectReviewInfo, Document_WinInfo>((a, d, e,f,g,h,i,j,k,l,m,n) => new JoinQueryInfos @@ -665,11 +666,11 @@ .WhereIF(page.ddlSignUp > 0 && page.ddlSignUp == 1, (a, d, e, f, g, h, i, j, k, l, m, n) => (d.IsSignup == 0 || d.IsSignup == null)) .WhereIF(page.ddlSignUp > 0 && page.ddlSignUp != 1, (a, d, e, f, g, h, i, j, k, l, m, n) => d.IsSignup == 1 ) //淇濊瘉閲戠姸鎬� - .WhereIF(page.ddlTenderDeposit > 0 && page.ddlTenderDeposit == 12, (a, d, e, f, g, h, i, j, k, l, m, n) => d.TenderDepositStatus == null) + .WhereIF(page.ddlTenderDeposit > 0 && page.ddlTenderDeposit == 12, (a, d, e, f, g, h, i, j, k, l, m, n) => a.TenderDeposit != null && a.TenderDeposit > 0 && d.TenderDepositStatus == null) .WhereIF(page.ddlTenderDeposit > 0 && page.ddlTenderDeposit == 36, (a, d, e, f, g, h, i, j, k, l, m, n) => a.TenderTime < DateTime.Now.AddDays(15) && d.TenderDepositStatus == 13 ) .WhereIF(page.ddlTenderDeposit > 0 && page.ddlTenderDeposit != 12 && page.ddlTenderDeposit != 36, (a, d, e, f, g, h, i, j, k, l, m, n) => d.TenderDepositStatus == page.ddlTenderDeposit) //灞ョ害閲戠姸鎬� - .WhereIF(page.ddlBidbond > 0 && page.ddlBidbond == 32, (a, d, e, f, g, h, i, j, k, l, m, n) => (d.BidbondStatus == null)) + .WhereIF(page.ddlBidbond > 0 && page.ddlBidbond == 32, (a, d, e, f, g, h, i, j, k, l, m, n) => (a.Bidbond!=null && a.Bidbond >0 && d.BidbondStatus == null)) .WhereIF(page.ddlBidbond > 0 && page.ddlBidbond != 32, (a, d, e, f, g, h, i, j, k, l, m, n) => d.BidbondStatus == page.ddlBidbond ) //鏍囦功鐘舵�� .WhereIF(page.ddlDocumentStatus > 0 && page.ddlDocumentStatus == 15, (a, d, e, f, g, h, i, j, k, l, m, n) => (d.DocumentStatus == null || d.DocumentStatus == 0 || d.DocumentStatus == 15)) @@ -692,6 +693,9 @@ //璇夎鎯呭喌 .WhereIF(page.ddlLitigationStatus > 0 && page.ddlLitigationStatus == 1, (a, d, e, f, g, h, i, j, k, l, m, n) => (h.FilePath == null || h.FilePath == "")) .WhereIF(page.ddlLitigationStatus > 0 && page.ddlLitigationStatus != 1, (a, d, e, f, g, h, i, j, k, l, m, n) => (h.FilePath != null && h.FilePath != "")) + + .WhereIF(!string.IsNullOrEmpty(page.txtCompanyName), (a, d, e, f, g, h, i, j, k, l, m, n) => (n.FirstWinCompany.Contains(page.txtCompanyName) || n.SecondWinCompany.Contains(page.txtCompanyName) || n.ThirdCompany.Contains(page.txtCompanyName) || SqlFunc.Subqueryable<Document_OtherCompanyTenderInfo>().Where(s => s.TenantID == a.TenantID && s.ProjectId == a.ProjectId && s.CompanyName.Contains(page.txtCompanyName)).Any())) + .Select((a, d, e, f, g, h, i, j, k, l, m, n) => new DocumentProjectInfoDTO { ProjectId = a.ProjectId, @@ -719,7 +723,9 @@ NoticeTypeName = "鎷涙爣鍏憡", NoticeType = a.NoticeType, PurchaseMethod = a.PurchaseMethod, - DocumentStatus = d.DocumentStatus + DocumentStatus = d.DocumentStatus, + SignupMethod = a.SignupMethod, + } ) .OrderByDescending(a => a.ProjectId).ToPageList(page.PageIndex, page.PageSize, ref total); @@ -746,7 +752,7 @@ documentProjectInfoDTO.xmqy = documentProjectInfoDTO.City+ documentProjectInfoDTO.County; } - if(documentProjectInfoDTO.IsSignup == 1) + if(documentProjectInfoDTO.IsSignup == 1 || documentProjectInfoDTO.SignupMethod == 9 ) { documentProjectInfoDTO.bm = "鈭�"; } @@ -871,7 +877,18 @@ documentProjectInfoDTO.PurchaseMethodName = document_Dictionary.Name; } } - + + var sss = _db.Queryable<Document_ZhaobiaoFile>().Count(x => x.ProjectId == documentProjectInfoDTO.ProjectId && x.UnitId == page.UnitId); + if (sss > 0) + { + documentProjectInfoDTO.zbwj = "鈭�"; + } + else + { + documentProjectInfoDTO.zbwj = "鎷涙爣鏂囦欢"; + } + + } } @@ -1803,7 +1820,7 @@ 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(); + var ret = _db.Queryable<Doc_Classification>().Where(x => x.parent_code =="003" && x.is_system == true).ToList(); return ret; } @@ -1822,5 +1839,275 @@ return true; } + + + + + + + public PageResult<DocClassificationDTO> postDocClassificationList(DocumentProjectInfoPageSearch page) + { + var aaa = GetJwtInfo(); + + SqlSugar.PageModel pg = new SqlSugar.PageModel(); + pg.PageSize = page.PageSize; + pg.PageIndex = page.PageIndex; + //page.ToEmployeeId = a.EID; + int total = 0; + PageResult<DocClassificationDTO> result = new PageResult<DocClassificationDTO>(); + + + + result.Items = _db.Queryable<Doc_Classification, Doc_ClassDel>((a, b) => + new JoinQueryInfos + ( + JoinType.Left, a.id == b.doc_classification_id && b.tenant_code == page.TenantID + )) + .Where((a, b) => ( a.tenant_code == page.TenantID || a.is_system == true) ) + //鏂囦欢鍚嶇О + .WhereIF(!string.IsNullOrEmpty(page.FileName), (a, b) => a.doc_classification.Contains(page.FileName)) + .WhereIF(!string.IsNullOrEmpty(page.parentcode), (a, b) => a.parent_code == page.parentcode ) + .WhereIF(page.Status.HasValue, (a, b) => (a.is_system == false && a.status == page.Status.Value ) || (page.Status.Value == 1 && a.is_system == true && b.tenant_code == null ) || (page.Status.Value == 0 && a.is_system == true && b.tenant_code != null)) + + .Select((a, b) => new DocClassificationDTO + { + id = a.id, + doc_classification_code = a.doc_classification_code, + doc_classification = a.doc_classification, + parent_code = a.parent_code, + is_system = a.is_system, + sort_id = a.sort_id, + tenant_code = a.tenant_code, + add_time = a.add_time, + status = a.status, + + } + ) + .OrderBy(a => a.sort_id).ToPageList(page.PageIndex, page.PageSize, ref total); + + + if (result.Items != null && result.Items.Count > 0) + { + + foreach (var item in result.Items) + { + if (item.is_system) + { + var doc_ClassDel = _db.Queryable<Doc_ClassDel>().Where(x => x.doc_classification_id == item.id && x.tenant_code == page.TenantID ).First();//鎵ц鏌ヨ + + if (doc_ClassDel != null) + { + item.status = 0; + item.statusName = "鍋滅敤"; + } + else + { + item.statusName = "鍚敤"; + } + } + else + { + if(item.status == 1) + { + item.statusName = "鍚敤"; + } + else + { + item.statusName = "鍋滅敤"; + } + + } + + } + } + + result.TotalCount = total; + result.TotalPage = total % page.PageSize == 0 ? total / page.PageSize : total / page.PageSize + 1; + + + + return result; + } + + + public Doc_Classification GetDocClassificationInfo(int ID) + { + var aaa = GetJwtInfo(); + var result = _db.Queryable<Doc_Classification>().Where(x => x.id == ID).First();//鎵ц鏌ヨ + if (result!=null && result.is_system) + { + var doc_ClassDel = _db.Queryable<Doc_ClassDel>().Where(x => x.doc_classification_id == result.id && x.tenant_code == aaa.TEID).First();//鎵ц鏌ヨ + + if (doc_ClassDel != null) + { + result.status = 0; + } + else + { + result.status = 1; + } + } + + + return result; + } + + + public bool GetDeleteDocClassDel(int ID , int tenantId) + { + + _db.Deleteable<Doc_ClassDel>().Where(x => x.doc_classification_id == ID && x.tenant_code == tenantId ).ExecuteCommand(); + + return true; + } + + + public bool GetDeleteDocClassification(int ID ) + { + var result = _db.Queryable<Doc_Classification>().Where(x => x.id == ID).First();//鎵ц鏌ヨ + if (result != null) + { + _db.Deleteable<Doc_Classification>().Where(x => x.parent_code == result.doc_classification_code).ExecuteCommand(); + } + + _db.Deleteable<Doc_Classification>().Where(x => x.id == ID ).ExecuteCommand(); + + return true; + } + + public bool SaveDocClassificationInfo(Doc_Classification dp) + { + + + + + + if (dp.id > 0) + { + _db.Updateable<Doc_Classification>(dp).ExecuteCommand(); + } + else + { + _db.Insertable<Doc_Classification>(dp).ExecuteCommand(); + } + + return true; + } + + public bool SaveDocClassDelInfo(Doc_ClassDel dp) + { + + if (dp.id > 0) + { + _db.Updateable<Doc_ClassDel>(dp).ExecuteCommand(); + } + else + { + _db.Insertable<Doc_ClassDel>(dp).ExecuteCommand(); + } + return true; + } + + + public List<Doc_Classification> GetDocClassificationList(int tenantId) + { + var ret = _db.Queryable<Doc_Classification>() + .Where(x => ((x.tenant_code == tenantId && x.status == 1) || x.is_system == true) && x.parent_code == "00" ) + //.Select(a => new Document_TBXYFile + //{ + // Id = a.Id, + // FileName = a.FileName, + // FilePath = a.FilePath, + // FileVersionNo = a.FileVersionNo, + // FileSize = a.FileSize, + // UnitId = a.UnitId, + // LastUpdateTime = a.LastUpdateTime, + // LastUpdateName = a.LastUpdateName, + // AdviseFlag = a.AdviseFlag, + // UserId = a.UserId, + // Sort = a.Sort, + // SaveFlag = a.SaveFlag, + // Classification = a.Classification, + //}) + .OrderBy(a => a.sort_id).ToList(); + + + if (ret != null && ret.Count > 0) + { + + foreach (var item in ret) + { + if (item.is_system) + { + var doc_ClassDel = _db.Queryable<Doc_ClassDel>().Where(x => x.doc_classification_id == item.id && x.tenant_code == tenantId).First();//鎵ц鏌ヨ + + if (doc_ClassDel != null) + { + item.status = 0; + + } + + } + + } + } + + ret = ret.Where(x => x.status == 1).ToList(); + + return ret; + } + + public Doc_Classification GetDocClassificationByFileName(int tenantId , string FileName, string parent_code) + { + var ret = _db.Queryable<Doc_Classification>().Where(x => ( x.tenant_code == tenantId || x.is_system == true ) && x.doc_classification == FileName && x.parent_code == parent_code).First(); + return ret; + } + + + public Doc_Classification GetDocClassificationcode(int tenantId,string parent_code) + { + var ret = _db.Queryable<Doc_Classification>().Where(x => (x.tenant_code == tenantId || x.is_system == true) && x.parent_code == parent_code).OrderByDescending(x=>x.doc_classification_code).First(); + string doc_classification_code = (int.Parse(ret.doc_classification_code) + 1).ToString().PadLeft(3, '0'); + Doc_Classification doc_Classification = new Doc_Classification(); + doc_Classification.doc_classification_code = doc_classification_code; + return doc_Classification; + } + + public Doc_Classification GetDocClassificationInfoMaxSortId(int tenantId ,string docclassificationcode) + { + var ret = _db.Queryable<Doc_Classification>() + .Where(x => (x.tenant_code == tenantId || x.is_system == true)) + .WhereIF(!string.IsNullOrEmpty(docclassificationcode), x => x.parent_code == docclassificationcode) + .Where(x => x.sort_id <= 99999) + .Max(x => x.sort_id); + + Doc_Classification doc_Classification = new Doc_Classification(); + doc_Classification.sort_id = ret; + return doc_Classification; + } + + public Doc_Classification GetDocumentInfoMaxSortId(int unitId, string doccode) + { + var ret = _db.Queryable<Doc_Info>() + .Where(x => x.org_id == unitId ) + .WhereIF(!string.IsNullOrEmpty(doccode), x => x.doc_code == doccode) + .Max(x => x.sort); + + Doc_Classification doc_Classification = new Doc_Classification(); + doc_Classification.sort_id = ret??0; + return doc_Classification; + } + + public Doc_Classification GetAchievementInfoMaxSortId(int unitId) + { + var ret = _db.Queryable<Doc_Achievement>() + .Where(x => x.tenant_code == unitId) + //.WhereIF(!string.IsNullOrEmpty(doccode), x => x.doc_code == doccode) + .Max(x => x.sort); + + Doc_Classification doc_Classification = new Doc_Classification(); + doc_Classification.sort_id = ret ?? 0; + return doc_Classification; + } } } diff --git a/DocumentServiceAPI.Application/ProjectInfo/Services/SheZhiService.cs b/DocumentServiceAPI.Application/ProjectInfo/Services/SheZhiService.cs index fd25822..97564cf 100644 --- a/DocumentServiceAPI.Application/ProjectInfo/Services/SheZhiService.cs +++ b/DocumentServiceAPI.Application/ProjectInfo/Services/SheZhiService.cs @@ -891,7 +891,7 @@ result.Items = _db.Queryable<Document_LayInfo>() - .Where(a => a.TenantID == aaa.TEID) + .Where(a => (a.TenantID == aaa.TEID || a.IsSys == 1)) //鏂囦欢鍚嶇О .WhereIF(!string.IsNullOrEmpty(page.LayName), a => a.LayName == page.LayName) .WhereIF(!string.IsNullOrEmpty(page.LayType) && page.LayType != "璇烽�夋嫨", a => a.LayType == page.LayType) diff --git a/DocumentServiceAPI.Application/ProjectInfo/ViewMode/DocClassificationDTO.cs b/DocumentServiceAPI.Application/ProjectInfo/ViewMode/DocClassificationDTO.cs new file mode 100644 index 0000000..84d7469 --- /dev/null +++ b/DocumentServiceAPI.Application/ProjectInfo/ViewMode/DocClassificationDTO.cs @@ -0,0 +1,65 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DocumentServiceAPI.Application.ProjectInfo.ViewMode +{ + public class DocClassificationDTO + { + + public DocClassificationDTO() + { + } + + /// <summary> + /// id + /// </summary> + public int id { get; set; } + + /// <summary> + /// 缂栫爜 + /// </summary> + public string doc_classification_code { get; set; } + + /// <summary> + /// 鍚嶇О + /// </summary> + public string doc_classification { get; set; } + + /// <summary> + /// 鐖剁骇缂栫爜 + /// </summary> + public string parent_code { get; set; } + + /// <summary> + /// 绯荤粺鏍囪瘑 + /// </summary> + public bool is_system { get; set; } + + /// <summary> + /// 鎺掑簭 + /// </summary> + public int sort_id { get; set; } + + /// <summary> + /// 绉熸埛鏍囪瘑 + /// </summary> + public int tenant_code { get; set; } + + /// <summary> + /// 娣诲姞/鏇存柊鏃堕棿 + /// </summary> + public DateTime add_time { get; set; } + + /// <summary> + /// 鐘舵�� + /// </summary> + public int status { get; set; } + /// <summary> + /// 鐘舵�� + /// </summary> + public string statusName { get; set; } + } +} diff --git a/DocumentServiceAPI.Application/ProjectInfo/ViewMode/DocumentProjectInfoDTO.cs b/DocumentServiceAPI.Application/ProjectInfo/ViewMode/DocumentProjectInfoDTO.cs index 63c7dcf..0546696 100644 --- a/DocumentServiceAPI.Application/ProjectInfo/ViewMode/DocumentProjectInfoDTO.cs +++ b/DocumentServiceAPI.Application/ProjectInfo/ViewMode/DocumentProjectInfoDTO.cs @@ -31,6 +31,7 @@ public int ddlBidbond { get; set; } public int ddlDocumentStatus { get; set; } public int ddlTenderStatus { get; set; } + public int? Status { get; set; } public int ddlWinStatus { get; set; } public int ddlOppugnStatus { get; set; } public int ddlComplainStatus { get; set; } @@ -40,6 +41,8 @@ public string Experts { get; set; } public string FileName { get; set; } + + public string parentcode { get; set; } public int ProjectId { get; set; } @@ -422,6 +425,7 @@ public string ts { get; set; } public string fy { get; set; } public string ss { get; set; } + public string zbwj { get; set; } public int? IsSignup { get; set; } public int? TenderDepositStatus { get; set; } diff --git a/DocumentServiceAPI.Application/WorkRemind/Services/Interfaces/IWorkRemindService.cs b/DocumentServiceAPI.Application/WorkRemind/Services/Interfaces/IWorkRemindService.cs index 720f40c..75b8e93 100644 --- a/DocumentServiceAPI.Application/WorkRemind/Services/Interfaces/IWorkRemindService.cs +++ b/DocumentServiceAPI.Application/WorkRemind/Services/Interfaces/IWorkRemindService.cs @@ -18,7 +18,7 @@ public bool InEmployee(Document_WorkRemind dw); public List<Document_EmployeeInfo> GetUEmployeeInfoList(); - public PageResult<Document_WorkRemind> postWorkRemindList(WorkRemindPageSearch page); + public PageResult<DocumentWorkRemindDTO> postWorkRemindList(WorkRemindPageSearch page); public bool DelEmployee(int ID); diff --git a/DocumentServiceAPI.Application/WorkRemind/Services/WorkRemindService.cs b/DocumentServiceAPI.Application/WorkRemind/Services/WorkRemindService.cs index adfec1b..0491956 100644 --- a/DocumentServiceAPI.Application/WorkRemind/Services/WorkRemindService.cs +++ b/DocumentServiceAPI.Application/WorkRemind/Services/WorkRemindService.cs @@ -14,6 +14,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Runtime.Intrinsics.Arm; using System.Security.Claims; using System.Text; using System.Threading.Tasks; @@ -60,18 +61,30 @@ { var a = GetJwtInfo(); dw.LastUpTime = DateTime.Now; - dw.CreatEmployeeId = a.EID; - var tentlist = _db.Queryable<Document_EmployeeInfo>() - .Where(x => x.EmployeeId == a.EID - - ).First(); - if (tentlist != null) + if (dw.WorkRemindId > 0) { - dw.CreatEmployeeName = tentlist.EmployeeName; - + _workRemindRepository.Update(dw); } - return _workRemindRepository.Insert(dw); + else + { + dw.CreatEmployeeId = a.EID; + + var tentlist = _db.Queryable<Document_EmployeeInfo>() + .Where(x => x.EmployeeId == a.EID + + ).First(); + if (tentlist != null) + { + dw.CreatEmployeeName = tentlist.EmployeeName; + + } + _workRemindRepository.Insert(dw); + } + + + + return true; @@ -98,7 +111,7 @@ /// </summary> /// <param name="page"></param> /// <returns></returns> - public PageResult<Document_WorkRemind> postWorkRemindList(WorkRemindPageSearch page) + public PageResult<DocumentWorkRemindDTO> postWorkRemindList(WorkRemindPageSearch page) { var a = GetJwtInfo(); @@ -107,26 +120,36 @@ pg.PageIndex = page.PageIndex; page.ToEmployeeId = a.EID; int total = 0; - PageResult<Document_WorkRemind> result = new PageResult<Document_WorkRemind>(); + PageResult<DocumentWorkRemindDTO> result = new PageResult<DocumentWorkRemindDTO>(); //result.Items = _db.Queryable<Document_WorkRemind>().Where(x => ((page.ToEmployeeId ==null || page.ToEmployeeId>0 ) || x.ToEmployeeId == page.ToEmployeeId) //&& (!page.WorkRemindTimeStart.HasValue || x.WorkRemindTime >= page.WorkRemindTimeStart.Value) // && (!page.WorkRemindTimeEnd.HasValue || x.WorkRemindTime <= page.WorkRemindTimeEnd.Value) //) // .OrderByDescending(x => x.WorkRemindTime).ToPageList(page.PageIndex, page.PageSize, ref total); + var Document_WorkReminds = _db.Queryable<Document_WorkRemind>() - result.Items = _db.Queryable<Document_WorkRemind>() - - .WhereIF(page.ToEmployeeId != null && page.ToEmployeeId > 0 , x => (x.ToEmployeeId == page.ToEmployeeId) ) + .WhereIF(page.ToEmployeeId != null && page.ToEmployeeId > 0 , x => (x.ToEmployeeId == page.ToEmployeeId || x.CreatEmployeeId == page.ToEmployeeId ) ) .WhereIF(page.WorkRemindTimeStart.HasValue, x => x.WorkRemindTime >= page.WorkRemindTimeStart.Value) .WhereIF(page.WorkRemindTimeEnd.HasValue, x=>x.WorkRemindTime <= page.WorkRemindTimeEnd.Value) .WhereIF(!string.IsNullOrEmpty(page.ProjectName), x => x.ProjectName.Contains(page.ProjectName)) .WhereIF(!string.IsNullOrEmpty(page.WorkRemindContent), x => x.WorkRemindContent.Contains(page.WorkRemindContent)) .OrderByDescending(x => x.WorkRemindTime).ToPageList(page.PageIndex, page.PageSize, ref total); - + result.Items = _mapper.Map<List<DocumentWorkRemindDTO>>(Document_WorkReminds); result.TotalCount = total; result.TotalPage = total%page.PageSize==0 ? total / page.PageSize : total / page.PageSize + 1; + + foreach(var workRemindDTO in result.Items) + { + var employeeInfo = _db.Queryable<Document_EmployeeInfo>().Where(x => x.EmployeeId == workRemindDTO.ToEmployeeId).First(); + if (employeeInfo != null) + { + workRemindDTO.ToEmployeeIdName = employeeInfo.EmployeeName; + } + + } + return result; } diff --git a/DocumentServiceAPI.Application/WorkRemind/ViewMode/DocumentWorkRemindDTO.cs b/DocumentServiceAPI.Application/WorkRemind/ViewMode/DocumentWorkRemindDTO.cs index 69fd73b..241ba1f 100644 --- a/DocumentServiceAPI.Application/WorkRemind/ViewMode/DocumentWorkRemindDTO.cs +++ b/DocumentServiceAPI.Application/WorkRemind/ViewMode/DocumentWorkRemindDTO.cs @@ -85,5 +85,26 @@ public int? CreatEmployeeId { get; set; } public string CreatEmployeeName { get; set; } + + /// <summary> + /// Desc: + /// Default: + /// Nullable:True + /// </summary> + public string ToEmployeeIdName { get; set; } + + /// <summary> + /// Desc: + /// Default: + /// Nullable:True + /// </summary> + public string ReplyContent { get; set; } + + /// <summary> + /// Desc: + /// Default: + /// Nullable:True + /// </summary> + public DateTime? ReplyTime { get; set; } } } diff --git a/DocumentServiceAPI.Application/WorkRemind/WorkRemindController.cs b/DocumentServiceAPI.Application/WorkRemind/WorkRemindController.cs index ca97d62..83ede30 100644 --- a/DocumentServiceAPI.Application/WorkRemind/WorkRemindController.cs +++ b/DocumentServiceAPI.Application/WorkRemind/WorkRemindController.cs @@ -39,7 +39,7 @@ /// </summary> /// <param name="page"></param> /// <returns></returns> - public PageResult<Document_WorkRemind> postWorkRemindList(WorkRemindPageSearch page) + public PageResult<DocumentWorkRemindDTO> postWorkRemindList(WorkRemindPageSearch page) { return _workRemindService.postWorkRemindList(page); } diff --git a/DocumentServiceAPI.Application/WorkRemind/dto/Mapper.cs b/DocumentServiceAPI.Application/WorkRemind/dto/Mapper.cs index 7b7ed12..c818964 100644 --- a/DocumentServiceAPI.Application/WorkRemind/dto/Mapper.cs +++ b/DocumentServiceAPI.Application/WorkRemind/dto/Mapper.cs @@ -1,4 +1,6 @@ -锘縰sing DocumentServiceAPI.Application.UserAndLogin.ViewMode; +锘縰sing DocumentServiceAPI.Application.ProjectInfo.ViewMode; +using DocumentServiceAPI.Application.UserAndLogin.ViewMode; +using DocumentServiceAPI.Application.WorkRemind.ViewMode; using DocumentServiceAPI.Model.cyDocumentModel; using System; using System.Collections.Generic; @@ -12,7 +14,8 @@ { public void Register(TypeAdapterConfig config) { - + config.ForType<DocumentWorkRemindDTO, Document_WorkRemind>(); + config.ForType<Document_WorkRemind, DocumentWorkRemindDTO>(); } } diff --git a/DocumentServiceAPI.Model/cyDocumentModel/Doc_Achievement.cs b/DocumentServiceAPI.Model/cyDocumentModel/Doc_Achievement.cs index c749af9..ebce805 100644 --- a/DocumentServiceAPI.Model/cyDocumentModel/Doc_Achievement.cs +++ b/DocumentServiceAPI.Model/cyDocumentModel/Doc_Achievement.cs @@ -64,6 +64,11 @@ public string hjzs_url { get; set; } /// <summary> + /// 鎺掑簭 + /// </summary> + public int? sort { get; set; } + + /// <summary> /// 鍏宠仈鍒嗙被 /// </summary> [SugarColumn(IsIgnore = true)] diff --git a/DocumentServiceAPI.Model/cyDocumentModel/Doc_ClassDel.cs b/DocumentServiceAPI.Model/cyDocumentModel/Doc_ClassDel.cs new file mode 100644 index 0000000..f31ab08 --- /dev/null +++ b/DocumentServiceAPI.Model/cyDocumentModel/Doc_ClassDel.cs @@ -0,0 +1,41 @@ +锘縰sing SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DocumentServiceAPI.Model.cyDocumentModel +{ + ///<summary> + ///鏂囨。鍒嗙被 + ///</summary> + [SugarTable("t_doc_classDel")] + public class Doc_ClassDel + { + public Doc_ClassDel() + { + } + + /// <summary> + /// id + /// </summary> + [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] + public int id { get; set; } + + /// <summary> + /// 鍒嗙被id + /// </summary> + public int? doc_classification_id { get; set; } + + /// <summary> + /// 娣诲姞/鏇存柊鏃堕棿 + /// </summary> + public DateTime add_time { get; set; } + + /// <summary> + /// 绉熸埛鏍囪瘑 + /// </summary> + public int? tenant_code { get; set; } + } +} diff --git a/DocumentServiceAPI.Model/cyDocumentModel/Doc_Info.cs b/DocumentServiceAPI.Model/cyDocumentModel/Doc_Info.cs index 446ddb4..de8c962 100644 --- a/DocumentServiceAPI.Model/cyDocumentModel/Doc_Info.cs +++ b/DocumentServiceAPI.Model/cyDocumentModel/Doc_Info.cs @@ -49,6 +49,11 @@ public bool is_del { get; set; } /// <summary> + /// 鎺掑簭 + /// </summary> + public int? sort { get; set; } + + /// <summary> /// 鍏宠仈鍒嗙被 /// </summary> [SugarColumn(IsIgnore = true)] diff --git a/DocumentServiceAPI.Model/cyDocumentModel/Document_WorkRemind.cs b/DocumentServiceAPI.Model/cyDocumentModel/Document_WorkRemind.cs index 1e5e585..2ed96c3 100644 --- a/DocumentServiceAPI.Model/cyDocumentModel/Document_WorkRemind.cs +++ b/DocumentServiceAPI.Model/cyDocumentModel/Document_WorkRemind.cs @@ -77,5 +77,19 @@ /// Nullable:True public string CreatEmployeeName { get; set; } + /// <summary> + /// Desc: + /// Default: + /// Nullable:True + /// </summary> + public string ReplyContent { get; set; } + + /// <summary> + /// Desc: + /// Default: + /// Nullable:True + /// </summary> + public DateTime? ReplyTime { get; set; } + } } -- Gitblit v1.9.1