数据集进度修改
This commit is contained in:
parent
7cfdc907fb
commit
5bfbe0d588
@ -47,6 +47,6 @@ public class DatasetPageReqVO extends PageParam {
|
||||
private Long dataLength;
|
||||
|
||||
@Schema(description = "标注进度", example = "20")
|
||||
private String annotateProgress;
|
||||
private Integer annotateProgress;
|
||||
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ public class DatasetRespVO {
|
||||
private Long dataLength;
|
||||
|
||||
@Schema(description = "标注进度", example = "20")
|
||||
private String annotateProgress;
|
||||
private Integer annotateProgress;
|
||||
|
||||
/* @Schema(description = "数据集数据文件", example = "[]")
|
||||
private List<DatasetQuestionRespVO> datasetQuestionRespVOS;*/
|
||||
|
@ -42,7 +42,7 @@ public class DatasetSaveReqVO {
|
||||
private Long dataLength;
|
||||
|
||||
@Schema(description = "标注进度", example = "20")
|
||||
private String annotateProgress;
|
||||
private Integer annotateProgress;
|
||||
|
||||
@Schema(description = "数据集数据文件", example = "[]")
|
||||
private List<DatasetFilesSaveReqVO> datasetFiles;
|
||||
|
@ -66,6 +66,6 @@ public class DatasetDO extends BaseDO {
|
||||
/**
|
||||
* 标注进度
|
||||
*/
|
||||
private String annotateProgress;
|
||||
private Integer annotateProgress;
|
||||
|
||||
}
|
||||
|
@ -33,6 +33,6 @@ public interface DatasetMapper extends BaseMapperX<DatasetDO> {
|
||||
.orderByDesc(DatasetDO::getId));
|
||||
}
|
||||
|
||||
@Update("update llm_dataset set annotate_progress = CONCAT(#{formattedRatio}, '%') where id = #{datasetId}")
|
||||
void updateProcess(@Param("formattedRatio") String formattedRatio, @Param("datasetId") Long datasetId);
|
||||
@Update("update llm_dataset set annotate_progress = #{formattedRatio} where id = #{datasetId}")
|
||||
void updateProcess(@Param("formattedRatio") Integer formattedRatio, @Param("datasetId") Long datasetId);
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ public class DatasetQuestionServiceImpl implements DatasetQuestionService {
|
||||
wrapper.eq(DatasetQuestionDO::getStatus,2);
|
||||
Long annoCount = datasetQuestionMapper.selectCount(wrapper);
|
||||
double ratio = sumCount == 0 ? 0 : ((double) annoCount / sumCount) *100;
|
||||
String formattedRatio = String.format("%.2f", ratio);
|
||||
Integer formattedRatio = ratio == 0 ? 0 : (int) ratio;
|
||||
datasetMapper.updateProcess(formattedRatio, updateReqVOS.get(0).getDatasetId());
|
||||
}
|
||||
|
||||
|
@ -107,7 +107,7 @@ public class DatasetServiceImpl implements DatasetService {
|
||||
.eq(DatasetQuestionDO::getDatasetId, updateObj.getId())
|
||||
.eq(DatasetQuestionDO::getStatus,2));
|
||||
double ratio = count == 0 ? 0 : ((double) annoCount / count) *100;
|
||||
String formattedRatio = String.format("%.2f%%", ratio);
|
||||
Integer formattedRatio = ratio == 0 ? 0 : (int) ratio;
|
||||
if (formattedRatio != null){
|
||||
updateObj.setAnnotateProgress(formattedRatio);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user