12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- package cn.cslg.pas.controller;
- import cn.cslg.pas.common.core.base.Constants;
- import cn.cslg.pas.common.dto.customAnalyse.SelectCustomAnalyseDTO;
- import cn.cslg.pas.common.dto.customAnalyse.SelectCustomAnalyseListDTO;
- import cn.cslg.pas.common.utils.Response;
- import cn.cslg.pas.common.vo.customAnalyse.CustomAnalyseIdVO;
- import cn.cslg.pas.common.vo.customAnalyse.CustomAnalyseVO;
- import cn.cslg.pas.common.vo.customAnalyse.SelectCustomAnalyseVO;
- import cn.cslg.pas.service.business.CustomAnalyseService;
- import io.swagger.v3.oas.annotations.Operation;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.PostMapping;
- import org.springframework.web.bind.annotation.RequestBody;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RestController;
- import java.util.List;
- @RequestMapping(Constants.API_XiaoSHI + "/customAnalyse")
- @RestController
- public class CustomAnalyseController {
- @Autowired
- private CustomAnalyseService customAnalyseService;
- @Operation(summary = "查询组别")
- @PostMapping("/queryAnalyseGroup")
- public Response queryAnalyseGroup(@RequestBody SelectCustomAnalyseVO vo) {
- List<SelectCustomAnalyseListDTO> list = customAnalyseService.queryAnalyseGroup(vo);
- return Response.success(list);
- }
- @Operation(summary = "查询组别详情")
- @PostMapping("/queryAnalyseGroupDetail")
- public Response queryAnalyseGroupDetail(@RequestBody CustomAnalyseIdVO vo) {
- SelectCustomAnalyseDTO dto = customAnalyseService.queryAnalyseGroupDetail(vo);
- return Response.success(dto);
- }
- @Operation(summary = "添加组别")
- @PostMapping("/addAnalyseGroup")
- public Response addAnalyseGroup(@RequestBody CustomAnalyseVO vo) {
- Integer groupId = customAnalyseService.addAnalyseGroup(vo);
- return Response.success(groupId);
- }
- @Operation(summary = "编辑组别")
- @PostMapping("/editAnalyseGroup")
- public Response editAnalyseGroup(@RequestBody CustomAnalyseVO vo) {
- Integer groupId = customAnalyseService.editAnalyseGroup(vo);
- return Response.success(groupId);
- }
- @Operation(summary = "删除组别")
- @PostMapping("/delAnalyseGroup")
- public Response delAnalyseGroup(@RequestBody CustomAnalyseIdVO vo) {
- Integer groupId = customAnalyseService.delAnalyseGroup(vo);
- return Response.success(groupId);
- }
- }
|