Xiaopeng Zhang 4 mesi fa
parent
commit
99c0e8ffb0
1 ha cambiato i file con 6 aggiunte e 3 eliminazioni
  1. 6 3
      specialdetection.py

+ 6 - 3
specialdetection.py

@@ -9,7 +9,7 @@ from pymongo import MongoClient
 client = MongoClient()
 client2 = MongoClient()
 db = client["baojia"]
-collection = db["qdxm"]
+collection = db["Djcs"]
 
 def clean(debh):
     if "附注" in debh:
@@ -26,7 +26,10 @@ def clean(debh):
     return debh
 async def main():
     
-    for post in collection.find({"biao_id": '689c49e092a763b02ec38603', 'Dwgcbh': '006'}):##total 006
+    for post in collection.find({"biao_id": '68a44e464966105da88382d4'}):##total 006
+        ##print(post)
+        if not "__children" in post:
+            continue
         for entry in (post['__children']):
         ##print(entry['清单编码'])
             cleaned = clean(entry['清单编码'])
@@ -34,7 +37,7 @@ async def main():
             if cleaned.startswith("D"):
                 continue
             dercj = (entry['dercj'])
-            A1, A2, rg, jx, cl, A6, A7, zhuanye = await dbservice.getSingleDeXilie_(model, client2, 10, cleaned, post['bt'] + " " + entry['名称'])
+            A1, A2, rg, jx, cl, A6, A7, zhuanye = await dbservice.getSingleDeXilie_(model, client2, 10, cleaned,  entry['名称'])
             
             if A1 == None:
                 if  '-F' in cleaned  :