基地经纬度
This commit is contained in:
parent
f8316e4238
commit
44b5724374
|
@ -20,6 +20,7 @@ use app\adminapi\controller\BaseAdminController;
|
|||
use app\adminapi\lists\device\DeviceLists;
|
||||
use app\adminapi\logic\device\DeviceLogic;
|
||||
use app\adminapi\validate\device\DeviceValidate;
|
||||
use app\common\model\device\Device;
|
||||
use app\common\service\ConfigService;
|
||||
use app\common\service\storage\Driver as StorageDriver;
|
||||
use PhpOffice\PhpSpreadsheet\IOFactory;
|
||||
|
@ -132,6 +133,11 @@ class DeviceController extends BaseAdminController
|
|||
{
|
||||
$iccid = $this->request->param('iccid', '');
|
||||
$deviceId = $this->request->param('deviceId', '');
|
||||
// 判断设备编码是否被使用
|
||||
$device = Device::where('sn', $deviceId)->find();
|
||||
if ($device) {
|
||||
return $this->fail('设备编码已被使用');
|
||||
}
|
||||
$requestResponse = HttpClient::create()->request('GET', env('PROJECT.MQTT_PROJECT_URL'). 'api/xumu/device/query', [
|
||||
'query' => ["iccid"=>$iccid, "deviceId"=>$deviceId],
|
||||
|
||||
|
|
Loading…
Reference in New Issue