正式检测-收取数据、原始数据组装和入库、配对关系入库、误差计算逻辑

This commit is contained in:
caozehui
2025-08-18 16:15:35 +08:00
parent 257d0b3af8
commit c9bf604a33
48 changed files with 1429 additions and 964 deletions

View File

@@ -60,4 +60,6 @@ public interface IDictTreeService extends IService<DictTree> {
List<DictTree> getDictTreeById(List<String> ids);
DictTree getDictTreeByCode(String code);
List<DictTree> listByFatherIds(List<String> fatherIdList);
}

View File

@@ -7,7 +7,6 @@ import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.njcn.common.pojo.enums.common.DataStateEnum;
import com.njcn.common.pojo.exception.BusinessException;
import com.njcn.gather.system.dictionary.mapper.DictTreeMapper;
import com.njcn.gather.system.dictionary.pojo.param.DictTreeParam;
@@ -82,7 +81,7 @@ public class DictTreeServiceImpl extends ServiceImpl<DictTreeMapper, DictTree> i
public boolean updateDictTree(DictTreeParam.UpdateParam param) {
param.setName(param.getName().trim());
DictTree dictTree = this.getById(param.getId());
if("975f63baeb6f653c54fca226a9ae36ca".equals(param.getId()) || dictTree.getPids().contains("975f63baeb6f653c54fca226a9ae36ca")){
if ("975f63baeb6f653c54fca226a9ae36ca".equals(param.getId()) || dictTree.getPids().contains("975f63baeb6f653c54fca226a9ae36ca")) {
throw new BusinessException(SystemResponseEnum.CAN_NOT_UPDATE_USED_DICT);
}
checkRepeat(param, true);
@@ -96,7 +95,7 @@ public class DictTreeServiceImpl extends ServiceImpl<DictTreeMapper, DictTree> i
public boolean deleteDictTree(String id) {
boolean result = false;
DictTree dictTree = this.getById(id);
if("975f63baeb6f653c54fca226a9ae36ca".equals(id) || dictTree.getPids().contains("975f63baeb6f653c54fca226a9ae36ca")){
if ("975f63baeb6f653c54fca226a9ae36ca".equals(id) || dictTree.getPids().contains("975f63baeb6f653c54fca226a9ae36ca")) {
throw new BusinessException(SystemResponseEnum.CAN_NOT_DELETE_USED_DICT);
}
@@ -139,6 +138,14 @@ public class DictTreeServiceImpl extends ServiceImpl<DictTreeMapper, DictTree> i
);
}
@Override
public List<DictTree> listByFatherIds(List<String> fatherIdList) {
if (CollUtil.isNotEmpty(fatherIdList)) {
return this.lambdaQuery().in(DictTree::getPid, fatherIdList).eq(DictTree::getState, DictConst.ENABLE).list();
}
return null;
}
private void checkRepeat(DictTreeParam dictTreeParam, boolean isExcludeSelf) {
LambdaQueryWrapper<DictTree> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(DictTree::getPid, dictTreeParam.getPid()) // 同一父节点下不能有相同的code

View File

@@ -14,7 +14,7 @@ import java.util.Map;
*/
public interface ISysRegResService extends IService<SysRegRes> {
/**
* 查询版本注册
* 查询版本注册信息
* @return
*/
SysRegRes getRegResByType(String type);
@@ -38,4 +38,10 @@ public interface ISysRegResService extends IService<SysRegRes> {
* @return 版本注册信息
*/
SysRegResVO listRegRes();
/**
* 获取比对式的注册信息
* @return
*/
SysRegRes getContrastRegRes();
}

View File

@@ -212,6 +212,11 @@ public class SysRegResServiceImpl extends ServiceImpl<SysRegResMapper, SysRegRes
return sysRegResVO;
}
@Override
public SysRegRes getContrastRegRes() {
return this.getRegResByType("7cd65363a6bf675ae408f28a281b77d4");
}
/**
* 格式化日期 (将日期格式化为yyyy-MM-dd)
*