main
parent
fe54903d0e
commit
6c57ce1158
|
|
@ -484,7 +484,7 @@ class DeviceService extends BaseService
|
||||||
'type' => 1,
|
'type' => 1,
|
||||||
'content' => $msg,
|
'content' => $msg,
|
||||||
]);
|
]);
|
||||||
//编号,-todo
|
//编号
|
||||||
$httpClient = app(HttpClient::class);
|
$httpClient = app(HttpClient::class);
|
||||||
$httpClient->deviceDataDownlink($device->sn, 'switch_control', ['switch_state' => 1]);
|
$httpClient->deviceDataDownlink($device->sn, 'switch_control', ['switch_state' => 1]);
|
||||||
return ;
|
return ;
|
||||||
|
|
|
||||||
|
|
@ -136,12 +136,16 @@ class DeviceWarningService
|
||||||
if(strpos($column, ',')){//看是否是并联条件
|
if(strpos($column, ',')){//看是否是并联条件
|
||||||
$_columns = explode(',',$column);
|
$_columns = explode(',',$column);
|
||||||
foreach($_columns as $cc){
|
foreach($_columns as $cc){
|
||||||
$msg.= $fieldNameMap[$cc].'达到'.($log->$cc ?? 0).$fieldUnitMap[$cc].'值,且';
|
if(isset($fieldNameMap[$cc]) && isset($fieldUnitMap[$cc])){
|
||||||
|
$msg.= $fieldNameMap[$cc].'达到'.($log->$cc ?? 0).$fieldUnitMap[$cc].'值,且';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$msg = mb_substr($msg, 0, -2);
|
$msg = mb_substr($msg, 0, -2);
|
||||||
}else{
|
}else{
|
||||||
$msg = $fieldNameMap[$column].'达到'.($log->$column ?? 0).$fieldUnitMap[$column].'值';
|
if(isset($fieldNameMap[$column]) && isset($fieldUnitMap[$column])){
|
||||||
|
$msg = $fieldNameMap[$column].'达到'.($log->$column ?? 0).$fieldUnitMap[$column].'值';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$notices[] = [
|
$notices[] = [
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue