Commit 13dcc79b authored by 单奇雲's avatar 单奇雲

调试接口

parent 0cb2f733
...@@ -209,7 +209,7 @@ public class View3dController extends BaseController { ...@@ -209,7 +209,7 @@ public class View3dController extends BaseController {
ReginParams reginParams =getSelectedOrgInfo(); ReginParams reginParams =getSelectedOrgInfo();
String orgCode = this.getOrgCode(reginParams); String orgCode = this.getOrgCode(reginParams);
orgCode = "1*2"; orgCode = "1*2";
return CommonResponseUtil.success(view3dService.get3dPointsByModel(orgCode,model)); return view3dService.get3dPointsByModel(orgCode,model);
} }
@Scheduled(cron = "${param.safetyIndexChange.cron}") @Scheduled(cron = "${param.safetyIndexChange.cron}")
...@@ -248,12 +248,17 @@ public class View3dController extends BaseController { ...@@ -248,12 +248,17 @@ public class View3dController extends BaseController {
@RequestParam(required = false) String type, @RequestParam(required = false) String type,
@RequestParam(required = false) String inputText, @RequestParam(required = false) String inputText,
@RequestParam(required = true) int current, @RequestParam(required = true) int current,
@RequestParam(required = true) int pageSize @RequestParam(required = true) int pageSize,
@RequestParam(required = false) String dataLevel,
@RequestParam(required = false) String protectObjName
) { ) {
ReginParams reginParams =getSelectedOrgInfo(); ReginParams reginParams =getSelectedOrgInfo();
String orgCode = this.getOrgCode(reginParams); String orgCode = this.getOrgCode(reginParams);
String token = this.getToken();
String appKey = this.getAppKey();
String product = this.getProduct();
orgCode = "1*2"; orgCode = "1*2";
return view3dService.retrieveAll(type,inputText,current,pageSize,orgCode); return view3dService.retrieveAll(type,inputText,current,pageSize,orgCode,dataLevel,protectObjName,token,appKey,product);
} }
......
...@@ -117,7 +117,7 @@ public interface View3dMapper extends BaseMapper{ ...@@ -117,7 +117,7 @@ public interface View3dMapper extends BaseMapper{
List<Node3DVoResponse> findViewDataByType(String type,Long riskSourceId,String orgCode); List<Node3DVoResponse> findViewDataByType(String type,Long riskSourceId,String orgCode);
Long retrieveAllCount(String type, String inputText,String orgCode); Long retrieveAllCount(String type, String inputText,String orgCode,String dataLevel,String protectObjName);
List<HashMap<String, Object>> retrieveAll(String type, String inputText, long start, int length,String orgCode); List<HashMap<String, Object>> retrieveAll(String type, String inputText, long start, int length,String orgCode,String dataLevel,String protectObjName);
} }
...@@ -36,6 +36,7 @@ import com.yeejoin.amos.fas.business.dao.mapper.RiskSourceMapper; ...@@ -36,6 +36,7 @@ import com.yeejoin.amos.fas.business.dao.mapper.RiskSourceMapper;
import com.yeejoin.amos.fas.business.dao.mapper.View3dMapper; import com.yeejoin.amos.fas.business.dao.mapper.View3dMapper;
import com.yeejoin.amos.fas.business.dao.repository.*; import com.yeejoin.amos.fas.business.dao.repository.*;
import com.yeejoin.amos.fas.business.feign.IDutyModeServer; import com.yeejoin.amos.fas.business.feign.IDutyModeServer;
import com.yeejoin.amos.fas.business.feign.RemoteSecurityService;
import com.yeejoin.amos.fas.business.feign.RemoteWebSocketServer; import com.yeejoin.amos.fas.business.feign.RemoteWebSocketServer;
import com.yeejoin.amos.fas.business.service.intfc.IDataRefreshService; import com.yeejoin.amos.fas.business.service.intfc.IDataRefreshService;
import com.yeejoin.amos.fas.business.service.intfc.IView3dService; import com.yeejoin.amos.fas.business.service.intfc.IView3dService;
...@@ -50,6 +51,8 @@ import com.yeejoin.amos.fas.core.util.CommonResponseUtil; ...@@ -50,6 +51,8 @@ import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
import com.yeejoin.amos.fas.core.util.StringUtil; import com.yeejoin.amos.fas.core.util.StringUtil;
import com.yeejoin.amos.fas.dao.entity.*; import com.yeejoin.amos.fas.dao.entity.*;
import com.yeejoin.amos.fas.exception.YeeException; import com.yeejoin.amos.fas.exception.YeeException;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
...@@ -105,6 +108,8 @@ public class View3dServiceImpl implements IView3dService { ...@@ -105,6 +108,8 @@ public class View3dServiceImpl implements IView3dService {
private IDataRefreshService iDataRefreshService; private IDataRefreshService iDataRefreshService;
@Autowired @Autowired
private RiskSourceMapper riskSourceMapper; private RiskSourceMapper riskSourceMapper;
@Autowired
private RemoteSecurityService remoteSecurityService;
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
...@@ -565,10 +570,17 @@ public class View3dServiceImpl implements IView3dService { ...@@ -565,10 +570,17 @@ public class View3dServiceImpl implements IView3dService {
} }
@Override @Override
public CommonResponse retrieveAll(String type, String inputText, int current, int pageSize,String orgCode) { public CommonResponse retrieveAll(String type, String inputText, int current, int pageSize,String orgCode,String dataLevel,String protectObjName,String token,String appKey,String product) {
CommonPageable pageable = new CommonPageable( current, pageSize); CommonPageable pageable = new CommonPageable( current, pageSize);
Long count = view3dMapper.retrieveAllCount(type,inputText,orgCode); Long count = view3dMapper.retrieveAllCount(type,inputText,orgCode,dataLevel,protectObjName);
List<HashMap<String, Object>> retrieveAll = view3dMapper.retrieveAll(type, inputText,pageable.getOffset(),pageable.getPageSize(),orgCode); List<HashMap<String, Object>> retrieveAll = view3dMapper.retrieveAll(type, inputText,pageable.getOffset(),pageable.getPageSize(),orgCode,dataLevel,protectObjName);
retrieveAll.stream().forEach(e->{
String person = (String)e.get("person");
if(person != null && !person.equals("")) {
AgencyUserModel user = remoteSecurityService.getUserById(token, product, appKey, person);
e.put("person", user != null ? user.getRealName() : "");
}
});
Page result = new PageImpl(retrieveAll,pageable,count); Page result = new PageImpl(retrieveAll,pageable,count);
return CommonResponseUtil.success(result); return CommonResponseUtil.success(result);
} }
......
...@@ -149,12 +149,14 @@ public interface IView3dService { ...@@ -149,12 +149,14 @@ public interface IView3dService {
* 检索 * 检索
* @param type类型 * @param type类型
* @param inputText关键字 * @param inputText关键字
* @param dataLevel风险等级
* @param protectObjName设备名称
* @param current * @param current
* @param pageSize * @param pageSize
* @param orgCode * @param orgCode
* @return * @return
*/ */
CommonResponse retrieveAll(String type, String inputText, int current, int pageSize,String orgCode); CommonResponse retrieveAll(String type, String inputText, int current, int pageSize,String orgCode,String dataLevel,String protectObjName,String token,String appKey,String product);
/** /**
* 等级查询 * 等级查询
......
package com.yeejoin.amos.fas.business.vo; package com.yeejoin.amos.fas.business.vo;
import java.util.List;
import com.alibaba.druid.util.StringUtils; import com.alibaba.druid.util.StringUtils;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.yeejoin.amos.fas.business.util.StringUtil; import com.yeejoin.amos.fas.business.util.StringUtil;
import com.yeejoin.amos.fas.core.common.response.CoordDTO;
public class View3dNodeVo { public class View3dNodeVo {
...@@ -19,6 +18,7 @@ public class View3dNodeVo { ...@@ -19,6 +18,7 @@ public class View3dNodeVo {
private String[] relationKeys; private String[] relationKeys;
private String level; private String level;
private String levelStr; private String levelStr;
private CoordDTO position;
/** /**
* 顶牌内容 * 顶牌内容
*/ */
...@@ -131,4 +131,18 @@ public class View3dNodeVo { ...@@ -131,4 +131,18 @@ public class View3dNodeVo {
this.levelStr = levelStr; this.levelStr = levelStr;
} }
/**
* @return the position
*/
public CoordDTO getPosition() {
return position;
}
/**
* @param position the position to set
*/
public void setPosition(String position) {
this.position = position == null?null:JSON.parseObject(position, CoordDTO.class);
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment