username@email.com
2023-08-29 ca12247dbc0728c7900db4188565d4c4f7d907c4
Merge branch 'master' of http://47.108.235.38:8080/r/DocumentService

# Conflicts:
# DocumentServiceAPI.Application/DocumentServiceAPI.Application.xml
# DocumentServiceAPI.Web.Entry/appsettings.json
21个文件已修改
1个文件已删除
16个文件已添加
3625 ■■■■■ 已修改文件
.gitignore 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Application/DocManage/DocClassificationManageAppService.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Application/DocManage/DocumentManageAppService.cs 395 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Application/DocManage/Dtos/Achievement_Submit_Dto.cs 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Application/DocManage/Dtos/Classification_Submit_Dto.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Application/DocManage/Dtos/Document_List_Dto.cs 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Application/DocManage/Dtos/Document_Lock_Dto.cs 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Application/DocManage/Dtos/FileInfo_List_Dto.cs 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Application/DocManage/Dtos/Project_List_Dto.cs 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Application/DocManage/Services/DocAchievementService.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Application/DocManage/Services/DocumentManageService.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Application/DocManage/Services/ProjectManageService.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Application/DocumentServiceAPI.Application.xml 1863 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Application/UserAndLogin/LogInController.cs 81 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Application/UserAndLogin/Services/TokenService.cs 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Application/UserAndLogin/ViewMode/UserInfo.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Application/applicationsettings.json 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Model/Oder/Oder.cs 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Model/Permissions/TenantPermissions.cs 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Model/UserInfoModel/TenantInfo.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Model/cyDocumentModel/Doc_Achievement.cs 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Model/cyDocumentModel/Doc_File_Info.cs 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Model/cyDocumentModel/Doc_Info.cs 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Utility/PageBaseSearch.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Web.Entry/AuthorizeHandler.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Web.Entry/DocumentServiceAPI.Web.Entry.csproj.user 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Web.Entry/Properties/PublishProfiles/FolderProfile.pubxml.user 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Web.Entry/Properties/launchSettings.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Web.Entry/appsettings.json 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.sln 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceApi.InitQMessage/DocumentServiceApi.InitQMessage.csproj 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceApi.InitQMessage/INITQMessageDefine.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceApi.InitQMessage/INITQSetups.cs 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceApi.InitQMessage/MessageReceive.cs 181 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceApi.InitQMessage/TenantOderInfo.cs 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZcPayCore/Model/OderInfo.cs 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZcPayCore/ZcPayCore.csproj 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
资料管理.sql 108 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.gitignore
@@ -29,3 +29,6 @@
/DocumentFile.Service/obj
/DocumentServiceAPI.Services/bin
/DocumentServiceAPI.Services/obj
ZcPayCore/obj/
DocumentServiceApi.InitQMessage/obj/
DocumentServiceAPI.Application/DocumentServiceAPI.Application.xml
DocumentServiceAPI.Application/DocManage/DocClassificationManageAppService.cs
@@ -42,11 +42,11 @@
            PageResult<Doc_Classification> result = new PageResult<Doc_Classification>();
            if (page.Status.HasValue)
            {
                result.Items = await _classificationService.GetPageListAsync(c => c.status ==page.Status && c.parent_code == page.Code, pg);
                result.Items = await _classificationService.GetPageListAsync(c => c.status ==page.Status && c.parent_code == page.Code,pg,c=>c.sort_id,OrderByType.Asc);
            }
            else
            {
                result.Items = await _classificationService.GetPageListAsync(c => c.parent_code == page.Code, pg);
                result.Items = await _classificationService.GetPageListAsync(c => c.parent_code == page.Code, pg, c => c.sort_id, OrderByType.Asc);
            }
            result.TotalCount = pg.TotalCount;
            result.PageIndex = pg.PageIndex;
@@ -62,7 +62,7 @@
        public async Task<IActionResult> PostItemList(DocClassificationSearch page)
        {
            var data = await _classificationService.GetListAsync(c => c.status == 1 && c.parent_code == page.Code);
            return new JsonResult(data);
            return new JsonResult(data.OrderBy(c=>c.sort_id).ToList());
        }
        /// <summary>
@@ -78,7 +78,7 @@
            doc.doc_classification_code = "";
            doc.is_system = false;
            doc.parent_code = info.code;
            doc.sort_id = 99;
            doc.sort_id = info.sort;
            doc.status = info.status;
            doc.tenant_code = info.tenant_id;
            
@@ -100,6 +100,7 @@
                model.add_time = DateTime.Now;
                model.doc_classification = info.name;
                model.status = info.status;
                model.sort_id = info.sort;
                msg = await _classificationService.UpdateAsync(model);
            }
DocumentServiceAPI.Application/DocManage/DocumentManageAppService.cs
@@ -1,8 +1,12 @@
using DocumentServiceAPI.Application.DocManage.Dtos;
using DocumentServiceAPI.Application.DocManage.Services;
using DocumentServiceAPI.Application.ProjectInfo.Services;
using DocumentServiceAPI.Application.System.Services;
using DocumentServiceAPI.Model.cyDocumentModel;
using DocumentServiceAPI.Services.IService;
using DocumentServiceAPI.Utility;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.Extensions.Caching.Memory;
using System.Linq.Expressions;
namespace DocumentServiceAPI.Application.DocManage
@@ -16,15 +20,89 @@
        private readonly DocumentManageService _docManageService;
        private readonly OrganizationService _organizationService;
        private readonly FileManageService _fileManageService;
        private readonly ProjectManageService _projectService;
        private readonly DocAchievementService _achievementService;
        private readonly IRedisCacheService _redisCache;
        public DocumentManageAppService(DocClassificationService classService, DocumentManageService docService, OrganizationService orgService,FileManageService fileManageService)
        public DocumentManageAppService(DocClassificationService classService, DocumentManageService docService, OrganizationService orgService,
            FileManageService fileManageService, ProjectManageService projectService, DocAchievementService achievementService, IRedisCacheService redisCase)
        {
            _classificationService = classService;
            _docManageService = docService;
            _organizationService = orgService;
            _fileManageService = fileManageService;
            _projectService = projectService;
            _achievementService = achievementService;
            _redisCache = redisCase;
        }
        /// <summary>
        /// ç¼–辑文档时设置文档锁定状态
        /// </summary>
        /// <param name="model"></param>
        /// <returns>
        ///  true:设置锁定成功
        ///  false:锁定失败,文档已被锁定
        /// </returns>
        public bool SetDocLockStatus(DocLock_Submit_Dto model)
        {
            bool msg = true;
            string key = model.tenant_id.ToString().PadLeft(4,'0') + "_" + model.id.ToString().PadLeft(8,'0');
            if (_redisCache.Get<Document_Lock_Dto>(key) != null)
            {
                msg = false;
            }
            else
            {
                Document_Lock_Dto lk = new Document_Lock_Dto();
                lk.doc_id = model.id;
                lk.lock_time = DateTime.Now;
                lk.lock_user = model.username;
                lk.lock_user_id = model.userid;
                lk.status = 0;
                lk.tenant_id = model.tenant_id;
                var db= _redisCache.Add<Document_Lock_Dto>(key,lk ,-1);
            }
            return msg;
        }
        /// <summary>
        /// æŸ¥è¯¢é¡¹ç›®ä¿¡æ¯
        /// </summary>
        /// <param name="search"></param>
        /// <returns></returns>
        public async Task<IActionResult> PostProjectItemList(ProjectItemSearch search)
        {
            var data = await _projectService.GetListAsync();//.GetListAsync(c => c.TenantID == search.tenant_id);
            if (data != null)
            {
                var list = data.Select(c => new ProjectItem_List_Dto()
                {
                     pro_id=c.ProjectId,
                      pro_name=c.ProjectName
                }).OrderBy(c => c.pro_name).ToList();
                return new JsonResult(list);
            }
            return null;
        }
        /// <summary>
        /// æ ¹æ®æ–‡æ¡£ç±»åž‹æŸ¥è¯¢æ–‡æ¡£åˆ—表
        /// </summary>
        /// <param name="search"></param>
        /// <returns></returns>
        public async Task<IActionResult> PostDocumentItemList(DocumentSearch search)
        {
            var data = await _docManageService.GetListAsync(c => c.is_del == false && c.doc_code == search.Code && c.tenant_code == search.TenantID);
            if (search.class_id > 0)
            {
                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());
        }
        /// <summary>
