Commit e5c24aa4 authored by tangwei's avatar tangwei

修改水源导出过滤

parent 05b18448
...@@ -411,5 +411,11 @@ public interface EquipFeignClient { ...@@ -411,5 +411,11 @@ public interface EquipFeignClient {
*/ */
@RequestMapping(value = "equipSpecific/getListByEquipmentCode/{code}", method = RequestMethod.GET) @RequestMapping(value = "equipSpecific/getListByEquipmentCode/{code}", method = RequestMethod.GET)
ResponseModel<List<Map<String, Object>>> getListByEquipmentCode(@PathVariable("code") String code); ResponseModel<List<Map<String, Object>>> getListByEquipmentCode(@PathVariable("code") String code);
/**
* 根据code获取指定分类的装备列表
* @param code 分类
* @return 装备列表
*/
@RequestMapping(value = "equipSpecific/getListByEquipmentCodeEQ/{code}", method = RequestMethod.GET)
ResponseModel<List<Map<String, Object>>> getListByEquipmentCodeEQ(@PathVariable("code") String code);
} }
...@@ -38,16 +38,14 @@ public class PersonIdentifyAspect { ...@@ -38,16 +38,14 @@ public class PersonIdentifyAspect {
@Autowired @Autowired
private JcsFeign jcsFeignClient; private JcsFeign jcsFeignClient;
// package com.yeejoin.equipmanage.controller; @Pointcut("execution(public * com.yeejoin.amos.*.business.controller..*(..))")
// com.yeejoin.amos.boot.biz.common.controller.BaseController public void userDate() {
// @Pointcut("execution(public * com.*.equipmanage.controller..*(..))")
// public void userDate() { }
//
// }
@Before(value = "@annotation(com.yeejoin.equipmanage.config.PersonIdentify) && @annotation(permission)") @Before(value = "userDate()")
public void personIdentity(JoinPoint joinPoint, PersonIdentify permission) { public void personIdentity(JoinPoint joinPoint) {
if(RequestContext.getToken() != null && RequestContext.getExeUserId() != null){ if(RequestContext.getToken() != null && RequestContext.getExeUserId() != null){
ReginParams reginParam = JSON.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class); ReginParams reginParam = JSON.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
......
...@@ -3,6 +3,7 @@ package com.yeejoin.equipmanage.controller; ...@@ -3,6 +3,7 @@ package com.yeejoin.equipmanage.controller;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.equipmanage.common.constant.Constant; import com.yeejoin.equipmanage.common.constant.Constant;
import com.yeejoin.equipmanage.common.entity.vo.EquiplistSpecificBySystemVO; import com.yeejoin.equipmanage.common.entity.vo.EquiplistSpecificBySystemVO;
import com.yeejoin.equipmanage.common.utils.*; import com.yeejoin.equipmanage.common.utils.*;
...@@ -381,6 +382,16 @@ public class EquipmentSpecificController extends AbstractBaseController { ...@@ -381,6 +382,16 @@ public class EquipmentSpecificController extends AbstractBaseController {
return equipmentSpecificSerivce.getListByEquipmentCode(code); return equipmentSpecificSerivce.getListByEquipmentCode(code);
} }
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getListByEquipmentCodeEQ/{code}")
@ApiOperation(httpMethod = "GET", value = "根据装备分类code获取装备list", notes = "根据装备分类code获取装备list")
public List<Map<String, Object>> getFirePumpInfoEQ( @PathVariable String code){
ReginParams ReginParams=getSelectedOrgInfo();
String bizCode= ReginParams.getPersonIdentity().getBizOrgCode();
return equipmentSpecificSerivce.getFirePumpInfoEQ(code,bizCode);
}
@GetMapping(value = "/index/normal") @GetMapping(value = "/index/normal")
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "查询非告警指标list", notes = "查询非告警指标list") @ApiOperation(httpMethod = "GET", value = "查询非告警指标list", notes = "查询非告警指标list")
......
...@@ -230,6 +230,8 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> { ...@@ -230,6 +230,8 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
List<Map<String, Object>> getFireMonitorInfo(@Param("equipmentId") Long fireEquipmentId, @Param("list") String[] strings); List<Map<String, Object>> getFireMonitorInfo(@Param("equipmentId") Long fireEquipmentId, @Param("list") String[] strings);
List<Map<String, Object>> getFirePumpInfo(@Param("list") String[] strings); List<Map<String, Object>> getFirePumpInfo(@Param("list") String[] strings);
List<Map<String, Object>> getFirePumpInfoEQ(@Param("list") String[] strings,@Param("bizOrgCode") String bizOrgCode);
Integer getAllEquipNum(@Param("bizOrgCode") String bizOrgCode); Integer getAllEquipNum(@Param("bizOrgCode") String bizOrgCode);
......
...@@ -228,7 +228,7 @@ public interface IEquipmentSpecificSerivce extends IService<EquipmentSpecific> { ...@@ -228,7 +228,7 @@ public interface IEquipmentSpecificSerivce extends IService<EquipmentSpecific> {
* @return 装备list * @return 装备list
*/ */
List<Map<String, Object>> getListByEquipmentCode(String code); List<Map<String, Object>> getListByEquipmentCode(String code);
List<Map<String, Object>> getFirePumpInfoEQ(String code,String bizOrgCode);
/** /**
* 根据装备id获取物联日志 * 根据装备id获取物联日志
* @param iotCode code * @param iotCode code
......
...@@ -1841,6 +1841,16 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM ...@@ -1841,6 +1841,16 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
} }
@Override @Override
public List<Map<String, Object>> getFirePumpInfoEQ(String code,String bizCode) {
List<Map<String, Object>> list = new ArrayList<>();
if (StringUtil.isNotEmpty(code)) {
String[] strings = code.split(",");
list = equipmentSpecificMapper.getFirePumpInfoEQ(strings,bizCode);
}
return list;
}
@Override
public List<IotIndexInfoVo> getIndexInfoList(String iotCode, ResponseModel entity, Integer isTrend, String fieldKey) { public List<IotIndexInfoVo> getIndexInfoList(String iotCode, ResponseModel entity, Integer isTrend, String fieldKey) {
List<IotIndexInfoVo> infoVoList = new ArrayList<>(); List<IotIndexInfoVo> infoVoList = new ArrayList<>();
String json = JSON.toJSONString(entity.getResult()); String json = JSON.toJSONString(entity.getResult());
......
...@@ -702,7 +702,9 @@ public class DataSourcesImpl implements DataSources { ...@@ -702,7 +702,9 @@ public class DataSourcesImpl implements DataSources {
private String[] getListByEquipmentCode() { private String[] getListByEquipmentCode() {
String code = "92010700,92011500"; String code = "92010700,92011500";
ResponseModel<List<Map<String, Object>>> response = equipFeignClient.getListByEquipmentCode(code); //ResponseModel<List<Map<String, Object>>> response = equipFeignClient.getListByEquipmentCode(code);
ResponseModel<List<Map<String, Object>>> response = equipFeignClient.getListByEquipmentCodeEQ(code);
List<Map<String, Object>> equipmentList = response.getResult(); List<Map<String, Object>> equipmentList = response.getResult();
String[] str = null; String[] str = null;
List<String> resultList = Lists.newArrayList(); List<String> resultList = Lists.newArrayList();
......
...@@ -1702,6 +1702,40 @@ ...@@ -1702,6 +1702,40 @@
ORDER BY realtiemIotIndexUpdateDate DESC ORDER BY realtiemIotIndexUpdateDate DESC
</select> </select>
<select id="getFirePumpInfoEQ" resultType="Map">
SELECT
wes.id,
wes.name,
wes.position,
wes.code,
wes.equipment_code equipmentCode,
wes.realtime_iot_index_name realtimeIotIndexName,
wes.realtime_iot_index_key realtimeIotIndexKey,
wes.realtime_iot_index_value realtimeIotIndexValue,
wes.value_label valueLabel,
wes.realtime_iot_es_index_id realtimeIotSpecificIndexId,
wes.realtime_iot_index_update_date realtiemIotIndexUpdateDate,
wes.realtime_iot_index_id realtimeIotIndexId
FROM
wl_equipment_specific wes
<where>
<if test="list != null and list.length > 0">
<foreach collection="list" item="item" index="index" open="(" close=")" separator="OR">
wes.equipment_code LIKE <![CDATA[CONCAT(#{item},'%')]]>
</foreach>
</if>
<if test="bizOrgCode != null and bizOrgCode != ''">
and wes.biz_org_code LIKE concat(#{bizOrgCode}, '%')
</if>
</where>
ORDER BY realtiemIotIndexUpdateDate DESC
</select>
<select id="getAllEquipNum" resultType="java.lang.Integer"> <select id="getAllEquipNum" resultType="java.lang.Integer">
select count(*) from wl_equipment_specific select count(*) from wl_equipment_specific
<where> <where>
......
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