From c7b6f5be3e5850bbf66db5363e634c57ff9ca876 Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期二, 28 三月 2023 15:32:24 +0800
Subject: [PATCH] 评分机制调整

---
 code_nature_analyse.py |   34 +++++++++++++---------------------
 1 files changed, 13 insertions(+), 21 deletions(-)

diff --git a/code_nature_analyse.py b/code_nature_analyse.py
index ac3e760..a0fb430 100644
--- a/code_nature_analyse.py
+++ b/code_nature_analyse.py
@@ -63,37 +63,29 @@
     p4 = __is_near_new_top(limit_up_price, record_datas)
     p5 = __is_n_model(record_datas)
     p6 = __is_v_model(record_datas)
-    # N瀛楀瀷鍖呭惈浜哊瀛楀瀷
-    if p5:
-        p6 = False, ''
-    return (p1, p2, p3, p4, p5, p6)
+
+    # # N瀛楀瀷鍖呭惈浜哊瀛楀瀷
+    # if p5:
+    #     p6 = False, ''
+
+    p7 = (p1[0] or p2[0] or p3[0] or p4[0] or p5[0] or p6[0], '')
+
+    return p1, p2, p3, p4, p5, p6, p7
 
 
 # 鏄惁鍏锋湁K绾垮舰鎬�
 def is_has_k_format(limit_up_price, record_datas):
-    is_too_high, is_new_top, is_lowest, is_near_new_top, is_n, is_v = get_k_format(float(limit_up_price), record_datas)
-
-    # if is_too_high:
-    #     return False, "15涓氦鏄撴棩娑ㄥ箙澶т簬24.9%"
-    # if is_near_new_top:
-    #     return False, "閫艰繎鍓嶉珮"
-    if is_new_top:
-        return True, "鐮村墠楂�"
-    if is_lowest:
-        return True, "瓒呰穼琛ユ定"
-    if is_n:
-        return True, "N瀛楀瀷"
-    if is_v:
-        return True, "V瀛楀舰"
-    return False, "涓嶆弧瓒矺绾垮舰鎬�"
-
+    is_too_high, is_new_top, is_lowest, is_near_new_top, is_n, is_v, has_format = get_k_format(float(limit_up_price), record_datas)
+    if not has_format:
+        return False, "涓嶆弧瓒矺绾垮舰鎬�"
+    return True, "鏈夊舰鎬�"
 
 # 鑾峰彇鑲℃��
 # 杩斿洖锛堟槸鍚︽定鍋滐紝棣栨澘婧环鐜囨槸鍚﹀ぇ浜�0.6锛�
 def get_nature(record_datas):
     limit_up = is_have_limit_up(record_datas)
     premium_rate = get_limit_up_premium_rate(record_datas)
-    result = (limit_up, premium_rate >= 0.6,premium_rate)
+    result = (limit_up, premium_rate >= 0.6, premium_rate)
 
     return result
 

--
Gitblit v1.8.0