@@ -35,7 +113,22 @@
        public async Task<bool> CheckNameDuplicate(Document_Submit_Dto model)
        {
            var msg = false;
            var ck =await _docManageService.GetFirstAsync(c=>c.doc_name==model.name && c.doc_code==model.code && c.classification_id==model.class_id && c.id!=model.id);
            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 );
            if (model.class_id.HasValue && model.class_id!=0)
            {
                expression = expression.And(t => t.classification_id == model.class_id);
            }
            if (model.project_id.HasValue && model.project_id != 0)
            {
                expression = expression.And(t => t.project_id == model.project_id);
            }
            if (model.id > 0)
            {
                expression = expression.And(t => t.id != model.id);
            }
            var ck =await _docManageService.GetFirstAsync(expression);
            if (ck != null)
            {
                msg = true;
@@ -56,7 +149,7 @@
            {
                Expression<Func<Doc_Info, bool>> expression = t => true;
                expression = expression.And(t => t.doc_code == page.Code && t.is_del==false);
                expression = expression.And(t =>t.tenant_code==page.TenantID && t.doc_code == page.Code && t.is_del==false);
                if (page.ClassCode.HasValue)
                {
                    expression = expression.And(t => t.classification_id == page.ClassCode);
@@ -77,7 +170,9 @@
                var data = await _docManageService.Context.Queryable<Doc_Info>()
                        .Includes(c => c.DocClassification)
                        .Includes(c=>c.DocOrganization)
                        .Includes(c=>c.DocProject)
                        .Where(expression)
                        .OrderByDescending(c=>c.id)
                        .ToPageListAsync(page.PageIndex, page.PageSize, total);
                if (data != null && total > 0)
@@ -90,9 +185,9 @@
                        doc_name = c.doc_name,
                        id = c.id,
                        org_id = c.org_id,
                        org_name = c.DocOrganization.UnitName,
                        org_name = c.DocOrganization?.UnitName,
                        project_id = c.project_id,
                        project_name = "",
                        project_name = c.DocProject?.ProjectName,
                        status = c.status
                    }).ToList();
@@ -107,6 +202,24 @@
            }
            
            return new JsonResult(result);
        }
        /// <summary>
        /// æ ¹æ®æ–‡æ¡£å·æŸ¥è¯¢
        /// </summary>
        /// <param name="search"></param>
        /// <returns></returns>
        public async Task<IActionResult> PostDocumentInfo(DocumentSearch search)
        {
            var data = await _docManageService.GetFirstAsync(c => c.is_del == false && c.id == search.ID && c.tenant_code==search.TenantID);
            if (data != null)
            {
                var list = await _fileManageService.GetListAsync(c =>c.status==1 && c.doc_id == search.ID);
                Document_Info_Dto info = new Document_Info_Dto(data, list.Select(c => new FileInfo_List_Dto(c)).OrderBy(c => c.sort).ToList());
                return new JsonResult(info);
            }
            return null;
        }
        /// <summary>
@@ -131,9 +244,9 @@
            var id =await _docManageService.InsertReturnIdentityAsync(doc);
            if (id > 0)
            {
                if(info.files!=null&& info.files.Count > 0)
                if(info.newfiles!=null&& info.newfiles.Count > 0)
                {
                    foreach (var item in info.files)
                    foreach (var item in info.newfiles)
                    {
                        File_Info file = new File_Info();
                        file.doc_id = id;                        
@@ -148,6 +261,7 @@
                        file.uptime = DateTime.Now;
                        file.up_userid = item.up_userid;
                        file.up_username = item.up_username;
                        file.sort = item.sort;
                        await _fileManageService.InsertAsync(file);
                    }
                }
@@ -156,45 +270,90 @@
            return msg;
        }
        /// <summary>
        /// æ ¹æ®ç±»åž‹æŸ¥è¯¢æ•°æ®
        /// </summary>
        /// <param name="page"></param>
        /// <returns></returns>
        public async Task<IActionResult> PostItemList(DocClassificationSearch page)
        {
            var data = await _classificationService.GetListAsync(c => c.status == 1 && c.parent_code == page.Code);
            return new JsonResult(data);
        }
        /// <summary>
        /// ä¿®æ”¹æ•°æ®
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public async Task<IActionResult> PostEdtInfo(Classification_Submit_Dto info)
        public async Task<bool> PostEdtDocumentInfo(Document_Submit_Dto info)
        {
            var msg = false;
            var model = await _classificationService.GetByIdAsync(info.id);
            if (model != null)
            {
                model.add_time = DateTime.Now;
                model.doc_classification = info.name;
                model.status = info.status;
            bool msg = false;
                msg = await _classificationService.UpdateAsync(model);
            var doc= _docManageService.GetById(info.id);
            if (info.tenant_id == doc.tenant_code && doc.is_del==false)
            {
                doc.add_time = DateTime.Now;
                doc.classification_id = info.class_id;
                doc.doc_name = info.name;
                doc.org_id = info.org_id;
                doc.status = info.status;
                if (await _docManageService.UpdateAsync(doc))
                {
                    //新提交的文件
                    if (info.newfiles != null && info.newfiles.Count > 0)
                    {
                        foreach (var item in info.newfiles)
                        {
                            File_Info file = new File_Info();
                            file.doc_id = doc.id;
                            file.filenewname = item.filenewname.Length > 40 ? item.filenewname.Substring(item.filenewname.Length - 40) : item.filenewname;
                            file.fileoldname = item.fileoldname.Length > 40 ? item.fileoldname.Substring(item.fileoldname.Length - 40) : item.fileoldname;
                            file.filepath = item.filepath;
                            file.fileservername = item.fileservername;
                            file.filesize = item.filesize;
                            file.filetype = item.filetype;
                            file.status = 1;
                            file.suffix = item.suffix;
                            file.uptime = DateTime.Now;
                            file.up_userid = item.up_userid;
                            file.up_username = item.up_username;
                            file.sort = item.sort;
                            await _fileManageService.InsertAsync(file);
                        }
            }
            
            return new JsonResult(msg);
                    //修改资源名称的文件
                    if (info.editfiles != null && info.editfiles.Count > 0)
                    {
                        foreach (var item in info.editfiles)
                        {
                            var file= _fileManageService.GetById(item.id);
                            if (file != null && file.doc_id==doc.id)
                            {
                                file.fileoldname = file.filenewname;
                                file.filenewname = item.filenewname.Length > 40 ? item.filenewname.Substring(item.filenewname.Length - 40) : item.filenewname;
                                file.uptime = DateTime.Now;
                                file.sort = item.sort;
                                await _fileManageService.UpdateAsync(file);
                            }
                        }
                    }
                    //删除资源
                    if (info.delfiles != null && info.delfiles.Count > 0)
                    {
                        foreach (var item in info.delfiles)
                        {
                            var file = _fileManageService.GetById(item);
                            if (file != null && file.doc_id == doc.id)
                            {
                                file.status = 0;
                                file.uptime = DateTime.Now;
                                await _fileManageService.UpdateAsync(file);
                            }
                        }
                    }
                    msg = true;
                }
            }
            return msg;
        }
        /// <summary>
        /// åˆ é™¤æ•°æ®
        /// åˆ é™¤æ–‡æ¡£æ•°æ®
        /// </summary>
        /// <param name="doc"></param>
        /// <returns></returns>
@@ -214,69 +373,131 @@
            return new JsonResult(msg);
        }
        #region æ–‡æ¡£çš„æ–‡ä»¶
        /// <summary>
        /// æ ¹æ®æ–‡æ¡£å·æŸ¥è¯¢æ–‡ä»¶æ•°æ®
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public async Task<IActionResult> GetDocumentFilesList(int id)
        {
            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
        #region ä¸šç»©ç®¡ç†
        /// <summary>
        /// æ ¹æ®åˆ†é¡µæ¡ä»¶æŸ¥è¯¢åˆ†é¡µæ•°æ®
        /// </summary>
        /// <param name="page"></param>
        /// <returns></returns>
        public async Task<IActionResult> PostAchievementListPage(DocumentPageSearch page)
        {
            PageResult<Achievement_List_Dto> result = new PageResult<Achievement_List_Dto>();
            try
            {
                Expression<Func<Doc_Achievement, 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.achievement_name.Contains(page.Name));
                }
                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)
                        .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.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
                    }).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> CheckDocAchievementDuplicate(Document_Submit_Dto model)
        {
            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);
            if (ck != null)
            {
                msg = true;
            }
            return msg;
        }
        /// <summary>
        /// æ·»åŠ æ•°æ®
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public async Task<IActionResult> PostAddFilesInfo(Classification_Submit_Dto info)
        public async Task<bool> PostAddDocAchievement(Achievement_Submit_Dto info)
        {
            Doc_Classification doc = new Doc_Classification();
            Doc_Achievement doc = new Doc_Achievement();
            doc.add_time = DateTime.Now;
            doc.doc_classification = info.name;
            doc.doc_classification_code = "";
            doc.is_system = false;
            doc.parent_code = info.code;
            doc.sort_id = 99;
            doc.status = info.status;
            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;
            var msg = await _classificationService.InsertAsync(doc);
            return new JsonResult(msg);
            return await _achievementService.InsertAsync(doc);
        }
        /// <summary>
        /// ä¿®æ”¹æ•°æ®
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public async Task<IActionResult> PostEdtFileInfo(Classification_Submit_Dto info)
        {
            var msg = false;
            var model = await _classificationService.GetByIdAsync(info.id);
            if (model != null)
            {
                model.add_time = DateTime.Now;
                model.doc_classification = info.name;
                model.status = info.status;
                msg = await _classificationService.UpdateAsync(model);
            }
            return new JsonResult(msg);
        }
        /// <summary>
        /// åˆ é™¤æ•°æ®
        /// </summary>
        /// <param name="doc"></param>
        /// <returns></returns>
        public async Task<IActionResult> PostDelFileInfo(Document_Submit_Dto doc)
        {
            bool msg = false;
            //假删除
            var model = await _docManageService.GetByIdAsync(doc.id);
            if (model != null)
            {
                if (model.tenant_code == doc.tenant_id && !model.is_del)
                {
                    model.is_del = true;
                    msg = await _docManageService.UpdateAsync(model);
                }
            }
            return new JsonResult(msg);
        }
        #endregion
    }
}
DocumentServiceAPI.Application/DocManage/Dtos/Achievement_Submit_Dto.cs
New file
@@ -0,0 +1,81 @@
namespace DocumentServiceAPI.Application.DocManage.Dtos
{
    /// <summary>
    /// ä¸šç»©èµ„料提交
    /// </summary>
    public class Achievement_Submit_Dto
    {
        public int id { get; set; }
        /// <summary>
        /// åˆ†ç±»id
        /// </summary>
        public int class_id { get; set; }
        public string name { get; set; }
        public int tenant_id { get; set; }
        /// <summary>
        /// é¡¹ç›®åç§°
        /// </summary>
        public int project_id { get; set; }
        public string zbtzs { get; set; }
        public string ht { get; set; }
        public string ysbg { get; set; }
        public string fkpz { get; set; }
        public string yhpj { get; set; }
        public string hjzs { get; set; }
    }
    public class Achievement_List_Dto
    {
        /// <summary>
        /// æ·»åŠ /更新时间
        /// </summary>
        public DateTime add_time { get; set; }
        /// <summary>
        /// çŠ¶æ€
        /// </summary>
        public int status { get; set; }
        public int id { get; set; }
        /// <summary>
        /// å½’属分类(子类型)
        /// </summary>
        public int? class_id { get; set; }
        public string class_name { get; set; }
        /// <summary>
        /// åç§°
        /// </summary>
        public string doc_name { get; set; }
        /// <summary>
        /// é¡¹ç›®id
        /// </summary>
        public int? project_id { get; set; }
        public string project_name { get; set; }
        public string zbtzs { get; set; }
        public string ht { get; set; }
        public string ysbg { get; set; }
        public string fkpz { get; set; }
        public string yhpj { get; set; }
        public string hjzs { get; set; }
    }
}
DocumentServiceAPI.Application/DocManage/Dtos/Classification_Submit_Dto.cs
@@ -13,6 +13,7 @@
        /// </summary>           
        public string code { get; set; }
        public int sort { get; set; }
        public int status { get; set; }
    }
}
DocumentServiceAPI.Application/DocManage/Dtos/Document_List_Dto.cs
@@ -63,7 +63,7 @@
        /// <summary>
        /// åˆ†ç±»id
        /// </summary>
        public int class_id { get; set; }
        public int? class_id { get; set; }
        public string name { get; set; }
        /// <summary>
