Commit 54db3921 authored by KeYong's avatar KeYong

Merge remote-tracking branch 'origin/develop_dl_bugfix_0723' into develop_dl_bugfix_0723

parents f4971857 5d6c0c3c
...@@ -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);
} }
......
...@@ -62,7 +62,7 @@ spring.influx.bufferLimit=20000 ...@@ -62,7 +62,7 @@ spring.influx.bufferLimit=20000
#系统机器人账号 #系统机器人账号
amos.system.user.user-name=gw_ys4 amos.system.user.user-name=gw_ys4
amos.system.user.password=Aa1234567 amos.system.user.password=ENC(7tDiqwjMIbE4TjngEimbmaXzvBC1/nlGrIDNPd1z6rBCr72XvCPcDzrIMkKQChuB)
amos.system.user.app-key=studio_normalapp_3056965 amos.system.user.app-key=studio_normalapp_3056965
amos.system.user.product=STUDIO_APP_WEB amos.system.user.product=STUDIO_APP_WEB
security.productApp=STUDIO_APP_MOBILE security.productApp=STUDIO_APP_MOBILE
......
...@@ -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
......
...@@ -6859,7 +6859,6 @@ ...@@ -6859,7 +6859,6 @@
wl_equipment_specific_alarm_log r wl_equipment_specific_alarm_log r
LEFT JOIN f_fire_fighting_system fs ON FIND_IN_SET( fs.id, r.system_ids ) LEFT JOIN f_fire_fighting_system fs ON FIND_IN_SET( fs.id, r.system_ids )
<where> <where>
r.update_date BETWEEN date_sub( now(), INTERVAL 6 MONTH ) AND now()
<if test="systemCode != null and systemCode != ''"> <if test="systemCode != null and systemCode != ''">
AND fs.`code` = #{systemCode} AND fs.`code` = #{systemCode}
</if> </if>
...@@ -7158,7 +7157,18 @@ ...@@ -7158,7 +7157,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},'%')
......
...@@ -1786,7 +1786,17 @@ ...@@ -1786,7 +1786,17 @@
IFNULL(SUM( t.point_num ), 0) AS allCount, IFNULL(SUM( t.point_num ), 0) AS allCount,
IFNULL(SUM(IF(t.finish_status = 3, t.point_num, 0)), 0) AS missPointCount, IFNULL(SUM(IF(t.finish_status = 3, t.point_num, 0)), 0) AS missPointCount,
IFNULL(SUM(IF(t.finish_status = 2, t.point_num, 0)), 0) AS finishCount, IFNULL(SUM(IF(t.finish_status = 2, t.point_num, 0)), 0) AS finishCount,
IFNULL((SELECT SUM(TIMESTAMPDIFF(MINUTE, t.begin_time, d.executor_date)) FROM p_plan_task_detail d where d.task_no = t.id and t.org_code LIKE LEFT(t.org_code, 18)), 0) AS totalTime IFNULL(
(
SELECT
SUM(TIMESTAMPDIFF(MINUTE, t.begin_time, d.executor_date))
FROM
p_plan_task t
LEFT JOIN p_plan_task_detail d ON d.task_no = t.id
WHERE
t.finish_status = 2 AND org_code LIKE LEFT(t.org_code, 18)
AND DATE_FORMAT( t.check_date, '%Y-%m-%d' ) = #{date}
), 0) AS totalTime
FROM FROM
p_plan_task t p_plan_task t
LEFT JOIN cb_org_usr u on u.biz_org_code = left(t.org_code, 18) LEFT JOIN cb_org_usr u on u.biz_org_code = left(t.org_code, 18)
......
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