package org.jeecg.modules.api.workorderController;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.apiService.ExcelService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;
import java.io.File;
import java.io.IOException;

@Api(tags="Excel导入导出相关接口")
@RestController
@RequestMapping("/workorder/excel")
@Slf4j
public class ExcelController {

    //excel信息
    @Resource
    private ExcelService excelService;
    /****************************************************************************************************/

    @ApiOperation(value="导入导出-工单信息导入", notes="导入导出-工单信息导入")
    @RequestMapping(value = "/templateImport", method = {RequestMethod.POST})
        public Result<?> templateImport(String path){

        return excelService.templateImport(path);
    }

    @ApiOperation(value="导入导出-工单信息导出", notes="导入导出-工单信息导出")
    @RequestMapping(value = "/templateExport", method = {RequestMethod.POST})
    public Result<?> templateExport(String templateId){
        return excelService.templateExport(templateId);
    }


}
