| | |
| | | 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; |
| | |
| | | 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> |
| | |
| | | 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; |
| | | |
| | |
| | | model.add_time = DateTime.Now; |
| | | model.doc_classification = info.name; |
| | | model.status = info.status; |
| | | model.sort_id = info.sort; |
| | | |
| | | msg = await _classificationService.UpdateAsync(model); |
| | | } |