feat(device): 新增阿里云语音通知功能并扩展设备查询接口

- 集成阿里云语音服务,实现TTS语音拨号功能
- 添加异步报警拨号机制,支持SOS紧急呼叫
- 新增按设备名称查询设备的接口和SQL
- 扩展设备类型统计和批量查询功能
- 添加租户ID字段支持多租户设备管理
- 配置阿里云语音API依赖和客户端单例模式
This commit is contained in:
2026-01-30 16:03:13 +08:00
parent b280038502
commit cb87871982
7 changed files with 210 additions and 1 deletions

View File

@ -140,6 +140,18 @@
<version>3.3.1</version>
</dependency>
<!-- 电话语音通知 -->
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>dyvmsapi20170525</artifactId>
<version>4.2.0</version>
</dependency>
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>tea-openapi</artifactId>
<version>0.3.2</version>
</dependency>
<!-- fastjson2 -->
<dependency>
<groupId>com.alibaba.fastjson2</groupId>

View File

@ -54,6 +54,9 @@ public class DeviceForm {
@Schema(title = "备注")
private String remark;
@Schema(title = "商户号")
private Long tenant_id;
// 设备类型相关字段
@Schema(title = "设备类型名称")

View File

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuyuanshen.equipment.domain.Device;
import com.fuyuanshen.equipment.domain.dto.InstructionRecordDto;
import com.fuyuanshen.equipment.domain.form.DeviceForm;
import com.fuyuanshen.equipment.domain.query.DeviceQueryCriteria;
import com.fuyuanshen.equipment.domain.vo.*;
import org.apache.ibatis.annotations.Mapper;
@ -148,4 +149,10 @@ public interface DeviceMapper extends BaseMapper<Device> {
*/
int countByDeviceTypeId(@Param("deviceTypeId") Long deviceTypeId);
List<Map<String, Object>> GetDeviceByName(DeviceForm deviceForm);
int getEquipCountByType(DeviceForm deviceForm);
List<Map<String,Object>> getEquipAllByType(DeviceForm deviceForm);
}

View File

@ -264,6 +264,44 @@
</if>
</select>
<select id="GetDeviceByName" resultType="map" >
select a.id,
a.device_type,
a.device_name,
a.device_mac,
a.type_name,
a.bluetooth_name,
a.device_imei
from device a
<where>
a.tenant_id = #{tenant_id} and
a.device_type = #{deviceType}
AND (
a.device_name=#{deviceName} or
a.bluetooth_name=#{deviceName}
)
</where>
</select>
<select id="getEquipCountByType" resultType="int">
select count(1) cnt
from device a
<where>
a.tenant_id = #{tenant_id} and
a.device_type = #{deviceType}
</where>
</select>
<select id="getEquipAllByType" resultType="map">
select device_mac,bluetooth_name,device_name
from device a
<where>
a.tenant_id = #{tenant_id} and
a.device_type = #{deviceType}
</where>
</select>
<!-- 获取分配设备的客户 -->
<select id="getAssignCustomer" resultType="com.fuyuanshen.equipment.domain.Device">
SELECT *