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)); } }