|
@@ -599,19 +599,42 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
Integer sceneSource = null;
|
|
|
Long cameraId = null;
|
|
|
ScenePro scenePro = this.getByNum(num);
|
|
|
+ Scene scene = sceneService.getByNum(num);
|
|
|
+ ScenePlus scenePlus = scenePlusService.getByNum(num);
|
|
|
+ Integer status = null;
|
|
|
+
|
|
|
if(scenePro!=null){
|
|
|
cameraId = scenePro.getCameraId();
|
|
|
sceneSource = scenePro.getSceneSource();
|
|
|
- this.removeById(scenePro.getId());
|
|
|
+ status = scenePro.getStatus();
|
|
|
}
|
|
|
- Scene scene = sceneService.getByNum(num);
|
|
|
if(scene!=null){
|
|
|
- sceneService.removeById(scene.getId());
|
|
|
+ cameraId = scene.getCameraId();
|
|
|
+ status = scene.getStatus();
|
|
|
}
|
|
|
- ScenePlus scenePlus = scenePlusService.getByNum(num);
|
|
|
if(scenePlus!=null){
|
|
|
cameraId = scenePlus.getCameraId();
|
|
|
sceneSource = scenePlus.getSceneSource();
|
|
|
+ status = scenePlus.getSceneStatus();
|
|
|
+ }
|
|
|
+ HashMap<String, MqSendLog> mqSendLogHashMap = mqSendLogService.getByNumList(Arrays.asList(num));
|
|
|
+ if(!mqSendLogHashMap.isEmpty()){
|
|
|
+ for (String key : mqSendLogHashMap.keySet()) {
|
|
|
+ mqSendLogService.removeById(mqSendLogHashMap.get(key).getId());
|
|
|
+ status = -1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(status != null && status == 0){
|
|
|
+ throw new BusinessException(ResultCode.CAN_NOT_DEL_MODELING_SCENE);
|
|
|
+ }
|
|
|
+
|
|
|
+ if(scenePro!=null){
|
|
|
+ this.removeById(scenePro.getId());
|
|
|
+ }
|
|
|
+ if(scene!=null){
|
|
|
+ sceneService.removeById(scene.getId());
|
|
|
+ }
|
|
|
+ if(scenePlus!=null){
|
|
|
ScenePlusExt plusExt = scenePlusExtService.getByPlusId(scenePlus.getId());
|
|
|
if(plusExt != null){
|
|
|
scenePlusExtService.delByPlus(scenePlus.getId());
|