|
|
|
|
@ -61,6 +61,7 @@ class PointService:
|
|
|
|
|
if obj:
|
|
|
|
|
if cat == 'Подъезд жилого дома':
|
|
|
|
|
objs = obj.all()
|
|
|
|
|
total+=objs.count()-1
|
|
|
|
|
else:
|
|
|
|
|
objs = [obj.first()]
|
|
|
|
|
for o in objs:
|
|
|
|
|
@ -84,8 +85,8 @@ class PointService:
|
|
|
|
|
models.PrePlacementPointPVZDistance.objects.get_or_create(placement_point=pre_obj,
|
|
|
|
|
pvz_postamates_group=d.pvz_postamates_group,
|
|
|
|
|
dist=d.dist)
|
|
|
|
|
matched += 1
|
|
|
|
|
|
|
|
|
|
matched += 1
|
|
|
|
|
elif not rayon:
|
|
|
|
|
models.PrePlacementPoint.objects.get_or_create(street=response.get('street'),
|
|
|
|
|
house_number=response.get('houseNumber'),
|
|
|
|
|
@ -104,6 +105,7 @@ class PointService:
|
|
|
|
|
house_number=response.get('houseNumber')).values().first()
|
|
|
|
|
house.pop('id')
|
|
|
|
|
if house.get('doors') and house.get('doors') > 1:
|
|
|
|
|
total+=house.get('doors')-1
|
|
|
|
|
house['flat_cnt'] = int(house['flat_cnt'] / house['doors'])
|
|
|
|
|
for _num in range(house['doors']):
|
|
|
|
|
models.PrePlacementPoint.objects.get_or_create(address=addr,
|
|
|
|
|
|