| | |
| | | package com.ruoyi.basic.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.dto.ProductPartDto; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.basic.pojo.ProductPart; |
| | | import com.ruoyi.basic.service.ProductPartService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @RestController |
| | | @AllArgsConstructor |
| | |
| | | private ProductPartService productPartService; |
| | | |
| | | @ApiOperation(value = "根据产品id查询零件") |
| | | @PostMapping("/selectByProductId") |
| | | @GetMapping("/selectByProductId") |
| | | public Result selectByProductId(Page page,ProductPart productPart){ |
| | | return Result.success(productPartService.selectByProductId(page,productPart)); |
| | | } |
| | |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "产品零件复核") |
| | | @PostMapping("/productPartReview") |
| | | public Result productPartReview(@RequestBody ProductPartDto productPartDto) { |
| | | productPartService.productPartReviewById(productPartDto); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除产品零件") |
| | | @PostMapping("/deleteProductPart") |
| | | @DeleteMapping("/deleteProductPart") |
| | | public Result deleteProductPart(Integer id) { |
| | | productPartService.removeById(id); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "成品进厂检验项") |
| | | @GetMapping("/inspectionItems") |
| | | public Result inspectionItems(String sample,String productName){ |
| | | return Result.success(productPartService.inspectionItems(sample,productName)); |
| | | } |
| | | |
| | | @ApiOperation(value = "产品零件日志查询") |
| | | @GetMapping("/productPartLogList") |
| | | public Result productPartLogList(Page page,Integer id){ |
| | | return Result.success(productPartService.productPartLogList(page,id)); |
| | | } |
| | | |
| | | } |