Merge remote-tracking branch 'origin/main'

This commit is contained in:
谷成伟 2024-11-04 10:34:01 +08:00
commit 78de9ba29b
6 changed files with 16 additions and 13 deletions

View File

@ -385,19 +385,19 @@ public class TDEngineService {
for (DeviceEventInfo dv : list) {
sb.append("E_");
sb.append(dv.getDeviceId());
sb.append(" using event_info tags (");
sb.append(" using event_info tags ('");
sb.append(dv.getDeviceCode());
sb.append(",");
sb.append("','");
sb.append(dv.getDeviceName());
sb.append(") values (");
sb.append("') values (");
sb.append(dv.getUpdateTime());
sb.append(",");
sb.append(dv.getEventId());
sb.append(",");
sb.append(dv.getEventLevel());
sb.append(",");
sb.append(",'");
sb.append(dv.getEventText());
sb.append(",");
sb.append("',");
sb.append(dv.getConfirmed());
sb.append(",");
sb.append(dv.getConfirmAccount());

View File

@ -307,8 +307,7 @@ public class NodeMessageServiceImpl implements NodeMessageService {
deviceEventInfo.setDeviceName(deviceInfoCache.getDeviceName());
deviceEventInfo.setDeviceCode(deviceInfoCache.getDeviceCode());
String eventType = getEventType(item.getEventType());
String model = dataService.iotModelMap.get(item.getDeviceId());
log.info("物模型缓存{}",dataService.iotModelMap);
String model = dataService.deviceModelMap.get(item.getDeviceId());
if (StringUtils.isEmpty(model)){
log.debug("未查询到物模型code设备id{}",item.getDeviceId());
}

View File

@ -15,7 +15,7 @@ export const getBelongLineListReq = () => {
}
export const runAirBlowerReq = (data: (CommandReqType & { measType: 199 | 147 | 146 | 138 | 139 | 140 })[]) => {
return createAxios({
return createAxios<unknown,Promise<{code:number,msg:string,success:boolean}>>({
url: '/api/page/turbines/windTurbinesControl',
method: 'post',
data: data

View File

@ -1375,7 +1375,7 @@ const sendCommand = (type: 'setTurbineFastStart' | 'setTurbineStop' | 'setTurbin
type: 'warning',
}).then(() => {
const serviceName = sendTypeEnum[type]
const optDesc = serviceName + 1
const optDesc = serviceName + ',设定值为1'
sendCommandReq({
deviceId: route.query.irn as string,
serviceCode: type,
@ -1403,7 +1403,7 @@ const sendManualCommand = (type: 1 | 0) => {
deviceId: route.query.irn as string,
serviceCode: 'Locked',
serviceName,
optDesc: serviceName + type,
optDesc: serviceName +',设定值为:'+ type,
opValue: type,
}).then((res) => {
if (res.code == 200) {

View File

@ -246,7 +246,7 @@ const airBlowerOperate = (type: 'setTurbineFastStart' | 'setTurbineStop' | 'setT
deviceId: item,
serviceName: sendTypeEnum[type],
serviceCode: type,
optDesc: sendTypeEnum[type] + 1,
optDesc: sendTypeEnum[type] +',设定值为:'+ 1,
opValue: 1 as const,
measType: 147 as const,
}
@ -255,8 +255,12 @@ const airBlowerOperate = (type: 'setTurbineFastStart' | 'setTurbineStop' | 'setT
runAirBlowerReq(data).then((res) => {
console.log(res);
if(res.success){
ElMessage.success('指令发送成功')
}
// ElMessage.success('')
}).catch(()=>{
ElMessage.error('操作失败')
})
}

View File

@ -192,7 +192,7 @@ const sendValue = (data: { serviceCode: string; opValue: number }, type: 146 | 1
type === 146
? deviceServiceType146List.value.find((item) => item.value === val.serviceCode)?.label
: deviceServiceType147List.value.find((item) => item.value === val.serviceCode)?.label
val.optDesc = val.serviceName + val.opValue
val.optDesc = val.serviceName +',设定值为:'+ val.opValue
sendCommandReq(val)
.then((res) => {
console.log(res)