| | |
| | | |
| | | 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.R; |
| | | import com.ruoyi.quality.dto.QualityInspectDto; |
| | | import com.ruoyi.quality.pojo.QualityInspect; |
| | |
| | | */ |
| | | @PostMapping("/add") |
| | | @Operation(summary = "新增检验") |
| | | @Log(title = "新增检验", businessType = BusinessType.INSERT) |
| | | public R<?> add(@RequestBody QualityInspectDto qualityInspectDto) { |
| | | return R.ok(qualityInspectService.add(qualityInspectDto)); |
| | | } |
| | |
| | | */ |
| | | @DeleteMapping("/del") |
| | | @Operation(summary = "删除检验") |
| | | @Log(title = "删除检验", businessType = BusinessType.DELETE) |
| | | public R<?> delQualityInspect(@RequestBody List<Integer> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return R.fail("请选择至少一条数据"); |
| | |
| | | */ |
| | | @GetMapping("/{id}") |
| | | @Operation(summary = "检验详情") |
| | | @Log(title = "检验详情", businessType = BusinessType.OTHER) |
| | | public R<?> QualityInspectDetail(@PathVariable("id") Integer id) { |
| | | return R.ok(qualityInspectService.getDetailById(id)); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/update") |
| | | @Operation(summary = "修改检验") |
| | | @Log(title = "修改检验", businessType = BusinessType.UPDATE) |
| | | public R<?> update(@RequestBody QualityInspectDto qualityInspectDto) { |
| | | return R.ok(qualityInspectService.updateQualityInspect(qualityInspectDto)); |
| | | } |
| | |
| | | */ |
| | | @GetMapping("/listPage") |
| | | @Operation(summary = "分页查询检验") |
| | | @Log(title = "分页查询检验", businessType = BusinessType.OTHER) |
| | | public R<?> qualityInspectListPage(Page page, QualityInspectDto qualityInspect) { |
| | | return R.ok(qualityInspectService.qualityInspectListPage(page, qualityInspect)); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/export") |
| | | @Operation(summary = "导出检验") |
| | | @Log(title = "导出检验", businessType = BusinessType.EXPORT) |
| | | public void qualityInspectExport(HttpServletResponse response, QualityInspect qualityInspect) { |
| | | qualityInspectService.qualityInspectExport(response, qualityInspect); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/submit") |
| | | @Operation(summary = "提交检验") |
| | | @Log(title = "提交检验", businessType = BusinessType.OTHER) |
| | | public R<?> submit(@RequestBody QualityInspect qualityInspect) { |
| | | return R.ok(qualityInspectService.submit(qualityInspect)); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/down") |
| | | @Operation(summary = "下载检验") |
| | | @Log(title = "下载检验", businessType = BusinessType.OTHER) |
| | | public void down(HttpServletResponse response, @RequestBody QualityInspect qualityInspect) { |
| | | qualityInspectService.down(response, qualityInspect); |
| | | } |