4 Commits e18e323dbe ... f2508f1b1d

Tác giả SHA1 Thông báo Ngày
  yzl f2508f1b1d update 5 ngày trước cách đây
  林轩 e18e323dbe 更新数据库信息 5 ngày trước cách đây
  林轩 e17b62f3bc Merge branch 'master' of http://code.nyzhwlw.com:10202/yf_fyh/bigdataAPI 5 ngày trước cách đây
  林轩 53ccbfba34 修改成景安的服务器 5 ngày trước cách đây

+ 1 - 1
apps/Equipment/men_tou_gou.py

@@ -28,7 +28,7 @@ def get_device(device_type=None):
 def get_table():
     passwd = parse.quote_plus("yfkj@6020")
     user = parse.quote_plus("root")
-    myclient = pymongo.MongoClient("mongodb://{0}:{1}@192.168.4.52:27017/".format(user,passwd))
+    myclient = pymongo.MongoClient("mongodb://{0}:{1}@8.136.98.49:57017/".format(user,passwd))
     return myclient
 
 

+ 2 - 2
crond_script/cbd_analysis.py

@@ -107,6 +107,6 @@ def get_cbd_data(devices, start, end):
 
 if __name__ == '__main__':
     devices = device_info(f"{BASE_DIR}/crond_script/find_query.xlsx")
-    get_cbd_data(devices, "2024-01-01", "2024-12-31")
+    get_cbd_data(devices, "2023-01-01", "2023-12-31")
     # init_henan_addr()
-    
+    

+ 1 - 1
crond_script/ct_cbd.py

@@ -15,7 +15,7 @@ from apps.DeviceCount.models import CbdPhoto
 user = parse.quote_plus("root")
 passwd = parse.quote_plus("yfkj@6020")
 # 账号密码方式连接MongoDB | "mongodb://用户名:密码@公网ip:端口/"
-myclient = pymongo.MongoClient("mongodb://{0}:{1}@192.168.4.52:27017/".format(user,passwd))
+myclient = pymongo.MongoClient("mongodb://{0}:{1}@8.136.98.49:57017/".format(user,passwd))
 db = myclient.smartfarming
 device = db.sa_device
 cbdphoto_a_collection = db.sa_device_cbdphoto

+ 2 - 2
crond_script/nd_qxz_data.py

@@ -18,7 +18,7 @@ from apps.PestAnalysis.models import EnvTempHum, HeNanAddr
 def bigata_mongo():
     user = parse.quote_plus("root")
     passwd = parse.quote_plus("yfkj@6020")
-    myclient = pymongo.MongoClient("mongodb://{0}:{1}@192.168.4.52:27017".format(user,passwd))
+    myclient = pymongo.MongoClient("mongodb://{0}:{1}@8.136.98.49:57017/".format(user,passwd))
     return myclient
 
 def device_aggrate():
@@ -175,4 +175,4 @@ def main(start_y, end_y):
 
 
 if __name__ == '__main__':
-    main(2024, 2025)
+    main(2023, 2024)

+ 1 - 1
crond_script/server_weather.py

@@ -79,7 +79,7 @@ def main():
         try:
             time_out_k = False 
             print(server_day_obj.cityid)
-            server_day_url = f"http://v1.yiketianqi.com/api?unescape=1&version=v91&appid=69334222&appsecret=2ME6U58N&cityid={server_day_obj.cityid}&ext=hours,aqi,life"
+            server_day_url = f"http://gfeljm.tianqiapi.com/api?unescape=1&version=v91&appid=69334222&appsecret=2ME6U58N&cityid={server_day_obj.cityid}&ext=hours,aqi,life"
             server_day_response = requests.get(server_day_url, headers=headers, timeout=10)
             server_ct += 1
         

+ 1 - 1
crond_script/today_weather.py

@@ -97,7 +97,7 @@ def main():
         try:        
             time_out = False 
             print(day_obj.cityid)
-            today_url = f"http://v1.yiketianqi.com/api?unescape=1&version=v62&appid=69334222&appsecret=2ME6U58N&cityid={day_obj.cityid}"
+            today_url = f"http://gfeljm.tianqiapi.com/api?unescape=1&version=v62&appid=69334222&appsecret=2ME6U58N&cityid={day_obj.cityid}"
             today_response = requests.get(today_url, headers=headers, timeout=10)
             if today_response.status_code == 200:
                 today_data = json.loads(today_response.text)

+ 4 - 4
formal.json

@@ -12,14 +12,14 @@
         "url": "redis://:yfkj1234@localhost:6379/12"
 	},
 	"bigdatamysql": {
-		"host": "192.168.4.53",
-		"port": 3306,
+		"host": "8.136.98.49",
+		"port": 61882,
 		"user": "root",
 		"pwd": "yfkj@6020"
 	},
 	"bigdatamongo": {
-		"host": "192.168.4.52",
-		"port": 27017,
+		"host": "8.136.98.49",
+		"port": 57017,
 		"user": "root",
 		"pwd": "yfkj@6020"
 	},