|
@@ -5,12 +5,14 @@ import com.alibaba.fastjson.JSONObject;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.fdkankan.tk.common.PageInfo;
|
|
import com.fdkankan.tk.common.PageInfo;
|
|
import com.fdkankan.tk.common.ResultCode;
|
|
import com.fdkankan.tk.common.ResultCode;
|
|
|
|
+import com.fdkankan.tk.common.util.JwtUtil;
|
|
import com.fdkankan.tk.exception.BusinessException;
|
|
import com.fdkankan.tk.exception.BusinessException;
|
|
import com.fdkankan.tk.httpClient.client.FdKKClient;
|
|
import com.fdkankan.tk.httpClient.client.FdKKClient;
|
|
import com.fdkankan.tk.httpClient.response.FdkkResponse;
|
|
import com.fdkankan.tk.httpClient.response.FdkkResponse;
|
|
import com.fdkankan.tk.request.SceneParam;
|
|
import com.fdkankan.tk.request.SceneParam;
|
|
import com.fdkankan.tk.response.SceneProEntityVo;
|
|
import com.fdkankan.tk.response.SceneProEntityVo;
|
|
import com.fdkankan.tk.response.SceneVo;
|
|
import com.fdkankan.tk.response.SceneVo;
|
|
|
|
+import com.fdkankan.tk.service.IScenePlusService;
|
|
import com.fdkankan.tk.service.ISceneService;
|
|
import com.fdkankan.tk.service.ISceneService;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
@@ -24,6 +26,8 @@ public class SceneServiceImpl implements ISceneService {
|
|
|
|
|
|
@Resource
|
|
@Resource
|
|
FdKKClient fdKKClient;
|
|
FdKKClient fdKKClient;
|
|
|
|
+ @Autowired
|
|
|
|
+ IScenePlusService scenePlusService;
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public List<SceneVo> getListByNumList(List<String> numList) {
|
|
public List<SceneVo> getListByNumList(List<String> numList) {
|
|
@@ -60,28 +64,10 @@ public class SceneServiceImpl implements ISceneService {
|
|
if (param.getType() == null) {
|
|
if (param.getType() == null) {
|
|
throw new BusinessException(ResultCode.PARAM_MISS);
|
|
throw new BusinessException(ResultCode.PARAM_MISS);
|
|
}
|
|
}
|
|
- List<SceneVo> sceneVoList = new ArrayList<>();
|
|
|
|
- long total = 0;
|
|
|
|
- if (param.getType() == 0 || param.getType() == 1 || param.getType() == 4) { //看看,看见
|
|
|
|
- //获取四维(看看,看见)场景数据
|
|
|
|
- FdkkResponse fdkkResponse = null;
|
|
|
|
- if (param.getNumList() == null || param.getNumList().size() <= 0) {
|
|
|
|
- fdkkResponse = fdKKClient.sceneList(param, token);
|
|
|
|
- } else {
|
|
|
|
- fdkkResponse = fdKKClient.sceneList(param);
|
|
|
|
- }
|
|
|
|
- if (fdkkResponse.getCode() != 0) {
|
|
|
|
- throw new BusinessException(fdkkResponse.getCode(), fdkkResponse.getMsg());
|
|
|
|
- }
|
|
|
|
- PageInfo pageInfo = JSONObject.parseObject(JSONObject.toJSONString(fdkkResponse.getData()), PageInfo.class);
|
|
|
|
- total = pageInfo.getTotal();
|
|
|
|
- JSONArray list = JSONArray.parseArray(JSONObject.toJSONString(pageInfo.getList()));
|
|
|
|
- sceneVoList = overSceneVo(list);
|
|
|
|
- }
|
|
|
|
|
|
+ String userName = JwtUtil.getUserName(token);
|
|
|
|
+ param.setUserName(userName);
|
|
|
|
+ Page<SceneVo> voPage = scenePlusService.pageList(param);
|
|
|
|
|
|
- Page<SceneVo> voPage = new Page<>(param.getPageNum(),param.getPageSize());
|
|
|
|
- voPage.setRecords(sceneVoList);
|
|
|
|
- voPage.setTotal(total);
|
|
|
|
return PageInfo.PageInfo(voPage);
|
|
return PageInfo.PageInfo(voPage);
|
|
}
|
|
}
|
|
|
|
|