liumiaomiao 1 săptămână în urmă
părinte
comite
1a0f3f2479

+ 8 - 0
.gitignore

@@ -7,6 +7,14 @@ node_modules/
 # 忽略所有 .tmp 和 .temp 文件
 *.tmp
 *.temp
+*.out
+*.out
+*.out
+*.out
+*.out
+*.out
+*.out
+*.out
 
 # 忽略 macOS 系统文件
 .DS_Store

+ 24 - 7
app.py

@@ -3,7 +3,7 @@ import inspect
 import csv
 from pymongo import MongoClient
 from docs.config import abnormal_config
-from tables.fields.winner import WinnerChecker
+from tables.fields.s_winner import WinnerChecker
 from tables.fields.buyer import BuyerChecker
 from tables.fields.bidamount import BidAmountChecker
 from tables.fields.budget import BudgetChecker
@@ -260,7 +260,7 @@ if __name__ == '__main__':
     "autoid" : int(249351001), 
     # "bidamount" : 1034.1111,
     "bidway" : "电子投标", 
-    # "budget" : None,
+    "budget" : 30.0,
     "supervisorrate": 0.03,
     "buyer" : "哈密市伊州区花园乡人民政府",
     "buyerclass" : "医疗", 
@@ -277,7 +277,7 @@ if __name__ == '__main__':
     "purchasing_tag" : "台式计算机,计算机,摄像头,液晶显示器,DR,M9,液晶,4G", 
     "s_subscopeclass" : "信息技术_其他,行政办公_通用办公设备", 
     "s_topscopeclass" : "行政办公,信息技术", 
-    "s_winner" : "二连浩特市智慧真彩文体办公院院",
+    "s_winner" : "玖宸(北京)科技有限公司",
     "subscopeclass" : [
         "信息技术_其他", 
         "行政办公_通用办公设备"
@@ -557,12 +557,29 @@ if __name__ == '__main__':
     # #     }
     # })
     result = check(row, rules={
-        "entname": {
+        "s_winner": {
+            "0103": {
+                "name": "包含叠词,异常词汇,特殊词汇",
+                "parent_name": "名称错误",
+                "parent_code": "01"
             },
-        "price": {
-        },
-        "sort": {
+            "0104": {
+                "name": "中标单位包含采购单位",
+                "parent_name": "名称错误",
+                "parent_code": "01"
+            },
+            "0301": {
+                "name": "中标单位名称长度<3",
+                "parent_name": "名称长度异常错误",
+                "parent_code": "03"
+            }
         },
+        # "entname": {
+        #     },
+        # "price": {
+        # },
+        # "sort": {
+        # },
         # "city": {
         #     "0302": {
         #         "name": "城市不在[3,11]个字之间",

+ 2 - 1
client_mongo_mysql_liantong.py

@@ -113,10 +113,11 @@ def batch_load_data():
     conn = MysqlUtil.connect_to_mysql(host='172.20.45.129', port='4000', user='root', password='=PDT49#80Z!RVv52_z',database='quality')
 
     max_id = ObjectId("0" * 24)
-    # max_id = ObjectId("655ec5609aed6eb2ffa654ca")
+    # max_id = ObjectId("6881072ff0c6ad8b095d808e")
     # 查询条件:_id >= max_id, appid匹配,且 createtime 在 [start_date, end_date] 之间
     query = {
         "_id": {"$gte": max_id},
+        # "_id": max_id,
         "appid": "jyGQ1XQQsEAwNeSENOFR9D",
         "createtime": {"$gte": start_date, "$lte": end_date}
     }

BIN
tables/fields/__pycache__/winner.cpython-37.pyc


+ 0 - 8
tables/fields/budget.py

@@ -1,8 +1,6 @@
 """
     预算金额字段检查
 """
-
-
 class BudgetChecker(object):
     """
         预算字段检查
@@ -94,9 +92,3 @@ class BudgetChecker(object):
             return True
         return False
 
-    @staticmethod
-    def check0401(budget: float, bidamount: float) -> bool:
-        """
-        预算金额 < 中标金额,视为异常
-        :return: 返回true 代表异常
-        """

+ 0 - 0
tables/fields/winner.py → tables/fields/s_winner.py