基地经纬度

This commit is contained in:
chenbo 2024-02-03 16:52:07 +08:00
parent 45416d0834
commit da0e31cf53
1 changed files with 9 additions and 6 deletions

View File

@ -131,13 +131,16 @@ class DeviceController extends BaseAdminController
public function queryDeviceIccid() public function queryDeviceIccid()
{ {
$iccid = $this->request->param('iccid'); $iccid = $this->request->param('iccid', '');
$deviceId = $this->request->param('deviceId'); $deviceId = $this->request->param('deviceId', '');
if (!$deviceId) {
// 判断设备编码是否被使用 // 判断设备编码是否被使用
$device = Device::where('code', $deviceId)->find(); $device = Device::where('code', $deviceId)->find();
if ($device) { if ($device) {
return $this->fail('设备编码已被使用'); 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],