package com.rongwei.bsserver.sys.controller;

import com.rongwei.bscommon.sys.service.EquForkliftRepairRecordService;
import com.rongwei.bscommon.sys.service.MaintenanceService;
import com.rongwei.bscommon.sys.utils.ExceptionUtils;
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;
import org.springframework.web.multipart.MultipartFile;

@RestController
@RequestMapping("/equForkliftRepairRecord")
public class EquForkliftRepairRecordController {

    private final static Logger log = LoggerFactory.getLogger(EquForkliftRepairRecordController.class);

    @Autowired
    private EquForkliftRepairRecordService equForkliftRepairRecordService;


    @PostMapping("/uploadimportForkliftRepairRecordSave")
    public R uploadimportForkliftRepairRecordSave(@RequestParam("file") MultipartFile multipartFile){
        try {
            log.info("进入接口：/equForkliftRepairRecord/importStandardSave,入参:{}", multipartFile);
            return equForkliftRepairRecordService.equForkliftRepairRecordService(multipartFile);
            // return null;
        }catch (Exception e){
            ExceptionUtils.printExceptionDetail(e,"导入失败，请检查后再导入:");
            return R.error(e.getMessage());
        }
    }
}
