|
@@ -4,17 +4,14 @@ package com.fdkankan.manage.controller;
|
|
|
import cn.dev33.satoken.stp.StpUtil;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.fdkankan.manage.common.ResultCode;
|
|
|
+import com.fdkankan.manage.entity.*;
|
|
|
import com.fdkankan.manage.exception.BusinessException;
|
|
|
import com.fdkankan.manage.common.ResultData;
|
|
|
-import com.fdkankan.manage.entity.ScenePlus;
|
|
|
-import com.fdkankan.manage.entity.ScenePro;
|
|
|
import com.fdkankan.manage.httpClient.client.FdKKClient;
|
|
|
import com.fdkankan.manage.httpClient.client.LaserClient;
|
|
|
import com.fdkankan.manage.httpClient.param.LaserSceneParam;
|
|
|
import com.fdkankan.manage.httpClient.vo.FdkkResponse;
|
|
|
-import com.fdkankan.manage.service.IDownService;
|
|
|
-import com.fdkankan.manage.service.IScenePlusService;
|
|
|
-import com.fdkankan.manage.service.ISceneProService;
|
|
|
+import com.fdkankan.manage.service.*;
|
|
|
import com.fdkankan.manage.vo.request.SceneParam;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -23,6 +20,8 @@ import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import java.util.HashMap;
|
|
|
+import java.util.List;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -43,12 +42,27 @@ public class SceneController {
|
|
|
FdKKClient fdKKClient;
|
|
|
@Autowired
|
|
|
LaserClient laserClient;
|
|
|
+ @Autowired
|
|
|
+ IJySceneUserAuthService jySceneUserAuthService;
|
|
|
+ @Autowired
|
|
|
+ ISysUserService sysUserService;
|
|
|
+ @Autowired
|
|
|
+ IJyUserService jyUserService;
|
|
|
|
|
|
@PostMapping("/list")
|
|
|
public ResultData list(@RequestBody SceneParam param){
|
|
|
return ResultData.ok(sceneProService.pageList(param));
|
|
|
}
|
|
|
|
|
|
+ @PostMapping("/authNumList")
|
|
|
+ public ResultData authNumList(@RequestBody SceneParam param){
|
|
|
+ SysUser byId = sysUserService.getById(Long.valueOf(StpUtil.getLoginId().toString()));
|
|
|
+ JyUser loginUser = jyUserService.getBySysId(byId.getId());
|
|
|
+ List<JySceneUserAuth> byJyUserId = jySceneUserAuthService.getByJyUserId(loginUser.getId());
|
|
|
+ List<String> collect = byJyUserId.stream().map(JySceneUserAuth::getNum).collect(Collectors.toList());
|
|
|
+ return ResultData.ok(collect);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 场景迁移
|
|
|
* num 迁移场景码
|