|
@@ -1,11 +1,12 @@
|
|
package com.fdkankan.ucenter.controller.api;
|
|
package com.fdkankan.ucenter.controller.api;
|
|
|
|
+import com.fdkankan.common.exception.BusinessException;
|
|
import com.fdkankan.ucenter.common.BaseController;
|
|
import com.fdkankan.ucenter.common.BaseController;
|
|
import com.fdkankan.ucenter.common.Result;
|
|
import com.fdkankan.ucenter.common.Result;
|
|
|
|
+import com.fdkankan.ucenter.entity.ScenePlus;
|
|
|
|
+import com.fdkankan.ucenter.entity.ScenePro;
|
|
import com.fdkankan.ucenter.entity.User;
|
|
import com.fdkankan.ucenter.entity.User;
|
|
-import com.fdkankan.ucenter.service.ICameraDetailService;
|
|
|
|
-import com.fdkankan.ucenter.service.ICameraService;
|
|
|
|
-import com.fdkankan.ucenter.service.ISceneProService;
|
|
|
|
-import com.fdkankan.ucenter.service.IUserService;
|
|
|
|
|
|
+import com.fdkankan.ucenter.service.*;
|
|
|
|
+import com.fdkankan.ucenter.vo.LaserSceneVo;
|
|
import com.fdkankan.ucenter.vo.response.CameraAppVo;
|
|
import com.fdkankan.ucenter.vo.response.CameraAppVo;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -29,6 +30,8 @@ public class LaserController extends BaseController {
|
|
@Autowired
|
|
@Autowired
|
|
ISceneProService sceneProService;
|
|
ISceneProService sceneProService;
|
|
@Autowired
|
|
@Autowired
|
|
|
|
+ IScenePlusService scenePlusService;
|
|
|
|
+ @Autowired
|
|
ICameraService cameraService;
|
|
ICameraService cameraService;
|
|
@Autowired
|
|
@Autowired
|
|
IUserService userService;
|
|
IUserService userService;
|
|
@@ -49,5 +52,31 @@ public class LaserController extends BaseController {
|
|
return Result.success(map);
|
|
return Result.success(map);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 获取场景数据 废弃
|
|
|
|
+ */
|
|
|
|
+ @RequestMapping(value = "/getSceneByNum",method = RequestMethod.GET)
|
|
|
|
+ public Result getSceneByNum(@RequestParam(required = false)String num) throws Exception {
|
|
|
|
+ ScenePro sceneProEntity = sceneProService.getByNum(num);
|
|
|
|
+ LaserSceneVo vo = new LaserSceneVo();
|
|
|
|
+ Long userId = null;
|
|
|
|
+ if(sceneProEntity!= null){
|
|
|
|
+ vo.setNum(sceneProEntity.getNum());
|
|
|
|
+ userId = sceneProEntity.getUserId();
|
|
|
|
+ }
|
|
|
|
+ ScenePlus scenePlus = scenePlusService.getByNum(num);
|
|
|
|
+ if(scenePlus != null){
|
|
|
|
+ vo.setNum(scenePlus.getNum());
|
|
|
|
+ userId = scenePlus.getUserId();
|
|
|
|
+ }
|
|
|
|
+ if(userId != null){
|
|
|
|
+ User user = userService.getById(userId);
|
|
|
|
+ if(user!=null){
|
|
|
|
+ vo.setUserPhone(user.getUserName());
|
|
|
|
+ vo.setUserId(user.getId());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return Result.success(vo);
|
|
|
|
+ }
|
|
|
|
|
|
}
|
|
}
|