package com.gkhy.assess.admin.controller.web; import com.gkhy.assess.common.annotation.RepeatSubmit; import com.gkhy.assess.common.api.CommonResult; import com.gkhy.assess.system.domain.AssRecitification; import com.gkhy.assess.system.service.AssRecitificationService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; /** *

* 项目整改情况说明表 前端控制器 *

* * @author kzy * @since 2023-12-12 10:46:54 */ @Api(tags = "整改情况 前端控制器") @RestController @RequestMapping("/manage/recitification") public class AssRecitificationController { @Autowired private AssRecitificationService recitificationService; @ApiOperation(value = "根据项目id获取整改情况列表") @GetMapping("/getRectifyByProjectId") public CommonResult getRectifyByProjectId(Long projectId){ return CommonResult.success(recitificationService.recitificationList(projectId)); } @RepeatSubmit @ApiOperation(value = "创建整改情况") @PostMapping("/add") public CommonResult addRecitification(@Validated @RequestBody AssRecitification recitification){ return CommonResult.success(recitificationService.addRecitification(recitification)); } @RepeatSubmit @ApiOperation(value = "编辑整改情况") @PutMapping("/edit") public CommonResult editRecitification(@Validated @RequestBody AssRecitification recitification){ return CommonResult.success(recitificationService.editRecitification(recitification)); } @RepeatSubmit @ApiOperation(value = "删除整改情况") @DeleteMapping("/remove/{rectifyId}") public CommonResult deleteRectify(@PathVariable(value = "rectifyId")Long rectifyId){ return CommonResult.success(recitificationService.deleteById(rectifyId)); } }