Commit 46d8c8cf authored by 李秀明's avatar 李秀明

Merge remote-tracking branch 'origin/develop_dl_3.7.1.0' into develop_dl_3.7.1.0

parents d0b253eb 27d7cb5d
...@@ -64,4 +64,7 @@ public class AppAlarmExtVo { ...@@ -64,4 +64,7 @@ public class AppAlarmExtVo {
@ApiModelProperty(value = "是否拥有简报") @ApiModelProperty(value = "是否拥有简报")
private Boolean isreport = false; private Boolean isreport = false;
@ApiModelProperty(value = "客户端id")
private String client_id;
} }
\ No newline at end of file
...@@ -44,4 +44,7 @@ public class AppAlarmRportVo { ...@@ -44,4 +44,7 @@ public class AppAlarmRportVo {
@ApiModelProperty(value = "相关报告") @ApiModelProperty(value = "相关报告")
private String analysisreport = ""; private String analysisreport = "";
@ApiModelProperty(value = "客户端id")
private String client_id;
} }
\ No newline at end of file
...@@ -18,4 +18,5 @@ public class SShanMessage { ...@@ -18,4 +18,5 @@ public class SShanMessage {
private String pointId; private String pointId;
private String time; private String time;
private String deviceId; private String deviceId;
private String eventstatus;
} }
...@@ -150,9 +150,9 @@ public class EquipmentIotMqttReceiveConfig { ...@@ -150,9 +150,9 @@ public class EquipmentIotMqttReceiveConfig {
mqttReceiveService.handlerMqttIncrementMessage(topic, msg); mqttReceiveService.handlerMqttIncrementMessage(topic, msg);
} else if (dataType.equals("event") && StringUtil.isNotEmpty(msg)) { } else if (dataType.equals("event") && StringUtil.isNotEmpty(msg)) {
mqttEventReceiveService.handlerMqttIncrementMessage(topic, msg); mqttEventReceiveService.handlerMqttIncrementMessage(topic, msg);
}else if (dataType.equals("transmit") && StringUtil.isNotEmpty(msg)){ }else if (dataType.equals("transmit") && StringUtil.isNotEmpty(msg)){ // 遥信遥测信号
mqttReceiveService.handlerMqttRomaMessage(topic,msg); mqttReceiveService.handlerMqttRomaMessage(topic,msg);
}else if (dataType.equals("shaoshan") && StringUtil.isNotEmpty(msg)){ }else if (dataType.equals("shaoshan") && StringUtil.isNotEmpty(msg)){ // 告警信号
mqttReceiveService.handlerMqttStationMessage(topic,msg); mqttReceiveService.handlerMqttStationMessage(topic,msg);
} }
} }
......
...@@ -27,8 +27,12 @@ public interface EquipmentSpecificAlarmLogMapper extends BaseMapper<EquipmentSpe ...@@ -27,8 +27,12 @@ public interface EquipmentSpecificAlarmLogMapper extends BaseMapper<EquipmentSpe
List<AppAlarmExtVo> findByIdList(@Param("list") List<Long> idList); List<AppAlarmExtVo> findByIdList(@Param("list") List<Long> idList);
List<AppAlarmExtVo> findByIdListForNRKJ(@Param("list") List<Long> idList);
List<AppAlarmExtVo> findByIdListNoBuildId(@Param("list") List<Long> idBNullList); List<AppAlarmExtVo> findByIdListNoBuildId(@Param("list") List<Long> idBNullList);
List<AppAlarmExtVo> findByIdListNoBuildIdForNRKJ(@Param("list") List<Long> idBNullList);
List<EquipmentSpecificAlarmLog> getIsConfirmByAlarmId(@Param("equipmentSpecificId") Long equipmentSpecificId List<EquipmentSpecificAlarmLog> getIsConfirmByAlarmId(@Param("equipmentSpecificId") Long equipmentSpecificId
, @Param("equipmentSpecificIndexKey") String equipmentSpecificIndexKey , @Param("equipmentSpecificIndexKey") String equipmentSpecificIndexKey
, @Param("isConfirm") String isConfirm); , @Param("isConfirm") String isConfirm);
......
...@@ -8,7 +8,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; ...@@ -8,7 +8,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey; import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils; import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.component.influxdb.InfluxDbConnection; import com.yeejoin.amos.component.influxdb.InfluxDbConnection;
import com.yeejoin.amos.component.robot.AmosRequestContext;
import com.yeejoin.amos.component.rule.RuleTrigger; import com.yeejoin.amos.component.rule.RuleTrigger;
import com.yeejoin.amos.feign.systemctl.model.MessageModel; import com.yeejoin.amos.feign.systemctl.model.MessageModel;
import com.yeejoin.equipmanage.common.datasync.entity.FireEquipmentDefectAlarm; import com.yeejoin.equipmanage.common.datasync.entity.FireEquipmentDefectAlarm;
...@@ -48,7 +47,6 @@ import org.springframework.util.CollectionUtils; ...@@ -48,7 +47,6 @@ import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import org.typroject.tyboot.component.emq.EmqKeeper; import org.typroject.tyboot.component.emq.EmqKeeper;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil; import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest; import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
...@@ -198,6 +196,8 @@ public class MqttReceiveServiceImpl implements MqttReceiveService { ...@@ -198,6 +196,8 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
private Resource systemStateIndex; private Resource systemStateIndex;
@Value("${dcs.send.message}") @Value("${dcs.send.message}")
private Boolean NRMsgSend; private Boolean NRMsgSend;
@Value("${message.alarm.char}")
private String specialChars;
public static List<EquipmentSpecificAlarmLog> upAlarmLogStatus(String iotCode, String equipmentSpecificIndexKey, public static List<EquipmentSpecificAlarmLog> upAlarmLogStatus(String iotCode, String equipmentSpecificIndexKey,
String traceId, IEquipmentSpecificAlarmLogService equipmentSpecificAlarmLogService, String traceId, IEquipmentSpecificAlarmLogService equipmentSpecificAlarmLogService,
...@@ -591,6 +591,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService { ...@@ -591,6 +591,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
action.setAlamContent(action.getEquipmentSpecificName() + action.getEquipmentSpecificIndexName()); action.setAlamContent(action.getEquipmentSpecificName() + action.getEquipmentSpecificIndexName());
} }
mqttSendGateway.sendToMqtt(TopicEnum.EQDQR.getTopic(), JSONArray.toJSON(action).toString()); mqttSendGateway.sendToMqtt(TopicEnum.EQDQR.getTopic(), JSONArray.toJSON(action).toString());
bool = Boolean.FALSE;
} else { } else {
alarmLogs.addAll(upAlarmLogStatus(action.getIotCode(), action.getEquipmentSpecificIndexKey(), action.getTraceId(), alarmLogs.addAll(upAlarmLogStatus(action.getIotCode(), action.getEquipmentSpecificIndexKey(), action.getTraceId(),
equipmentSpecificAlarmLogService, false, "")); equipmentSpecificAlarmLogService, false, ""));
...@@ -692,7 +693,14 @@ public class MqttReceiveServiceImpl implements MqttReceiveService { ...@@ -692,7 +693,14 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
SShanStationMessage sShanStationMessage = JSON.parseObject(String.valueOf(message), SShanStationMessage.class); SShanStationMessage sShanStationMessage = JSON.parseObject(String.valueOf(message), SShanStationMessage.class);
Map<Object, Object> equipmentIndexKeyMap = redisUtils.hmget(RedisKey.EQUIP_INDEX_ADDRESS_KEY_STATION); Map<Object, Object> equipmentIndexKeyMap = redisUtils.hmget(RedisKey.EQUIP_INDEX_ADDRESS_KEY_STATION);
sShanStationMessage.getWarns().forEach(m -> { sShanStationMessage.getWarns().forEach(m -> {
String value = m.getEventTextL1().contains("出现") ? TRUE : FALSE; String value;
if (message.contains("eventtextL1")) {
// 此通道目前专供韶山告警消息value赋值,没必要用配置文件多字段进行逐个判断,所以暂时不修改
value = m.getEventTextL1().contains("出现") ? TRUE : FALSE;
} else {
value = String.valueOf(BeanUtil.judgePropertyContainsChar(m.getEventstatus(), specialChars));
}
if (equipmentIndexKeyMap.get(m.getPointId()) != null) { if (equipmentIndexKeyMap.get(m.getPointId()) != null) {
EquipmentSpecificIndex equipmentSpeIndex = equipmentSpecificIndexService.getEquipmentSpeIndexByAddress(null, m.getPointId(), null); EquipmentSpecificIndex equipmentSpeIndex = equipmentSpecificIndexService.getEquipmentSpeIndexByAddress(null, m.getPointId(), null);
if (equipmentSpeIndex == null) { if (equipmentSpeIndex == null) {
...@@ -845,6 +853,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService { ...@@ -845,6 +853,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
action.setAlamContent(action.getEquipmentSpecificName() + action.getEquipmentSpecificIndexName()); action.setAlamContent(action.getEquipmentSpecificName() + action.getEquipmentSpecificIndexName());
} }
mqttSendGateway.sendToMqtt(TopicEnum.EQDQR.getTopic(), JSONArray.toJSON(action).toString()); mqttSendGateway.sendToMqtt(TopicEnum.EQDQR.getTopic(), JSONArray.toJSON(action).toString());
bool = Boolean.FALSE;
} else { } else {
alarmLogs.addAll(upAlarmLogStatus(action.getIotCode(), action.getEquipmentSpecificIndexKey(), action.getTraceId(), alarmLogs.addAll(upAlarmLogStatus(action.getIotCode(), action.getEquipmentSpecificIndexKey(), action.getTraceId(),
equipmentSpecificAlarmLogService, false, "")); equipmentSpecificAlarmLogService, false, ""));
...@@ -931,6 +940,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService { ...@@ -931,6 +940,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
}); });
} }
/** /**
* 物联数据处理 * 物联数据处理
* *
...@@ -1134,6 +1144,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService { ...@@ -1134,6 +1144,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
action.setAlamContent(action.getEquipmentSpecificName() + action.getEquipmentSpecificIndexName()); action.setAlamContent(action.getEquipmentSpecificName() + action.getEquipmentSpecificIndexName());
} }
mqttSendGateway.sendToMqtt(TopicEnum.EQDQR.getTopic(), JSONArray.toJSON(action).toString()); mqttSendGateway.sendToMqtt(TopicEnum.EQDQR.getTopic(), JSONArray.toJSON(action).toString());
bool = Boolean.FALSE;
} else { } else {
alarmLogs.addAll(upAlarmLogStatus(action.getIotCode(), action.getEquipmentSpecificIndexKey(), action.getTraceId(), alarmLogs.addAll(upAlarmLogStatus(action.getIotCode(), action.getEquipmentSpecificIndexKey(), action.getTraceId(),
equipmentSpecificAlarmLogService, false, "")); equipmentSpecificAlarmLogService, false, ""));
...@@ -1499,6 +1510,9 @@ public class MqttReceiveServiceImpl implements MqttReceiveService { ...@@ -1499,6 +1510,9 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
model.setExtras(equipMap); model.setExtras(equipMap);
} }
model.setRelationId(String.valueOf(equipmentSpecificAlarmLog.getId())); model.setRelationId(String.valueOf(equipmentSpecificAlarmLog.getId()));
List<String> receive = new ArrayList<>();
receive.add("system");
model.setRecivers(receive);
Token token = remoteSecurityService.getServerToken(); Token token = remoteSecurityService.getServerToken();
systemctlFeign.create(token.getAppKey(), token.getProduct(), token.getToke(), model); systemctlFeign.create(token.getAppKey(), token.getProduct(), token.getToke(), model);
log.info(String.format("调用平台消息服务成功:%s", JSON.toJSONString(model))); log.info(String.format("调用平台消息服务成功:%s", JSON.toJSONString(model)));
......
...@@ -65,6 +65,9 @@ public class SyncDataServiceImpl implements ISyncDataService { ...@@ -65,6 +65,9 @@ public class SyncDataServiceImpl implements ISyncDataService {
@Value("${dcs.x.hw.appKey}") @Value("${dcs.x.hw.appKey}")
private String xHwAppKey; private String xHwAppKey;
@Value("dcs.NRKJ.use")
private Boolean NRKJUse;
@Autowired @Autowired
private DcsUtil dcsUtil; private DcsUtil dcsUtil;
...@@ -427,6 +430,7 @@ public class SyncDataServiceImpl implements ISyncDataService { ...@@ -427,6 +430,7 @@ public class SyncDataServiceImpl implements ISyncDataService {
private AppAlarmRportVo getAppAlarmRportVo(AppAlarmExtVo vo) { private AppAlarmRportVo getAppAlarmRportVo(AppAlarmExtVo vo) {
AppAlarmRportVo alarmRportVo = new AppAlarmRportVo(); AppAlarmRportVo alarmRportVo = new AppAlarmRportVo();
alarmRportVo.setClient_id(clientId);
alarmRportVo.setTime(vo.getConfirmtime()); alarmRportVo.setTime(vo.getConfirmtime());
alarmRportVo.setEventdesc(vo.getEventdesc()); alarmRportVo.setEventdesc(vo.getEventdesc());
alarmRportVo.setEventreason(vo.getEventreason()); alarmRportVo.setEventreason(vo.getEventreason());
...@@ -451,11 +455,20 @@ public class SyncDataServiceImpl implements ISyncDataService { ...@@ -451,11 +455,20 @@ public class SyncDataServiceImpl implements ISyncDataService {
if (CollectionUtils.isNotEmpty(idList) || CollectionUtils.isNotEmpty(idBNullList)) { if (CollectionUtils.isNotEmpty(idList) || CollectionUtils.isNotEmpty(idBNullList)) {
List<AppAlarmExtVo> appAlarmVoList = new ArrayList<>(); List<AppAlarmExtVo> appAlarmVoList = new ArrayList<>();
List<AppAlarmExtVo> appAlarmVoList1 = new ArrayList<>(); List<AppAlarmExtVo> appAlarmVoList1 = new ArrayList<>();
if (CollectionUtils.isNotEmpty(idList)) { if (NRKJUse) {
appAlarmVoList = equipmentSpecificAlarmLogMapper.findByIdList(idList); if (CollectionUtils.isNotEmpty(idList)) {
} appAlarmVoList = equipmentSpecificAlarmLogMapper.findByIdListForNRKJ(idList);
if (CollectionUtils.isNotEmpty(idBNullList)) { }
appAlarmVoList1 = equipmentSpecificAlarmLogMapper.findByIdListNoBuildId(idBNullList); if (CollectionUtils.isNotEmpty(idBNullList)) {
appAlarmVoList1 = equipmentSpecificAlarmLogMapper.findByIdListNoBuildIdForNRKJ(idBNullList);
}
} else {
if (CollectionUtils.isNotEmpty(idList)) {
appAlarmVoList = equipmentSpecificAlarmLogMapper.findByIdList(idList);
}
if (CollectionUtils.isNotEmpty(idBNullList)) {
appAlarmVoList1 = equipmentSpecificAlarmLogMapper.findByIdListNoBuildId(idBNullList);
}
} }
appAlarmVoList.addAll(appAlarmVoList1); appAlarmVoList.addAll(appAlarmVoList1);
if (CollectionUtils.isNotEmpty(appAlarmVoList)) { if (CollectionUtils.isNotEmpty(appAlarmVoList)) {
......
...@@ -30,4 +30,16 @@ public class BeanUtil { ...@@ -30,4 +30,16 @@ public class BeanUtil {
public static void copyPropertiesIgnoreNull(Object src, Object target){ public static void copyPropertiesIgnoreNull(Object src, Object target){
BeanUtils.copyProperties(src, target, getNullPropertyNames(src)); BeanUtils.copyProperties(src, target, getNullPropertyNames(src));
} }
public static boolean judgePropertyContainsChar(String sourceStr, String specialStr) {
boolean bool = Boolean.FALSE;
String[] strings = specialStr.split(",");
for (String code : strings) {
if (sourceStr.contains(code)) {
bool = Boolean.TRUE;
break;
}
}
return bool;
}
} }
...@@ -78,8 +78,10 @@ dcs.token-key=dcs_token_key ...@@ -78,8 +78,10 @@ dcs.token-key=dcs_token_key
dcs.client.secret=fire_system dcs.client.secret=fire_system
dcs.x.hw.id=io.cs dcs.x.hw.id=io.cs
dcs.x.hw.appKey=i!YmnHgJ=Ysz8V+O@ZG237inQKfixkQ.-#-P3IlR8fO%.#F!g%35Z#@tp$6G+52v dcs.x.hw.appKey=i!YmnHgJ=Ysz8V+O@ZG237inQKfixkQ.-#-P3IlR8fO%.#F!g%35Z#@tp$6G+52v
dcs.url.token=http://198.87.103.158:8001/auth-service/oauth/token # \u7531\u4E8E\u76EE\u524D\u6709\u4E0D\u6B62\u4E00\u4E2A\u6570\u5B57\u7AD9\u5E73\u53F0\u5BF9\u5E94\u63A5\u53E3\u89C4\u8303\u4E0D\u4E00\u81F4\uFF0C\u6240\u4EE5\u6B64\u5904\u589E\u52A0\u914D\u7F6E\uFF0Ctrue\u8868\u793A\u9002\u7528\u4E8E\u5357\u745E\u79D1\u6280\u7684\u63A5\u53E3\u89C4\u8303
dcs.url.sendalarm=http://198.87.103.158:8001/alarm-service/appalarm/sendalarm dcs.NRKJ.use=false
dcs.url.token=http://172.21.101.123/udaap-ddis/v1/cs/auth-service/oauth/token
dcs.url.sendalarm=http://172.21.101.101/v1/cs/alarm-service/appalarm/sendalarm
#dcs.url.token=https://192.168.4.89/v1/cs/auth-service/oauth/token #dcs.url.token=https://192.168.4.89/v1/cs/auth-service/oauth/token
#dcs.url.sendalarm=https://192.168.4.89/v1/cs/alarm-service/appalarm/sendalarm #dcs.url.sendalarm=https://192.168.4.89/v1/cs/alarm-service/appalarm/sendalarm
...@@ -150,4 +152,7 @@ spring.influx.database=iot_platform ...@@ -150,4 +152,7 @@ spring.influx.database=iot_platform
spring.influx.retention_policy=default spring.influx.retention_policy=default
spring.influx.retention_policy_time=30d spring.influx.retention_policy_time=30d
spring.influx.actions=10000 spring.influx.actions=10000
spring.influx.bufferLimit=20000 spring.influx.bufferLimit=20000
\ No newline at end of file
# message\u670D\u52A1\u8F6C\u53D1\u544A\u8B66\u4FE1\u53F7\u7279\u6B8A\u5224\u65AD\u5B57\u7B26\u96C6
message.alarm.char=\u51FA\u73B0
\ No newline at end of file
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
CONCAT(sal.create_date) AS time, CONCAT(sal.create_date) AS time,
IFNULL(a.`code`,' ') AS areaid, IFNULL(a.`code`,' ') AS areaid,
IFNULL(a.`name`,' ') AS areaname, IFNULL(a.`name`,' ') AS areaname,
f.`code` AS stationid, sal.station_code AS stationid,
f.`name` AS stationname, sal.station_name AS stationname,
s.`code` AS deviceid, s.`code` AS deviceid,
s.`name` AS devicename, s.`name` AS devicename,
sal.equipment_specific_code AS partid, sal.equipment_specific_code AS partid,
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
IF IF
( sal.confirm_type = 'FIREALARM', 0, 1 ) AS eventlevel, ( sal.confirm_type = 'FIREALARM', 0, 1 ) AS eventlevel,
-- CONCAT( sal.equipment_specific_name, ' ', sal.equipment_specific_index_name ) AS eventdesc, -- CONCAT( sal.equipment_specific_name, ' ', sal.equipment_specific_index_name ) AS eventdesc,
CONCAT( '位于', a.`name`, '的', sal.equipment_specific_name, '(', sal.equipment_specific_code, ')在', sal.create_date, '发生', sal.equipment_specific_index_name, ',请相关人员进行核实确认现场情况!') AS eventdesc, CONCAT(IF(a.`name` IS NOT NULL, CONCAT('位于', a.`name`, '的'), ''), sal.equipment_specific_name, '在', sal.create_date, '发生', sal.equipment_specific_index_name, '事件,请相关人员进行核实确认现场情况!') AS eventdesc,
sal.equipment_specific_index_name AS eventaction, sal.equipment_specific_index_name AS eventaction,
IF IF
( sal.confirm_date IS NULL, FALSE, TRUE ) AS isreport, ( sal.confirm_date IS NULL, FALSE, TRUE ) AS isreport,
...@@ -43,8 +43,44 @@ ...@@ -43,8 +43,44 @@
wl_equipment_specific_alarm_log sal wl_equipment_specific_alarm_log sal
LEFT JOIN wl_form_instance i ON sal.build_id = i.instance_id LEFT JOIN wl_form_instance i ON sal.build_id = i.instance_id
LEFT JOIN wl_area a ON a.id = i.field_value LEFT JOIN wl_area a ON a.id = i.field_value
LEFT JOIN f_fire_fighting_system s ON FIND_IN_SET(s.id, sal.system_ids), LEFT JOIN f_fire_fighting_system s ON FIND_IN_SET(s.id, sal.system_ids)
f_station_info f WHERE
i.field_name = "belongAreaId"
<if test="list != null and list.size() >0">
AND sal.id IN
<foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
GROUP BY
sal.id
</select>
<select id="findByIdListForNRKJ" resultType="com.yeejoin.equipmanage.common.datasync.vo.AppAlarmExtVo">
SELECT
'fire_system' AS client_id,
CONCAT(sal.create_date) AS time,
IFNULL(a.`code`,' ') AS areaid,
IFNULL(a.`name`,' ') AS areaname,
sal.station_code AS stationid,
sal.station_name AS stationname,
s.`code` AS deviceid,
s.`name` AS devicename,
sal.equipment_specific_code AS partid,
sal.equipment_specific_name AS partname,
s.`system_type_code` AS type,
IF
( sal.confirm_type = 'FIREALARM', 0, 1 ) AS eventlevel,
CONCAT(IF(a.`name` IS NOT NULL, CONCAT('位于', a.`name`, '的'), ''), sal.equipment_specific_name, '在', sal.create_date, '发生', sal.equipment_specific_index_name, '事件,请相关人员进行核实确认现场情况!') AS eventdesc,
sal.equipment_specific_index_name AS eventaction,
IF
( sal.confirm_date IS NULL, FALSE, TRUE ) AS isreport,
CONCAT(sal.confirm_date) AS confirmtime,
sal.alarm_reason AS eventreason
FROM
wl_equipment_specific_alarm_log sal
LEFT JOIN wl_form_instance i ON sal.build_id = i.instance_id
LEFT JOIN wl_area a ON a.id = i.field_value
LEFT JOIN f_fire_fighting_system s ON FIND_IN_SET(s.id, sal.system_ids)
WHERE WHERE
i.field_name = "belongAreaId" i.field_name = "belongAreaId"
<if test="list != null and list.size() >0"> <if test="list != null and list.size() >0">
...@@ -70,8 +106,43 @@ ...@@ -70,8 +106,43 @@
s.`system_type_code` AS type, s.`system_type_code` AS type,
IF IF
( sal.confirm_type = 'FIREALARM', 0, 1 ) AS eventlevel, ( sal.confirm_type = 'FIREALARM', 0, 1 ) AS eventlevel,
CONCAT(sal.equipment_specific_name, '在', sal.create_date, '发生', sal.equipment_specific_index_name, '事件,请相关人员进行核实确认现场情况!') AS eventdesc,
sal.equipment_specific_index_name AS eventaction,
IF
( sal.confirm_date IS NULL, FALSE, TRUE ) AS isreport ,
CONCAT(sal.confirm_date) AS confirmtime,
sal.alarm_reason AS eventreason
FROM
wl_equipment_specific_alarm_log sal
LEFT JOIN f_fire_fighting_system s ON FIND_IN_SET(s.id, sal.system_ids),
f_station_info f
<where>
<if test="list != null and list.size() >0">
AND sal.id IN
<foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
</where>
GROUP BY
sal.id
</select>
<select id="findByIdListNoBuildIdForNRKJ" resultType="com.yeejoin.equipmanage.common.datasync.vo.AppAlarmExtVo">
SELECT
CONCAT(sal.create_date) AS time,
' ' AS areaid,
' ' AS areaname,
f.`code` AS stationid,
f.`name` AS stationname,
s.`code` AS deviceid,
s.`name` AS devicename,
sal.equipment_specific_code AS partid,
sal.equipment_specific_name AS partname,
s.`system_type_code` AS type,
IF
( sal.confirm_type = 'FIREALARM', 0, 1 ) AS eventlevel,
-- CONCAT( sal.equipment_specific_name, ' ', sal.equipment_specific_index_name ) AS eventdesc, -- CONCAT( sal.equipment_specific_name, ' ', sal.equipment_specific_index_name ) AS eventdesc,
CONCAT(sal.equipment_specific_name, '(', sal.equipment_specific_code, ')在', sal.create_date, '发生', sal.equipment_specific_index_name, ',请相关人员进行核实确认现场情况!') AS eventdesc, CONCAT(sal.equipment_specific_name, '在', sal.create_date, '发生', sal.equipment_specific_index_name, '事件,请相关人员进行核实确认现场情况!') AS eventdesc,
sal.equipment_specific_index_name AS eventaction, sal.equipment_specific_index_name AS eventaction,
IF IF
( sal.confirm_date IS NULL, FALSE, TRUE ) AS isreport , ( sal.confirm_date IS NULL, FALSE, TRUE ) AS isreport ,
......
...@@ -5599,7 +5599,7 @@ ...@@ -5599,7 +5599,7 @@
</select> </select>
<select id="selectAllPressurePumpInfo" resultType="java.util.Map"> <select id="selectAllPressurePumpInfo" resultType="java.util.Map">
SELECT SELECT
ed.`name`, es.`name`,
concat_ws( '-', ws.full_name, ed.area ) area, concat_ws( '-', ws.full_name, ed.area ) area,
es.iot_code, es.iot_code,
es.id, es.id,
......
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