DocumentFile.Service/Controllers/DocumentController.cs
@@ -135,6 +135,43 @@ return new JsonResult(msg); } /// <summary> /// 删除文件 /// </summary> /// <param name="delurl"></param> /// <returns></returns> [HttpPost] public IActionResult FileLastWriteTime([FromForm] string delurl) { ReturnMsg msg = new ReturnMsg(); try { if (delurl != null && delurl.Length > 0) { var dir = AppDomain.CurrentDomain.BaseDirectory; if (!string.IsNullOrEmpty(delurl)) { var path = dir + delurl; if (System.IO.File.Exists(path)) { var lastWriteTime = System.IO.File.GetLastWriteTime(path); msg.lastWriteTime = lastWriteTime.ToString(); } } msg.code = 1; } } catch (Exception ex) { NLogProvider.GetInstance().Error(ex); } return new JsonResult(msg); } /// <summary> /// 下载文件 /// </summary> DocumentFile.Service/ReturnMsg.cs
@@ -34,5 +34,10 @@ /// 记录数量 /// </summary> public int count { get; set; } /// <summary> /// 标识代码 /// </summary> public string lastWriteTime { get; set; } } } DocumentServiceAPI.Application/DocManage/DocumentManageAppService.cs
@@ -23,9 +23,11 @@ private readonly ProjectManageService _projectService; private readonly DocAchievementService _achievementService; private readonly IRedisCacheService _redisCache; private readonly DocShebeinengliService _shebeinengliService; public DocumentManageAppService(DocClassificationService classService, DocumentManageService docService, OrganizationService orgService, FileManageService fileManageService, ProjectManageService projectService, DocAchievementService achievementService, IRedisCacheService redisCase) FileManageService fileManageService, ProjectManageService projectService, DocAchievementService achievementService, IRedisCacheService redisCase , DocShebeinengliService shebeinengliService) { _classificationService = classService; _docManageService = docService; @@ -33,6 +35,7 @@ _fileManageService = fileManageService; _projectService = projectService; _achievementService = achievementService; _shebeinengliService = shebeinengliService; _redisCache = redisCase; } @@ -105,6 +108,16 @@ } return new JsonResult(data.OrderBy(x => x.sort).Select(c => new { name = c.achievement_name, idcode = c.id+ "/002" }).ToList()); } else if (search.Code == "006") { var data = await _shebeinengliService.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.OrderBy(x => x.sort).Select(c => new { name = c.shebeinengli_name, idcode = c.id + "/006" }).ToList()); } else { @@ -204,6 +217,9 @@ project_name = c.DocProject?.ProjectName, status = c.status, sort = c.sort, zb_time = c.zb_time.HasValue ? c.zb_time.Value.ToString("yyyy/MM/dd") : "", zige_code = c.zige_code, zige_code_name = c.document_Dictionary?.Name }).ToList(); } @@ -256,6 +272,8 @@ doc.status = info.status; doc.tenant_code = info.tenant_id; doc.sort = info.sort; doc.zb_time = info.zb_time; doc.zige_code = info.zige_code; var id =await _docManageService.InsertReturnIdentityAsync(doc); if (id > 0) @@ -304,6 +322,8 @@ doc.org_id = info.org_id; doc.status = info.status; doc.sort = info.sort; doc.zb_time = info.zb_time; doc.zige_code = info.zige_code; if (await _docManageService.UpdateAsync(doc)) { //新提交的文件 @@ -464,6 +484,62 @@ return new JsonResult(list_Dtos); } else if (code == "006") { var data = await _shebeinengliService.GetByIdAsync(id); List<FileInfo_List_Dto> list_Dtos = new List<FileInfo_List_Dto>(); if (data != null) { if (!string.IsNullOrEmpty(data.sbzp_url) && data.sbzp_fuhe > 0) { FileInfo_List_Dto fileInfo_List_Dto = new FileInfo_List_Dto(); fileInfo_List_Dto.filePath = data.sbzp_url; fileInfo_List_Dto.fileNewName = "设备照片"; fileInfo_List_Dto.suffix = Path.GetExtension(data.sbzp_url); list_Dtos.Add(fileInfo_List_Dto); } if (!string.IsNullOrEmpty(data.gmht_url) && data.gmht_fuhe > 0) { FileInfo_List_Dto fileInfo_List_Dto = new FileInfo_List_Dto(); fileInfo_List_Dto.filePath = data.gmht_url; fileInfo_List_Dto.fileNewName = "购买合同"; fileInfo_List_Dto.suffix = Path.GetExtension(data.gmht_url); list_Dtos.Add(fileInfo_List_Dto); } if (!string.IsNullOrEmpty(data.fp_url) && data.fp_fuhe > 0) { FileInfo_List_Dto fileInfo_List_Dto = new FileInfo_List_Dto(); fileInfo_List_Dto.filePath = data.fp_url; fileInfo_List_Dto.fileNewName = "发票"; fileInfo_List_Dto.suffix = Path.GetExtension(data.fp_url); list_Dtos.Add(fileInfo_List_Dto); } if (!string.IsNullOrEmpty(data.fkpz_url) && data.fkpz_fuhe > 0) { 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.csmp_url) && data.csmp_fuhe > 0) { FileInfo_List_Dto fileInfo_List_Dto = new FileInfo_List_Dto(); fileInfo_List_Dto.filePath = data.csmp_url; fileInfo_List_Dto.fileNewName = "参数(铭牌)"; fileInfo_List_Dto.suffix = Path.GetExtension(data.csmp_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); @@ -605,6 +681,7 @@ zbtzs=c.zbtzs_url, status = c.status, sort = c.sort, zb_time = c.zb_time.HasValue? c.zb_time.Value.ToString("yyyy/MM/dd") :"", }).ToList(); } @@ -629,10 +706,10 @@ { var msg = false; var ck = await _achievementService.GetFirstAsync(c=>c.status==1 && c.tenant_code==model.tenant_id && c.achievement_name==model.name && c.classification_id==c.classification_id); && c.achievement_name==model.name && c.classification_id== model.class_id); if (ck != null) { if(model.id>0 && model.id != ck.id) if (model.id <= 0 || (model.id > 0 && model.id != ck.id)) { msg = true; } @@ -671,6 +748,7 @@ doc.status = 1; doc.tenant_code = info.tenant_id; doc.sort = info.sort; doc.zb_time = info.zb_time; return await _achievementService.UpdateAsync(doc); } else @@ -691,6 +769,7 @@ doc.status = 1; doc.tenant_code = info.tenant_id; doc.sort = info.sort; doc.zb_time = info.zb_time; return await _achievementService.InsertAsync(doc); } @@ -739,6 +818,7 @@ achievement_Submit_Dto.tenant_id = data.tenant_code; achievement_Submit_Dto.status = data.status; achievement_Submit_Dto.sort = data.sort; achievement_Submit_Dto.zb_time = data.zb_time; return new JsonResult(achievement_Submit_Dto); @@ -748,5 +828,313 @@ } #endregion #region 设备能力 /// <summary> /// 根据分页条件查询分页数据 /// </summary> /// <param name="page"></param> /// <returns></returns> public async Task<IActionResult> PostShebeinengliListPage(DocumentPageSearch page) { PageResult<Achievement_List_Dto> result = new PageResult<Achievement_List_Dto>(); try { Expression<Func<Doc_Shebeinengli, bool>> expression = t => true; expression = expression.And(t => t.tenant_code == page.TenantID && t.status == 1); if (page.ClassCode.HasValue) { expression = expression.And(t => t.classification_id == page.ClassCode); } if (!string.IsNullOrEmpty(page.Name)) { expression = expression.And(t => t.shebeinengli_name.Contains(page.Name)); } if (page.sbzp.HasValue) { if (page.sbzp == 1) { expression = expression.And(t => t.sbzp_url != null); } else { expression = expression.And(t => t.sbzp_url == null); } } if (page.gmht.HasValue) { if (page.gmht == 1) { expression = expression.And(t => t.gmht_url != null); } else { expression = expression.And(t => t.gmht_url == null); } } if (page.fp.HasValue) { if (page.fp == 1) { expression = expression.And(t => t.fp_url != null); } else { expression = expression.And(t => t.fp_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.csmp.HasValue) { if (page.csmp == 1) { expression = expression.And(t => t.csmp_url != null); } else { expression = expression.And(t => t.csmp_url == null); } } RefAsync<int> total = 0; var data = await _shebeinengliService.Context.Queryable<Doc_Shebeinengli>() .Includes(c => c.DocClassification) //.Includes(c => c.DocProject) .Where(expression) .OrderBy(c => c.sort) .ToPageListAsync(page.PageIndex, page.PageSize, total); if (data != null && total > 0) { result.Items = data.Select(c => new Achievement_List_Dto() { add_time = c.add_time, class_id = c.classification_id, class_name = c.DocClassification?.doc_classification, id = c.id, project_id = c.project_id, project_name = c.shebeinengli_name,//c.DocProject?.ProjectName, sbzp = c.sbzp_url, gmht = c.gmht_url, fp = c.fp_url, fkpz = c.fkpz_url, csmp = c.csmp_url, status = c.status, sort = c.sort, zb_time = c.zb_time.HasValue ? c.zb_time.Value.ToString("yyyy/MM/dd") : "", zige_code = (c.sbzp_zige.HasValue&& c.sbzp_zige >0 ) || (c.gmht_zige.HasValue && c.gmht_zige > 0) || (c.fp_zige.HasValue && c.fp_zige > 0) || (c.fkpz_zige.HasValue && c.fkpz_zige > 0) || (c.csmp_zige.HasValue && c.csmp_zige > 0) ? 1:null, }).ToList(); } result.PageIndex = page.PageIndex; result.PageSize = page.PageSize; result.TotalCount = total; } catch (Exception er) { Log.Error(er.Message, er); } return new JsonResult(result); } /// <summary> /// 检查重复 /// </summary> /// <param name="model"></param> /// <returns></returns> public async Task<bool> CheckDocShebeinengliDuplicate(Document_Submit_Dto model) { var msg = false; var ck = await _shebeinengliService.GetFirstAsync(c => c.status == 1 && c.tenant_code == model.tenant_id && c.shebeinengli_name == model.name && c.classification_id == model.class_id); if (ck != null) { if (model.id <= 0 || (model.id > 0 && model.id != ck.id)) { msg = true; } else { msg = false; } } return msg; } /// <summary> /// 添加数据 /// </summary> /// <param name="info"></param> /// <returns></returns> public async Task<bool> PostAddDocShebeinengli(Achievement_Submit_Dto info) { if (info.id > 0) { Doc_Shebeinengli doc = new Doc_Shebeinengli(); doc.id = info.id; doc.add_time = DateTime.Now; doc.classification_id = info.class_id; doc.project_id = info.project_id; doc.shebeinengli_name = info.name; doc.sbzp_url = info.sbzp; doc.gmht_url = info.gmht; doc.fp_url = info.fp; doc.fkpz_url = info.fkpz; doc.csmp_url = info.csmp; doc.status = 1; doc.tenant_code = info.tenant_id; doc.sort = info.sort; doc.zb_time = info.zb_time; doc.zige_code = info.zige_code; doc.sbzp_zige = info.sbzp_zige; doc.gmht_zige = info.gmht_zige; doc.fp_zige = info.fp_zige; doc.fkpz_zige = info.fkpz_zige; doc.csmp_zige = info.csmp_zige; doc.sbzp_fuhe = info.sbzp_fuhe; doc.gmht_fuhe = info.gmht_fuhe; doc.fp_fuhe = info.fp_fuhe; doc.fkpz_fuhe = info.fkpz_fuhe; doc.csmp_fuhe = info.csmp_fuhe; return await _shebeinengliService.UpdateAsync(doc); } else { Doc_Shebeinengli doc = new Doc_Shebeinengli(); doc.add_time = DateTime.Now; doc.classification_id = info.class_id; doc.project_id = info.project_id; doc.shebeinengli_name = info.name; doc.sbzp_url = info.sbzp; doc.gmht_url = info.gmht; doc.fp_url = info.fp; doc.fkpz_url = info.fkpz; doc.csmp_url = info.csmp; doc.status = 1; doc.tenant_code = info.tenant_id; doc.sort = info.sort; doc.zb_time = info.zb_time; doc.zige_code = info.zige_code; doc.sbzp_zige = info.sbzp_zige; doc.gmht_zige = info.gmht_zige; doc.fp_zige = info.fp_zige; doc.fkpz_zige = info.fkpz_zige; doc.csmp_zige = info.csmp_zige; doc.sbzp_fuhe = info.sbzp_fuhe; doc.gmht_fuhe = info.gmht_fuhe; doc.fp_fuhe = info.fp_fuhe; doc.fkpz_fuhe = info.fkpz_fuhe; doc.csmp_fuhe = info.csmp_fuhe; return await _shebeinengliService.InsertAsync(doc); } } /// <summary> /// 删除文档数据 /// </summary> /// <param name="doc"></param> /// <returns></returns> public async Task<IActionResult> PostDelShebeinengli(Achievement_Submit_Dto doc) { bool msg = false; var sss = new Doc_Shebeinengli(); sss.id = doc.id; msg = await _shebeinengliService.DeleteAsync(sss); return new JsonResult(msg); } /// <summary> /// 根据文档号查询 /// </summary> /// <param name="search"></param> /// <returns></returns> public async Task<IActionResult> PostShebeinengliInfo(DocumentSearch search) { var data = await _shebeinengliService.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.shebeinengli_name; achievement_Submit_Dto.sbzp = data.sbzp_url; achievement_Submit_Dto.gmht = data.gmht_url; achievement_Submit_Dto.fp = data.fp_url; achievement_Submit_Dto.fkpz = data.fkpz_url; achievement_Submit_Dto.csmp = data.csmp_url; achievement_Submit_Dto.tenant_id = data.tenant_code; achievement_Submit_Dto.status = data.status; achievement_Submit_Dto.sort = data.sort; achievement_Submit_Dto.zb_time = data.zb_time; achievement_Submit_Dto.zige_code = data.zige_code; achievement_Submit_Dto.sbzp_zige = data.sbzp_zige; achievement_Submit_Dto.gmht_zige = data.gmht_zige; achievement_Submit_Dto.fp_zige = data.fp_zige; achievement_Submit_Dto.fkpz_zige = data.fkpz_zige; achievement_Submit_Dto.csmp_zige = data.csmp_zige; achievement_Submit_Dto.sbzp_fuhe = data.sbzp_fuhe; achievement_Submit_Dto.gmht_fuhe = data.gmht_fuhe; achievement_Submit_Dto.fp_fuhe = data.fp_fuhe; achievement_Submit_Dto.fkpz_fuhe = data.fkpz_fuhe; achievement_Submit_Dto.csmp_fuhe = data.csmp_fuhe; return new JsonResult(achievement_Submit_Dto); } return null; } #endregion } } DocumentServiceAPI.Application/DocManage/Dtos/Achievement_Submit_Dto.cs
@@ -33,10 +33,54 @@ public string hjzs { get; set; } public int status { get; set; } /// <summary> /// 设备照片 /// </summary> public string sbzp { get; set; } /// <summary> /// 购买合同 /// </summary> public string gmht { get; set; } /// <summary> /// 发票 /// </summary> public string fp { get; set; } /// <summary> /// 参数(铭牌) /// </summary> public string csmp { get; set; } /// <summary> /// 排序 /// </summary> public int? sort { get; set; } /// <summary> /// 添加/更新时间 /// </summary> public DateTime? zb_time { get; set; } /// <summary> /// 资格文件类型 /// </summary> public int? zige_code { get; set; } public int? sbzp_zige { get; set; } public int? gmht_zige { get; set; } public int? fp_zige { get; set; } public int? fkpz_zige { get; set; } public int? csmp_zige { get; set; } public int? sbzp_fuhe { get; set; } public int? gmht_fuhe { get; set; } public int? fp_fuhe { get; set; } public int? fkpz_fuhe { get; set; } public int? csmp_fuhe { get; set; } } public class Achievement_List_Dto @@ -88,5 +132,41 @@ /// 排序 /// </summary> public int? sort { get; set; } /// <summary> /// 设备照片 /// </summary> public string sbzp { get; set; } /// <summary> /// 购买合同 /// </summary> public string gmht { get; set; } /// <summary> /// 发票 /// </summary> public string fp { get; set; } /// <summary> /// 参数(铭牌) /// </summary> public string csmp { get; set; } /// <summary> /// 添加/更新时间 /// </summary> public string zb_time { get; set; } /// <summary> /// 资格文件类型 /// </summary> public int? zige_code { get; set; } } } DocumentServiceAPI.Application/DocManage/Dtos/Document_List_Dto.cs
@@ -53,6 +53,18 @@ /// 排序 /// </summary> public int? sort { get; set; } /// <summary> /// 资格文件类型 /// </summary> public int? zige_code { get; set; } public string zige_code_name { get; set; } /// <summary> /// 获奖时间 /// </summary> public string zb_time { get; set; } } /// <summary> @@ -92,6 +104,16 @@ /// </summary> public int? sort { get; set; } /// <summary> /// 资格文件类型 /// </summary> public int? zige_code { get; set; } /// <summary> /// 获奖时间 /// </summary> public DateTime? zb_time { get; set; } public List<DocumentFile_Submit_Dto> newfiles { get; set; } public List<DocumentFile_Submit_Dto> editfiles { get; set; } @@ -121,6 +143,9 @@ this.status = doc.status; this.files = filelist; this.sort = doc.sort; this.zb_time = doc.zb_time; this.zige_code = doc.zige_code; } public int id { get; set; } @@ -140,6 +165,16 @@ public int? sort { get; set; } /// <summary> /// 资格文件类型 /// </summary> public int? zige_code { get; set; } /// <summary> /// 获奖时间 /// </summary> public DateTime? zb_time { get; set; } public List<FileInfo_List_Dto> files { get; set; } } DocumentServiceAPI.Application/DocManage/Services/DocShebeinengliService.cs
New file @@ -0,0 +1,14 @@ using DocumentServiceAPI.Core; using DocumentServiceAPI.Model.cyDocumentModel; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DocumentServiceAPI.Application.DocManage.Services { public class DocShebeinengliService : BaseRepository<Doc_Shebeinengli>, ITransient { } } DocumentServiceAPI.Application/DocManage/Services/DocumentManageService.cs
@@ -45,6 +45,29 @@ public int? yhpj { get; set; } public int? hjzs { get; set; } /// <summary> /// 设备照片 /// </summary> public int? sbzp { get; set; } /// <summary> /// 购买合同 /// </summary> public int? gmht { get; set; } /// <summary> /// 发票 /// </summary> public int? fp { get; set; } /// <summary> /// 参数(铭牌) /// </summary> public int? csmp { get; set; } } public class DocumentSearch : BaseSearch DocumentServiceAPI.Application/ProjectInfo/ProjectInfoController.cs
@@ -700,5 +700,59 @@ return _projectInfoService.GetAchievementInfoMaxSortId(unitId); } /// <summary> /// 获取最大排序 /// </summary> /// <param name="unitId"></param> /// <returns></returns> public Doc_Classification GetShebeinengliInfoMaxSortId(int unitId) { return _projectInfoService.GetShebeinengliInfoMaxSortId(unitId); } /// <summary> /// 获取分类列表postDocumentTempletList /// </summary> /// <param name="page"></param> /// <returns></returns> public PageResult<Document_DocumentTempletInfoDTO> postDocumentTempletList(DocumentProjectInfoPageSearch page) { return _projectInfoService.postDocumentTempletList(page); } /// <summary> ///删除分类GetDeleteDocumentTempletInfo /// </summary> /// <param name="ID"></param> /// <returns></returns> public bool GetDeleteDocumentTempletInfo(int ID) { return _projectInfoService.GetDeleteDocumentTempletInfo(ID); } /// <summary> /// 保存Document_DocumentTempletInfo /// </summary> /// <param name="dp"></param> /// <returns></returns> public bool SaveDocumentTempletInfo(Document_DocumentTempletInfo dp) { return _projectInfoService.SaveDocumentTempletInfo(dp); } /// <summary> /// 获取项目GetTempletModelByProjectId /// <param name="projiectid"></param> /// </summary> public Document_DocumentTempletInfo GetTempletModelByProjectId(int projiectid) { return _projectInfoService.GetTempletModelByProjectId(projiectid); } } } DocumentServiceAPI.Application/ProjectInfo/Services/Interfaces/IProjectInfoService.cs
@@ -153,5 +153,20 @@ public Doc_Classification GetDocumentInfoMaxSortId(int unitId, string doccode); public Doc_Classification GetAchievementInfoMaxSortId(int unitId); public Doc_Classification GetShebeinengliInfoMaxSortId(int unitId); public PageResult<Document_DocumentTempletInfoDTO> postDocumentTempletList(DocumentProjectInfoPageSearch page); public bool GetDeleteDocumentTempletInfo(int ID); public bool SaveDocumentTempletInfo(Document_DocumentTempletInfo dp); public Document_DocumentTempletInfo GetTempletModelByProjectId(int projiectid); } } DocumentServiceAPI.Application/ProjectInfo/Services/ProjectInfoService.cs
@@ -1,5 +1,6 @@ using AngleSharp.Dom; using AngleSharp.Html.Parser; using DocumentServiceAPI.Application.DocManage.Dtos; using DocumentServiceAPI.Application.ProjectInfo.Services.Interfaces; using DocumentServiceAPI.Application.ProjectInfo.ViewMode; using DocumentServiceAPI.Application.Repository; @@ -117,7 +118,7 @@ document_ProjectInfo.ProjectUrl = dp.ProjectUrl; var parser = new HtmlParser(); var list11 = new List<AngleSharp.Dom.IElement>(); if (url.StartsWith("http://www.ccgp.gov.cn")) if (url.StartsWith("http://www.ccgp.gov.cn")|| url.StartsWith("https://www.ccgp.gov.cn")) { using (HttpClient client = new HttpClient()) { @@ -146,22 +147,42 @@ if (document_ProjectInfo.ProjectName.IndexOf("公开招标")>=0) { document_ProjectInfo.PurchaseMethod = 3; document_ProjectInfo.ProjectName = document_ProjectInfo.ProjectName.Replace("公开招标", "").Replace("公告", ""); } else if (document_ProjectInfo.ProjectName.IndexOf("竞争性谈判") >= 0) { document_ProjectInfo.PurchaseMethod = 4; document_ProjectInfo.ProjectName = document_ProjectInfo.ProjectName.Replace("竞争性谈判", "").Replace("公告", ""); } else if (document_ProjectInfo.ProjectName.IndexOf("单一来源") >= 0) { document_ProjectInfo.PurchaseMethod = 5; document_ProjectInfo.ProjectName = document_ProjectInfo.ProjectName.Replace("单一来源", "").Replace("公告", ""); } else if (document_ProjectInfo.ProjectName.IndexOf("询价") >= 0) { document_ProjectInfo.PurchaseMethod = 6; document_ProjectInfo.ProjectName = document_ProjectInfo.ProjectName.Replace("询价", "").Replace("公告", ""); } else if (document_ProjectInfo.ProjectName.IndexOf("邀请") >= 0) { document_ProjectInfo.PurchaseMethod = 31; document_ProjectInfo.ProjectName = document_ProjectInfo.ProjectName.Replace("邀请招标", "").Replace("公告", ""); } else if (document_ProjectInfo.ProjectName.IndexOf("竞争性磋商") >= 0) { document_ProjectInfo.PurchaseMethod = 37; document_ProjectInfo.ProjectName = document_ProjectInfo.ProjectName.Replace("竞争性磋商", "").Replace("公告", ""); } else if (document_ProjectInfo.ProjectName.IndexOf("框架协议") >= 0) { document_ProjectInfo.PurchaseMethod = 38; document_ProjectInfo.ProjectName = document_ProjectInfo.ProjectName.Replace("框架协议", "").Replace("公告", ""); } else if (document_ProjectInfo.ProjectName.IndexOf("比选") >= 0) { document_ProjectInfo.PurchaseMethod = 39; document_ProjectInfo.ProjectName = document_ProjectInfo.ProjectName.Replace("比选", "").Replace("公告", ""); } @@ -337,9 +358,35 @@ if (DateTime.TryParse(TenderTimes, out b)) { document_ProjectInfo.TenderTime = b; } var jiezhishijian = document.All.Where(m => m.HasAttribute("id") && m.GetAttribute("id").StartsWith("_notice_content_noticePurchaseTime-noticePurchaseTime")).FirstOrDefault(); var jiezhishijians = jiezhishijian.QuerySelectorAll("span"); if (jiezhishijians != null && jiezhishijians.Length > 0) { //for (int i = 0; i < jiezhishijians.Length; i++) //{ // if (jiezhishijians[i].TextContent.IndexOf("年") >= 0 && jiezhishijians[i].TextContent.IndexOf("、") < 0) // { // } //} if (DateTime.TryParse(jiezhishijians[0].TextContent.Trim(), out b)) { document_ProjectInfo.SignupStartTime = b; } if (DateTime.TryParse(jiezhishijians[1].TextContent.Trim(), out b)) { document_ProjectInfo.SignupEndTime = b; } } @@ -347,25 +394,43 @@ if (document_ProjectInfo.ProjectName.IndexOf("公开招标") >= 0) { document_ProjectInfo.PurchaseMethod = 3; document_ProjectInfo.ProjectName = document_ProjectInfo.ProjectName.Replace("公开招标", "").Replace("公告",""); } else if (document_ProjectInfo.ProjectName.IndexOf("竞争性谈判") >= 0) { document_ProjectInfo.PurchaseMethod = 4; document_ProjectInfo.ProjectName = document_ProjectInfo.ProjectName.Replace("竞争性谈判", "").Replace("公告", ""); } else if (document_ProjectInfo.ProjectName.IndexOf("单一来源") >= 0) { document_ProjectInfo.PurchaseMethod = 5; document_ProjectInfo.ProjectName = document_ProjectInfo.ProjectName.Replace("单一来源", "").Replace("公告", ""); } else if (document_ProjectInfo.ProjectName.IndexOf("询价") >= 0) { document_ProjectInfo.PurchaseMethod = 6; document_ProjectInfo.ProjectName = document_ProjectInfo.ProjectName.Replace("询价", "").Replace("公告", ""); } else if (document_ProjectInfo.ProjectName.IndexOf("邀请") >= 0) { document_ProjectInfo.PurchaseMethod = 31; document_ProjectInfo.ProjectName = document_ProjectInfo.ProjectName.Replace("邀请招标", "").Replace("公告", ""); } else if (document_ProjectInfo.ProjectName.IndexOf("竞争性磋商") >= 0) { document_ProjectInfo.PurchaseMethod = 37; document_ProjectInfo.ProjectName = document_ProjectInfo.ProjectName.Replace("竞争性磋商", "").Replace("公告", ""); } else if (document_ProjectInfo.ProjectName.IndexOf("框架协议") >= 0) { document_ProjectInfo.PurchaseMethod = 38; document_ProjectInfo.ProjectName = document_ProjectInfo.ProjectName.Replace("框架协议", "").Replace("公告", ""); } else if (document_ProjectInfo.ProjectName.IndexOf("比选") >= 0) { document_ProjectInfo.PurchaseMethod = 39; document_ProjectInfo.ProjectName = document_ProjectInfo.ProjectName.Replace("比选", "").Replace("公告", ""); } var vF_detail_content = document.All.Where(m => m.LocalName == "div" && @@ -389,8 +454,76 @@ } if (td[i].TextContent.IndexOf("项目名称:") >= 0 && td[i].TextContent.IndexOf("、") < 0) { if (string.IsNullOrEmpty(document_ProjectInfo.ProjectName)) { document_ProjectInfo.ProjectName = td[i].TextContent.Replace("项目名称:", "").Replace("1.", "").Replace("/", "").Trim(); } } if (td[i].TextContent.IndexOf("采购方式:") >= 0 && td[i].TextContent.IndexOf("、") < 0) { if (td[i].TextContent.IndexOf("公开招标") >= 0) { document_ProjectInfo.PurchaseMethod = 3; document_ProjectInfo.ProjectName = document_ProjectInfo.ProjectName.Replace("公开招标", "").Replace("公告", ""); } else if (td[i].TextContent.IndexOf("竞争性谈判") >= 0) { document_ProjectInfo.PurchaseMethod = 4; document_ProjectInfo.ProjectName = document_ProjectInfo.ProjectName.Replace("竞争性谈判", "").Replace("公告", ""); } else if (td[i].TextContent.IndexOf("单一来源") >= 0) { document_ProjectInfo.PurchaseMethod = 5; document_ProjectInfo.ProjectName = document_ProjectInfo.ProjectName.Replace("单一来源", "").Replace("公告", ""); } else if (td[i].TextContent.IndexOf("询价") >= 0) { document_ProjectInfo.PurchaseMethod = 6; document_ProjectInfo.ProjectName = document_ProjectInfo.ProjectName.Replace("询价", "").Replace("公告", ""); } else if (td[i].TextContent.IndexOf("邀请") >= 0) { document_ProjectInfo.PurchaseMethod = 31; document_ProjectInfo.ProjectName = document_ProjectInfo.ProjectName.Replace("邀请招标", "").Replace("公告", ""); } else if (td[i].TextContent.IndexOf("竞争性磋商") >= 0) { document_ProjectInfo.PurchaseMethod = 37; document_ProjectInfo.ProjectName = document_ProjectInfo.ProjectName.Replace("竞争性磋商", "").Replace("公告", ""); } else if (td[i].TextContent.IndexOf("框架协议") >= 0) { document_ProjectInfo.PurchaseMethod = 38; document_ProjectInfo.ProjectName = document_ProjectInfo.ProjectName.Replace("框架协议", "").Replace("公告", ""); } else if (td[i].TextContent.IndexOf("比选") >= 0) { document_ProjectInfo.PurchaseMethod = 39; document_ProjectInfo.ProjectName = document_ProjectInfo.ProjectName.Replace("比选", "").Replace("公告", ""); } } } } var txtAgencyManager = document.All.Where(m => m.LocalName == "span" && m.HasAttribute("id") && m.GetAttribute("id").StartsWith("_notice_content_projectContact-managerName")).FirstOrDefault(); if (txtAgencyManager != null) { document_ProjectInfo.AgencyManager = txtAgencyManager.TextContent; } var lianxiren = document.All.Where(m => m.LocalName == "div" && m.ClassName == "innercontent").ToList(); foreach (var element in lianxiren) { @@ -475,22 +608,42 @@ if (document_ProjectInfo.ProjectName.IndexOf("公开招标") >= 0) { document_ProjectInfo.PurchaseMethod = 3; document_ProjectInfo.ProjectName = document_ProjectInfo.ProjectName.Replace("公开招标", "").Replace("公告", ""); } else if (document_ProjectInfo.ProjectName.IndexOf("竞争性谈判") >= 0) { document_ProjectInfo.PurchaseMethod = 4; document_ProjectInfo.ProjectName = document_ProjectInfo.ProjectName.Replace("竞争性谈判", "").Replace("公告", ""); } else if (document_ProjectInfo.ProjectName.IndexOf("单一来源") >= 0) { document_ProjectInfo.PurchaseMethod = 5; document_ProjectInfo.ProjectName = document_ProjectInfo.ProjectName.Replace("单一来源", "").Replace("公告", ""); } else if (document_ProjectInfo.ProjectName.IndexOf("询价") >= 0) { document_ProjectInfo.PurchaseMethod = 6; document_ProjectInfo.ProjectName = document_ProjectInfo.ProjectName.Replace("询价", "").Replace("公告", ""); } else if (document_ProjectInfo.ProjectName.IndexOf("邀请") >= 0) { document_ProjectInfo.PurchaseMethod = 31; document_ProjectInfo.ProjectName = document_ProjectInfo.ProjectName.Replace("邀请招标", "").Replace("公告", ""); } else if (document_ProjectInfo.ProjectName.IndexOf("竞争性磋商") >= 0) { document_ProjectInfo.PurchaseMethod = 37; document_ProjectInfo.ProjectName = document_ProjectInfo.ProjectName.Replace("竞争性磋商", "").Replace("公告", ""); } else if (document_ProjectInfo.ProjectName.IndexOf("框架协议") >= 0) { document_ProjectInfo.PurchaseMethod = 38; document_ProjectInfo.ProjectName = document_ProjectInfo.ProjectName.Replace("框架协议", "").Replace("公告", ""); } else if (document_ProjectInfo.ProjectName.IndexOf("比选") >= 0) { document_ProjectInfo.PurchaseMethod = 39; document_ProjectInfo.ProjectName = document_ProjectInfo.ProjectName.Replace("比选", "").Replace("公告", ""); } @@ -1282,16 +1435,16 @@ public List<Document_AptitudeInfo> GetAptitudeInfoByUnitId(int UnitId) { var result = _db.Queryable<Doc_Info>().Where( x=>x.is_del == false && x.org_id == UnitId).ToList() ;//执行查询 var result = _db.Queryable<Doc_Info>().Where( x=>x.is_del == false && x.org_id == UnitId && x.zige_code > 0).OrderBy(x=>x.doc_code).OrderBy(x=>x.sort).ToList() ;//执行查询 var ids = result.Select(x => x.id).ToArray(); var file = _db.Queryable<File_Info>().Where(x => ids.Contains(x.doc_id)).ToList();//执行查询 var file = _db.Queryable<File_Info>().Where(x => ids.Contains(x.doc_id) && x.status ==1 ).ToList();//执行查询 var document_AptitudeInfos = new List<Document_AptitudeInfo>(); foreach (var doc_Info in result) { var document_AptitudeInfo = new Document_AptitudeInfo(); var filesss = file.Where(x => x.doc_id == doc_Info.id).ToList(); var filesss = file.Where(x => x.doc_id == doc_Info.id).OrderBy(x => x.sort).ToList(); if(filesss!=null && filesss.Count > 0) { @@ -1322,8 +1475,174 @@ document_AptitudeInfo.UnitId = doc_Info.org_id.HasValue ? doc_Info.org_id.Value : 0; ; document_AptitudeInfo.LastUpdateTime = doc_Info.add_time; document_AptitudeInfo.LastUpdateName = ""; document_AptitudeInfo.AdviseFlag = 1; document_AptitudeInfo.AdviseFlag = doc_Info.zige_code; ; document_AptitudeInfo.UserId = doc_Info.tenant_code; document_AptitudeInfos.Add(document_AptitudeInfo); } //var resultAchievement = _db.Queryable<Doc_Achievement>().Where(x => x.status == 1 && x.tenant_code == UnitId).OrderBy(x=>x.sort).ToList();//执行查询 //foreach (var achievement in resultAchievement) //{ // var document_AptitudeInfo = new Document_AptitudeInfo(); // document_AptitudeInfo.FilePath = ""; // document_AptitudeInfo.FileName = ""; // document_AptitudeInfo.FileSize = 0; // if (!string.IsNullOrEmpty(achievement.zbtzs_url)) // { // document_AptitudeInfo.FilePath += achievement.zbtzs_url; // document_AptitudeInfo.FileName += "中标通知书"; // document_AptitudeInfo.FileSize += 0 ; // document_AptitudeInfo.FilePath += ";"; // document_AptitudeInfo.FileName += ";"; // } // if (!string.IsNullOrEmpty(achievement.ht_url)) // { // document_AptitudeInfo.FilePath += achievement.ht_url; // document_AptitudeInfo.FileName += "合同"; // document_AptitudeInfo.FileSize += 0; // document_AptitudeInfo.FilePath += ";"; // document_AptitudeInfo.FileName += ";"; // } // if (!string.IsNullOrEmpty(achievement.ysbg_url)) // { // document_AptitudeInfo.FilePath += achievement.ysbg_url; // document_AptitudeInfo.FileName += "验收报告"; // document_AptitudeInfo.FileSize += 0; // document_AptitudeInfo.FilePath += ";"; // document_AptitudeInfo.FileName += ";"; // } // if (!string.IsNullOrEmpty(achievement.fkpz_url)) // { // document_AptitudeInfo.FilePath += achievement.fkpz_url; // document_AptitudeInfo.FileName += "付款凭证"; // document_AptitudeInfo.FileSize += 0; // document_AptitudeInfo.FilePath += ";"; // document_AptitudeInfo.FileName += ";"; // } // if (!string.IsNullOrEmpty(achievement.yhpj_url)) // { // document_AptitudeInfo.FilePath += achievement.yhpj_url; // document_AptitudeInfo.FileName += "用户评价"; // document_AptitudeInfo.FileSize += 0; // document_AptitudeInfo.FilePath += ";"; // document_AptitudeInfo.FileName += ";"; // } // if (!string.IsNullOrEmpty(achievement.hjzs_url)) // { // document_AptitudeInfo.FilePath += achievement.hjzs_url; // document_AptitudeInfo.FileName += "获奖证书"; // document_AptitudeInfo.FileSize += 0; // document_AptitudeInfo.FilePath += ";"; // document_AptitudeInfo.FileName += ";"; // } // if (document_AptitudeInfo.FilePath.EndsWith(";")) // { // document_AptitudeInfo.FilePath = document_AptitudeInfo.FilePath.Substring(0, document_AptitudeInfo.FilePath.Length - 1); // } // if (document_AptitudeInfo.FileName.EndsWith(";")) // { // document_AptitudeInfo.FileName = document_AptitudeInfo.FileName.Substring(0, document_AptitudeInfo.FileName.Length - 1); // } // document_AptitudeInfo.AptitudeId = achievement.id; // document_AptitudeInfo.AptitudeName = achievement.achievement_name; // document_AptitudeInfo.AptitudeType = achievement.classification_id; // document_AptitudeInfo.IsUsed = achievement.status; // document_AptitudeInfo.FileVersionNo = ""; // document_AptitudeInfo.SendTime = achievement.add_time.ToShortDateString(); // document_AptitudeInfo.UnitId = achievement.tenant_code ; // document_AptitudeInfo.LastUpdateTime = achievement.add_time; // document_AptitudeInfo.LastUpdateName = ""; // document_AptitudeInfo.AdviseFlag = 1; // document_AptitudeInfo.UserId = achievement.tenant_code; // document_AptitudeInfos.Add(document_AptitudeInfo); //} var resultShebeinengli = _db.Queryable<Doc_Shebeinengli>().Where(x => x.status == 1 && x.tenant_code == UnitId && (x.sbzp_zige > 0 || x.gmht_zige > 0 || x.fp_zige > 0 || x.fkpz_zige > 0 || x.csmp_zige > 0)).OrderBy(x => x.sort).ToList();//执行查询 foreach (var achievement in resultShebeinengli) { var document_AptitudeInfo = new Document_AptitudeInfo(); document_AptitudeInfo.FilePath = ""; document_AptitudeInfo.FileName = ""; document_AptitudeInfo.FileSize = 0; if (!string.IsNullOrEmpty(achievement.sbzp_url) && achievement.sbzp_zige > 0) { document_AptitudeInfo.FilePath += achievement.sbzp_url; document_AptitudeInfo.FileName += "设备照片"; document_AptitudeInfo.FileSize += 0; document_AptitudeInfo.FilePath += ";"; document_AptitudeInfo.FileName += ";"; } if (!string.IsNullOrEmpty(achievement.gmht_url) && achievement.gmht_zige > 0) { document_AptitudeInfo.FilePath += achievement.gmht_url; document_AptitudeInfo.FileName += "购买合同"; document_AptitudeInfo.FileSize += 0; document_AptitudeInfo.FilePath += ";"; document_AptitudeInfo.FileName += ";"; } if (!string.IsNullOrEmpty(achievement.fp_url) && achievement.fp_zige > 0) { document_AptitudeInfo.FilePath += achievement.fp_url; document_AptitudeInfo.FileName += "发票"; document_AptitudeInfo.FileSize += 0; document_AptitudeInfo.FilePath += ";"; document_AptitudeInfo.FileName += ";"; } if (!string.IsNullOrEmpty(achievement.fkpz_url) && achievement.fkpz_zige > 0) { document_AptitudeInfo.FilePath += achievement.fkpz_url; document_AptitudeInfo.FileName += "付款凭证"; document_AptitudeInfo.FileSize += 0; document_AptitudeInfo.FilePath += ";"; document_AptitudeInfo.FileName += ";"; } if (!string.IsNullOrEmpty(achievement.csmp_url) && achievement.csmp_zige > 0) { document_AptitudeInfo.FilePath += achievement.csmp_url; document_AptitudeInfo.FileName += "参数(铭牌)"; document_AptitudeInfo.FileSize += 0; document_AptitudeInfo.FilePath += ";"; document_AptitudeInfo.FileName += ";"; } if (document_AptitudeInfo.FilePath.EndsWith(";")) { document_AptitudeInfo.FilePath = document_AptitudeInfo.FilePath.Substring(0, document_AptitudeInfo.FilePath.Length - 1); } if (document_AptitudeInfo.FileName.EndsWith(";")) { document_AptitudeInfo.FileName = document_AptitudeInfo.FileName.Substring(0, document_AptitudeInfo.FileName.Length - 1); } document_AptitudeInfo.AptitudeId = achievement.id; document_AptitudeInfo.AptitudeName = achievement.shebeinengli_name; document_AptitudeInfo.AptitudeType = achievement.classification_id; document_AptitudeInfo.IsUsed = achievement.status; document_AptitudeInfo.FileVersionNo = ""; document_AptitudeInfo.SendTime = achievement.add_time.ToShortDateString(); document_AptitudeInfo.UnitId = achievement.tenant_code; document_AptitudeInfo.LastUpdateTime = achievement.add_time; document_AptitudeInfo.LastUpdateName = ""; document_AptitudeInfo.AdviseFlag = achievement.zige_code; document_AptitudeInfo.UserId = achievement.tenant_code; document_AptitudeInfos.Add(document_AptitudeInfo); } @@ -1577,7 +1896,8 @@ public List<Document_DocumentTempletInfo> GetDocumentTempletList() { var result = _db.Queryable<Document_DocumentTempletInfo>().Where(x => x.IsUsed == 1).ToList();//执行查询 var aaa = GetJwtInfo(); var result = _db.Queryable<Document_DocumentTempletInfo>().Where(x => x.IsUsed == 1 && x.UnitId == aaa.UID).OrderByDescending(x=>x.LastUpdateTime).ToList();//执行查询 return result; } @@ -1700,7 +2020,7 @@ if(result.Items !=null&& result.Items.Count > 0) { var doc_Classifications = _db.Queryable<Doc_Classification>().Where(x => x.parent_code == "003").ToList();//执行查询 var doc_Classifications = _db.Queryable<Doc_Classification>().Where(x => x.parent_code == "000").ToList();//执行查询 foreach (var item in result.Items) { var doc_Classification = doc_Classifications.Where(x => x.id == item.Classification).FirstOrDefault(); @@ -1820,7 +2140,7 @@ public List<Doc_Classification> GetDocClassificationList() { var ret = _db.Queryable<Doc_Classification>().Where(x => x.parent_code =="003" && x.is_system == true).ToList(); var ret = _db.Queryable<Doc_Classification>().Where(x => x.parent_code =="000" && x.is_system == true).ToList(); return ret; } @@ -2109,5 +2429,109 @@ doc_Classification.sort_id = ret ?? 0; return doc_Classification; } public Doc_Classification GetShebeinengliInfoMaxSortId(int unitId) { var ret = _db.Queryable<Doc_Shebeinengli>() .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; } public PageResult<Document_DocumentTempletInfoDTO> postDocumentTempletList(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<Document_DocumentTempletInfoDTO> result = new PageResult<Document_DocumentTempletInfoDTO>(); var document_DocumentTempletInfos = _db.Queryable<Document_DocumentTempletInfo> () .Where(x=>x.UnitId == aaa.UID) //文件名称 .WhereIF(!string.IsNullOrEmpty(page.templetName), a => a.TempletName.Contains(page.templetName)) .WhereIF(page.purchaseMethod !=0, a => a.PurchaseMethod == page.purchaseMethod) .WhereIF(page.IsUsed>0, a => (page.IsUsed == 1 && a.IsUsed == 1 ) || (page.IsUsed != 1 && a.IsUsed == 2)) .OrderByDescending(a => a.TempletId).ToPageList(page.PageIndex, page.PageSize, ref total); result.Items = _mapper.Map<List<Document_DocumentTempletInfoDTO>>(document_DocumentTempletInfos); if (result.Items != null && result.Items.Count > 0) { foreach (var item in result.Items) { if (item.IsUsed == 1) { item.isUseName = "启用"; item.isUseOp = "停用"; } else { item.isUseName = "停用"; item.isUseOp = "启用"; } } } result.TotalCount = total; result.TotalPage = total % page.PageSize == 0 ? total / page.PageSize : total / page.PageSize + 1; return result; } public bool GetDeleteDocumentTempletInfo(int ID) { _db.Deleteable<Document_DocumentTempletInfo>().Where(x => x.TempletId == ID ).ExecuteCommand(); return true; } public bool SaveDocumentTempletInfo(Document_DocumentTempletInfo dp) { if (dp.TempletId > 0) { _db.Updateable<Document_DocumentTempletInfo>(dp).ExecuteCommand(); } else { _db.Insertable<Document_DocumentTempletInfo>(dp).ExecuteCommand(); } return true; } public Document_DocumentTempletInfo GetTempletModelByProjectId(int projiectid) { var aaa = GetJwtInfo(); var ret = _db.Queryable<Document_DocumentTempletInfo>().Where(x => x.ProjectId == projiectid && x.UnitId == aaa.UID ).First(); return ret; } } } DocumentServiceAPI.Application/ProjectInfo/Services/SheZhiService.cs
@@ -2,6 +2,7 @@ using DocumentServiceAPI.Application.ProjectInfo.ViewMode; using DocumentServiceAPI.Application.Repository; using DocumentServiceAPI.Model.cyDocumentModel; using DocumentServiceAPI.Model.Permissions; using DocumentServiceAPI.Model.UserInfoModel; using DocumentServiceAPI.Utility; using MapsterMapper; @@ -137,6 +138,18 @@ } else { var aaa = GetJwtInfo(); var tenantPermissions = _db.Queryable<TenantPermissions>().Where(x => x.IsDel == false && x.IsEn == true && x.TenantId == aaa.TEID.Value && x.PermissionsType == TenantPermissionsType.Manage).First(); if (tenantPermissions != null) { var times = _db.Queryable<Document_TenderUnit>().Count(x => x.IsDeled == false && x.IsEn == true && x.TenantId == aaa.TEID.Value); if (tenantPermissions.UnitMaxCount > 0 && tenantPermissions.UnitMaxCount <= times) { throw new Exception("投标单位数量超出最大值!无法新增"); } } dp.IsEn = true; dp.IsDeled = false; _db.Insertable<Document_TenderUnit>(dp).ExecuteCommand(); } @@ -281,7 +294,15 @@ { var aaa = GetJwtInfo(); var tenantPermissions = _db.Queryable<TenantPermissions>().Where(x => x.IsDel == false && x.IsEn == true && x.TenantId == aaa.TEID.Value && x.PermissionsType == TenantPermissionsType.Manage).First(); if (tenantPermissions != null) { var times = _db.Queryable<EmployeeAtTenant>().Count(x => x.IsDel == false && x.IsEn == true && x.TenantID == aaa.TEID.Value ); if(tenantPermissions.EmployeeMaxCount>0 && tenantPermissions.EmployeeMaxCount<= times) { throw new Exception("员工数量超出最大值!无法新增"); } } dp.EmployeeId = _db.Insertable<Document_EmployeeInfo>(document_EmployeeInfo).ExecuteReturnIdentity(); DocumentServiceAPI.Application/ProjectInfo/ViewMode/DocumentProjectInfoDTO.cs
@@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Threading.Tasks; @@ -70,6 +71,121 @@ public string LayProvince { get; set; } public int purchaseMethod { get; set; } public string templetName { get; set; } //public int isUsed { get; set; } } public class Document_DocumentTempletInfoDTO { public Document_DocumentTempletInfoDTO() { } /// <summary> /// Desc: /// Default: /// Nullable:False /// </summary> public int TempletId { get; set; } /// <summary> /// Desc: /// Default: /// Nullable:True /// </summary> public int? PurchaseMethod { get; set; } /// <summary> /// Desc: /// Default: /// Nullable:True /// </summary> public string TempletName { get; set; } /// <summary> /// Desc: /// Default: /// Nullable:True /// </summary> public string TempletPath { get; set; } /// <summary> /// Desc: /// Default: /// Nullable:True /// </summary> public string TempleVersionNo { get; set; } /// <summary> /// Desc: /// Default: /// Nullable:True /// </summary> public int? TempleSize { get; set; } /// <summary> /// Desc: /// Default:1 /// Nullable:True /// </summary> public int? IsUsed { get; set; } /// <summary> /// Desc: /// Default: /// Nullable:True /// </summary> public int? ProjectId { get; set; } /// <summary> /// Desc: /// Default: /// Nullable:True /// </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? TempletFlag { get; set; } /// <summary> /// Desc: /// Default: /// Nullable:True /// </summary> public int? UserId { get; set; } public string isUseName { get; set; } public string isUseOp { get; set; } } public class DocumentProjectInfoDTO DocumentServiceAPI.Application/ProjectInfo/dto/Mapper.cs
@@ -20,6 +20,10 @@ config.ForType<Document_EmployeeInfo, DocumentEmployeeInfoDTO>(); config.ForType<DocumentEmployeeInfoDTO, Document_EmployeeInfo>(); config.ForType<Document_DocumentTempletInfo, Document_DocumentTempletInfoDTO>(); config.ForType<Document_DocumentTempletInfoDTO, Document_DocumentTempletInfo>(); } } } DocumentServiceAPI.Application/UserAndLogin/Services/UserService.cs
@@ -271,6 +271,26 @@ }).WithCache(20).FirstAsync(); if (TenantID != null) { //add by zyyao 2023-10-17 租户信息增加 var permissions = _db.Queryable<TenantPermissions>().Where(x => x.IsDel == false && x.IsEn == true && x.TenantId == TenantID).ToList(); var permissions1 = permissions.Where(x => x.PermissionsType == TenantPermissionsType.Manage).FirstOrDefault(); if (permissions1 != null && Tenant!=null) { Tenant.UnitMaxCount = permissions1.UnitMaxCount; Tenant.EmployeeMaxCount = permissions1.EmployeeMaxCount; Tenant.WendangOverTimeCount = permissions1.OverTime.Subtract(DateTime.Now).Days+1; } var permissions2 = permissions.Where(x => x.PermissionsType == TenantPermissionsType.Document).FirstOrDefault(); if (permissions2 != null && Tenant != null) { Tenant.BiaoshuOverTimeCount = permissions2.OverTime.Subtract(DateTime.Now).Days + 1; } } return new RetUserInfo { DocumentServiceAPI.Application/UserAndLogin/ViewMode/UserInfo.cs
@@ -81,6 +81,11 @@ ///// </summary> //[SugarColumn(Length = 30)] //public string? PsW { get; set; } public int UnitMaxCount { get; set; } public int EmployeeMaxCount { get; set; } public int BiaoshuOverTimeCount { get; set; } public int WendangOverTimeCount { get; set; } } public class EmployeeInfoVM /*:Document_EmployeeInfo*/ DocumentServiceAPI.Model/cyDocumentModel/Doc_Achievement.cs
@@ -69,6 +69,11 @@ public int? sort { get; set; } /// <summary> /// 中标时间 /// </summary> public DateTime? zb_time { get; set; } /// <summary> /// 关联分类 /// </summary> [SugarColumn(IsIgnore = true)] DocumentServiceAPI.Model/cyDocumentModel/Doc_Info.cs
@@ -54,6 +54,25 @@ public int? sort { get; set; } /// <summary> /// 资格文件类型 /// </summary> public int? zige_code { get; set; } /// <summary> /// 获奖时间 /// </summary> public DateTime? zb_time { get; set; } /// <summary> /// 关联分类 /// </summary> [SugarColumn(IsIgnore = true)] [Navigate(NavigateType.OneToOne, nameof(zige_code))] public Document_Dictionary? document_Dictionary { get; set; } /// <summary> /// 关联分类 /// </summary> [SugarColumn(IsIgnore = true)] DocumentServiceAPI.Model/cyDocumentModel/Doc_Shebeinengli.cs
New file @@ -0,0 +1,101 @@ using 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_shebeinengli")] public class Doc_Shebeinengli : Doc_Base { public Doc_Shebeinengli() { } /// <summary> /// id /// </summary> [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] public int id { get; set; } /// <summary> /// 归属分类(子类型) /// </summary> public int? classification_id { get; set; } /// <summary> /// 项目id /// </summary> public int? project_id { get; set; } /// <summary> /// 名称 /// </summary> public string shebeinengli_name { get; set; } /// <summary> /// 设备照片 /// </summary> public string sbzp_url { get; set; } /// <summary> /// 购买合同 /// </summary> public string gmht_url { get; set; } /// <summary> /// 发票 /// </summary> public string fp_url { get; set; } /// <summary> /// 付款凭证 /// </summary> public string fkpz_url { get; set; } /// <summary> /// 参数(铭牌) /// </summary> public string csmp_url { get; set; } /// <summary> /// 排序 /// </summary> public int? sort { get; set; } /// <summary> /// 中标时间 /// </summary> public DateTime? zb_time { get; set; } /// <summary> /// 资格文件类型 /// </summary> public int? zige_code { get; set; } public int? sbzp_zige { get; set; } public int? gmht_zige { get; set; } public int? fp_zige { get; set; } public int? fkpz_zige { get; set; } public int? csmp_zige { get; set; } public int? sbzp_fuhe { get; set; } public int? gmht_fuhe { get; set; } public int? fp_fuhe { get; set; } public int? fkpz_fuhe { get; set; } public int? csmp_fuhe { get; set; } /// <summary> /// 关联分类 /// </summary> [SugarColumn(IsIgnore = true)] [Navigate(NavigateType.OneToOne, nameof(classification_id))] public Doc_Classification? DocClassification { get; set; } } } DocumentServiceAPI.Model/cyDocumentModel/Document_ProjectExpand.cs
@@ -247,5 +247,12 @@ /// </summary> public string Experts {get;set;} /// <summary> /// Desc: /// Default: /// Nullable:True /// </summary> public string Remark { get; set; } } }