| | |
| | | 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> |
| | |
| | | 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; |
| | |
| | | /// </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); |
| | | } |
| | | } |