| | |
| | | using DocumentServiceAPI.Application.DocManage.Dtos; |
| | | using DocumentServiceAPI.Application.DocManage.Services; |
| | | using DocumentServiceAPI.Application.ProjectInfo.Services.Interfaces; |
| | | using DocumentServiceAPI.Model.cyDocumentModel; |
| | | using DocumentServiceAPI.Utility; |
| | | |
| | |
| | | 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> |
| | |
| | | /// </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); |
| | | } |
| | | } |
| | |
| | | /// <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.Code == "002") |
| | | { |
| | | 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> |
| | |
| | | { |
| | | 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); |
| | |
| | | .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) |
| | |
| | | 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(); |
| | | |
| | | } |
| | |
| | | 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) |
| | |
| | | doc.doc_name = info.name; |
| | | doc.org_id = info.org_id; |
| | | doc.status = info.status; |
| | | |
| | | doc.sort = info.sort; |
| | | if (await _docManageService.UpdateAsync(doc)) |
| | | { |
| | | //新提交的文件 |
| | |
| | | /// </summary> |
| | | /// <param name="id"></param> |
| | | /// <returns></returns> |
| | | public async Task<IActionResult> GetDocumentFilesList(int id) |
| | | public async Task<IActionResult> GetDocumentFilesList(int id,string code) |
| | | { |
| | | 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); |
| | | } |
| | | |
| | | 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 |
| | |
| | | { |
| | | 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) |
| | |
| | | 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(); |
| | | |
| | | } |
| | |
| | | { |
| | | 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) |
| | | { |
| | | if(model.id>0 && model.id != ck.id) |
| | | { |
| | | msg = true; |
| | | } |
| | | else |
| | | { |
| | | msg = false; |
| | | } |
| | | |
| | | } |
| | | return msg; |
| | | } |
| | |
| | | /// <param name="info"></param> |
| | | /// <returns></returns> |
| | | public async Task<bool> PostAddDocAchievement(Achievement_Submit_Dto info) |
| | | { |
| | | 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.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.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 |
| | | } |
| | | } |
| | |
| | | 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 |
| | |
| | | public string yhpj { get; set; } |
| | | |
| | | public string hjzs { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 排序 |
| | | /// </summary> |
| | | public int? sort { get; set; } |
| | | } |
| | | } |
| | |
| | | public int? project_id { get; set; } |
| | | |
| | | public string project_name { get; set; } |
| | | /// <summary> |
| | | /// 排序 |
| | | /// </summary> |
| | | public int? sort { get; set; } |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | |
| | | 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; } |
| | |
| | | } |
| | | this.status = doc.status; |
| | | this.files = filelist; |
| | | this.sort = doc.sort; |
| | | } |
| | | |
| | | public int id { get; set; } |
| | |
| | | |
| | | public int status { get; set; } |
| | | |
| | | public int? sort { get; set; } |
| | | |
| | | public List<FileInfo_List_Dto> files { get; set; } |
| | | } |
| | | |
| | |
| | | /// 状态 |
| | | /// </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 |
| | |
| | | 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; |
| | |
| | | { |
| | | 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); |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | 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; |
| | |
| | | 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 |
| | |
| | | .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)) |
| | |
| | | //诉讼情况 |
| | | .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, |
| | |
| | | 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); |
| | |
| | | documentProjectInfoDTO.xmqy = documentProjectInfoDTO.City+ documentProjectInfoDTO.County; |
| | | } |
| | | |
| | | if(documentProjectInfoDTO.IsSignup == 1) |
| | | if(documentProjectInfoDTO.IsSignup == 1 || documentProjectInfoDTO.SignupMethod == 9 ) |
| | | { |
| | | documentProjectInfoDTO.bm = "√"; |
| | | } |
| | |
| | | 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 = "招标文件"; |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | |
| | | 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; |
| | | } |
| | | |
| | |
| | | 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; |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | 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) |
New file |
| | |
| | | using 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; } |
| | | } |
| | | } |
| | |
| | | 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; } |
| | |
| | | public string Experts { get; set; } |
| | | |
| | | public string FileName { get; set; } |
| | | |
| | | public string parentcode { get; set; } |
| | | |
| | | public int ProjectId { get; set; } |
| | | |
| | |
| | | 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; } |
| | |
| | | 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); |
| | | |
| | |
| | | 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; |
| | |
| | | { |
| | | var a = GetJwtInfo(); |
| | | dw.LastUpTime = DateTime.Now; |
| | | |
| | | if (dw.WorkRemindId > 0) |
| | | { |
| | | _workRemindRepository.Update(dw); |
| | | } |
| | | else |
| | | { |
| | | dw.CreatEmployeeId = a.EID; |
| | | |
| | | var tentlist = _db.Queryable<Document_EmployeeInfo>() |
| | |
| | | dw.CreatEmployeeName = tentlist.EmployeeName; |
| | | |
| | | } |
| | | return _workRemindRepository.Insert(dw); |
| | | _workRemindRepository.Insert(dw); |
| | | } |
| | | |
| | | |
| | | |
| | | return true; |
| | | |
| | | |
| | | |
| | |
| | | /// </summary> |
| | | /// <param name="page"></param> |
| | | /// <returns></returns> |
| | | public PageResult<Document_WorkRemind> postWorkRemindList(WorkRemindPageSearch page) |
| | | public PageResult<DocumentWorkRemindDTO> postWorkRemindList(WorkRemindPageSearch page) |
| | | { |
| | | var a = GetJwtInfo(); |
| | | |
| | |
| | | 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; |
| | | } |
| | | |
| | |
| | | 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; } |
| | | } |
| | | } |
| | |
| | | /// </summary> |
| | | /// <param name="page"></param> |
| | | /// <returns></returns> |
| | | public PageResult<Document_WorkRemind> postWorkRemindList(WorkRemindPageSearch page) |
| | | public PageResult<DocumentWorkRemindDTO> postWorkRemindList(WorkRemindPageSearch page) |
| | | { |
| | | return _workRemindService.postWorkRemindList(page); |
| | | } |
| | |
| | | using DocumentServiceAPI.Application.UserAndLogin.ViewMode; |
| | | using DocumentServiceAPI.Application.ProjectInfo.ViewMode; |
| | | using DocumentServiceAPI.Application.UserAndLogin.ViewMode; |
| | | using DocumentServiceAPI.Application.WorkRemind.ViewMode; |
| | | using DocumentServiceAPI.Model.cyDocumentModel; |
| | | using System; |
| | | using System.Collections.Generic; |
| | |
| | | { |
| | | public void Register(TypeAdapterConfig config) |
| | | { |
| | | |
| | | config.ForType<DocumentWorkRemindDTO, Document_WorkRemind>(); |
| | | config.ForType<Document_WorkRemind, DocumentWorkRemindDTO>(); |
| | | |
| | | } |
| | | } |
| | |
| | | public string hjzs_url { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 排序 |
| | | /// </summary> |
| | | public int? sort { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 关联分类 |
| | | /// </summary> |
| | | [SugarColumn(IsIgnore = true)] |
New file |
| | |
| | | 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_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; } |
| | | } |
| | | } |
| | |
| | | public bool is_del { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 排序 |
| | | /// </summary> |
| | | public int? sort { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 关联分类 |
| | | /// </summary> |
| | | [SugarColumn(IsIgnore = true)] |
| | |
| | | /// 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; } |
| | | |
| | | } |
| | | } |