|
@@ -115,6 +115,10 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
private IInnerService innerService;
|
|
|
@Autowired
|
|
|
LaserService laserService;
|
|
|
+ @Autowired
|
|
|
+ ITmContractorService tmContractorService;
|
|
|
+ @Autowired
|
|
|
+ ITmContractorNumService tmContractorNumService;
|
|
|
|
|
|
@Value("${scene.pro.url}")
|
|
|
private String sceneProUrl;
|
|
@@ -958,15 +962,18 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
@Override
|
|
|
public void deleteByList(List<ScenePro> proList,List<ScenePlus> plusList) {
|
|
|
HashMap<Long ,Long >cameraMap = new HashMap<>();
|
|
|
+ List<String > numList = new ArrayList<>();
|
|
|
if(proList.size() >0){
|
|
|
for (ScenePro scenePro : proList) {
|
|
|
cameraMap.merge(scenePro.getCameraId(), scenePro.getSpace(), Long::sum);
|
|
|
}
|
|
|
List<Long> proIds = proList.parallelStream().map(ScenePro::getId).collect(Collectors.toList());
|
|
|
+ numList.addAll(proList.parallelStream().map(ScenePro::getNum).collect(Collectors.toList()));
|
|
|
this.removeByIds(proIds);
|
|
|
}
|
|
|
if(plusList.size() >0){
|
|
|
List<Long> plusIds = plusList.parallelStream().map(ScenePlus::getId).collect(Collectors.toList());
|
|
|
+ numList.addAll( plusList.parallelStream().map(ScenePlus::getNum).collect(Collectors.toList()));
|
|
|
HashMap<Long, ScenePlusExt> plusMap = scenePlusExtService.getByPlusIds(plusIds);
|
|
|
|
|
|
for (ScenePlus scenePlus : plusList) {
|
|
@@ -976,11 +983,17 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
}
|
|
|
scenePlusService.removeByIds(plusIds);
|
|
|
scenePlusExtService.removeByPlusIds(plusIds);
|
|
|
+
|
|
|
}
|
|
|
//恢复相机使用容量
|
|
|
if(cameraMap.size() >0){
|
|
|
cameraDetailService.addUsedSpace(cameraMap);
|
|
|
}
|
|
|
+ if(!numList.isEmpty()){
|
|
|
+ numList.forEach(e ->tmContractorNumService.deleteByNum(e));
|
|
|
+ tmContractorService.checkDel();
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
@Override
|