package com.tofly.analyse.controller;

import com.tofly.analyse.service.ImportTranService;
import com.tofly.common.core.entity.ResultRespone;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
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;

@RestController
@RequestMapping("/importTran")
@Api(tags = "数据转换")
public class ImportTranController {
	
    @Autowired	
    private ImportTranService importTranService;
	
	@ApiOperation(value = "获取转换数据")
    @PostMapping("/getTranData")
    public ResultRespone getTranData(
            @ApiParam(value = "文件",name = "file",required = true) MultipartFile file,@ApiParam(value = "文件存放路径",name = "path",required = true) @RequestParam String path) {
	   return importTranService.getTranData(file,path);
    }
	
	

		
		
} 