package com.zjty.autotest.controller;

import com.zjty.autotest.pojo.sjq.common.ResponseResult;
import com.zjty.autotest.service.TestReportService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 控制器层
 * @author Administrator
 *
 */
@RestController
@CrossOrigin
@RequestMapping("/report")
@Api(value = "报告管理接口",description = "提供输入输出查询接口")
public class TestReportController {

	@Autowired
	private TestReportService testReportService;

	
	/**
	 * 根据ID查询
	 * @param id ID
	 * @return*/
	@ApiOperation("根据AutoResultId查询输入")
	@RequestMapping(value="/in/{id}",method= RequestMethod.GET)
	public ResponseResult findByIdInData(@PathVariable String id){
		return testReportService.findByIdInData(id);
	}

	/**
	 * 根据ID查询
	 * @param id ID
	 * @return*/
	@ApiOperation("根据AutoResultId查询输出")
	@RequestMapping(value="/out/{id}",method= RequestMethod.GET)
	public ResponseResult findByIdOutData(@PathVariable String id){
		return testReportService.findByIdOutData(id);
	}

}
