基地经纬度

This commit is contained in:
chenbo 2024-02-03 16:49:06 +08:00
parent f8316e4238
commit 44b5724374
1 changed files with 6 additions and 0 deletions

View File

@ -20,6 +20,7 @@ use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\device\DeviceLists; use app\adminapi\lists\device\DeviceLists;
use app\adminapi\logic\device\DeviceLogic; use app\adminapi\logic\device\DeviceLogic;
use app\adminapi\validate\device\DeviceValidate; use app\adminapi\validate\device\DeviceValidate;
use app\common\model\device\Device;
use app\common\service\ConfigService; use app\common\service\ConfigService;
use app\common\service\storage\Driver as StorageDriver; use app\common\service\storage\Driver as StorageDriver;
use PhpOffice\PhpSpreadsheet\IOFactory; use PhpOffice\PhpSpreadsheet\IOFactory;
@ -132,6 +133,11 @@ class DeviceController extends BaseAdminController
{ {
$iccid = $this->request->param('iccid', ''); $iccid = $this->request->param('iccid', '');
$deviceId = $this->request->param('deviceId', ''); $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', [ $requestResponse = HttpClient::create()->request('GET', env('PROJECT.MQTT_PROJECT_URL'). 'api/xumu/device/query', [
'query' => ["iccid"=>$iccid, "deviceId"=>$deviceId], 'query' => ["iccid"=>$iccid, "deviceId"=>$deviceId],