<?php
/** 仅启用既有设备菜单，不导入业务数据、不改变点检表结构。 */
if(PHP_SAPI!=='cli')exit;
$root=$argv[1]??'D:/phpstudy_pro/WWW/cqoms.com';
require $root.'/vendor/autoload.php';$app=new \think\App($root.'/');$app->initialize();
$q=\think\facade\Db::name('admin_menus')->where('menu_key','production.equipment');
if((clone $q)->find())$q->update(['enabled'=>1,'title'=>'设备点检基础数据','updated_at'=>time()]);
else \think\facade\Db::name('admin_menus')->insert(['menu_key'=>'production.equipment','parent_key'=>'production','title'=>'设备点检基础数据','icon'=>'Document','sort_order'=>20,'enabled'=>1,'updated_at'=>time()]);
echo "Machine check menu enabled. No business records imported.\n";
