| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.production.dto.ProductWorkOrderDto; |
| | | import com.ruoyi.production.pojo.ProductWorkOrder; |
| | | import com.ruoyi.production.service.ProductWorkOrderService; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | 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 javax.servlet.http.HttpServletResponse; |
| | | |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("/productWorkOrder") |
| | | public class ProductWorkOrderController { |
| | | |
| | | private ProductWorkOrderService productWorkOrderservice; |
| | | private final ProductWorkOrderService productWorkOrderservice; |
| | | |
| | | |
| | | /** |
| | | * 产品工单实体类分页查询 |
| | | */ |
| | | @ApiOperation("产品工单实体类分页查询") |
| | | @ApiOperation("产品工单分页查询") |
| | | @GetMapping("/page") |
| | | public R page(Page<ProductWorkOrderDto> page, ProductWorkOrderDto productWorkOrder) { |
| | | return R.ok(productWorkOrderservice.listPage(page, productWorkOrder)); |
| | | } |
| | | |
| | | @ApiOperation("产品工单更新") |
| | | @PostMapping("/updateProductWorkOrder") |
| | | public R updateProductWorkOrder(@RequestBody ProductWorkOrderDto productWorkOrderDto) { |
| | | return R.ok(productWorkOrderservice.updateProductWorkOrder(productWorkOrderDto)); |
| | | } |
| | | |
| | | @ApiOperation("根据id查询工单") |
| | | @GetMapping("/getProductWorkOrderById") |
| | | public R getProductWorkOrderById(Long id) { |
| | | return R.ok(productWorkOrderservice.getProductWorkOrderById(id)); |
| | | } |
| | | |
| | | @PostMapping("/down") |
| | | public void down(HttpServletResponse response, @RequestBody ProductWorkOrder productWorkOrder) { |
| | | productWorkOrderservice.down(response, productWorkOrder); |
| | | } |
| | | } |