对比新文件 |
| | |
| | | package com.ruoyi.basic.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.pojo.StandardMethod; |
| | | import com.ruoyi.basic.service.StandardMethodService; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | |
| | | @Api(tags = "鏍囧噯鏂规硶") |
| | | @RestController |
| | | @RequestMapping("/standardMethod") |
| | | @AllArgsConstructor |
| | | public class StandardMethodController { |
| | | |
| | | private StandardMethodService standardMethodService; |
| | | |
| | | @ApiOperation(value = "鑾峰彇鏍囧噯鏂规硶鍒楄〃") |
| | | @GetMapping("/selectStandardMethodList") |
| | | public Result selectStandardMethodList(Page page, StandardMethod standardMethod) throws Exception { |
| | | return Result.success(standardMethodService.selectStandardMethodList(page, standardMethod)); |
| | | } |
| | | |
| | | @ApiOperation(value = "鑾峰彇鏍囧噯鏂规硶鏋氫妇") |
| | | @GetMapping("/selectStandardMethods") |
| | | public Result selectStandardMethods(){ |
| | | return Result.success(standardMethodService.selectStandardMethods()); |
| | | } |
| | | |
| | | @ApiOperation(value = "娣诲姞鏍囧噯鏂规硶") |
| | | @PostMapping("/addStandardMethod") |
| | | public Result addStandardMethod(@RequestBody StandardMethod standardMethod) { |
| | | return Result.success(standardMethodService.addStandardMethod(standardMethod)); |
| | | } |
| | | |
| | | @ApiOperation(value = "鍒犻櫎鏍囧噯鏂规硶") |
| | | @DeleteMapping("/delStandardMethod") |
| | | public Result<?> delStandardMethod(Integer id) { |
| | | return Result.success(standardMethodService.delStandardMethod(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "淇敼鏍囧噯鏂规硶") |
| | | @PostMapping("/upStandardMethod") |
| | | public Result<?> upStandardMethod(@RequestBody StandardMethod standardMethod) { |
| | | return Result.success(standardMethodService.upStandardMethod(standardMethod)); |
| | | } |
| | | |
| | | @ApiOperation(value = "瀵煎叆鏍囧噯鏄庣粏") |
| | | @PostMapping("/importStandardDetails") |
| | | public Result<?> importStandardDetails(@RequestPart("file") MultipartFile file) throws IOException { |
| | | standardMethodService.inputExcel(file); |
| | | return Result.success(); |
| | | } |
| | | } |