| | |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | 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("新增检测标准参数") |
| | | @Log(title = "新增检测标准参数", businessType = BusinessType.INSERT) |
| | | public AjaxResult add(@RequestBody QualityTestStandardParam qualityTestStandardParam) { |
| | | return AjaxResult.success(qualityTestStandardParamService.save(qualityTestStandardParam)); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/del") |
| | | @ApiOperation("删除检测标准参数") |
| | | @Log(title = "删除检测标准参数", businessType = BusinessType.DELETE) |
| | | public AjaxResult delQualityTestStandard(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | | return AjaxResult.error("请选择至少一条数据"); |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperation("修改检测标准参数") |
| | | @Log(title = "修改检测标准参数", businessType = BusinessType.UPDATE) |
| | | public AjaxResult update(@RequestBody QualityTestStandardParam qualityTestStandardParam) { |
| | | return AjaxResult.success(qualityTestStandardParamService.updateById(qualityTestStandardParam)); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperation("查询检测标准参数") |
| | | @Log(title = "查询检测标准参数", businessType = BusinessType.OTHER) |
| | | public AjaxResult list(Long testStandardId) { |
| | | return AjaxResult.success(qualityTestStandardParamService.list(Wrappers.<QualityTestStandardParam>lambdaQuery().eq(QualityTestStandardParam::getTestStandardId,testStandardId))); |
| | | } |