@@ -74,11 +74,61 @@
        /// <summary>
        /// æŠ•标单位
        /// </summary>
        public int? org_id { get; set; }
        /// <summary>
        /// é¡¹ç›®åç§°
        /// </summary>
        public int? project_id { get; set; }
        public int status { get; set; }
        public List<DocumentFile_Submit_Dto> newfiles { get; set; }
        public List<DocumentFile_Submit_Dto> editfiles { get; set; }
        public List<int> delfiles { get; set; }
    }
    /// <summary>
    /// æŸ¥è¯¢æ–‡æ¡£ä¿¡æ¯
    /// </summary>
    public class Document_Info_Dto
    {
        public Document_Info_Dto() { }
        public Document_Info_Dto(Doc_Info doc,List<FileInfo_List_Dto> filelist)
        {
            this.id = doc.id;
            if (doc.classification_id.HasValue)
            {
                this.class_id = doc.classification_id.Value;
            }
            this.name = doc.doc_name;
            if (doc.org_id.HasValue)
            {
                this.org_id = doc.org_id.Value;
            }
            this.status = doc.status;
            this.files = filelist;
        }
        public int id { get; set; }
        /// <summary>
        /// åˆ†ç±»id
        /// </summary>
        public int class_id { get; set; }
        public string name { get; set; }
        /// <summary>
        /// æŠ•标单位
        /// </summary>
        public int org_id { get; set; }
        public int status { get; set; }
        public List<DocumentFile_Submit_Dto> files { get; set; }
        public List<FileInfo_List_Dto> files { get; set; }
    }
    /// <summary>
@@ -86,6 +136,7 @@
    /// </summary>
    public class DocumentFile_Submit_Dto
    {
        public int id { get; set; }
        /// <summary>
        /// åŽŸæ–‡ä»¶åç§°
        /// </summary>           
@@ -133,5 +184,7 @@
        public string filepath { get; set; }
        public int sort { get; set; }
    }
}
DocumentServiceAPI.Application/DocManage/Dtos/Document_Lock_Dto.cs
New file
@@ -0,0 +1,48 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DocumentServiceAPI.Application.DocManage.Dtos
{
    public class Document_Lock_Dto
    {
        /// <summary>
        /// æ–‡æ¡£id
        /// </summary>
        public int doc_id { get; set; }
        public int lock_user_id { get; set; }
        public string lock_user { get; set; }
        public DateTime lock_time { get; set; }
        public DateTime? release_time { get; set; }
        public int tenant_id { get; set; }
        public int status { get; set; }
    }
    /// <summary>
    /// æäº¤ä¿¡æ¯
    /// </summary>
    public class DocLock_Submit_Dto
    {
        public int id { get; set; }
        /// <summary>
        /// äººå‘˜
        /// </summary>
        public int userid { get; set; }
        /// <summary>
        /// äººå‘˜
        /// </summary>
        public string username { get; set; }
        public int tenant_id { get; set; }
    }
}
DocumentServiceAPI.Application/DocManage/Dtos/FileInfo_List_Dto.cs
New file
@@ -0,0 +1,42 @@
using DocumentServiceAPI.Model.cyDocumentModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DocumentServiceAPI.Application.DocManage.Dtos
{
    public class FileInfo_List_Dto
    {
        public FileInfo_List_Dto()
        {
        }
        public FileInfo_List_Dto(File_Info file)
        {
            this.id = file.id;
            this.fileOldName = file.fileoldname;
            this.fileNewName = file.filenewname;
            this.filePath = file.filepath;
            this.isChange = false;
            this.filesize = file.filesize;
            this.sort = file.sort;
            this.suffix = file.suffix;
        }
        public int id { get; set; }
        public string fileOldName { get; set; }
        public string fileNewName { get; set; }
        public string filePath { get; set; }
        public bool isChange { get; set; }
        public long filesize { get; set; }
        public int sort { get; set; }
        /// <summary>
        /// æ‰©å±•名
        /// </summary>
        public string suffix { get; set; }
    }
}
DocumentServiceAPI.Application/DocManage/Dtos/Project_List_Dto.cs
New file
@@ -0,0 +1,34 @@
namespace DocumentServiceAPI.Application.DocManage.Dtos
{
    /// <summary>
    /// é¡¹ç›®åˆ—表信息
    /// </summary>
    public class ProjectItem_List_Dto
    {
        /// <summary>
        /// é¡¹ç›®id
        /// </summary>
        public int pro_id { get; set; }
        /// <summary>
        /// é¡¹ç›®åç§°
        /// </summary>
        public string pro_name { get; set; }
    }
    /// <summary>
    /// é¡¹ç›®æŸ¥è¯¢æ¡ä»¶
    /// </summary>
    public class ProjectItemSearch
    {
        /// <summary>
        /// ç§Ÿæˆ·
        /// </summary>
        public int tenant_id { get; set; }
        /// <summary>
        /// å•位
        /// </summary>
        public int org_id { get; set; }
    }
}
DocumentServiceAPI.Application/DocManage/Services/DocAchievementService.cs
New file
@@ -0,0 +1,9 @@
using DocumentServiceAPI.Core;
using DocumentServiceAPI.Model.cyDocumentModel;
namespace DocumentServiceAPI.Application.DocManage.Services
{
    public class DocAchievementService : BaseRepository<Doc_Achievement>, ITransient
    {
    }
}
DocumentServiceAPI.Application/DocManage/Services/DocumentManageService.cs
@@ -37,11 +37,17 @@
    public class DocumentSearch : BaseSearch
    {
        /// <summary>
        /// åˆ†ç±»ä»£ç 
        /// </summary>
        public string Code { get; set; }
        /// <summary>
        /// äºŒçº§åˆ†ç±»
        /// </summary>
        public int class_id { get; set; }
    }
    /// <summary>
