refactor(steady): 重构数据校验功能并新增PQDIF解析预留模块

- 将数据校验中的缺失率相关字段替换为数据完整性字段
- 新增数据校验任务删除功能及相应测试
- 在tools模块中添加parse-pqdif子模块作为PQDIF文件解析预留
- 更新README文档以反映新的模块结构和依赖关系
- 优化数据校验统计汇总逻辑和测试覆盖
- 在entrance模块中集成parse-pqdif依赖
- 重构数据校验服务层实现和数据对象映射
This commit is contained in:
2026-06-12 08:41:11 +08:00
parent f7154db93d
commit 212b69060c
37 changed files with 1606 additions and 126 deletions

View File

@@ -0,0 +1,46 @@
package com.njcn.gather.tool.parsepqdif.controller;
import com.njcn.common.pojo.annotation.OperateInfo;
import com.njcn.common.pojo.enums.common.LogEnum;
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.common.utils.LogUtil;
import com.njcn.gather.tool.parsepqdif.pojo.vo.PqdifParseResponse;
import com.njcn.gather.tool.parsepqdif.service.ParsePqdifService;
import com.njcn.web.controller.BaseController;
import com.njcn.web.utils.HttpResultUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
/**
* PQDIF 解析接口入口。
*/
@Slf4j
@Api(tags = "PQDIF解析")
@RestController
@RequestMapping("/api/parse-pqdif")
@RequiredArgsConstructor
public class ParsePqdifController extends BaseController {
private final ParsePqdifService parsePqdifService;
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
@ApiOperation("上传 PQDIF 文件并解析")
@ApiImplicitParam(name = "pqdifFile", value = "PQDIF文件", required = true, dataType = "__file", paramType = "form")
@PostMapping(value = "/parse", consumes = {"multipart/form-data"})
public HttpResult<PqdifParseResponse> parse(@RequestPart("pqdifFile") MultipartFile pqdifFile) {
String methodDescribe = getMethodDescribe("parse");
LogUtil.njcnDebug(log, "{}PQDIF解析预留入口fileName={}",
methodDescribe, pqdifFile == null ? null : pqdifFile.getOriginalFilename());
PqdifParseResponse result = parsePqdifService.parse(pqdifFile);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
}
}

View File

@@ -0,0 +1,22 @@
package com.njcn.gather.tool.parsepqdif.pojo.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* PQDIF 解析占位响应。
*/
@Data
@ApiModel("PQDIF解析响应")
public class PqdifParseResponse {
@ApiModelProperty("状态")
private String status;
@ApiModelProperty("提示信息")
private String message;
@ApiModelProperty("文件名")
private String fileName;
}

View File

@@ -0,0 +1,12 @@
package com.njcn.gather.tool.parsepqdif.service;
import com.njcn.gather.tool.parsepqdif.pojo.vo.PqdifParseResponse;
import org.springframework.web.multipart.MultipartFile;
/**
* PQDIF 解析服务。
*/
public interface ParsePqdifService {
PqdifParseResponse parse(MultipartFile pqdifFile);
}

View File

@@ -0,0 +1,24 @@
package com.njcn.gather.tool.parsepqdif.service.impl;
import com.njcn.gather.tool.parsepqdif.pojo.vo.PqdifParseResponse;
import com.njcn.gather.tool.parsepqdif.service.ParsePqdifService;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
/**
* PQDIF 解析服务实现。
*/
@Service
public class ParsePqdifServiceImpl implements ParsePqdifService {
private static final String STATUS_NOT_SUPPORTED = "NOT_SUPPORTED";
@Override
public PqdifParseResponse parse(MultipartFile pqdifFile) {
PqdifParseResponse response = new PqdifParseResponse();
response.setStatus(STATUS_NOT_SUPPORTED);
response.setMessage("PQDIF解析功能待实现");
response.setFileName(pqdifFile == null ? null : pqdifFile.getOriginalFilename());
return response;
}
}

View File

@@ -0,0 +1 @@