Xiaopeng Zhang 3 mēneši atpakaļ
vecāks
revīzija
8c186ce75a
3 mainītis faili ar 1986 papildinājumiem un 40 dzēšanām
  1. 5 5
      loadmongo.py
  2. 2 2
      main.py
  3. 1979 33
      saveDE.ipynb

+ 5 - 5
loadmongo.py

@@ -2,7 +2,8 @@ import pymongo
 import pandas
 import json
 from pymongo import MongoClient
-client = MongoClient()
+uri2 = "mongodb://owner:Pheecian1@47.101.198.30:27017/dinge"
+client = MongoClient(uri2)
 db = client["dinge"]
 collection = db["de-collection"]
 from subdir import service
@@ -35,19 +36,18 @@ def handle_jx(jx):
     result["hj"] = jx["hj"]
     return result
 
-for post in collection.find({"zhuanye": "安装"}):
+for post in collection.find({"zhuanye": "修缮工程安装"}):
     
 
     
-
     
 
     print(post['DEBH'])
     
-    myquery = { "zhuanye": "安装",
+    myquery = { "zhuanye": "修缮工程安装",
                 "DEBH": post["DEBH"]
                 }
-    A1, A2, rg, jx, cl, bz_, A3 = service.getSingleDeXilie_az(post["DEBH"])
+    A1, A2, rg, jx, cl, bz_, A3 = service.getSingleDeXilie_xsaz(post["DEBH"])
     if bz_:
         bz = json.loads(bz_)
         mongo_bz = []

+ 2 - 2
main.py

@@ -986,7 +986,7 @@ async def upload(file: Annotated[UploadFile, File()], token: Annotated[str, Form
         string = content.decode('utf-8')
         await resolve(string, user)
         return [file.filename]
-    elif file.filename.endswith("jszf"):
+    elif file.filename.endswith("jszf") or file.filename.endswith("JSZF"):
         content = await file.read()
         string = content.decode('utf-8')
         root = ET.fromstring(string)
@@ -1066,4 +1066,4 @@ async def resolve(data, user):
 async def token(r : Info):
     token = manager.create_access_token(data=dict(sub=r.name), expires=timedelta(hours=12))
     return {'token' : token, 'token_type' : 'bearer'}
-    
+    

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1979 - 33
saveDE.ipynb


Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels