| | |
| | | package com.whyc.controller; |
| | | |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.pojo.ProductHistory; |
| | | import com.whyc.service.ProductHistoryService; |
| | | import com.whyc.service.ProductService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | @Api(tags = "产品管理") |
| | | @RestController |
| | | @RequestMapping("product") |
| | | public class ProductController { |
| | | @Autowired |
| | | private ProductService service; |
| | | |
| | | @Autowired |
| | | private ProductHistoryService historyService; |
| | | |
| | | @ApiOperation(tags = "物料管理",value = "根据物料编码查询所有包含该物料的产品信息",notes = "8.17修改后使用") |
| | | @GetMapping() |
| | | @GetMapping("getProductByMaterial") |
| | | public Response getProductByMaterial(@RequestParam String subCode){ |
| | | return service.getProductByMaterial(subCode); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询出所有的产品信息(分页加模糊查询<产品的编码,型号,名字,定制表编号>)",notes = "8.17修改后使用") |
| | | @GetMapping("getAllProduct") |
| | | public Response getAllProduct(@RequestParam(required = false) String parentCode,@RequestParam(required = false) String parentName, @RequestParam(required = false) String parentModel |
| | | , @RequestParam(required = false) String customCode, @RequestParam int pageCurr, @RequestParam int pageSize){ |
| | | return service.getAllProduct(parentCode,parentName,parentModel,customCode,pageCurr,pageSize); |
| | | } |
| | | @ApiOperation(value = "产品详情查看版本信息",notes = "8.17修改后使用") |
| | | @GetMapping("getProductVersion") |
| | | public Response getProductVersion( @RequestParam String parentModel, String customCode){ |
| | | return historyService.getProductVersion(parentModel,customCode); |
| | | } |
| | | |
| | | } |