|
@@ -1,4 +1,5 @@
|
|
package com.fdkankan.manage.test;
|
|
package com.fdkankan.manage.test;
|
|
|
|
+import com.google.common.collect.Lists;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
@@ -15,6 +16,7 @@ import com.fdkankan.manage.service.*;
|
|
import com.fdkankan.manage.thread.ThreadService;
|
|
import com.fdkankan.manage.thread.ThreadService;
|
|
import com.fdkankan.manage.util.ExcelUtil;
|
|
import com.fdkankan.manage.util.ExcelUtil;
|
|
import com.fdkankan.manage.util.RsaUtils;
|
|
import com.fdkankan.manage.util.RsaUtils;
|
|
|
|
+import com.fdkankan.manage.vo.request.SceneParam;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
@@ -191,131 +193,36 @@ public class TestController {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- private String[] getSnCodes(){
|
|
|
|
- String res [] = {
|
|
|
|
- "916ED6689",
|
|
|
|
- "0239E5CD0",
|
|
|
|
- "067E15841",
|
|
|
|
- "07C3DA2E1",
|
|
|
|
- "07EC6E0DC",
|
|
|
|
- "06FFCBDA1",
|
|
|
|
- "061D18D73",
|
|
|
|
- "030285552",
|
|
|
|
- "06EE53219",
|
|
|
|
- "02452945D",
|
|
|
|
- "060C4CB6A",
|
|
|
|
- "06FAE7E46",
|
|
|
|
- "06F860091",
|
|
|
|
- "072D80097",
|
|
|
|
- "073BD9E33",
|
|
|
|
- "04AE6E2F5",
|
|
|
|
- "071123F88",
|
|
|
|
- "071256BC7",
|
|
|
|
- "071210632",
|
|
|
|
- "071265E8B",
|
|
|
|
- "070D743D2",
|
|
|
|
- "0700FA837",
|
|
|
|
- "0703A543A",
|
|
|
|
- "070B42A10",
|
|
|
|
- "070BE22BA",
|
|
|
|
- "0711305CA",
|
|
|
|
- "0694087DB",
|
|
|
|
- "070273265",
|
|
|
|
- "071624ACD",
|
|
|
|
- "072FAE15E",
|
|
|
|
- "07F3DD250",
|
|
|
|
- "0707D2A2C",
|
|
|
|
- "0266F55AE",
|
|
|
|
- "021DD5E87",
|
|
|
|
- "02A80E87F",
|
|
|
|
- "02C6209A2",
|
|
|
|
- "02FE298D8",
|
|
|
|
- "067B891A9",
|
|
|
|
- "0408E93F5",
|
|
|
|
- "0650ABFFB",
|
|
|
|
- "070DE64AF",
|
|
|
|
- "02D9E2F29",
|
|
|
|
- "06B38A34F",
|
|
|
|
- "063DE2E04",
|
|
|
|
- "072ACF5F2",
|
|
|
|
- "07288B5BF",
|
|
|
|
- "02FFAB589",
|
|
|
|
- "072D27B03",
|
|
|
|
- "075BB0B0A",
|
|
|
|
- "033869CC0",
|
|
|
|
- "06EA790F7",
|
|
|
|
- "06105B947",
|
|
|
|
- "04FC2C13C",
|
|
|
|
- "065E1EA54",
|
|
|
|
- "06050CCD2",
|
|
|
|
- "065DAAB57",
|
|
|
|
- "06376454A",
|
|
|
|
- "069CE5379",
|
|
|
|
- "06FE7A53F",
|
|
|
|
- "06DA9EADA",
|
|
|
|
- "062B959FB",
|
|
|
|
- "07058CC1C",
|
|
|
|
- "0721ADBCF",
|
|
|
|
- "0708E15A3",
|
|
|
|
- "073B6BE96",
|
|
|
|
- "07757C452",
|
|
|
|
- "076A4A2C2",
|
|
|
|
- "07467B94D",
|
|
|
|
- "07F838850",
|
|
|
|
- "076AAAA05",
|
|
|
|
- "0766855A9",
|
|
|
|
- "0765692AA",
|
|
|
|
- "077A0D967",
|
|
|
|
- "0707D67D9",
|
|
|
|
- "07676CC0C",
|
|
|
|
- "074C7BE97",
|
|
|
|
- "0772F50DA",
|
|
|
|
- "0712A8FA0",
|
|
|
|
- "0768CD82B",
|
|
|
|
- "0764A39B5",
|
|
|
|
- "0771B69E4",
|
|
|
|
- "07F66673D",
|
|
|
|
- "077705FEE",
|
|
|
|
- "07696266D",
|
|
|
|
- "076F8D814",
|
|
|
|
- "077EBF4FE",
|
|
|
|
- "07109D1B0",
|
|
|
|
- "06F83452B",
|
|
|
|
- "0300B6F0A",
|
|
|
|
- "0774EA21B",
|
|
|
|
- "070D890E8",
|
|
|
|
- "077E7B417",
|
|
|
|
- "07DE244F1",
|
|
|
|
- "070591078",
|
|
|
|
- "03451435F",
|
|
|
|
- "0775B3B58",
|
|
|
|
- "07239FFFB",
|
|
|
|
- "070E51723",
|
|
|
|
- "076F1650D",
|
|
|
|
- "07199F0E6",
|
|
|
|
- "0703C265E",
|
|
|
|
- "07451A77B",
|
|
|
|
- "0711ABE58",
|
|
|
|
- "07BE0B836",
|
|
|
|
- "070AFD6DD",
|
|
|
|
- "070A40E42",
|
|
|
|
- "07143F457",
|
|
|
|
- "0706CE0EC",
|
|
|
|
- "0713DCCC0",
|
|
|
|
- "073AFACA6",
|
|
|
|
- "025D3928F",
|
|
|
|
- "02D874C48",
|
|
|
|
- "06042AB08",
|
|
|
|
- "04CA21B73",
|
|
|
|
- "02F7D171B",
|
|
|
|
- "02C17AE5E",
|
|
|
|
- "024696CB5",
|
|
|
|
- "4DKKP01B000127",
|
|
|
|
- "4DKKP01B000114",
|
|
|
|
- "4DKKP01B000138",
|
|
|
|
- "4DKKP01B000160",
|
|
|
|
- "4DKKP01B000163",
|
|
|
|
- };
|
|
|
|
- return res;
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 06F7B8204 --> 087EEF7B5
|
|
|
|
+ * 90F86252A --> 92ED4458E
|
|
|
|
+ */
|
|
|
|
+ @PostMapping("/moveCamera")
|
|
|
|
+ public ResultData moveCamera(@RequestParam(required = false) String snCode,
|
|
|
|
+ @RequestParam(required = false) String toSnCode){
|
|
|
|
+ Camera camera = cameraService.getBySnCode(snCode);
|
|
|
|
+ if(camera == null){
|
|
|
|
+ throw new BusinessException(ResultCode.CAMERA_NOT_EXIST);
|
|
|
|
+ }
|
|
|
|
+ Camera camera2 = cameraService.getBySnCode(toSnCode);
|
|
|
|
+ if(camera2 == null){
|
|
|
|
+ throw new BusinessException(ResultCode.CAMERA_NOT_EXIST);
|
|
|
|
+ }
|
|
|
|
+ List<ScenePro> sceneProList = sceneProService.getListByCameraId(camera.getId());
|
|
|
|
+ List<ScenePlus> plusList = scenePlusService.getListByCameraId(camera.getId());
|
|
|
|
+ for (ScenePro scenePro : sceneProList) {
|
|
|
|
+ SceneParam param = new SceneParam();
|
|
|
|
+ param.setNum(scenePro.getNum());
|
|
|
|
+ param.setSnCode(toSnCode);
|
|
|
|
+ sceneProService.move(param);
|
|
|
|
+ }
|
|
|
|
+ for (ScenePlus scenePro : plusList) {
|
|
|
|
+ SceneParam param = new SceneParam();
|
|
|
|
+ param.setNum(scenePro.getNum());
|
|
|
|
+ param.setSnCode(toSnCode);
|
|
|
|
+ sceneProService.move(param);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return ResultData.ok();
|
|
}
|
|
}
|
|
}
|
|
}
|