李林
2023-10-07 658d4927d468c47208fd012d9128b09249c07eff
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
53
54
package com.chinaztt.mes.production.controller;
 
import com.chinaztt.mes.production.service.TraceService;
import com.chinaztt.ztt.common.core.util.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
/**
 * @author zhangxy
 */
@RestController
@AllArgsConstructor
@RequestMapping("/trace")
@Api(value = "trace", tags = "产品追溯")
public class TraceController {
 
    private TraceService traceService;
 
    /**
     * @param no
     * @return
     */
    @ApiOperation(value = "根据编号查询", notes = "根据编号查询")
    @GetMapping("/queryByNo")
    public R queryByNo(String no) {
        return R.ok(traceService.queryListByNo(no));
    }
 
    /**
     * @param systemNo
     * @return
     */
    @ApiOperation(value = "追溯结构图", notes = "追溯结构图")
    @GetMapping("/diagram")
    public R diagram(String systemNo, String traceType) {
        return R.ok(traceService.diagram(systemNo, traceType));
    }
 
    /**
     * @param systemNo
     * @return
     */
    @ApiOperation(value = "工单", notes = "工单")
    @GetMapping("/nodeDetail")
    public R nodeDetail(String systemNo) {
        return R.ok(traceService.nodeDetail(systemNo));
    }
 
 
}