whyclxw
2024-07-23 12d9277646a5eeafc20f18c6bb4ea8a855d4e2c1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package com.whyc.controller;
 
import com.whyc.dto.Response;
import com.whyc.service.ProductBomHistoryService;
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("productBomHistory")
public class ProductBomHistoryController {
    @Autowired
    private ProductBomHistoryService service;
 
    @ApiOperation(value = "根据子件名称和母料型号查询历史版本记录")
    @GetMapping("getBomHistoryByPModelAndSName")
    public Response getBomHistoryByPModelAndSName(@RequestParam String pmodel, @RequestParam String sname){
        return service.getBomHistoryByPModelAndSName(pmodel,sname);
    }
   /*
    @ApiOperation(tags="产品管理",value = "查询具体某一版本产品信息")
    @GetMapping("getBoomByVersion")
    public Response getBoomByVersion(@RequestParam String parentModel,@RequestParam int version){
        return service.getBoomByVersion(parentModel,version);
    }*/
 
    /*
    @ApiOperation(tags="产品管理",value = "下载指定版本的产品")
    @GetMapping("downloaByVersion")
    public void downloaByVersion(HttpServletRequest req, HttpServletResponse resp, @RequestParam String parentModel, @RequestParam int version){
        service.downloaByVersion(req,resp,parentModel,version);
    }*/
 
    @GetMapping("compare")
    @ApiOperation(value = "版本对比",notes = "preProductId:旧版本的产品id,productId:新版本的产品id;返回结果data,data2,data3分别对应diffList,addList,deleteList")
    public Response compare(@RequestParam int preProductId,@RequestParam int productId){
        return service.compare(preProductId,productId);
    }
 
 
    @ApiOperation("修复选项查询")
    @GetMapping("fixItem")
    public void getFixItem(){
        service.getFixItem();
    }
 
}