package com.diagbot.web;

import com.diagbot.dto.RespDTO;
import com.diagbot.facade.LisExcelResFacade;
import com.diagbot.vo.LitAssayVO;
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.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;

/**
 * @author wangfeng
 * @Description: 化验导入
 * @date 2018年11月28日 上午10:20:38
 */
@RestController
@RequestMapping("/lisExcelRes")
@Api(value = "化验导入API[by:wangfeng]", tags = { "WF——化验导入API" })
@SuppressWarnings("unchecked")
public class LisExcelResController {

    @Autowired
    LisExcelResFacade lisExcelResFacade;

    @ApiOperation(value = "导入化验数据:[by:wangfeng]", notes = "导入化验数据")
    @PostMapping("/lisExcelAnalysis")
    public RespDTO<LitAssayVO> lisExcelAnalysis(@RequestParam("uploadfile") MultipartFile file,
                                                HttpServletRequest request) {
        return lisExcelResFacade.lisExcelAnalysis(file, request);
    }
}