作者 董瑞恩
1 个管道 的构建 通过 耗费 0 秒

interface

... ... @@ -164,6 +164,12 @@ class AdminEquipmentController extends AdminBaseController{
'create_time' => time()
];
$data['qr_code'] = $this->createQrCode($data['name']);
//查询设备是否已存在
$is_equipment=Db::name('equipment')->where(['name'=>$data['name'],'is_delete'=>0])->count();
if (!empty($is_equipment)){
echo "第" . $j . "行".$data['name']."的设备已存在!<br/>";
continue;
}
$Equipment=new EquipmentModel();
try{
$Equipment->save($data);
... ...