2026-04-16 6ad5c2cdc193cf7bb02884961b7434cd7f607a0d
src/main/java/com/ruoyi/production/controller/ProductWorkOrderController.java
@@ -5,10 +5,13 @@
import com.ruoyi.production.dto.ProductWorkOrderDto;
import com.ruoyi.production.pojo.ProductWorkOrder;
import com.ruoyi.production.service.ProductWorkOrderService;
import com.ruoyi.quality.pojo.QualityInspect;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;
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;
@@ -17,44 +20,28 @@
@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")
    @PostMapping("/updateProductWorkOrder")
    public R updateProductWorkOrder(@RequestBody ProductWorkOrderDto productWorkOrderDto) {
        return R.ok(productWorkOrderservice.updateProductWorkOrder(productWorkOrderDto));
    }
    /**
     * pda根据二维码的工单id查询数据
     */
    @ApiOperation("pda根据二维码的工单id查询数据")
    @ApiOperation("根据id查询工单")
    @GetMapping("/getProductWorkOrderById")
    public R getProductWorkOrderById(Long id) {
        return R.ok(productWorkOrderservice.getById(id));
        return R.ok(productWorkOrderservice.getProductWorkOrderById(id));
    }
    /**
     * 工单流转卡下载
     * @param response
     * @param productWorkOrder
     */
    @PostMapping("/down")
    public void down(HttpServletResponse response, @RequestBody ProductWorkOrder productWorkOrder) {
        productWorkOrderservice.down(response, productWorkOrder);
    }
}