Commit f36eab9e authored by lisong's avatar lisong

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

parents 4743eb24 bec09bc8
......@@ -87,4 +87,8 @@ public class AlertCallePowerTransferRo implements Serializable{
@ApiModelProperty(value = "调派类型队伍")
private String powerTransType;
//bug 5973
@Label(value = "类别")
private Integer category;
}
......@@ -150,7 +150,7 @@ public interface EquipmentSpecificAlarmMapper extends BaseMapper<EquipmentSpecif
List<FireEquipmentFireAlarm> getFireEquipAlarmDetailsByAlarmId(@Param("list") List<Long> specificAlarmIds, @Param("indexIds") List<Long> equipIndexIds);
Page<Map<String, Object>> pageAlarmsInfo(Page page,@Param("param") CommonPageInfoParam param);
Page<Map<String, Object>> pageAlarmsInfo(Page page, @Param("param") CommonPageInfoParam param);
List<Map<String, Object>> getProObject(@Param("id") Long id);
......@@ -164,6 +164,7 @@ public interface EquipmentSpecificAlarmMapper extends BaseMapper<EquipmentSpecif
Page<EquipSpecificAlarmDTO> getAlarmPage(Page page, @Param("dto") AlarmDTO dto);
Page<EquipSpecificAlarmDTO> getEqPage(Page page, @Param("dto") AlarmDTO dto);
List<EquipmentSpecificAlarmLog> getConfirmUser();
EquipSpecificAlarmDTO getbyqrCode(@Param("code") String code);
......@@ -176,7 +177,6 @@ public interface EquipmentSpecificAlarmMapper extends BaseMapper<EquipmentSpecif
Integer getcountAlarmHandle(@Param("tyep") String tyep);
/**
*
* <pre>
* 根据装备id和查询指定状态告警数据
* </pre>
......@@ -187,4 +187,12 @@ public interface EquipmentSpecificAlarmMapper extends BaseMapper<EquipmentSpecif
*/
List<EquipmentSpecificAlarm> getEquipListBySpecific(@Param("status") Boolean status, @Param("equipmentSpecificId") Long equipmentSpecificId);
/**
* 根据Code 和 indexKey 查设备是否报警
* @param iotCode
* @param indexKey
* @param indexValue
* @return
*/
int selectCountByIotCode(@Param("iotCode") String iotCode, @Param("indexKey") String indexKey, @Param("indexValue") String indexValue);
}
......@@ -1301,8 +1301,12 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
public List<BuildingTreeVo> getBuildingVideoTreeNew() {
//1.组装数据
List<BuildingTreeVo> companyBuildingList = buildBuildingAndCompanyListVos(buildVideoAuthKey);
List<Map<String, Long>> countList = iFormInstanceService.getBuildVideoCount();
Map<Long, Long> countMap = countList.stream().collect(Collectors.toMap(p -> p.get("buildId"), p -> p.get("total")));
companyBuildingList.forEach(c -> {
// 建筑类型数据,填充本级及子级包含的摄像头数量
if (!ALL_BUILDING.equals(c.getGroupType())) {
......
......@@ -264,6 +264,12 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
if (ObjectUtils.isEmpty(iotDatalist)) {
return;
}
for (IotDataVO item : iotDatalist) {
int count = equipmentSpecificAlarmMapper.selectCountByIotCode(iotCode, item.getKey(), String.valueOf(item.getValue()));
if (count > 0 && "true".equals(item.getValue())) {
return;
}
}
log.info(String.format("收到mqtt消息:%s", message));
realTimeDateProcessing(topicEntity, iotDatalist);
}
......
package com.yeejoin.amos.boot.module.jcs.biz.audioToText.entity;
import lombok.Data;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
@Data
@Component
@ConfigurationProperties(prefix = "speech-config")
public class SpeechConfig implements InitializingBean {
public String accessKeyId;
public String accessKeySecret;
public String appKey;
@Override
public void afterPropertiesSet() throws Exception {
com.yeejoin.amos.speech.SpeechConfig.AccessKeyId = accessKeyId;
com.yeejoin.amos.speech.SpeechConfig.AccessKeySecret = accessKeySecret;
com.yeejoin.amos.speech.SpeechConfig.AppKey = appKey;
}
}
......@@ -6,6 +6,7 @@ import java.util.List;
import java.util.Set;
import com.alibaba.fastjson.JSON;
import com.yeejoin.amos.boot.biz.common.enums.RuleTypeEnum;
import com.yeejoin.amos.component.rule.config.ClazzUtils;
import com.yeejoin.amos.feign.rule.Rule;
import com.yeejoin.amos.feign.rule.client.RuleClient;
......@@ -265,6 +266,9 @@ public class RuleAlertCalledService {
if (alertCalledFormDto == null) {
return false;
}
//任务型计划 // bug 5973
alertCallePowerTransferRo.setCategory(RuleTypeEnum.任务型计划生成.getCategory());
AlertCalled alertCalled = alertCalledFormDto.getAlertCalled();
alertCallePowerTransferRo
.setCallTimeStr(DateUtils.convertDateToString(alertCalled.getCallTime(), DateUtils.DATE_TIME_PATTERN));
......
......@@ -299,6 +299,7 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
}
//为不影响其他业余 加一个判断 flag == null 是外部单位导入的隐患 == 1 是保存并提交按钮
if (flag.equals("1")){
param.setId(null); //如果是先保存草稿 在提交进来 将id重置为NULL走入判断
if (ValidationUtil.isEmpty(param.getId()) && !"draft".equals(latentDanger.getDangerState()) ) {
// 第一次保存隐患提交记录
LatentDangerFlowRecord inputRecord = saveFlowRecord(instance.getString("id"), "提交隐患", userId,
......
......@@ -1096,4 +1096,15 @@
</if>
</select>
<select id="selectCountByIotCode" resultType="int">
SELECT
count(*)
FROM
wl_equipment_specific_alarm
WHERE
iot_code = #{iotCode,jdbcType=VARCHAR}
AND equipment_specific_index_value = #{indexValue,jdbcType=VARCHAR}
AND equipment_specific_index_key = #{indexKey,jdbcType=VARCHAR}
and `status` = 1
</select>
</mapper>
\ No newline at end of file
......@@ -114,3 +114,8 @@ mybatis.interceptor.enabled = false
## 消防救援保障部ID
fire-rescue=1432549862557130753
#阿里云实时语音识别参数
speech-config.access-key-id=LTAI5t7mGN6dYoCwMdKiLTgt
speech-config.access-key-secret=0LYdEnvKzQxBg0lpIahDp5rzB2r4Dp
speech-config.app-key=EG5fJBBIqkNMj6bM
\ No newline at end of file
......@@ -85,7 +85,7 @@ class AppNslClientToken {
* @return token 访问token
*/
private static AccessToken getAccessToken() {
AccessToken accessToken = new AccessToken(SpeechConfig.AccessKeId, SpeechConfig.AccessKeySecret);
AccessToken accessToken = new AccessToken(SpeechConfig.AccessKeyId, SpeechConfig.AccessKeySecret);
try {
accessToken.apply();
logger.warn("获取到最新的token: " + accessToken.getToken() + ", 过期时间: " + accessToken.getExpireTime() + "(" + accessToken.getExpireTime() / (1000 * 60 * 60 * 24) + "天)");
......
......@@ -23,8 +23,8 @@ public class SpeechConfig {
/**
* 测试信息,可在阿里云上配置
*/
public static final String AccessKeId = "LTAI5t7mGN6dYoCwMdKiLTgt";
public static final String AccessKeySecret = "0LYdEnvKzQxBg0lpIahDp5rzB2r4Dp";
public static final String AppKey = "EG5fJBBIqkNMj6bM";
public static String AccessKeyId = "";
public static String AccessKeySecret = "";
public static String AppKey = "";
}
......@@ -69,7 +69,7 @@ public class SpeechRecognizer {
e.printStackTrace();
}
// 创建DefaultAcsClient实例并初始化
DefaultProfile profile = DefaultProfile.getProfile(REGIONID, SpeechConfig.AccessKeId, SpeechConfig.AccessKeySecret);
DefaultProfile profile = DefaultProfile.getProfile(REGIONID, SpeechConfig.AccessKeyId, SpeechConfig.AccessKeySecret);
this.client = new DefaultAcsClient(profile);
}
......
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