|
@@ -17,10 +17,7 @@ import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.io.File;
|
|
import java.io.File;
|
|
-import java.util.ArrayList;
|
|
|
|
-import java.util.HashMap;
|
|
|
|
-import java.util.HashSet;
|
|
|
|
-import java.util.List;
|
|
|
|
|
|
+import java.util.*;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -54,6 +51,8 @@ public class CaseNumServiceImpl extends ServiceImpl<ICaseNumMapper, CaseNumEntit
|
|
IFusionGuidePathService fusionGuidePathService;
|
|
IFusionGuidePathService fusionGuidePathService;
|
|
@Autowired
|
|
@Autowired
|
|
ICaseTagService caseTagService;
|
|
ICaseTagService caseTagService;
|
|
|
|
+ @Autowired
|
|
|
|
+ ICaseTagPointService caseTagPointService;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -220,4 +219,22 @@ public class CaseNumServiceImpl extends ServiceImpl<ICaseNumMapper, CaseNumEntit
|
|
wrapper.eq(CaseNumEntity::getNum,num);
|
|
wrapper.eq(CaseNumEntity::getNum,num);
|
|
return this.list(wrapper);
|
|
return this.list(wrapper);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void deleteByNum(String num) {
|
|
|
|
+ LambdaQueryWrapper<CaseNumEntity> wrapper = new LambdaQueryWrapper<>();
|
|
|
|
+ wrapper.eq(CaseNumEntity::getNum,num);
|
|
|
|
+ this.remove(wrapper);
|
|
|
|
+ List<Model> modelList = modelService.getListByNum(Arrays.asList(num));
|
|
|
|
+ if(modelList.size() >0){
|
|
|
|
+ List<Integer> modelIds = modelList.parallelStream().map(Model::getModelId).collect(Collectors.toList());
|
|
|
|
+ for (Model model : modelList) {
|
|
|
|
+ fusionNumService.deleteByModelId(model.getModelId());
|
|
|
|
+ fusionMeterService.deleteByModelId(model.getModelId());
|
|
|
|
+ }
|
|
|
|
+ caseTagPointService.deleteByModelIds(modelIds);
|
|
|
|
+ }
|
|
|
|
+ caseViewService.deleteByNum(num);
|
|
|
|
+
|
|
|
|
+ }
|
|
}
|
|
}
|