From 8373f3c80858bedc3bdb57239780d85dae10bced Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E5=89=8D=E6=98=8E?= <909355014@qq.com> Date: Wed, 21 Sep 2022 19:09:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BB=E6=81=AF=20=E7=BB=8F=E7=BA=AC?= =?UTF-8?q?=E8=BD=AC=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/am/tasks.py | 2 +- apps/ecm/service.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/am/tasks.py b/apps/am/tasks.py index 4cae456e..67374376 100644 --- a/apps/am/tasks.py +++ b/apps/am/tasks.py @@ -15,7 +15,7 @@ def cache_areas_info(): for i in Area.objects.filter(is_hidden=False).exclude(third_info__xx_rail=None).order_by('number'): points = [] for item in i.third_info['xx_rail']['detail']['polygon']['points']: - points.append((item['x'], item['y'])) + points.append((item['longitude'], item['latitude'])) area_dict = { 'id': i.id, 'type': i.type, diff --git a/apps/ecm/service.py b/apps/ecm/service.py index 8465c258..f22f1280 100644 --- a/apps/ecm/service.py +++ b/apps/ecm/service.py @@ -456,7 +456,7 @@ def loc_change(data): ep_loc_dict['time2'] = int(time.time()) ep_loc_dict['xx_detail'] = data - area_fix, area_temp = get_area_from_point(data['xMillimeter'], data['yMillimeter'], data['floorNo']) + area_fix, area_temp = get_area_from_point(data['longitude'], data['latitude'], data['floorNo']) time2 = int(time.time()) ep_loc_dict['area_temp_id'] = area_temp['id'] if area_temp else None ep_loc_dict['time2'] = time2