فهرست منبع

support_azfy_in_djcs

Xiaopeng Zhang 5 ماه پیش
والد
کامیت
1e3e3b8101
2فایلهای تغییر یافته به همراه9 افزوده شده و 4 حذف شده
  1. 1 1
      README
  2. 8 3
      subdir/db.py

+ 1 - 1
README

@@ -28,7 +28,7 @@ JD_PeiBiF 表很有用,它可以用来找一个材料的组成。
 公式 比如 [1-274]*2 没必要支持,完全可以改数量(fixed)
 附注 小众情况还不支持Debm="17-177附注2*-1附注3*-1"
 材料甲供标志是有用的,这个还没处理,招标工程量清单里面会有发包人供应材料,会有编号和价格,但是数量是零,套完定额才能知道
-需要人材机汇总后一并处理下甲供材,把量拿到,把总价算好
+需要人材机汇总后一并处理下甲供材,把量拿到,把总价算好(fixed)
 
 
 钢筋工程,铁件制作,铁件安装的定额有意思5-28

+ 8 - 3
subdir/db.py

@@ -1318,9 +1318,14 @@ async def getQdmx(client, name, bh, bt):
     db = client["baojia"]
     collection = db["qdxm"]
     result = []
-    async for post in collection.find({'biao_id': name, "Dwgcbh": bh, "bt": bt}):
-        del post["_id"]
-        result.append(post)
+    if bt == 'ALL':
+        async for post in collection.find({'biao_id': name, "Dwgcbh": bh,}):
+            del post["_id"]
+            result.append(post)
+    else:
+        async for post in collection.find({'biao_id': name, "Dwgcbh": bh, "bt": bt}):
+            del post["_id"]
+            result.append(post)
     return result