|
@@ -118,6 +118,13 @@ def get_next_job(db,repeat=False,repkw=None,repnum=None):
|
|
|
result['num']=c['num']
|
|
|
break
|
|
|
|
|
|
+ cursor = db.query('select lat,lon,loc from lat_lon_loc where num ="'+str(result['num'])+'"')
|
|
|
+ for c in cursor:
|
|
|
+ result['lat']=c['lat']
|
|
|
+ result['lon']=c['lon']
|
|
|
+ result['loc']=c['loc']
|
|
|
+ break
|
|
|
+
|
|
|
if repeat:
|
|
|
result['kw']=repkw
|
|
|
result['num']=repnum
|
|
@@ -135,19 +142,13 @@ def get_next_job(db,repeat=False,repkw=None,repnum=None):
|
|
|
return result
|
|
|
|
|
|
|
|
|
- cursor = db.query('select lat,lon,loc from lat_lon_loc where num ="'+str(result['num'])+'"')
|
|
|
- for c in cursor:
|
|
|
- result['lat']=c['lat']
|
|
|
- result['lon']=c['lon']
|
|
|
- result['loc']=c['loc']
|
|
|
- break
|
|
|
|
|
|
- if repeat:
|
|
|
+# if repeat:
|
|
|
|
|
|
- cursor = db.query('select lat_txt,lon_txt from swire_store_list where num ="'+str(result['num'])+'" and keyword="'+result['kw']+'" order by rand() limit 1')
|
|
|
- for c in cursor:
|
|
|
- result['lat']=c['lat_txt']
|
|
|
- result['lon']=c['lon_txt']
|
|
|
+# cursor = db.query('select lat_txt,lon_txt from swire_store_list where num ="'+str(result['num'])+'" and keyword="'+result['kw']+'" order by rand() limit 1')
|
|
|
+# for c in cursor:
|
|
|
+# result['lat']=c['lat_txt']
|
|
|
+# result['lon']=c['lon_txt']
|
|
|
|
|
|
return result
|
|
|
|