DocumentServiceAPI.Application/DocManage/Services/ProjectManageService.cs
New file
@@ -0,0 +1,12 @@
using DocumentServiceAPI.Core;
using DocumentServiceAPI.Model.cyDocumentModel;
namespace DocumentServiceAPI.Application.DocManage.Services
{
    /// <summary>
    /// é¡¹ç›®æŸ¥è¯¢ç±»
    /// </summary>
    public class ProjectManageService : BaseRepository<Document_ProjectInfo>, ITransient
    {
    }
}
DocumentServiceAPI.Application/DocumentServiceAPI.Application.xml
File was deleted
DocumentServiceAPI.Application/UserAndLogin/LogInController.cs
@@ -1,11 +1,18 @@
using DocumentServiceAPI.Application.UserAndLogin.Services;
using DocumentServiceAPI.Application.UserAndLogin.ViewMode;
using DocumentServiceAPI.Model.cyDocumentModel;
using DocumentServiceAPI.Model.UserInfoModel;
using DocumentServiceAPI.Utility;
using Furion.DynamicApiController;
using Furion.JsonSerialization;
using Microsoft.AspNetCore.Http;
using Microsoft.IdentityModel.Tokens;
using NetTaste;
using Newtonsoft.Json.Linq;
using Swashbuckle.AspNetCore.Annotations;
using System;
using System.Collections.Generic;
using System.IdentityModel.Tokens.Jwt;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -28,12 +35,37 @@
         }
        /// <summary>
        /// ç™»å½• 1 è¾“入员工账户或者租户账户,2 é€‰æ‹©ç§Ÿæˆ·è´¦æˆ·ï¼Œ3 é€‰æ‹©å…¬å¸
        /// å½“密码为空时,带入用户中心token即可实现登录
        /// </summary>
        /// <returns>登录信息</returns>
        [HttpPost("LogoIn")]
        public async Task<RetLoginVM> LogoIn (LoginPsWordIN Parma)
        {
            //zctok校验成功是否标志
            bool IsTokenPass=false;
               if(string.IsNullOrEmpty(Parma.PassWord))
            {
                var Request = App.HttpContext.Request;
                string stoken = Request.Headers["Authorization"];
                if (stoken == null)
                    throw Oops.Oh("没有输入密码");
                stoken = stoken.Replace("Bearer ", "");
                var isvale = _tokenService.CheckJwt(stoken, out SecurityToken securityToken);
                JwtSecurityToken jwtToken = securityToken as JwtSecurityToken;
                string itcode = jwtToken.Claims.FirstOrDefault(claim => claim.Type == "sub")?.Value;
                if (isvale == false)
                    throw Oops.Oh("登录信息出错");
                if(Parma.ITCode!= itcode)
                    throw Oops.Oh("用户名错误");
                IsTokenPass=true;
            }
              bool needtoken=false;
            if (Parma.TenantId==null)
            {
                //如果还没确定租户ID éœ€è¦å…ˆç¡®å®šç§Ÿæˆ·ID
@@ -44,10 +76,14 @@
                    case 0:
                        throw Oops.Oh($"账户或者密码错误");
                    case 1:
                        if (!IsTokenPass)
                        {
                         needtoken = await _userService.CheckPsw(Tender[0].TenderId, Tender[0].EmployeeID,Parma.PassWord);
                       
                        if(!needtoken)
                            throw Oops.Oh($"账户或者密码错误");
                        }
                        Parma.TenantId = Tender[0].TenderId;
                        Parma.employeeID = Tender[0].EmployeeID;
@@ -130,10 +166,13 @@
                {
                    throw Oops.Oh($"账户密码或者租户选择错误");
                }
                if (!IsTokenPass)
                {
                needtoken = await _userService.CheckPsw(Tender. TenderId, Tender.EmployeeID, Parma.PassWord);
                if (!needtoken)
                    throw Oops.Oh($"账户或者密码错误");
                }
              var token=  _tokenService.CreateToken(new Model.JwtInfo
                {
                    EID = Tender.EmployeeID,
@@ -151,32 +190,38 @@
            throw Oops.Oh($"参数错误");
        }
        /// <summary>
        /// èŽ·å–å…¬å¸åˆ—è¡¨
        /// æ˜¯å¦æ˜¯ç”¨æˆ·ç§Ÿæˆ·ï¼Œæˆ–者是员工
        /// </summary>
        /// <returns>登录信息</returns>
        public bool GetUnitList()
        /// <param name="ITCode">账号</param>
        /// <returns>  è¿”回true ä»£è¡¨æ˜¯ï¼Œ false代表不是</returns>
        [HttpGet("IDIsEmployee")]
        public async Task<bool> IDIsEmployee(string ITCode, [FromServices] ISqlSugarClient db)
        {
          var ad=  ITCode.TryValidate(ValidationTypes.PhoneNumber);
            if(!ad.IsValid)
            {
                throw Oops.Oh("请输入正确的账号");
            }
          var count= await db.Queryable<TenantInfo>().Where(x=>x.ItCode==ITCode&&x.IsEn==true&&x.IsDel==false).WithCache(600).CountAsync();
            if (count > 0)
            return true;
        }
        /// <summary>
        /// èŽ·å–å…¬å¸åˆ—è¡¨
        /// </summary>
        /// <returns>登录信息</returns>
        public bool GetTenantInfoList()
        {
            count=await db.Queryable<Document_EmployeeInfo>().Where(x=>x.UserName==ITCode).WithCache(600).CountAsync();
            if (count > 0)
                return true;
            return false;
            return true;
        }
        public string Get()
        {
            return $"Hello {nameof(Furion)}";
        }
    }
}
DocumentServiceAPI.Application/UserAndLogin/Services/TokenService.cs
@@ -3,10 +3,13 @@
using Furion.Authorization;
using Furion.DistributedIDGenerator;
using Furion.JsonSerialization;
using Furion.Logging.Extensions;
using Microsoft.IdentityModel.Tokens;
using NetTaste;
using SqlSugar.Extensions;
using System;
using System.Collections.Generic;
using System.IdentityModel.Tokens.Jwt;
using System.Linq;
using System.Reflection;
using System.Security.Claims;
@@ -58,7 +61,50 @@
            return token;
        }
        /// <summary>
        /// æ ¡éªŒtoken çš„æœ‰æ•ˆæ€§
        /// </summary>
        /// <param name="Token"> Token校验</param>
        /// <param name="validationParameters"></param>
        /// <param name="securityToken"></param>
        /// <returns></returns>
        public bool  CheckJwt(string Token, out SecurityToken?  securityToken)
        {
            var configuration = App.Configuration;
         //   var value = configuration["xxx:xxx"];
            string secretKey = configuration["ZCUserInfoJwtOP:SecurityKey"];
            if (secretKey == null)
            {
                "没有配置用户中心的安全秘钥 ZCUserInfoJwtOP:SecurityKey æ‰¾ä¸åˆ°".LogInformation<TokenService>();
              throw  Oops.Oh("配置错误,联系管理员");
            }
            JwtSecurityTokenHandler tokenHandler = new JwtSecurityTokenHandler();
            //JwtSecurityToken jwt = tokenHandler.ReadJwtToken(Token);
            // éªŒè¯ JWT ç­¾åå¹¶æ£€æŸ¥æœ‰æ•ˆæœŸ
            TokenValidationParameters validationParameters = new TokenValidationParameters
            {
                ValidateIssuerSigningKey = true,
                IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(secretKey)),
                ValidateIssuer = false,
                ValidateAudience = false,
                ClockSkew = TimeSpan.Zero // ç¦ç”¨æ—¶é—´åç§»é‡
            };
            try
            {
                ClaimsPrincipal claimsPrincipal = tokenHandler.ValidateToken(Token, validationParameters, out SecurityToken validatedToken);
                securityToken = validatedToken;
                return true;
            }
            catch (SecurityTokenException)
            {
                securityToken=null;
                return false;
            }
        }
        /// <summary>
