| | |
| | | import com.ruoyi.basic.pojo.ProductModel; |
| | | import com.ruoyi.basic.service.IProductModelService; |
| | | import com.ruoyi.basic.service.IProductService; |
| | | import com.ruoyi.basic.vo.ProductModelVo; |
| | | 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.AjaxResult; |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import com.ruoyi.sales.service.ISalesLedgerProductService; |
| | | import com.ruoyi.sales.service.ISalesLedgerService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | |
| | | public class ProductController extends BaseController { |
| | | |
| | | private IProductService productService; |
| | | |
| | | private IProductModelService productModelService; |
| | | @Autowired |
| | | private ISalesLedgerProductService salesLedgerProductService; |
| | | /** |
| | | * 查询产品 |
| | |
| | | return productModelService.modelListPage(page, productDto); |
| | | } |
| | | |
| | | @ApiOperation("分页查询所有产品型号") |
| | | @Operation(summary = "分页查询所有产品型号") |
| | | @GetMapping("/pageModel") |
| | | public IPage<ProductModel> listPageProductModel(Page<ProductModel> page, ProductModel productModel) { |
| | | public IPage<ProductModelVo> listPageProductModel(Page<ProductModelVo> page, ProductModel productModel) { |
| | | return productService.listPageProductModel(page, productModel); |
| | | } |
| | | |
| | |
| | | * 产品导入模板 |
| | | */ |
| | | @GetMapping("/export") |
| | | @ApiOperation("产品导入模板") |
| | | @Operation(summary = "产品导入模板") |
| | | @Log(title = "产品导入模板", businessType = BusinessType.EXPORT) |
| | | public void importProduct(HttpServletResponse response) { |
| | | ExcelUtil<ProductModelExportDto> excelUtil = new ExcelUtil<>(ProductModelExportDto.class); |