| | |
| | | import com.ruoyi.quality.pojo.QualityTestStandard; |
| | | import com.ruoyi.quality.pojo.QualityTestStandardParam; |
| | | import com.ruoyi.quality.service.QualityTestStandardParamService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/qualityTestStandardParam") |
| | | @Api(tags = "检测标准参数") |
| | | public class QualityTestStandardParamController { |
| | | |
| | | @Autowired |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("/add") |
| | | @ApiOperation("新增检测标准参数") |
| | | public AjaxResult add(@RequestBody QualityTestStandardParam qualityTestStandardParam) { |
| | | return AjaxResult.success(qualityTestStandardParamService.save(qualityTestStandardParam)); |
| | | } |
| | |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @ApiOperation("删除检测指标维护") |
| | | @DeleteMapping("/del") |
| | | public AjaxResult delQualityTestStandard(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperation("检测指标维护修改") |
| | | public AjaxResult update(@RequestBody QualityTestStandardParam qualityTestStandardParam) { |
| | | return AjaxResult.success(qualityTestStandardParamService.updateById(qualityTestStandardParam)); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperation("检测指标维护查询") |
| | | public AjaxResult list(Long testStandardId) { |
| | | return AjaxResult.success(qualityTestStandardParamService.list(Wrappers.<QualityTestStandardParam>lambdaQuery().eq(QualityTestStandardParam::getTestStandardId,testStandardId))); |
| | | } |