@@ -91,6 +137,10 @@
            string TokenKey = TokenKeys + jwt.EID?.ToString() + jwt.UID?.ToString()  + jwt.TEID?.ToString();
            return TokenKey;
        }
    }
   
}
DocumentServiceAPI.Application/UserAndLogin/ViewMode/UserInfo.cs
@@ -130,8 +130,10 @@
        /// </summary>           
        public string LastUpdateName { get; set; }
        /// <summary>
        /// ç”¨æˆ·å
        /// ç”¨æˆ·å æ‰‹æœºå·éªŒè¯ å¿…å¡«
        /// </summary>           
        [Required]
        [RegularExpression("/^(?:(?:\\+|00)86)?1\\d{10}$/")]
        public string UserName { get; set; }
        /// <summary>
        /// ç”¨æˆ·å¯†ç 
DocumentServiceAPI.Application/applicationsettings.json
@@ -53,5 +53,18 @@
      "x-access-token",
      "environment"
    ]
  },
  "ZCUserInfoJwtOP": { //zc用户中心jwt配置 ç”¨äºŽè§£æžzc的token
    "Issuer": "http://localhost",
    "Audience": "http://localhost",
    "Expires": 10800,
    "weixinExpires": 1296000,
    "SecurityKey": "superSecretKey@345",
    "RefreshTokenExpires": 86400,
    "LoginPath": "/_Framework/Redirect401"
  }
}
DocumentServiceAPI.Model/Oder/Oder.cs
@@ -1,6 +1,8 @@
using DocumentServiceAPI.Enum;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -12,6 +14,54 @@
    /// </summary>
    public class Oder:BaseModel
    {
        /// <summary>
        /// OderID
        /// </summary>
        [SugarColumn( IsPrimaryKey =true,IsIdentity =true)]
        public int Id { get; set; }
        /// <summary>
        /// æœˆä»½
        /// </summary>
        [Display(Name = "月份")]
        public int? MonthCount { get; set; }
        /// <summary>
        /// å•位个数
        /// </summary>
        [Display(Name = "单位个数")]
        public int? UnitCount { get; set; }
        /// <summary>
        /// å‘˜å·¥
        /// </summary>
        [Display(Name = "员工个数")]
        public int? EmployeeCount { get; set; }
        /// <summary>
        /// å•ä»·
        /// </summary>
        [Display(Name = "金额")]
        public decimal Amount { get; set; }
       /// <summary>
       /// æ”¯ä»˜æ–¹å¼
       /// </summary>
        public string? PayType { get; set; }
        /// <summary>
        /// æ”¯ä»˜æ—¶é—´
        /// </summary>
        public DateTime? PayTime { get; set; }
        /// <summary>
        /// æè¿°
        /// </summary>
        public string? Description { get; set; }
        /// <summary>
        /// æ‰‹æœºå·ç 
        /// </summary>
        public string ITCode { get; set; }
        /// <summary>
        /// æ”¿é‡‡ç”¨æˆ·ä¸­å¿ƒID
        /// </summary>
        public Guid? ZcUserID { get; set; }
    }
DocumentServiceAPI.Model/Permissions/TenantPermissions.cs
@@ -1,6 +1,8 @@
using DocumentServiceAPI.Enum;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -10,8 +12,50 @@
    /// <summary>
    /// ç§Ÿæˆ·æƒé™
    /// </summary>
    public class TenantPermissions
    public class TenantPermissions: BaseModel
    {
        /// <summary>
        /// id
        /// </summary>
        [Display(Name = "id ")]
        [SugarColumn(ColumnDescription = "id " ,IsPrimaryKey =true,IsIdentity =true)]
        public int Id { get; set; }
        /// <summary>
        /// ç§Ÿæˆ·ID
        /// </summary>
        [Display(Name = "租户ID ")]
        [SugarColumn(ColumnDescription = "租户ID ")]
        public int TenantId { get; set; }
        /// <summary>
        /// æœ€å¤§ä¼ä¸šä¸ªæ•°
        /// </summary>
        [Display(Name = "最大企业个数 ")]
        [SugarColumn(ColumnDescription = "最大企业个数 ")]
        public int UnitMaxCount { get; set; }
        /// <summary>
        /// æœ€å¤§å‘˜å·¥æ•°é‡
        /// </summary>
        [Display(Name = "最大员工数量 ")]
        [SugarColumn(ColumnDescription = "最大员工数量 ")]
        public int EmployeeMaxCount { get; set; }
        /// <summary>
        /// åˆ°æœŸæ—¶é—´
        /// </summary>
        [Display(Name = "到期时间 ")]
        [SugarColumn(ColumnDescription = "到期时间 ")]
        public DateTime OverTime { get; set; }
        /// <summary>
        /// æè¿°
        /// </summary>
        [Display(Name = "描述 ")]
        [SugarColumn(ColumnDescription = "描述 ")]
        public string? Description { get; set; }
    }
}
DocumentServiceAPI.Model/UserInfoModel/TenantInfo.cs
@@ -69,6 +69,11 @@
        /// </summary>
        [SugarColumn(Length =30)]
        public string? PsW { get; set; }  
        /// <summary>
        /// æ”¿é‡‡ç”¨æˆ·ä¸­å¿ƒID
        /// </summary>
        public Guid? ZcUserID { get; set; }
    }
