62 lines
1.6 KiB
Java
62 lines
1.6 KiB
Java
package net.srt.controller;
|
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
import net.srt.entity.DatastandardEntity;
|
|
import net.srt.entity.StandardEntity;
|
|
import net.srt.framework.common.utils.BeanUtil;
|
|
import net.srt.framework.common.utils.Result;
|
|
import net.srt.framework.common.utils.TreeNodeVo;
|
|
import net.srt.service.StandardService;
|
|
import net.srt.vo.StandardManagementVo;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import javax.validation.Valid;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
/**
|
|
* @ClassName : StandardController
|
|
* @Description :
|
|
* @Author : FJJ
|
|
* @Date: 2023-12-20 11:30
|
|
*/
|
|
@RestController
|
|
@RequestMapping("standard-category")
|
|
@Tag(name = "数据开发-调度中心目录")
|
|
public class StandardController {
|
|
@Autowired
|
|
StandardService standardService;
|
|
|
|
@GetMapping("/list-tree")
|
|
@Operation(summary = "查询文件分组树")
|
|
public Result<List<TreeNodeVo>> listTree() {
|
|
return Result.ok(standardService.listTree());
|
|
}
|
|
|
|
|
|
@PostMapping
|
|
@Operation(summary = "保存")
|
|
public Result<String> save(@RequestBody StandardManagementVo vo) {
|
|
standardService.save1(vo);
|
|
return Result.ok();
|
|
}
|
|
|
|
@PutMapping
|
|
@Operation(summary = "修改")
|
|
public Result<String> update(@RequestBody StandardManagementVo vo) {
|
|
standardService.update1(vo);
|
|
return Result.ok();
|
|
}
|
|
|
|
@DeleteMapping
|
|
@Operation(summary = "删除")
|
|
public Result<String> delete(Long id) {
|
|
standardService.delete(id);
|
|
return Result.ok();
|
|
}
|
|
|
|
|
|
}
|