¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.basic.pojo.StandardTemplate; |
| | | import com.ruoyi.basic.service.StandardTemplateService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @RequestMapping("/StandardTemplate") |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @Api(tags = "åå§è®°å½æ¨¡æ¿") |
| | | public class StandardTemplateController { |
| | | |
| | | private StandardTemplateService standardTemplateService; |
| | | |
| | | @ApiOperation(value = "è·ååå§è®°å½æ¨¡æ¿å表") |
| | | @GetMapping("/selectStandardTemplatePageList") |
| | | public Result selectStandardTemplatePageList(Page page,StandardTemplate standardTemplate) throws Exception { |
| | | return Result.success(standardTemplateService.selectStandardTemplatePageList(page, standardTemplate)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ·»å åå§è®°å½æ¨¡æ¿") |
| | | @PostMapping("/addStandardTemplate") |
| | | public Result addStandardTemplate(@RequestBody StandardTemplate standardTemplate) { |
| | | return Result.success(standardTemplateService.addStandardTemplate(standardTemplate)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä¿®æ¹åå§è®°å½æ¨¡æ¿") |
| | | @PostMapping("/upStandardTemplate") |
| | | public Result<?> upStandardTemplate(@RequestBody StandardTemplate standardTemplate) { |
| | | return Result.success(standardTemplateService.upStandardTemplate(standardTemplate)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å é¤åå§è®°å½æ¨¡æ¿") |
| | | @DeleteMapping("/delStandardTemplate") |
| | | public Result<?> delStandardTemplate(Integer id) { |
| | | return Result.success(standardTemplateService.delStandardTemplate(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢åå§è®°å½æ¨¡æ¿æä¸¾") |
| | | @GetMapping("/getStandardTemplate") |
| | | public Result<?> getStandardTemplate() { |
| | | return Result.success(standardTemplateService.getStandardTemplate()); |
| | | } |
| | | |
| | | @ApiOperation(value = "éè¿æ¨¡æ¿idè·åæ£éªé¡¹æ¨¡æ¿å
容") |
| | | @GetMapping("/getStandTempThingById") |
| | | public Result<?> getStandTempThingById(Integer id) { |
| | | return Result.success(standardTemplateService.getStandTempThingById(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ç¼è¾æ¨¡æ¿ç¼å¶") |
| | | @GetMapping("/getEditTemplatePreparation") |
| | | public Result<?> getEditTemplatePreparation(@RequestParam("id") Integer id) { |
| | | StandardTemplate byId = standardTemplateService.getById(id); |
| | | return Result.success("OK", byId.getThing()); |
| | | } |
| | | } |