DocumentServiceAPI.Model/cyDocumentModel/Doc_Achievement.cs
New file
@@ -0,0 +1,80 @@
using SqlSugar;
namespace DocumentServiceAPI.Model.cyDocumentModel
{
    ///<summary>
    ///业绩管理
    ///</summary>
    [SugarTable("t_doc_achievement")]
    public class Doc_Achievement : Doc_Base
    {
        public Doc_Achievement()
        {
        }
        /// <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 achievement_name { get; set; }
        /// <summary>
        /// ä¸­æ ‡é€šçŸ¥ä¹¦
        /// </summary>
        public string zbtzs_url { get; set; }
        /// <summary>
        /// åˆåŒ
        /// </summary>
        public string ht_url { get; set; }
        /// <summary>
        /// éªŒæ”¶æŠ¥å‘Š
        /// </summary>
        public string ysbg_url { get; set; }
        /// <summary>
        /// ä»˜æ¬¾å‡­è¯
        /// </summary>
        public string fkpz_url { get; set; }
        /// <summary>
        /// ç”¨æˆ·è¯„ä»·
        /// </summary>
        public string yhpj_url { get; set; }
        /// <summary>
        /// èŽ·å¥–è¯ä¹¦
        /// </summary>
        public string hjzs_url { get; set; }
        /// <summary>
        /// å…³è”分类
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        [Navigate(NavigateType.OneToOne, nameof(classification_id))]
        public Doc_Classification? DocClassification { get; set; }
        /// <summary>
        /// å…³è”项目
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        [Navigate(NavigateType.OneToOne, nameof(project_id))]
        public Document_ProjectInfo? DocProject { get; set; }
    }
}
DocumentServiceAPI.Model/cyDocumentModel/Doc_File_Info.cs
New file
@@ -0,0 +1,97 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Principal;
using System.Text;
using System.Threading.Tasks;
namespace DocumentServiceAPI.Model.cyDocumentModel
{
    ///<summary>
    ///文件信息类
    ///</summary>
    [SugarTable("t_doc_file")]
    public class File_Info
    {
        /// <summary>
        /// id
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int id { get; set; }
        /// <summary>
        /// åŽŸæ–‡ä»¶åç§°
        /// </summary>
        public string fileoldname { get; set; }
        /// <summary>
        /// æ–°åç§°
        /// </summary>
        public string filenewname { get; set; }
        /// <summary>
        /// ä¿å­˜æ–‡ä»¶åç§°
        /// </summary>
        public string fileservername { get; set; }
        /// <summary>
        /// æ–‡ä»¶å¤§å°ï¼ˆå­—节)
        /// </summary>
        public int filesize { get; set; }
        /// <summary>
        /// åŽç¼€å
        /// </summary>
        public string suffix { get; set; }
        /// <summary>
        /// æ›´æ–°æ—¶é—´
        /// </summary>
        public DateTime uptime { get; set; }
        /// <summary>
        /// æ–‡æ¡£ID
        /// </summary>
        public int doc_id { get; set; }
        /// <summary>
        /// çŠ¶æ€
        /// </summary>
        public int status { get; set; }
        /// <summary>
        /// æ–‡ä»¶ç±»åž‹
        /// 001-资质文档
        /// 002-业绩文档
        /// 003-方案文档
        /// 004-财务文档
        /// 005-技术文档
        /// 006-设备文档
        /// 007-质检文档
        /// 008-制度流程文档
        /// </summary>
        public string filetype { get; set; }
        /// <summary>
        /// ä¸Šä¼ äººå‘˜
        /// </summary>
        public int up_userid { get; set; }
        /// <summary>
        /// ä¸Šä¼ äººå‘˜
        /// </summary>
        public string up_username { get; set; }
        /// <summary>
        /// è·¯å¾„
        /// </summary>
        public string filepath { get; set; }
        /// <summary>
        /// æŽ’序
        /// </summary>
        public int sort { get; set; }
    }
}
DocumentServiceAPI.Model/cyDocumentModel/Doc_Info.cs
@@ -61,89 +61,13 @@
        [SugarColumn(IsIgnore = true)]
        [Navigate(NavigateType.OneToOne, nameof(org_id))]
        public Document_TenderUnit? DocOrganization { get; set; }
        /// <summary>
        /// å…³è”项目
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        [Navigate(NavigateType.OneToOne, nameof(project_id))]
        public Document_ProjectInfo? DocProject { get; set; }
    }
    ///<summary>
    ///文件信息类
    ///</summary>
    [SugarTable("t_doc_file")]
    public class File_Info
    {
        /// <summary>
        /// id
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int id { get; set; }
        /// <summary>
        /// åŽŸæ–‡ä»¶åç§°
        /// </summary>
        public string fileoldname { get; set; }
        /// <summary>
        /// æ–°åç§°
        /// </summary>
        public string filenewname { get; set; }
        /// <summary>
        /// ä¿å­˜æ–‡ä»¶åç§°
        /// </summary>
        public string fileservername { get; set; }
        /// <summary>
        /// æ–‡ä»¶å¤§å°ï¼ˆå­—节)
        /// </summary>
        public int filesize { get; set; }
        /// <summary>
        /// åŽç¼€å
        /// </summary>
        public string suffix { get; set; }
        /// <summary>
        /// æ›´æ–°æ—¶é—´
        /// </summary>
        public DateTime uptime { get; set; }
        /// <summary>
        /// æ–‡æ¡£ID
        /// </summary>
        public int doc_id { get; set; }
        /// <summary>
        /// çŠ¶æ€
        /// </summary>
        public int status { get; set; }
        /// <summary>
        /// æ–‡ä»¶ç±»åž‹
        /// 001-资质文档
        /// 002-业绩文档
        /// 003-方案文档
        /// 004-财务文档
        /// 005-技术文档
        /// 006-设备文档
        /// 007-质检文档
        /// 008-制度流程文档
        /// </summary>
        public string filetype { get; set; }
        /// <summary>
        /// ä¸Šä¼ äººå‘˜
        /// </summary>
        public int up_userid { get; set; }
        /// <summary>
        /// ä¸Šä¼ äººå‘˜
        /// </summary>
        public string up_username { get; set; }
        /// <summary>
        /// è·¯å¾„
        /// </summary>
        public string filepath { get; set; }
    }
}
DocumentServiceAPI.Utility/PageBaseSearch.cs
@@ -19,20 +19,22 @@
    public abstract class BaseSearch
    {
        public int ID { get; set; }
        /// <summary>
        /// å…¬å¸ID
        /// </summary>
        public string CompanyID { get; set; }
        public int CompanyID { get; set; }
        /// <summary>
        /// ç§Ÿæˆ·ID
        /// </summary>
        public string TenantID { get; set; }
        public int TenantID { get; set; }
        /// <summary>
        /// ç”¨æˆ·ID
        /// </summary>
        public string UserID { get; set; }
        public int UserID { get; set; }
        /// <summary>
        /// å¼€å§‹æ—¥æœŸ
DocumentServiceAPI.Web.Entry/AuthorizeHandler.cs
@@ -1,4 +1,5 @@
using Furion.Authorization;
using Furion.DataEncryption;
using Microsoft.AspNetCore.Authorization;
namespace DocumentServiceAPI.Web.Entry
@@ -8,6 +9,7 @@
    /// </summary>
    public class AuthorizeHandler:AppAuthorizeHandler
    {
        /// <summary>
        /// è¯·æ±‚管道
        /// </summary>
DocumentServiceAPI.Web.Entry/DocumentServiceAPI.Web.Entry.csproj.user
@@ -4,7 +4,7 @@
    <DebuggerFlavor>ProjectDebugger</DebuggerFlavor>
  </PropertyGroup>
  <PropertyGroup>
    <ActiveDebugProfile>DocumentServiceAPI.Web.Entry</ActiveDebugProfile>
    <ActiveDebugProfile>IIS Express</ActiveDebugProfile>
    <NameOfLastUsedPublishProfile>E:\workdir\标书软件\ApiService\DocumentServiceAPI\DocumentServiceAPI.Web.Entry\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
  </PropertyGroup>
</Project>
DocumentServiceAPI.Web.Entry/Properties/PublishProfiles/FolderProfile.pubxml.user
@@ -5,7 +5,7 @@
<Project>
  <PropertyGroup>
    <_PublishTargetUrl>D:\DocServiceAPI</_PublishTargetUrl>
    <History>True|2023-08-03T03:23:49.7155745Z;True|2023-08-03T10:57:12.3860490+08:00;True|2023-08-02T17:29:04.8984231+08:00;True|2023-08-02T14:24:54.6607875+08:00;True|2023-08-02T13:12:00.3228236+08:00;</History>
    <History>True|2023-08-25T08:28:37.8668025Z;True|2023-08-25T15:17:17.9212851+08:00;True|2023-08-25T11:21:18.2228201+08:00;True|2023-08-03T11:23:49.7155745+08:00;True|2023-08-03T10:57:12.3860490+08:00;True|2023-08-02T17:29:04.8984231+08:00;True|2023-08-02T14:24:54.6607875+08:00;True|2023-08-02T13:12:00.3228236+08:00;</History>
    <LastFailureDetails />
  </PropertyGroup>
</Project>
DocumentServiceAPI.Web.Entry/Properties/launchSettings.json
@@ -4,8 +4,8 @@
    "windowsAuthentication": false,
    "anonymousAuthentication": true,
    "iisExpress": {
      "applicationUrl": "http://localhost:53785",
      "sslPort": 44342
      "applicationUrl": "http://localhost:5001"
    }
  },
  "profiles": {
DocumentServiceAPI.Web.Entry/appsettings.json
@@ -37,7 +37,12 @@
  },
  //消息队列配置 ä¸ºäº†ç‹¬ç«‹éƒ¨ç½²ï¼Œè¿™é‡Œå•独配置
  "InitQRedisConfig": {
    // å¦‚果采用容器化部署Service è¦å†™æˆredis的服务名,否则写地址
    "ConnectionString": "127.0.0.1:6379,password=,connectTimeout=30000,responseTimeout=30000,abortConnect=false,connectRetry=1,syncTimeout=10000,DefaultDatabase=7" //redis数据库连接字符串
  },
  "JWTSettings": {
DocumentServiceAPI.sln
@@ -21,6 +21,10 @@
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DocumentServiceAPI.Services", "DocumentServiceAPI.Services\DocumentServiceAPI.Services.csproj", "{3369F102-ABB2-42A4-B216-58D530AEE8BE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ZcPayCore", "ZcPayCore\ZcPayCore.csproj", "{76BFAB65-B7AC-4534-A595-363551111129}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DocumentServiceApi.InitQMessage", "DocumentServiceApi.InitQMessage\DocumentServiceApi.InitQMessage.csproj", "{0A75ECEE-91C9-4A87-8573-4298DF0B6CDE}"
EndProject
Global
    GlobalSection(SolutionConfigurationPlatforms) = preSolution
        Debug|Any CPU = Debug|Any CPU
@@ -62,6 +66,14 @@
        {3369F102-ABB2-42A4-B216-58D530AEE8BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {3369F102-ABB2-42A4-B216-58D530AEE8BE}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {3369F102-ABB2-42A4-B216-58D530AEE8BE}.Release|Any CPU.Build.0 = Release|Any CPU
        {76BFAB65-B7AC-4534-A595-363551111129}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {76BFAB65-B7AC-4534-A595-363551111129}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {76BFAB65-B7AC-4534-A595-363551111129}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {76BFAB65-B7AC-4534-A595-363551111129}.Release|Any CPU.Build.0 = Release|Any CPU
        {0A75ECEE-91C9-4A87-8573-4298DF0B6CDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {0A75ECEE-91C9-4A87-8573-4298DF0B6CDE}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {0A75ECEE-91C9-4A87-8573-4298DF0B6CDE}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {0A75ECEE-91C9-4A87-8573-4298DF0B6CDE}.Release|Any CPU.Build.0 = Release|Any CPU
    EndGlobalSection
    GlobalSection(SolutionProperties) = preSolution
        HideSolutionNode = FALSE
DocumentServiceApi.InitQMessage/DocumentServiceApi.InitQMessage.csproj
New file
@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net6.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="InitQ" Version="1.0.0.15" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\DocumentServiceAPI.Core\DocumentServiceAPI.Core.csproj" />
    <ProjectReference Include="..\DocumentServiceAPI.Model\DocumentServiceAPI.Model.csproj" />
  </ItemGroup>
</Project>
DocumentServiceApi.InitQMessage/INITQMessageDefine.cs
New file
@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DocumentServiceApi.InitQMessage
{
    /// <summary>
    /// æ¶ˆæ¯ç»“构定义
    /// </summary>
    public static class INITQMessageDefine
    {
        /// <summary>
        /// è´­å…¥Oder消息
        /// </summary>
        public const string InitTenantOder = "DocumentServiceAPI_OderINIT";
        /// <summary>
        /// æ’¤å•
        /// </summary>
        public const string DecTenantOder = "DocumentServiceAPI_DecOderINIT";
    }
}
DocumentServiceApi.InitQMessage/INITQSetups.cs
New file
@@ -0,0 +1,48 @@
using CSRedis;
using Furion;
using InitQ;
using Mapster;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace DocumentServiceApi.InitQMessage
{
    /// <summary>
    /// æ³¨å†Œ INITQ
    /// </summary>
    public class DocServiceApiStartup : AppStartup
    {
        public void ConfigureServices(IServiceCollection services)        {
            var readisconnectionstring = App.Configuration["InitQRedisConfig:ConnectionString"];
            if (readisconnectionstring != null)
            //初始化redi配置
            {
                services.AddInitQ((op) =>
                {
                    op.SuspendTime = 500;
                    op.IntervalTime = 500;
                    op.ConnectionString = readisconnectionstring;
                    op.ListSubscribe = new List<Type>() { typeof(MessageReceive) };
                    op.ShowLog = false;
                });
            }
        }
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
        {
        }
    }
}
DocumentServiceApi.InitQMessage/MessageReceive.cs
New file
@@ -0,0 +1,181 @@
using DocumentServiceAPI.Model.Oder;
using DocumentServiceAPI.Model.Permissions;
using DocumentServiceAPI.Model.UserInfoModel;
using Furion;
using Furion.JsonSerialization;
using Furion.Logging.Extensions;
using InitQ.Abstractions;
using InitQ.Attributes;
using Microsoft.Extensions.Options;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DocumentServiceApi.InitQMessage
{
    /// <summary>
    /// æ¶ˆæ¯æŽ¥æ”¶å¤„理函数
    /// </summary>
    public class MessageReceive: IRedisSubscribe
    {
        /// <summary>
        /// åˆå§‹åŒ–订单处理
        /// </summary>
        /// <param name="msg"></param>
        /// <returns></returns>
        [Subscribe(INITQMessageDefine.InitTenantOder)]
        private async Task InitTenantOder(string msg)
        {
            TenantOderInfo? obj = JSON.Deserialize<TenantOderInfo>(msg);
            if(obj==null)
            {
                $"InitTenantOder åˆå§‹åŒ– msg å¯¹è±¡é”™è¯¯ ,msg为{msg}".LogInformation<MessageReceive>();
                return;
            }
            var    _db=  App.GetService<ISqlSugarClient>();
            Oder oder = new Oder()
            {
                Amount = obj.Amount,
                CreatBy = "消息队列 InitTenantOder",
                CreatTime = DateTime.Now,
                Description = obj.Description,
                EmployeeCount = obj.EmployeeCount,
                MonthCount = obj.MonthCount,
                UnitCount = obj.UnitCount,
                PayType = obj.PayType,
                PayTime = obj.PayTime,
                ZcUserID = obj.ZcUserID,
                ITCode = obj.ITCode,
            };
            TenantInfo? Tinfo = await _db.Queryable<TenantInfo>().Where(x=>x.ZcUserID==obj.ZcUserID).SingleAsync();
            if(Tinfo==null)
            {
                Tinfo = new TenantInfo
                {
                    ZcUserID = obj.ZcUserID,
                    ItCode = obj.ITCode,
                    CreatBy = "消息队列 InitTenantOder",
                    CreatTime = DateTime.Now,
                    Description = obj.Description,
                    Name = obj.ITCode,
                    PsW = obj.ITCode.Substring(obj.ITCode.Length - 4),
                };
                TenantPermissions permissions = new TenantPermissions()
                {
                    CreatBy = "消息队列 InitTenantOder",
                    CreatTime = DateTime.Now,
                    Description = obj.Description,
                    EmployeeMaxCount = obj.EmployeeCount ?? 0,
                    UnitMaxCount = obj.UnitCount ?? 0,
                    OverTime = DateTime.Now.AddMonths(obj.MonthCount ?? 0),
                };
                try
                {
                    await _db.AsTenant().BeginTranAsync();
                  var id=  await _db.Insertable(Tinfo).ExecuteReturnIdentityAsync();
                    permissions.TenantId = id;
                    await _db.Insertable(permissions).ExecuteCommandAsync ();
                    await _db.Insertable(oder).ExecuteCommandAsync();
                    await _db.AsTenant().CommitTranAsync();
                }
                catch (Exception e)
                {
                    await _db.AsTenant().RollbackTranAsync();
                    $"新建租户处理失败 msg:{msg},e:{e.ToString()} BY:消息队列 InitTenantOder".LogInformation<MessageReceive>();
                    return;
                }
            }
            else
            {
                Tinfo.ItCode = obj.ITCode;
                Tinfo.UpdataBy = "消息队列 InitTenantOder";
                Tinfo.UpdataTime = DateTime.Now;
                Tinfo.IsDel = false;
                Tinfo.IsEn = true;
              var tp= await _db.Queryable<TenantPermissions>().Where(x=>x.TenantId==Tinfo.Id).FirstAsync();
                try
                {
                    await _db.AsTenant().BeginTranAsync();
                    if (Tinfo.ItCode != obj.ITCode)
                    {
                       await _db.Updateable(Tinfo).ExecuteCommandAsync();
                    };
                    if (tp == null)
                    {
                        tp = new TenantPermissions()
                        {
                            CreatBy = "消息队列 InitTenantOder",
                             CreatTime = DateTime.Now,
                              IsDel = false,
                               IsEn = true,
                                EmployeeMaxCount=obj.EmployeeCount??0,
                                 UnitMaxCount=obj.UnitCount??0,
                                  OverTime=DateTime.Now.AddMinutes(obj.MonthCount??0),
                                   TenantId= Tinfo.Id,
                        };
                        await _db.Insertable(tp).ExecuteCommandAsync();
                    }
                    else
                    {
                        tp.IsDel = false;
                        tp.IsEn = true;
                        tp.UnitMaxCount = obj.UnitCount ?? tp.UnitMaxCount;
                        tp.EmployeeMaxCount = obj.EmployeeCount ?? tp.EmployeeMaxCount;
                        tp.OverTime = tp.OverTime.AddMonths(obj.MonthCount??0);
                        tp.UpdataBy = "消息队列 InitTenantOder";
                        tp.UpdataTime = DateTime.Now;
                        await _db.Updateable(tp).ExecuteCommandAsync();
                    }
                    await _db.Insertable(oder).ExecuteCommandAsync();
                    await _db.AsTenant().CommitTranAsync();
                }
                catch (Exception e)
                {
                    await _db.AsTenant().RollbackTranAsync();
                    $"修改租户权限失败 msg:{msg},e:{e.ToString()}  By:消息队列 InitTenantOder".LogInformation<MessageReceive>();
                    return;
                }
            }
        }
    }
}
DocumentServiceApi.InitQMessage/TenantOderInfo.cs
New file
@@ -0,0 +1,60 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DocumentServiceApi.InitQMessage
{
    /// <summary>
    /// è®¢å•消息模型详情
    /// </summary>
    internal class TenantOderInfo
    {
        /// <summary>
        /// æ‰‹æœºå·ç 
        /// </summary>
        public string ITCode { get; set; }
        /// <summary>
        /// æ”¿é‡‡ç”¨æˆ·ä¸­å¿ƒID
        /// </summary>
        public Guid? ZcUserID { get; set; }
        /// <summary>
        /// æœˆä»½
        /// </summary>
        [Display(Name = "月份")]
        public int? MonthCount { get; set; }
        /// <summary>
        /// å•位个数
        /// </summary>
        [Display(Name = "单位个数")]
        public int? UnitCount { get; set; }
        /// <summary>
        /// å‘˜å·¥
        /// </summary>
        [Display(Name = "员工个数")]
        public int? EmployeeCount { get; set; }
        /// <summary>
        /// å•ä»·
        /// </summary>
        [Display(Name = "金额")]
        public decimal Amount { get; set; }
        /// <summary>
        /// æ”¯ä»˜æ–¹å¼
        /// </summary>
        public string? PayType { get; set; }
        /// <summary>
        /// æ”¯ä»˜æ—¶é—´
        /// </summary>
        public DateTime? PayTime { get; set; }
        /// <summary>
        /// æè¿°
        /// </summary>
        public string? Description { get; set; }
    }
}
ZcPayCore/Model/OderInfo.cs
New file
@@ -0,0 +1,55 @@
using DocumentServiceAPI.Enum;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ZcPayCore.Model
{
    /// <summary>
    /// é€šç”¨è®¢å•ç±»
    /// </summary>
    [Display(Name = "通用订单类 ")]
    [SugarTable(TableName = "Oder", TableDescription = "通用订单类")]
    public class Oder : BaseModel
    {
        /// <summary>
        /// Id
        /// </summary>
        [Display(Name = "Id ")]
        [SugarColumn(ColumnDescription = "Id ",IsIdentity =true,IsPrimaryKey =true)]
        public int Id { get; set; }
        /// <summary>
        /// ç”¨æˆ·ID ä¹Ÿå¯èƒ½æ˜¯ç§Ÿæˆ·ID
        /// </summary>
        [Display(Name = "用户ID ä¹Ÿå¯èƒ½æ˜¯ç§Ÿæˆ·ID ")]
        [SugarColumn(ColumnDescription = "用户ID ä¹Ÿå¯èƒ½æ˜¯ç§Ÿæˆ·ID ")]
        public int UserID { get; set; }
        /// <summary>
        /// è®¢å•详情描述
        /// </summary>
        [Display(Name = "订单详情描述 ")]
        [SugarColumn(ColumnDescription = "订单详情描述 ")]
        public string? Description { get; set; }
        /// <summary>
        /// å…¶ä»–参数
        /// </summary>
        [Display(Name = "其他参数 ")]
        [SugarColumn(ColumnDescription = "其他参数 ")]
        public string? Param { get; set; }
        /// <summary>
        /// PropertyDecName
        /// </summary>
        [Display(Name = "PropertyDecName ")]
        [SugarColumn(ColumnDescription = "PropertyDecName ")]
        public int Property { get; set; }
    }
}
ZcPayCore/ZcPayCore.csproj
New file
@@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net6.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Essensoft.Paylink.Alipay" Version="4.1.2" />
    <PackageReference Include="Essensoft.Paylink.Security" Version="4.1.2" />
    <PackageReference Include="Essensoft.Paylink.WeChatPay" Version="4.1.2" />
    <PackageReference Include="SqlSugarCore" Version="5.1.4.99" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\DocumentServiceAPI.Enum\DocumentServiceAPI.Enum.csproj" />
  </ItemGroup>
</Project>
×ÊÁϹÜÀí.sql
New file
@@ -0,0 +1,108 @@
/****** Object:  Table [dbo].[t_doc_classification]    Script Date: 2023-08-08 11:35:47 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[t_doc_classification](
    [id] [int] IDENTITY(1,1) NOT NULL,
    [doc_classification_code] [nvarchar](10) NULL,
    [doc_classification] [nvarchar](30) NULL,
    [parent_code] [nvarchar](10) NULL,
    [is_system] [bit] NULL,
    [tenant_code] [int] NULL,
    [status] [int] NULL,
    [sort_id] [int] NULL,
    [add_time] [datetime] NULL,
 CONSTRAINT [PK_t_doc_classification] PRIMARY KEY CLUSTERED
(
    [id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET IDENTITY_INSERT [dbo].[t_doc_classification] ON
GO
INSERT [dbo].[t_doc_classification] ([id], [doc_classification_code], [doc_classification], [parent_code], [is_system], [tenant_code], [status], [sort_id], [add_time]) VALUES (1, N'001', N'资质类别', N'00', 1, NULL, 1, 1, CAST(N'2023-08-01T16:21:39.003' AS DateTime))
INSERT [dbo].[t_doc_classification] ([id], [doc_classification_code], [doc_classification], [parent_code], [is_system], [tenant_code], [status], [sort_id], [add_time]) VALUES (2, N'002', N'业绩类别', N'00', 1, NULL, 1, 2, CAST(N'2023-08-02T16:22:39.003' AS DateTime))
INSERT [dbo].[t_doc_classification] ([id], [doc_classification_code], [doc_classification], [parent_code], [is_system], [tenant_code], [status], [sort_id], [add_time]) VALUES (3, N'003', N'方案类别', N'00', 1, NULL, 1, 3, CAST(N'2023-08-03T16:23:39.003' AS DateTime))
INSERT [dbo].[t_doc_classification] ([id], [doc_classification_code], [doc_classification], [parent_code], [is_system], [tenant_code], [status], [sort_id], [add_time]) VALUES (4, N'004', N'财务类别', N'00', 1, NULL, 1, 4, CAST(N'2023-08-04T16:24:39.003' AS DateTime))
INSERT [dbo].[t_doc_classification] ([id], [doc_classification_code], [doc_classification], [parent_code], [is_system], [tenant_code], [status], [sort_id], [add_time]) VALUES (5, N'005', N'技术类别', N'00', 1, NULL, 1, 5, CAST(N'2023-08-05T16:25:39.003' AS DateTime))
INSERT [dbo].[t_doc_classification] ([id], [doc_classification_code], [doc_classification], [parent_code], [is_system], [tenant_code], [status], [sort_id], [add_time]) VALUES (6, N'006', N'设备资料', N'00', 1, NULL, 1, 6, CAST(N'2023-08-06T16:25:39.003' AS DateTime))
INSERT [dbo].[t_doc_classification] ([id], [doc_classification_code], [doc_classification], [parent_code], [is_system], [tenant_code], [status], [sort_id], [add_time]) VALUES (7, N'007', N'质检报告', N'00', 1, NULL, 1, 7, CAST(N'2023-08-07T16:25:39.003' AS DateTime))
INSERT [dbo].[t_doc_classification] ([id], [doc_classification_code], [doc_classification], [parent_code], [is_system], [tenant_code], [status], [sort_id], [add_time]) VALUES (8, N'008', N'制度流程', N'00', 1, NULL, 1, 8, CAST(N'2023-08-08T16:25:39.003' AS DateTime))
SET IDENTITY_INSERT [dbo].[t_doc_classification] OFF
GO
/****** Object:  Table [dbo].[t_project_file]    Script Date: 2023-08-09 14:21:20 ******/
CREATE TABLE [dbo].[t_document](
    [id] [int] IDENTITY(1,1) NOT NULL,
    [doc_code] [nvarchar](10) NOT NULL,
    [classification_id] [int] NULL,
    [doc_name] [nvarchar](50) NOT NULL,
    [org_id] [int] NULL,
    [project_id] [int] NULL,
    [status] [int] NOT NULL,
    [add_time] [datetime] NOT NULL,
    [tenant_code] [int] NULL,
    [is_del] [bit] NULL,
 CONSTRAINT [PK_t_doc_credential] PRIMARY KEY CLUSTERED
(
    [id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[t_doc_file](
    [id] [int] IDENTITY(1,1) NOT NULL,
    [fileoldname] [nvarchar](50) NULL,
    [filenewname] [nvarchar](50) NULL,
    [fileservername] [nvarchar](50) NULL,
    [filesize] [int] NULL,
    [suffix] [nvarchar](10) NULL,
    [uptime] [datetime] NULL,
    [doc_id] [int] NULL,
    [status] [int] NULL,
    [filetype] [nvarchar](10) NULL,
    [up_userid] [int] NULL,
    [up_username] [nvarchar](40) NULL,
    [filepath] [nvarchar](150) NULL,
    [sort] [int] NULL,
 CONSTRAINT [PK_t_project_file] PRIMARY KEY CLUSTERED
(
    [id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[t_doc_achievement]    Script Date: 2023-08-25 16:10:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[t_doc_achievement](
    [id] [int] IDENTITY(1,1) NOT NULL,
    [classification_id] [int] NULL,
    [project_id] [int] NULL,
    [achievement_name] [nvarchar](50) NULL,
    [zbtzs_url] [nvarchar](100) NULL,
    [ht_url] [nvarchar](100) NULL,
    [ysbg_url] [nvarchar](100) NULL,
    [fkpz_url] [nvarchar](100) NULL,
    [yhpj_url] [nvarchar](100) NULL,
    [hjzs_url] [nvarchar](100) NULL,
    [tenant_code] [int] NULL,
    [add_time] [datetime] NULL,
    [status] [int] NULL,
 CONSTRAINT [PK_t_doc_achievement] PRIMARY KEY CLUSTERED
(
    [id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO