基地经纬度

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()
{
$iccid = $this->request->param('iccid');
$deviceId = $this->request->param('deviceId');
// 判断设备编码是否被使用
$device = Device::where('code', $deviceId)->find();
if ($device) {
return $this->fail('设备编码已被使用');
$iccid = $this->request->param('iccid', '');
$deviceId = $this->request->param('deviceId', '');
if (!$deviceId) {
// 判断设备编码是否被使用
$device = Device::where('code', $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],