whyclxw
2024-07-24 aa485b3e2ff8b693014436ff9a74312ddc08bfc8
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
package com.whyc.controller;
 
import com.whyc.dto.Response;
import com.whyc.service.MaterialHistoryService;
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("materialHistory")
public class MaterialHistoryController {
    @Autowired
    private MaterialHistoryService service;
 
    @ApiOperation(value = "根据物料id查询dwg历史")
    @GetMapping("getDwgHisById")
    public Response getDwgHisById(@RequestParam int materialId,@RequestParam int pageCurr,@RequestParam int pageSize){
        return service.getDwgHisById(materialId,pageCurr,pageSize);
    }
    @ApiOperation(value = "根据物料id查询pic历史")
    @GetMapping("getPicHisById")
    public Response getPicHisById(@RequestParam int materialId,@RequestParam int pageCurr,@RequestParam int pageSize){
        return service.getPicHisById(materialId,pageCurr,pageSize);
    }
 
    /**
     * 一次调用,用于保留首次物料的图纸或图片
     * @return
     */
    @GetMapping("moveFromMaterialTable")
    public Response moveFromMaterialTable(@RequestParam int checkNum){
        if(checkNum == 87654321){
            return service.moveFromMaterialTable(checkNum);
        }
        return new Response().set(1,false,"参数校验错误");
    }
}