管道基础大数据平台系统开发-【后端】-Server
5
13693261870
2023-01-09 57c63c7af9bcff4d38da1bf247ec0eac21887c48
src/main/java/com/lf/server/controller/data/upload/CheckController.java
@@ -13,6 +13,8 @@
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -69,7 +71,11 @@
    @SysLog()
    @ApiOperation(value = "提交数据质检")
    @GetMapping(value = "/uploadChecks")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "entity", value = "FME请求实体类", dataType = "FmeReqEntity", paramType = "body")
    })
    @ResponseBody
    @PostMapping(value = "/uploadChecks")
    public ResponseMsg<Object> uploadChecks(FmeReqEntity entity, HttpServletRequest req) {
        try {
            if (StringHelper.isEmpty(entity.names)) {
@@ -102,10 +108,16 @@
        }
    }
    /**
     * 获取文件路径
     */
    private String getFullPath(String filePath) {
        return null == filePath ? null : pathHelper.getConfig().getTempPath() + File.separator + filePath;
    }
    /**
     * 是/否为Zip文件
     */
    private boolean isZipFile(String filePath) {
        if (null == filePath || !filePath.toLowerCase().endsWith(StaticData.ZIP)) {
            return false;
@@ -116,6 +128,9 @@
        return zipFile.exists() && !zipFile.isDirectory();
    }
    /**
     * 是/否为Excel文件
     */
    private boolean isXlsFile(String filePath) {
        if (null == filePath) {
            return false;