develop
parent
101bb2c632
commit
eab2a29438
|
|
@ -39,6 +39,7 @@ class MqttPenwuPlan extends Command
|
||||||
//获取所有喷雾监控点,对应的自动喷雾配置
|
//获取所有喷雾监控点,对应的自动喷雾配置
|
||||||
$deviceList = Device::where('type', Device::TYPE_ATOMIZING)->get();
|
$deviceList = Device::where('type', Device::TYPE_ATOMIZING)->get();
|
||||||
$time = now()->format('H:i');//获取当前时间(时,分)
|
$time = now()->format('H:i');//获取当前时间(时,分)
|
||||||
|
// $time = '01:00';
|
||||||
foreach($deviceList as $device){
|
foreach($deviceList as $device){
|
||||||
$_config = $device->extends ?? [];
|
$_config = $device->extends ?? [];
|
||||||
if($_config && $_config['is_enable']){//判断该配置是否开启
|
if($_config && $_config['is_enable']){//判断该配置是否开启
|
||||||
|
|
@ -46,7 +47,7 @@ class MqttPenwuPlan extends Command
|
||||||
list($start, $end) = explode(',', $item['time_zone']);
|
list($start, $end) = explode(',', $item['time_zone']);
|
||||||
//决定开启,关闭,
|
//决定开启,关闭,
|
||||||
if($time == $start){//相等
|
if($time == $start){//相等
|
||||||
//如果当前对应位置已开启,则不作为
|
// 如果当前对应位置已开启,则不作为
|
||||||
if(
|
if(
|
||||||
($item['value'] == 'a' && $status['yv1'] == 0)
|
($item['value'] == 'a' && $status['yv1'] == 0)
|
||||||
||($item['value'] == 'b' && $status['yv2'] == 0)
|
||($item['value'] == 'b' && $status['yv2'] == 0)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue