|
@@ -3,8 +3,13 @@ package com.fdkankan.contro.mq.listener;
|
|
|
import cn.hutool.core.io.FileUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.fdkankan.common.constant.SceneSource;
|
|
|
import com.fdkankan.common.util.FileUtils;
|
|
|
+import com.fdkankan.contro.entity.ScenePlus;
|
|
|
+import com.fdkankan.contro.entity.ScenePlusExt;
|
|
|
import com.fdkankan.contro.service.ICommonService;
|
|
|
+import com.fdkankan.contro.service.IScenePlusExtService;
|
|
|
+import com.fdkankan.contro.service.IScenePlusService;
|
|
|
import com.fdkankan.fyun.face.FYunFileServiceInterface;
|
|
|
import com.fdkankan.model.constants.ConstantFilePath;
|
|
|
import com.fdkankan.model.constants.UploadFilePath;
|
|
@@ -28,6 +33,10 @@ public class UpdateSceneStatusListener {
|
|
|
private FYunFileServiceInterface fYunFileService;
|
|
|
@Autowired
|
|
|
private ICommonService commonService;
|
|
|
+ @Autowired
|
|
|
+ private IScenePlusService scenePlusService;
|
|
|
+ @Autowired
|
|
|
+ private IScenePlusExtService scenePlusExtService;
|
|
|
|
|
|
/**
|
|
|
* 更新场景status.json状态
|
|
@@ -51,6 +60,12 @@ public class UpdateSceneStatusListener {
|
|
|
jsonObject.put("status", status);
|
|
|
FileUtil.writeUtf8String(jsonObject.toJSONString(),ConstantFilePath.SCENE_PATH + "data/data" + num + File.separator + "status.json");
|
|
|
fYunFileService.uploadFile(ConstantFilePath.SCENE_PATH + "data/data" + num + File.separator + "status.json", statusJsonPath);
|
|
|
+ ScenePlus scenePlus = scenePlusService.getScenePlusByNum(num);
|
|
|
+ if(scenePlus.getSceneSource() == SceneSource.QJKK.code()){
|
|
|
+ scenePlus.setSceneStatus(status);
|
|
|
+ scenePlus.setUpdateTime(null);
|
|
|
+ scenePlusService.updateById(scenePlus);
|
|
|
+ }
|
|
|
if(status == 1){
|
|
|
commonService.sendEmail(num, "standar");
|
|
|
}
|