username@email.com
2024-12-26 90858c80d9921b555119f41060c1f883f6e6ffc5
DocumentServiceAPI.Application/DocManage/DocClassificationManageAppService.cs
@@ -1,5 +1,6 @@
using DocumentServiceAPI.Application.DocManage.Dtos;
using DocumentServiceAPI.Application.DocManage.Services;
using DocumentServiceAPI.Application.ProjectInfo.Services.Interfaces;
using DocumentServiceAPI.Model.cyDocumentModel;
using DocumentServiceAPI.Utility;
@@ -11,10 +12,11 @@
    public class DocClassificationManageAppService : IDynamicApiController
    {
        private readonly DocClassificationService _classificationService;
        public DocClassificationManageAppService(DocClassificationService classificationService)
        private readonly IProjectInfoService _projectInfoService;
        public DocClassificationManageAppService(DocClassificationService classificationService, IProjectInfoService projectInfoService)
        {
            _classificationService = classificationService;
            _projectInfoService = projectInfoService;
        }
        /// <summary>
@@ -42,11 +44,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,c=>c.sort_id,OrderByType.Asc);
                result.Items = await _classificationService.GetPageListAsync(c => c.status ==page.Status  && c.parent_code == page.Code && c.is_system == false , pg,c=>c.sort_id,OrderByType.Asc);
            }
            else
            {
                result.Items = await _classificationService.GetPageListAsync(c => c.parent_code == page.Code, pg, c => c.sort_id, OrderByType.Asc);
                result.Items = await _classificationService.GetPageListAsync(c => c.parent_code == page.Code && c.is_system == false , pg, c => c.sort_id, OrderByType.Asc);
            }
            result.TotalCount = pg.TotalCount;
            result.PageIndex = pg.PageIndex;
@@ -113,9 +115,9 @@
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public async Task<IActionResult> PostDelInfo(int id)
        public IActionResult PostDelInfo(int id)
        {
            var msg = await _classificationService.DeleteByIdAsync(id);
            var msg = _projectInfoService.GetDeleteDocClassification(id);
            return new JsonResult(msg);
        }
    }