DrawController.java
1.21 KB
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
package com.huaheng.pc.draw.controller;
import com.huaheng.framework.web.domain.AjaxResult;
import com.huaheng.pc.draw.domain.Draw;
import com.huaheng.pc.draw.service.IDrawService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
*查看图纸控制层
* @author xcq
*/
@RestController
@RequestMapping("/draw")
@Slf4j
public class DrawController {
@Resource
private IDrawService drawService;
//@RequiresPermissions("srm:srmDetail:selectDraw")
@GetMapping(value = "/selectDraw")
@ApiOperation("通过物料编码查询plm图纸")
public AjaxResult selectDraw(String no){
try {
String rid = drawService.getRid();
Draw draw = drawService.getDrawPartsList(rid, no);
draw = drawService.getDraw2DList(draw);
return AjaxResult.success(draw);
}catch (Exception e){
return AjaxResult.error(e.getMessage());
}
}
}