package com.rongwei.savecheck.controller;


import com.rongwei.rwcommon.base.R;
import com.rongwei.rwcommon.utils.StringUtils;
import com.rongwei.sfcommon.sys.service.DhzyDataUploadService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 特殊作业数据接口
 *
 */
@RestController
@RequestMapping("/dataUpload")
@Slf4j
public class DataUploadController {
    @Autowired
    private DhzyDataUploadService dhzyDataUploadService;

    /**
     * 动火作业数据上传接口
     *
     * @return
     */
    @PostMapping("/dhzyDatauUpload")
    public R upload() {
        try {
            dhzyDataUploadService.getDataUpload();
            return R.ok();
        } catch (Exception e) {
            e.printStackTrace();
            log.error(StringUtils.spliceErrorMsg(e), e.fillInStackTrace());
            return R.error();
        }
    }
}
