bug修改
This commit is contained in:
parent
ba345909e8
commit
7782d7d195
|
|
@ -116,10 +116,14 @@ public class SampleService {
|
|||
return AjaxResult.error(validResult);
|
||||
}
|
||||
// 1.查询样本库数据是否包含样本数据
|
||||
int result = diSampleService.hasLabelData(dto);
|
||||
if (result > 0) {
|
||||
int result1 = diSampleService.hasLabelData(dto);
|
||||
if (result1 > 0) {
|
||||
return AjaxResult.error("样本库包含样本数据无法删除");
|
||||
}
|
||||
int result2 = diSampleService.hasDatasetData(dto);
|
||||
if (result2 > 0) {
|
||||
return AjaxResult.error("数据集包含样本数据无法删除");
|
||||
}
|
||||
// 2.删除样本库数据
|
||||
diSampleService.operData(dto, 3);
|
||||
return AjaxResult.success();
|
||||
|
|
|
|||
|
|
@ -58,6 +58,15 @@ public interface DISampleMapper {
|
|||
*/
|
||||
int hasLabelData(SampleLibraryDto dto);
|
||||
|
||||
/**
|
||||
* 查询数据集数据是否包含样本数据
|
||||
* @param dto
|
||||
* @return int
|
||||
* @author lhdhy
|
||||
* @date 2025/12/22 11:19
|
||||
*/
|
||||
int hasDatasetData(SampleLibraryDto dto);
|
||||
|
||||
/**
|
||||
* 查询样本库详情
|
||||
* @param dto
|
||||
|
|
|
|||
|
|
@ -56,6 +56,15 @@ public interface DISampleService {
|
|||
*/
|
||||
int hasLabelData(SampleLibraryDto dto);
|
||||
|
||||
/**
|
||||
* 查询数据集数据是否包含样本数据
|
||||
* @param dto
|
||||
* @return int
|
||||
* @author cwchen
|
||||
* @date 2025/12/22 11:18
|
||||
*/
|
||||
int hasDatasetData(SampleLibraryDto dto);
|
||||
|
||||
/**
|
||||
* 查询样本库详情
|
||||
* @param dto
|
||||
|
|
|
|||
|
|
@ -48,6 +48,11 @@ public class DSampleServiceImpl implements DISampleService {
|
|||
return diSampleMapper.hasLabelData(dto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hasDatasetData(SampleLibraryDto dto) {
|
||||
return diSampleMapper.hasDatasetData(dto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SampleLibraryVo getSampleDetail(SampleLibraryDto dto) {
|
||||
return diSampleMapper.getSampleDetail(dto);
|
||||
|
|
|
|||
|
|
@ -859,7 +859,7 @@
|
|||
<select id="getLabelPicturesDetail" parameterType="com.bonus.common.domain.data.dto.LabelingTaskDto" resultMap="LabelingTaskVoResult">
|
||||
SELECT
|
||||
tls.labeling_sample_id,tls.is_invalid_data,tls.dataset_sample_id,t1.file_path,
|
||||
tld.label_id,tld.labeling_color,tld.labeling_coordinate,tld.box_type,tld.text_content
|
||||
t2.label_id,t2.labeling_color,t2.labeling_coordinate,t2.box_type,t2.text_content,t2.label_name
|
||||
FROM tb_labeling_sample tls
|
||||
LEFT JOIN (
|
||||
SELECT tds.sample_id,tds.dataset_sample_id,ts.file_path
|
||||
|
|
@ -867,7 +867,11 @@
|
|||
LEFT JOIN tb_sample ts ON ts.sample_id = tds.sample_id
|
||||
WHERE ts.del_flag = '0'
|
||||
) t1 ON t1.dataset_sample_id = tls.dataset_sample_id
|
||||
LEFT JOIN tb_labeling_data tld ON tld.labeling_sample_id = tls.labeling_sample_id
|
||||
LEFT JOIN
|
||||
(SELECT tld.label_id,tld.labeling_color,tld.labeling_sample_id,tld.labeling_coordinate,tld.box_type,tld.text_content,tl.label_name
|
||||
FROM tb_labeling_data tld
|
||||
LEFT JOIN tb_label tl ON tl.label_id = tld.label_id
|
||||
) t2 ON t2.labeling_sample_id = tls.labeling_sample_id
|
||||
WHERE tls.del_flag = '0'
|
||||
AND tls.labeling_task_id = #{labelingTaskId}
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -100,6 +100,11 @@
|
|||
<select id="hasLabelData" resultType="java.lang.Integer">
|
||||
SELECT COUNT(*) FROM tb_sample WHERE sample_library_id = #{sampleLibraryId} AND del_flag = '0'
|
||||
</select>
|
||||
|
||||
<select id="hasDatasetData" resultType="java.lang.Integer">
|
||||
SELECT COUNT(*) FROM tb_dataset_version_sample WHERE sample_library_id = #{sampleLibraryId}
|
||||
</select>
|
||||
|
||||
<!--查询样本库详情-->
|
||||
<select id="getSampleDetail" resultType="com.bonus.common.domain.data.vo.SampleLibraryVo">
|
||||
SELECT sample_library_id,
|
||||
|
|
|
|||
Loading…
Reference in New Issue