管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2023-01-10 a5de74e84d74eef4543e56b1181a5b4b269212e1
src/main/java/com/lf/server/controller/data/upload/CheckController.java
@@ -13,6 +13,9 @@
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.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -69,8 +72,12 @@
    @SysLog()
    @ApiOperation(value = "提交数据质检")
    @GetMapping(value = "/uploadChecks")
    public ResponseMsg<Object> uploadChecks(FmeReqEntity entity, HttpServletRequest req) {
    @ApiImplicitParams({
            @ApiImplicitParam(name = "entity", value = "FME请求实体类", dataType = "FmeReqEntity", paramType = "body")
    })
    @ResponseBody
    @PostMapping(value = "/uploadChecks")
    public ResponseMsg<Object> uploadChecks(@RequestBody FmeReqEntity entity, HttpServletRequest req) {
        try {
            if (StringHelper.isEmpty(entity.names)) {
                return fail("任务名称不能为空");
@@ -102,10 +109,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 +129,9 @@
        return zipFile.exists() && !zipFile.isDirectory();
    }
    /**
     * 是/否为Excel文件
     */
    private boolean isXlsFile(String filePath) {
        if (null == filePath) {
            return false;