|
|
@ -424,7 +424,18 @@ public class IotThingApiServiceImpl extends BaseServiceImpl<IotThingApiMapper, I |
|
|
return Maps.newHashMap(); |
|
|
return Maps.newHashMap(); |
|
|
} |
|
|
} |
|
|
//todo 这里主要是组态设计的websocket请求,可能需要修改 |
|
|
//todo 这里主要是组态设计的websocket请求,可能需要修改 |
|
|
return encapsulationQuery(dto.getThingCondition(), dto.getAttrCondition(), dto.getTimeCondition(), dto.getReqParams(), null, null, dto.getSort(), null); |
|
|
|
|
|
|
|
|
String remark = dto.getRemark(); |
|
|
|
|
|
Long tenantCode = dto.getTenantCode(); |
|
|
|
|
|
if (StringUtils.equals(remark, "0")) { |
|
|
|
|
|
tenantCode = UserContext.getRealTenantCode(); |
|
|
|
|
|
} |
|
|
|
|
|
// Map<String, Object> params = new HashMap<>(); |
|
|
|
|
|
// params.put("id", id); |
|
|
|
|
|
// params.put("reqParams", dto.getReqParams()); |
|
|
|
|
|
// Map<String, Object> stringObjectMap1 = telemetryById(params); |
|
|
|
|
|
// Map<String, Object> stringObjectMap = encapsulationQuery(dto.getThingCondition(), dto.getAttrCondition(), dto.getTimeCondition(), dto.getReqParams(), null, null, dto.getSort(), tenantCode); |
|
|
|
|
|
|
|
|
|
|
|
return encapsulationQuery(dto.getThingCondition(), dto.getAttrCondition(), dto.getTimeCondition(), dto.getReqParams(), null, null, dto.getSort(), tenantCode); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
@ -489,19 +500,25 @@ public class IotThingApiServiceImpl extends BaseServiceImpl<IotThingApiMapper, I |
|
|
parmsMap.put("sort", sort); |
|
|
parmsMap.put("sort", sort); |
|
|
resultMap.put("param", parmsMap); |
|
|
resultMap.put("param", parmsMap); |
|
|
resultMap.put("filterParam", reqParams); |
|
|
resultMap.put("filterParam", reqParams); |
|
|
|
|
|
|
|
|
|
|
|
//属性查询类型 |
|
|
|
|
|
Map<String, Object> entityResultMap = new HashMap<>(); |
|
|
|
|
|
Map<String, IotThingViewDTO> entityInfoMap = new HashMap<>(); |
|
|
|
|
|
ApiEntityAttrDTO attrsEntity = ApiEntityAttrDTO.createFromJson(attrCondition); |
|
|
|
|
|
String type = attrsEntity.getType(); |
|
|
//过滤条件的封装 |
|
|
//过滤条件的封装 |
|
|
if (StringUtils.isNotBlank(reqParams)) { |
|
|
if (StringUtils.isNotBlank(reqParams)) { |
|
|
reqParams = packageQueryFilterParams(reqParams); |
|
|
reqParams = packageQueryFilterParams(reqParams); |
|
|
Map<String, Object> conditionMap = BeanUtil.jsonConvertMap(reqParams); |
|
|
Map<String, Object> conditionMap = BeanUtil.jsonConvertMap(reqParams); |
|
|
// thingCondition = (String)conditionMap.get("entitys"); |
|
|
|
|
|
attrCondition = (String) conditionMap.get("attrs"); |
|
|
|
|
|
|
|
|
if (StringUtils.equalsAnyIgnoreCase(type, ApiSeparateAttr.SEPARATE.getValue())) { |
|
|
|
|
|
attrCondition = conditionMap.get("splitAttrs").toString(); |
|
|
|
|
|
}else{ |
|
|
|
|
|
attrCondition = conditionMap.get("attrs").toString(); |
|
|
|
|
|
} |
|
|
//timeCondition = (String)conditionMap.get("times");TODO 暂时时间没有过滤 |
|
|
//timeCondition = (String)conditionMap.get("times");TODO 暂时时间没有过滤 |
|
|
} |
|
|
} |
|
|
//属性查询类型 |
|
|
|
|
|
Map<String, Object> entityResultMap = new HashMap<>(); |
|
|
|
|
|
Map<String, IotThingViewDTO> entityInfoMap = new HashMap<>(); |
|
|
|
|
|
ApiEntityAttrDTO attrsEntity = ApiEntityAttrDTO.createFromJson(attrCondition); |
|
|
|
|
|
String type = attrsEntity.getType(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//查询物和属性的参数 |
|
|
//查询物和属性的参数 |
|
|
Map<String, Collection<String>> paramMap = Maps.newHashMap(); |
|
|
Map<String, Collection<String>> paramMap = Maps.newHashMap(); |
|
|
//分属性 |
|
|
//分属性 |
|
|
|