|
@@ -399,6 +399,14 @@ class ShouhuanCommand
|
|
|
'kind' => 'send',
|
|
|
'need_back' => 1,
|
|
|
],
|
|
|
+ 'KEYBRD' => [
|
|
|
+ 'content' => [
|
|
|
+ 'command' => 'KEYBRD',
|
|
|
+ 'is_open' => '',
|
|
|
+ ],
|
|
|
+ 'kind' => 'send',
|
|
|
+ 'need_back' => 1,
|
|
|
+ ],
|
|
|
//平台回复
|
|
|
'LK' => [
|
|
|
'content' => [
|
|
@@ -889,8 +897,15 @@ class ShouhuanCommand
|
|
|
*/
|
|
|
public function createbootoffcommand($facility_id, $device_id_code, $param, $sys_user_id)
|
|
|
{
|
|
|
- Log::write($param, 'shouhuan');
|
|
|
- $is_open = $param['is_open'];
|
|
|
+ $is_open = empty($param['is_open']) ? 0 : 1;
|
|
|
+
|
|
|
+ $fillfields = ['bootup_time', 'shutdown_time'];
|
|
|
+ foreach ($fillfields as $key => $value) {
|
|
|
+ if (!isset($param[$value]) || empty($param[$value])) {
|
|
|
+ throw new \Exception("BOOTOFF参数错误");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
$bootup_time = $param['bootup_time'];
|
|
|
$shutdown_time = $param['shutdown_time'];
|
|
|
$command = [
|
|
@@ -931,4 +946,20 @@ class ShouhuanCommand
|
|
|
$command = ['command' => 'CALL', 'content_arr' => ['command' => 'CALL', 'telno' => $telno]];
|
|
|
$this->createsendmsg($facility_id, $device_id_code, $command, [], $sys_user_id);
|
|
|
}
|
|
|
+ /**
|
|
|
+ * 拨号盘开关
|
|
|
+ *
|
|
|
+ * @param [type] $facility_id
|
|
|
+ * @param [type] $device_id_code
|
|
|
+ * @param [type] $telno
|
|
|
+ * @param [type] $sys_user_id
|
|
|
+ * @return void
|
|
|
+ * @author wj
|
|
|
+ * @date 2023-09-18
|
|
|
+ */
|
|
|
+ public function createkeybrdcommand($facility_id, $device_id_code, $is_open, $sys_user_id)
|
|
|
+ {
|
|
|
+ $command = ['command' => 'KEYBRD', 'content_arr' => ['command' => 'KEYBRD', 'is_open' => $is_open]];
|
|
|
+ $this->createsendmsg($facility_id, $device_id_code, $command, [], $sys_user_id);
|
|
|
+ }
|
|
|
}
|