From eab2a294389e57bdcdbce07acbd32de2337e3312 Mon Sep 17 00:00:00 2001 From: vine_liutk <961510893@qq.com> Date: Mon, 17 Jul 2023 12:07:08 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Console/Commands/MqttPenwuPlan.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Console/Commands/MqttPenwuPlan.php b/app/Console/Commands/MqttPenwuPlan.php index 05fe193..028b3bd 100644 --- a/app/Console/Commands/MqttPenwuPlan.php +++ b/app/Console/Commands/MqttPenwuPlan.php @@ -39,6 +39,7 @@ class MqttPenwuPlan extends Command //获取所有喷雾监控点,对应的自动喷雾配置 $deviceList = Device::where('type', Device::TYPE_ATOMIZING)->get(); $time = now()->format('H:i');//获取当前时间(时,分) + // $time = '01:00'; foreach($deviceList as $device){ $_config = $device->extends ?? []; if($_config && $_config['is_enable']){//判断该配置是否开启 @@ -46,7 +47,7 @@ class MqttPenwuPlan extends Command list($start, $end) = explode(',', $item['time_zone']); //决定开启,关闭, if($time == $start){//相等 - //如果当前对应位置已开启,则不作为 + // 如果当前对应位置已开启,则不作为 if( ($item['value'] == 'a' && $status['yv1'] == 0) ||($item['value'] == 'b' && $status['yv2'] == 0)