Commit b2f48f63 authored by maoying's avatar maoying

修改配置文件及三维屏查询方法

parent 9fe5bf7e
...@@ -166,14 +166,15 @@ public class RemoteSecurityService { ...@@ -166,14 +166,15 @@ public class RemoteSecurityService {
return oked; return oked;
} }
/* public List<UserModel> listUserByRoleIds(String roleIds) { /**
CommonResponse commonResponse = iAmosSecurityServer.listUserByRoleIds(roleIds); * 用户id批量获取用户信息
return handleArray(commonResponse, UserModel.class); * @param toke
}*/ * @param product
//用户id批量获取用户信息 * @param appKey
* @param userIds
* @return
*/
public List<AgencyUserModel> listUserByUserIds(String toke,String product,String appKey,String userIds) { public List<AgencyUserModel> listUserByUserIds(String toke,String product,String appKey,String userIds) {
// CommonResponse commonResponse = iAmosSecurityServer.listUserByUserIds(userIds);
//return handleArray(commonResponse, UserModel.class);
RequestContext.setToken(toke); RequestContext.setToken(toke);
RequestContext.setProduct(product); RequestContext.setProduct(product);
RequestContext.setAppKey(appKey); RequestContext.setAppKey(appKey);
...@@ -347,18 +348,16 @@ public class RemoteSecurityService { ...@@ -347,18 +348,16 @@ public class RemoteSecurityService {
e.printStackTrace(); e.printStackTrace();
} }
return agencyUserModel; return agencyUserModel;
// CommonResponse commonResponse = iAmosSecurityServer.listUserByDepartmentId(departmentId);
// return handleArray(commonResponse, UserModel.class);
} }
/* public UserModel getUserByToken() { /**
CommonResponse commonResponse = iAmosSecurityServer.getUserByToken(); * 获取子公司信息树结构
return handleObj(commonResponse, UserModel.class); * @param toke
}*/ * @param product
//* 获取子公司信息树结构 * @param appKey
* @param companyId
* @return
*/
public List<CompanyModel> getCompanyTreeByCompanyId(String toke,String product,String appKey,String companyId) { public List<CompanyModel> getCompanyTreeByCompanyId(String toke,String product,String appKey,String companyId) {
if (companyId == null || companyId.equals("")) { if (companyId == null || companyId.equals("")) {
return null; return null;
...@@ -376,14 +375,15 @@ public class RemoteSecurityService { ...@@ -376,14 +375,15 @@ public class RemoteSecurityService {
e.printStackTrace(); e.printStackTrace();
} }
return companyModel; return companyModel;
//CommonResponse commonResponse = iAmosSecurityServer.getCompanyTreeByCompanyId(companyId);
//return handleArray(commonResponse, CompanyBo.class);
} }
//查询指定公司的部门树 /**
* 查询指定公司的部门树
* @param toke
* @param product
* @param appKey
* @param companyId
* @return
*/
public List<DepartmentModel> getDepartmentTreeByCompanyId(String toke,String product,String appKey,String companyId) { public List<DepartmentModel> getDepartmentTreeByCompanyId(String toke,String product,String appKey,String companyId) {
if (companyId == null || companyId.equals("")) { if (companyId == null || companyId.equals("")) {
return null; return null;
...@@ -447,12 +447,6 @@ public class RemoteSecurityService { ...@@ -447,12 +447,6 @@ public class RemoteSecurityService {
* 基础平台全部菜单权限树,用于平台登录前端初始化路由 * 基础平台全部菜单权限树,用于平台登录前端初始化路由
*/ */
public CommonResponse searchPermissionTree(String toke,String product,String appKey,String appType) { public CommonResponse searchPermissionTree(String toke,String product,String appKey,String appType) {
// CommonResponse commonResponse = iAmosSecurityServer.listPermissionTree(appType);
// return commonResponse;
RequestContext.setToken(toke); RequestContext.setToken(toke);
RequestContext.setProduct(product); RequestContext.setProduct(product);
RequestContext.setAppKey(appKey); RequestContext.setAppKey(appKey);
...@@ -466,22 +460,17 @@ public class RemoteSecurityService { ...@@ -466,22 +460,17 @@ public class RemoteSecurityService {
e.printStackTrace(); e.printStackTrace();
} }
CommonResponse commonResponse =new CommonResponse("SUCCESS",dictionarieModel); CommonResponse commonResponse =new CommonResponse("SUCCESS",dictionarieModel);
return commonResponse ; return commonResponse ;
} }
//根据Code查询指定的字典信息. /**
* 根据Code查询指定的字典信息.
* @param toke
* @param product
* @param appKey
* @param dictCode
* @return
*/
public JSONArray listDictionaryByDictCode(String toke,String product,String appKey,String dictCode) { public JSONArray listDictionaryByDictCode(String toke,String product,String appKey,String dictCode) {
/* CommonResponse commonResponse = iAmosSecurityServer.listDictionaryByDictCode(dictCode);
if (commonResponse != null && commonResponse.isSuccess()) {
String jsonStr = JSON.toJSONString(commonResponse.getDataList());
return JSONArray.parseArray(jsonStr);
}*/
RequestContext.setToken(toke); RequestContext.setToken(toke);
RequestContext.setProduct(product); RequestContext.setProduct(product);
RequestContext.setAppKey(appKey); RequestContext.setAppKey(appKey);
...@@ -498,25 +487,24 @@ public class RemoteSecurityService { ...@@ -498,25 +487,24 @@ public class RemoteSecurityService {
String jsonStr = JSON.toJSONString(dictionarieModel); String jsonStr = JSON.toJSONString(dictionarieModel);
return JSONArray.parseArray(jsonStr); return JSONArray.parseArray(jsonStr);
} }
return null; return null;
} }
/** /**
* 查询指定公司信息与其部门用户树 * 查询指定公司信息与其部门用户树
* @param toke
* @param product
* @param appKey
* @param companyId
* @return
*/ */
public CompanyModel listUserByCompanyId1(String toke,String product,String appKey,String companyId) { public CompanyModel listUserByCompanyId1(String toke,String product,String appKey,String companyId) {
if (companyId == null || companyId.equals("")) { if (companyId == null || companyId.equals("")) {
return null; return null;
} }
//CommonResponse commonResponse = iAmosSecurityServer.getuserTreeByCompanyId(companyId);
// String jsonStr = JSON.toJSONString(commonResponse);
RequestContext.setToken(toke); RequestContext.setToken(toke);
RequestContext.setProduct(product); RequestContext.setProduct(product);
RequestContext.setAppKey(appKey); RequestContext.setAppKey(appKey);
//List<CompanyModel> companyModel=null;
CompanyModel companyModel=null; CompanyModel companyModel=null;
FeignClientResult feignClientResult; FeignClientResult feignClientResult;
try { try {
...@@ -527,21 +515,12 @@ public class RemoteSecurityService { ...@@ -527,21 +515,12 @@ public class RemoteSecurityService {
e.printStackTrace(); e.printStackTrace();
} }
return companyModel; return companyModel;
// return JSONObject.parseObject(jsonStr);
} }
public boolean loginOutFromApp(String toke,String product,String appKey) { public boolean loginOutFromApp(String toke,String product,String appKey) {
// CommonResponse commonResponse = iAmosSecurityServer.loginOutFromApp();
// if (commonResponse != null && commonResponse.isSuccess()) {
// return true;
// }
RequestContext.setToken(toke); RequestContext.setToken(toke);
RequestContext.setProduct(product); RequestContext.setProduct(product);
RequestContext.setAppKey(appKey); RequestContext.setAppKey(appKey);
...@@ -558,7 +537,6 @@ public class RemoteSecurityService { ...@@ -558,7 +537,6 @@ public class RemoteSecurityService {
} }
public JSONArray listDepartmentUserTree(String toke,String product,String appKey,String companyId) { public JSONArray listDepartmentUserTree(String toke,String product,String appKey,String companyId) {
RequestContext.setToken(toke); RequestContext.setToken(toke);
RequestContext.setProduct(product); RequestContext.setProduct(product);
RequestContext.setAppKey(appKey); RequestContext.setAppKey(appKey);
...@@ -580,24 +558,9 @@ public class RemoteSecurityService { ...@@ -580,24 +558,9 @@ public class RemoteSecurityService {
return JSONArray.parseArray(jsonStr); return JSONArray.parseArray(jsonStr);
} }
return null; return null;
/*CommonResponse commonResponse = iAmosSecurityServer.listDepartmentUserTree(companyId);
if (commonResponse != null && commonResponse.isSuccess()) {
String jsonStr = JSON.toJSONString(commonResponse.getDataList());
return JSONArray.parseArray(jsonStr);
}
return null;*/
} }
public boolean editPassword(String toke,String product,String appKey,String userId, String oldPassword, String newPassword) { public boolean editPassword(String toke,String product,String appKey,String userId, String oldPassword, String newPassword) {
// JSONObject request = new JSONObject();
//
//
// request.put("originalPassword", oldPassword);
// request.put("userId", userId);
// request.put("password", newPassword);
// request.put("rePassword", newPassword);
boolean flag=false; boolean flag=false;
RequestContext.setToken(toke); RequestContext.setToken(toke);
RequestContext.setProduct(product); RequestContext.setProduct(product);
...@@ -620,11 +583,6 @@ public class RemoteSecurityService { ...@@ -620,11 +583,6 @@ public class RemoteSecurityService {
if(agencyUserModel2!=null){ if(agencyUserModel2!=null){
flag=true; flag=true;
} }
// CommonResponse commonResponse = iAmosSecurityServer.editPassword(userId, request);
// if (commonResponse != null && commonResponse.isSuccess()) {
// return true;
// }
return false; return false;
} }
} }
......
...@@ -43,6 +43,7 @@ import org.springframework.data.domain.PageImpl; ...@@ -43,6 +43,7 @@ import org.springframework.data.domain.PageImpl;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
...@@ -573,14 +574,19 @@ public class View3dServiceImpl implements IView3dService { ...@@ -573,14 +574,19 @@ public class View3dServiceImpl implements IView3dService {
CommonPageable pageable = new CommonPageable( current, pageSize); CommonPageable pageable = new CommonPageable( current, pageSize);
Long count = view3dMapper.retrieveAllCount(type,inputText,orgCode,dataLevel,protectObjName); Long count = view3dMapper.retrieveAllCount(type,inputText,orgCode,dataLevel,protectObjName);
List<HashMap<String, Object>> retrieveAll = view3dMapper.retrieveAll(type, inputText,pageable.getOffset(),pageable.getPageSize(),orgCode,dataLevel,protectObjName); List<HashMap<String, Object>> retrieveAll = view3dMapper.retrieveAll(type, inputText,pageable.getOffset(),pageable.getPageSize(),orgCode,dataLevel,protectObjName);
Set<Object> userIds = new HashSet<>();
retrieveAll.forEach(action->{
if(!ObjectUtils.isEmpty(action.get("person"))){
userIds.add(action.get("person").toString());
}
});
Map<String,String> userMap = remoteSecurityService.getUserRealName(token, product, appKey, userIds);
retrieveAll.stream().forEach(e->{ retrieveAll.stream().forEach(e->{
String person = (String)e.get("person");
String positionDTO = (String)e.get("positionDTO"); String positionDTO = (String)e.get("positionDTO");
JSONArray ue4Location = this.getInitJSONArray(String.valueOf(e.get("ue4Location"))); JSONArray ue4Location = this.getInitJSONArray(String.valueOf(e.get("ue4Location")));
JSONArray ue4Rotation = this.getInitJSONArray(String.valueOf(e.get("ue4Rotation"))); JSONArray ue4Rotation = this.getInitJSONArray(String.valueOf(e.get("ue4Rotation")));
if(person != null && !person.equals("")) { if(!ObjectUtils.isEmpty(e.get("person"))){
AgencyUserModel user = remoteSecurityService.getUserById(token, product, appKey, person); e.put("person", userMap.get(e.get("person").toString()));
e.put("person", user != null ? user.getRealName() : "");
} }
CoordDTO position = null; CoordDTO position = null;
if(positionDTO != null && !positionDTO.equals("")) { if(positionDTO != null && !positionDTO.equals("")) {
......
...@@ -62,4 +62,7 @@ DutyMode.dutyUrl=http://172.16.11.36:10005/ ...@@ -62,4 +62,7 @@ DutyMode.dutyUrl=http://172.16.11.36:10005/
rule.definition.load=true rule.definition.load=true
rule.definition.model-package=com.yeejoin.amos.fas.business.service.model rule.definition.model-package=com.yeejoin.amos.fas.business.service.model
amos.feign.gennerator.use-gateway=true amos.feign.gennerator.use-gateway=true
\ No newline at end of file
#�����
file.downLoad.url=http://172.16.10.175:8888/
...@@ -60,4 +60,7 @@ DutyMode.dutyUrl=http://172.16.11.36:10005/ ...@@ -60,4 +60,7 @@ DutyMode.dutyUrl=http://172.16.11.36:10005/
##\u89C4\u5219\u5BF9\u8C61\u81EA\u52A8\u626B\u63CF ##\u89C4\u5219\u5BF9\u8C61\u81EA\u52A8\u626B\u63CF
rule.definition.load=true rule.definition.load=true
rule.definition.model-package=com.yeejoin.amos.fas.business.service.model rule.definition.model-package=com.yeejoin.amos.fas.business.service.model
\ No newline at end of file
#\uFFFD\u013C\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD
file.downLoad.url=http://172.16.10.175:8888/
...@@ -60,4 +60,7 @@ DutyMode.dutyUrl=http://172.16.11.36:10005/ ...@@ -60,4 +60,7 @@ DutyMode.dutyUrl=http://172.16.11.36:10005/
##\u89C4\u5219\u5BF9\u8C61\u81EA\u52A8\u626B\u63CF ##\u89C4\u5219\u5BF9\u8C61\u81EA\u52A8\u626B\u63CF
rule.definition.load=true rule.definition.load=true
rule.definition.model-package=com.yeejoin.amos.fas.business.service.model rule.definition.model-package=com.yeejoin.amos.fas.business.service.model
\ No newline at end of file
#\uFFFD\u013C\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD
file.downLoad.url=http://172.16.10.175:8888/
...@@ -32,6 +32,8 @@ mybatis.mapper-locations = classpath:db/mapper/*.xml ...@@ -32,6 +32,8 @@ mybatis.mapper-locations = classpath:db/mapper/*.xml
# mybatis entity package # mybatis entity package
mybatis.type-aliases-package = com.yeejoin.amos.fas.business.entity.mybatis mybatis.type-aliases-package = com.yeejoin.amos.fas.business.entity.mybatis
mybatis.configuration.mapUnderscoreToCamelCase=true mybatis.configuration.mapUnderscoreToCamelCase=true
mybatis.configuration.call-setters-on-nulls = true
logging.level.com.yeejoin.amos.fas.business.dao.mapper=debug logging.level.com.yeejoin.amos.fas.business.dao.mapper=debug
#liquibase #liquibase
...@@ -56,7 +58,4 @@ param.safetyIndexChange.cron = 0 0 2 * * ? ...@@ -56,7 +58,4 @@ param.safetyIndexChange.cron = 0 0 2 * * ?
param.weather.url = http://wthrcdn.etouch.cn/weather_mini?citykey= param.weather.url = http://wthrcdn.etouch.cn/weather_mini?citykey=
file.downLoad.url=http://172.16.10.175:8888/
...@@ -110,4 +110,61 @@ ...@@ -110,4 +110,61 @@
END# END#
</sql> </sql>
</changeSet> </changeSet>
<changeSet author="shanqiyun" id="1597831211780-1" runOnChange="true">
<comment>create view toip_biz_message</comment>
<sql>
DROP VIEW IF EXISTS toip_biz_message;
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `toip_biz_message` AS SELECT
`m`.`id` AS `id`,
`m`.`id` AS `originId`,
`m`.`time` AS `time`,
`m`.`content` AS `content`,
`m`.`title` AS `title`,
`m`.`type` AS `type`,
`m`.`sender` AS `sender`,
`m`.`receiver` AS `receiver`,
`m`.`reader` AS `reader`,
`m`.`biz_id` AS `biz_id`,
`m`.`bizclass_name` AS `bizclass_name`,
`n`.`org_code` AS `org_code`
FROM
( `toip_sys_message` `m` JOIN `f_equipment` `n` )
WHERE
( ( `n`.`id` = `m`.`biz_id` ) AND ( `m`.`bizclass_name` = 'class com.yeejoin.amos.fas.business.service.model.FireEquimentDataRo' ) ) UNION ALL
SELECT
`m`.`id` AS `id`,
`m`.`id` AS `originId`,
`m`.`time` AS `time`,
`m`.`content` AS `content`,
`m`.`title` AS `title`,
`m`.`type` AS `type`,
`m`.`sender` AS `sender`,
`m`.`receiver` AS `receiver`,
`m`.`reader` AS `reader`,
`m`.`biz_id` AS `biz_id`,
`m`.`bizclass_name` AS `bizclass_name`,
`n`.`org_code` AS `org_code`
FROM
( `toip_sys_message` `m` JOIN `p_point` `n` )
WHERE
( ( `n`.`id` = `m`.`biz_id` ) AND ( `m`.`bizclass_name` = 'class com.yeejoin.amos.fas.business.service.model.ProtalDataRo' ) ) UNION ALL
SELECT
`m`.`id` AS `id`,
`m`.`id` AS `originId`,
`m`.`time` AS `time`,
`m`.`content` AS `content`,
`m`.`title` AS `title`,
`m`.`type` AS `type`,
`m`.`sender` AS `sender`,
`m`.`receiver` AS `receiver`,
`m`.`reader` AS `reader`,
`m`.`biz_id` AS `biz_id`,
`m`.`bizclass_name` AS `bizclass_name`,
`n`.`org_code` AS `org_code`
FROM
( `toip_sys_message` `m` JOIN `f_risk_source` `n` )
WHERE
( ( `n`.`id` = `m`.`biz_id` ) AND ( `m`.`bizclass_name` = 'class com.yeejoin.amos.fas.business.service.model.RiskSourceRuleRo' ) );
</sql>
</changeSet>
</databaseChangeLog> </databaseChangeLog>
\ No newline at end of file
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