|
@@ -9,8 +9,10 @@ import com.fdkankan.fusion.entity.CaseNumEntity;
|
|
|
import com.fdkankan.fusion.entity.Model;
|
|
|
import com.fdkankan.fusion.mapper.ICaseNumMapper;
|
|
|
import com.fdkankan.fusion.request.SceneNumParam;
|
|
|
+import com.fdkankan.fusion.service.ICaseFusionService;
|
|
|
import com.fdkankan.fusion.service.ICaseNumService;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.fdkankan.fusion.service.IFusionNumService;
|
|
|
import com.fdkankan.fusion.service.IModelService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
@@ -44,6 +46,8 @@ public class CaseNumServiceImpl extends ServiceImpl<ICaseNumMapper, CaseNumEntit
|
|
|
private String queryPath;
|
|
|
@Autowired
|
|
|
IModelService modelService;
|
|
|
+ @Autowired
|
|
|
+ IFusionNumService fusionNumService;
|
|
|
|
|
|
@Override
|
|
|
public List<CaseNumEntity> getByCaseId(Integer caseId) {
|
|
@@ -56,7 +60,7 @@ public class CaseNumServiceImpl extends ServiceImpl<ICaseNumMapper, CaseNumEntit
|
|
|
@Override
|
|
|
public void addBatch(Integer caseId, List<SceneNumParam> sceneNumParam) {
|
|
|
|
|
|
- this.deleteByCaseId(caseId);
|
|
|
+ this.deleteByCaseId(caseId,true);
|
|
|
|
|
|
List<CaseNumEntity> newCaseNums = new ArrayList<>();
|
|
|
List<Model> modelList = new ArrayList<>();
|
|
@@ -122,14 +126,12 @@ public class CaseNumServiceImpl extends ServiceImpl<ICaseNumMapper, CaseNumEntit
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void deleteByCaseId(Integer caseId) {
|
|
|
+ public void deleteByCaseId(Integer caseId,Boolean rest) {
|
|
|
LambdaQueryWrapper<CaseNumEntity> wrapper = new LambdaQueryWrapper<>();
|
|
|
wrapper.eq(CaseNumEntity::getCaseId,caseId);
|
|
|
- List<CaseNumEntity> list = this.list(wrapper);
|
|
|
- if(list.size() >0){
|
|
|
- List<String> numList = list.parallelStream().map(CaseNumEntity::getNum).collect(Collectors.toList());
|
|
|
- modelService.deleteByNum(numList);
|
|
|
- this.remove(wrapper);
|
|
|
+ this.remove(wrapper);
|
|
|
+ if(!rest){
|
|
|
+ fusionNumService.deleteByCaseId(caseId);
|
|
|
}
|
|
|
}
|
|
|
|