package com.rongwei.controller;

import com.rongwei.bscommon.sys.service.impl.ImportShiftServiceImpl;
import com.rongwei.rwcommon.base.R;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
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;

/**
 * ImportController class
 *
 * @author XH
 * @date 2023/04/04
 */
@RestController
@RequestMapping("/import")
public class ImportController {
    private final Logger log = LoggerFactory.getLogger(this.getClass().getName());
    @Autowired
    private ImportShiftServiceImpl importService;

    /**
     * 根据Id 导出8D问题
     *
     * @param id
     * @return
     */
    @PostMapping("/shift")
    public R export8dExcel(@RequestParam("id") String id) {
        log.info("接口入参：{}", id);
       return importService.importByFileId(id);
    }
}
