文件分类标记

This commit is contained in:
liang.chao 2025-09-16 09:24:09 +08:00
parent 781f665eb5
commit 33b240044c
1 changed files with 12 additions and 3 deletions

View File

@ -93,7 +93,10 @@ public class ArchiveController extends BaseController {
if (vo.getLevel() == null) {
return R.fail("级别有误");
}
int num = service.geMaxSort(vo.getParentId().toString());
Integer num = service.geMaxSort(vo.getParentId().toString());
if (num == null) {
num = 0;
}
if (vo.getSort() <= num) {
return R.fail("排序序号需大于" + num);
}
@ -137,7 +140,10 @@ public class ArchiveController extends BaseController {
@RequiresPermissions("archive:catalogue:edit")
public R editArchivalCatalogue(@RequestBody @Validated ArchivalCatalogueVo vo) {
try {
int num = service.geMaxSort(vo.getParentId().toString());
Integer num = service.geMaxSort(vo.getParentId().toString());
if (num == null) {
num = 0;
}
int sort = service.getSortById(vo.getId());
if (sort != vo.getSort() && vo.getSort() <= num) {
return R.fail("排序序号需大于" + num);
@ -185,7 +191,10 @@ public class ArchiveController extends BaseController {
@SysLog(title = "查询最大sort", module = "档案管理->查询最大sort", businessType = OperaType.QUERY, details = "查询最大sort", logType = 1)
public AjaxResult geMaxSort(String parentId) {
try {
int num = service.geMaxSort(parentId);
Integer num = service.geMaxSort(parentId);
if (num == null) {
num = 0;
}
return AjaxResult.success(num);
} catch (Exception e) {
log.error(e.toString(), e);