| | |
| | | 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 com.ruoyi.common.core.domain.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | |
| | | private StandardTemplateService standardTemplateService; |
| | | |
| | | @ApiOperation(value = "获取原始记录模板列表") |
| | | @PostMapping("/selectStandardTemplatePageList") |
| | | public Result selectStandardTemplatePageList(Page page,StandardTemplate standardTemplate) throws Exception { |
| | | @GetMapping("/selectStandardTemplatePageList") |
| | | public Result selectStandardTemplatePageList(Page page, StandardTemplate standardTemplate) throws Exception { |
| | | return Result.success(standardTemplateService.selectStandardTemplatePageList(page, standardTemplate)); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "删除原始记录模板") |
| | | @PostMapping("/delStandardTemplate") |
| | | @DeleteMapping("/delStandardTemplate") |
| | | public Result<?> delStandardTemplate(Integer id) { |
| | | return Result.success(standardTemplateService.delStandardTemplate(id)); |
| | | } |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "通过模板id获取检验项模板内容") |
| | | @PostMapping("/getStandTempThingById") |
| | | @GetMapping("/getStandTempThingById") |
| | | public Result<?> getStandTempThingById(Integer id) { |
| | | return Result.success(standardTemplateService.getStandTempThingById(id)); |
| | | } |
| | |
| | | public Result<?> getEditTemplatePreparation(@RequestParam("id") Integer id) { |
| | | StandardTemplate byId = standardTemplateService.getById(id); |
| | | return Result.success("OK", byId.getThing()); |
| | | } |
| | | |
| | | @ApiOperation(value = "复制原始记录模板") |
| | | @PostMapping("/copyStandardTemplate") |
| | | public Result copyStandardTemplate(@RequestBody StandardTemplate newTemplate) { |
| | | return Result.success(standardTemplateService.copyStandardTemplate(newTemplate)); |
| | | } |
| | | } |