1. 添加新功能
parent
b2a802d47b
commit
b817b69c4d
@ -1,25 +1,68 @@
|
||||
package com.supervision.police.dto;
|
||||
|
||||
import com.supervision.police.domain.ModelAtomicIndex;
|
||||
import com.supervision.police.domain.ModelAtomicResult;
|
||||
import com.supervision.police.domain.ModelIndex;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 案件原子指标DTO
|
||||
*/
|
||||
@Data
|
||||
public class CaseAtomicIndexDTO {
|
||||
|
||||
@Schema(description = "原子评估结果id")
|
||||
private String atomicResultId;
|
||||
|
||||
@Schema(description = "案件id")
|
||||
private String caseId;
|
||||
|
||||
@Schema(description = "原子指标名称")
|
||||
private String indexName;
|
||||
|
||||
@Schema(description = "原子指标id")
|
||||
private String automicIndex;
|
||||
private String atomicIndexId;
|
||||
|
||||
@Schema(description = "原子指标名")
|
||||
private String automicIndexName;
|
||||
|
||||
@Schema(description = "指标id")
|
||||
private String indexId;
|
||||
|
||||
@Schema(description = "指标名")
|
||||
private String indexName;
|
||||
|
||||
@Schema(description = "案件类型")
|
||||
private String caseType;
|
||||
|
||||
@Schema(description = "指标来源 1:人工定义 2:数据库查询 3:图谱生成 4:大模型")
|
||||
private String indexSource;
|
||||
|
||||
@Schema(description = "评估结果")
|
||||
private String atomicResult;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
public CaseAtomicIndexDTO() {
|
||||
}
|
||||
|
||||
public CaseAtomicIndexDTO(ModelAtomicIndex modelAtomicIndex, ModelIndex modelIndex, ModelAtomicResult modelAtomicResult) {
|
||||
if (Objects.nonNull(modelAtomicIndex)){
|
||||
this.atomicIndexId = modelAtomicIndex.getId();
|
||||
this.automicIndexName = modelAtomicIndex.getName();
|
||||
}
|
||||
if (Objects.nonNull(modelIndex)){
|
||||
this.caseType = modelIndex.getCaseType();
|
||||
this.indexName = modelIndex.getName();
|
||||
this.indexId = modelIndex.getId();
|
||||
|
||||
}
|
||||
if (Objects.nonNull(modelAtomicResult)){
|
||||
this.atomicResult = modelAtomicResult.getAtomicResult();
|
||||
this.atomicResultId = modelAtomicResult.getId();
|
||||
this.caseId = modelAtomicResult.getCaseId();
|
||||
// todo: this.remark = modelAtomicResult.getRemark();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,22 @@
|
||||
package com.supervision.police.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.supervision.police.domain.ModelAtomicIndex;
|
||||
import com.supervision.police.mapper.ModelAtomicIndexMapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ModelAtomicIndexService {
|
||||
|
||||
ModelAtomicIndexMapper getMapper();
|
||||
|
||||
IPage<ModelAtomicIndex> selectAll(IPage<ModelAtomicIndex> iPage,ModelAtomicIndex index);
|
||||
|
||||
List<ModelAtomicIndex> selectByCaseType(String caseType);
|
||||
|
||||
|
||||
List<ModelAtomicIndex> selectBatchIds(List<String> ids);
|
||||
|
||||
|
||||
List<ModelAtomicIndex> listCaseAtomicIndex(List<String> indexIdList, String caseId, String indexSource);
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package com.supervision.police.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.supervision.police.domain.ModelAtomicIndex;
|
||||
import com.supervision.police.mapper.ModelAtomicIndexMapper;
|
||||
import com.supervision.police.service.ModelAtomicIndexService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class ModelAtomicIndexServiceImpl extends ServiceImpl<ModelAtomicIndexMapper, ModelAtomicIndex> implements ModelAtomicIndexService {
|
||||
|
||||
@Override
|
||||
public ModelAtomicIndexMapper getMapper() {
|
||||
return super.getBaseMapper();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<ModelAtomicIndex> selectAll(IPage<ModelAtomicIndex> iPage, ModelAtomicIndex index) {
|
||||
return super.getBaseMapper().selectAll(iPage, index);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ModelAtomicIndex> selectByCaseType(String caseType) {
|
||||
return super.getBaseMapper().selectByCaseType(caseType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ModelAtomicIndex> selectBatchIds(List<String> ids) {
|
||||
return super.getBaseMapper().selectBatchIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ModelAtomicIndex> listCaseAtomicIndex(List<String> indexIdList, String caseType, String indexSource) {
|
||||
return super.getBaseMapper().listCaseAtomicIndex(indexIdList, caseType, indexSource);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue