package com.lantone.qc.kernel.web.controller;

import com.lantone.qc.kernel.analysis.QCAnalysis;
import com.lantone.qc.pub.model.OutputInfo;
import com.lantone.qc.pub.model.vo.QueryVo;
import com.lantone.qc.pub.res.Response;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName : QCController
 * @Description : 质控总入口
 * @Author : 楼辉荣
 * @Date: 2020-03-03 19:57
 */
@Api(value = "质控服务接口", tags = { "质控服务接口" })
@RestController
@RequestMapping(value = "analyse")
public class QCController {

    @Autowired
    private QCAnalysis qCAnalysis;

    @ApiOperation(value = "质控外部接口，需要token信息", notes = "")
    @PostMapping("rec")
    public Response<OutputInfo> extract(@RequestBody QueryVo queryVo) {
        Response response = new Response();
        response.setData(qCAnalysis.anlysis(queryVo));
        return response;
    }

}