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