| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.pojo.Customer; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | 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.production.dto.ProductOrderDto; |
| | | import com.ruoyi.production.pojo.ProcessRoute; |
| | | import com.ruoyi.production.pojo.ProductOrder; |
| | | import com.ruoyi.production.service.ProductOrderService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | @RequestMapping("productOrder") |
| | | @RestController |
| | | @Api(tags = "ç产订å") |
| | | public class ProductOrderController { |
| | | |
| | | @Autowired |
| | | private ProductOrderService productOrderService; |
| | | |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @GetMapping("page") |
| | | public R page(ProductOrderDto productOrder, Page page) { |
| | | return R.ok(productOrderService.pageProductOrder(page, productOrder)); |
| | | } |
| | | |
| | | @ApiOperation("ç»å®å·¥èºè·¯çº¿") |
| | | @PostMapping("/bindingRoute") |
| | | public R bindingRoute(@RequestBody ProductOrder productOrder) { |
| | | return R.ok(productOrderService.bindingRoute(productOrder)); |
| | | } |
| | | |
| | | @ApiOperation("æ¥è¯¢è§æ ¼åå·å¯¹åºçå·¥èºè·¯çº¿") |
| | | @GetMapping("/listProcessRoute") |
| | | public R listProcessRoute(Long productModelId) { |
| | | return R.ok(productOrderService.listProcessRoute(productModelId)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºç产订å |
| | | */ |
| | | @Log(title = "ç产订å", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, ProductOrderDto productOrderDto) { |
| | | List<ProductOrderDto> list; |
| | | list = productOrderService.pageProductOrder(new Page<>(1, -1), productOrderDto).getRecords(); |
| | | ExcelUtil<ProductOrderDto> util = new ExcelUtil<ProductOrderDto>(ProductOrderDto.class); |
| | | util.exportExcel(response, list, "çäº§è®¢åæ°æ®"); |
| | | } |
| | | |
| | | @ApiOperation("æ¥è¯¢ç产订å对åºçBOM") |
| | | @GetMapping("/listProcessBom") |
| | | public R listProcessBom(Long orderId) { |
| | | return R.ok(productOrderService.listProcessBom(orderId)); |
| | | } |
| | | |
| | | |
| | | } |