Commit 5d6c0c3c authored by 张森's avatar 张森

29605 【中心级】一张图全景监控>设备管理>物联统计,站端视角,监测信号和今日监测数据未根据所选换流站过滤

parent 66b12a9e
...@@ -44,4 +44,7 @@ public class EquipmentSpecificVo implements Serializable { ...@@ -44,4 +44,7 @@ public class EquipmentSpecificVo implements Serializable {
@ApiModelProperty(value = "装备分类code") @ApiModelProperty(value = "装备分类code")
private String ecode; private String ecode;
@ApiModelProperty
private String bizOrgCode;
} }
...@@ -107,7 +107,7 @@ public class SystemStatisticController extends AbstractBaseController { ...@@ -107,7 +107,7 @@ public class SystemStatisticController extends AbstractBaseController {
// 获取当天结束时间(23点59分59秒) // 获取当天结束时间(23点59分59秒)
Date endOfDay = DateUtil.endOfDay(new Date()); Date endOfDay = DateUtil.endOfDay(new Date());
String endOfDayStr = DateUtil.formatDateTime(endOfDay); String endOfDayStr = DateUtil.formatDateTime(endOfDay);
ResponseModel<Map<String, Object>> mapResponseModel = iotFeign.queryIotDataNum(startOfDayStr, endOfDayStr); ResponseModel<Map<String, Object>> mapResponseModel = iotFeign.queryIotDataNum(startOfDayStr, endOfDayStr, bizOrgCode);
if (200 == mapResponseModel.getStatus() ) { if (200 == mapResponseModel.getStatus() ) {
Map<String, Object> result = mapResponseModel.getResult(); Map<String, Object> result = mapResponseModel.getResult();
Object totalNum = result.get("totalNum"); Object totalNum = result.get("totalNum");
......
...@@ -84,7 +84,8 @@ public interface IotFeign { ...@@ -84,7 +84,8 @@ public interface IotFeign {
@RequestMapping(value = "v1/livedata/queryIotDataNum", method = RequestMethod.GET, consumes = "application/json") @RequestMapping(value = "v1/livedata/queryIotDataNum", method = RequestMethod.GET, consumes = "application/json")
ResponseModel<Map<String ,Object>> queryIotDataNum(@RequestParam("timeStart") String timeStart, ResponseModel<Map<String ,Object>> queryIotDataNum(@RequestParam("timeStart") String timeStart,
@RequestParam("timeEnd") String timeEnd); @RequestParam("timeEnd") String timeEnd,
@RequestParam(value = "bizOrgCode", required = false) String bizOrgCode);
@RequestMapping(value = "v1/livedata/queryIotDataNumByIndex", method = RequestMethod.GET, consumes = "application/json") @RequestMapping(value = "v1/livedata/queryIotDataNumByIndex", method = RequestMethod.GET, consumes = "application/json")
ResponseModel<Map<String ,Integer>> queryIotDataNumByIndex(@RequestParam(value = "timeStart") String timeStart, ResponseModel<Map<String ,Integer>> queryIotDataNumByIndex(@RequestParam(value = "timeStart") String timeStart,
......
...@@ -399,11 +399,13 @@ public class MqttReceiveServiceImpl implements MqttReceiveService { ...@@ -399,11 +399,13 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
} }
//给 iot服务 推送消息 插数据到 influxdb //给 iot服务 推送消息 插数据到 influxdb
if (isSendIot) { if (isSendIot) {
EquipmentSpecificVo equipmentSpecificVo = eqIotCodeList.get(0);
JSONObject messageObj = JSON.parseObject(message); JSONObject messageObj = JSON.parseObject(message);
if (!messageObj.containsKey("traceId")) { if (!messageObj.containsKey("traceId")) {
String traceId = System.currentTimeMillis() + ""; String traceId = System.currentTimeMillis() + "";
messageObj.put("traceId", traceId); messageObj.put("traceId", traceId);
} }
messageObj.put("bizOrgCode", equipmentSpecificVo.getBizOrgCode());
String messageTraceId = JSON.toJSONString(messageObj); String messageTraceId = JSON.toJSONString(messageObj);
mqttSendGateway.sendToMqtt("influxdb/" + topic.substring(0, endIndex), messageTraceId); mqttSendGateway.sendToMqtt("influxdb/" + topic.substring(0, endIndex), messageTraceId);
} }
......
...@@ -211,7 +211,8 @@ ...@@ -211,7 +211,8 @@
`wes`.`system_id` `wes`.`system_id`
)) AS `code`, )) AS `code`,
wes.system_id systemId, wes.system_id systemId,
( SELECT GROUP_CONCAT(fs.name) FROM f_fire_fighting_system fs WHERE `wes`.`system_id` like CONCAT("%",fs.id,'%') ) AS systemName ( SELECT GROUP_CONCAT(fs.name) FROM f_fire_fighting_system fs WHERE `wes`.`system_id` like CONCAT("%",fs.id,'%') ) AS systemName,
biz_org_code as bizOrgCode
FROM FROM
wl_equipment_specific AS wes wl_equipment_specific AS wes
...@@ -224,7 +225,8 @@ ...@@ -224,7 +225,8 @@
'car' AS type, 'car' AS type,
wc.car_num AS `code`, wc.car_num AS `code`,
'' systemId, '' systemId,
'' systemName '' systemName,
biz_org_code as bizOrgCode
FROM FROM
wl_car wc wl_car wc
where TRIM(wc.iot_code) != '' AND wc.iot_code IS NOT NULL where TRIM(wc.iot_code) != '' AND wc.iot_code IS NOT NULL
......
...@@ -7021,7 +7021,18 @@ ...@@ -7021,7 +7021,18 @@
* *
FROM FROM
( (
(SELECT count( 1 ) AS indexNum FROM wl_equipment_specific_index a LEFT JOIN wl_equipment_index b ON a.equipment_index_id = b.id WHERE b.is_iot = 1) AS indexNum, (SELECT count( 1 ) AS indexNum FROM wl_equipment_specific_index a LEFT JOIN wl_equipment_index b ON a.equipment_index_id = b.id WHERE b.is_iot = 1
and equipment_specific_id IN
(SELECT
id
FROM
wl_equipment_specific
<where>
<if test="bizOrgCode!=null and bizOrgCode!=''">
AND biz_org_code LIKE CONCAT(#{bizOrgCode},'%')
</if>
</where>)
) AS indexNum,
(SELECT count( 1 ) AS equipNum FROM wl_equipment_specific es LEFT JOIN wl_equipment e ON e.`code` = es.equipment_code WHERE e.is_iot = 1 (SELECT count( 1 ) AS equipNum FROM wl_equipment_specific es LEFT JOIN wl_equipment e ON e.`code` = es.equipment_code WHERE e.is_iot = 1
<if test="bizOrgCode!=null and bizOrgCode!=''"> <if test="bizOrgCode!=null and bizOrgCode!=''">
AND es.biz_org_code LIKE CONCAT(#{bizOrgCode},'%') AND es.biz_org_code LIKE CONCAT(#{bizOrgCode},'%')
......
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