feat: 落实决策216/219/227取价锚点与公式口径,增加商业版权益和源码完整性校验

This commit is contained in:
lianjianwei2024
2026-10-27 12:16:47 +08:00
parent 5d9eaf774b
commit 380a39f8db
36 changed files with 18821 additions and 879 deletions

View File

@@ -177,8 +177,8 @@ def test_norm_qty_gcl_formula(server):
r = edit("GCL*(5+9.25+6.36)+GCL") # 0.503*20.61 + 0.503 = 10.86983
assert r["ok"] is True and abs(r["quantity"] - 10.86983) < 1e-9, r
assert row()[0] is None and row()[1] == "GCL*(5+9.25+6.36)+GCL"
r = edit("GCL*GCL") # 0.503² = 0.253009
assert r["ok"] is True and abs(r["quantity"] - 0.253009) < 1e-9, r
r = edit("GCL*GCL") # 决策 216:GCL=清单原值 5.03,结果整体÷10 → 25.3009/10 = 2.53009
assert r["ok"] is True and abs(r["quantity"] - 2.53009) < 1e-9, r
# 纯字母单位 → GCL=清单工程量
con = sqlite3.connect(server["sessdb"])
con.execute("UPDATE s_norms SET Unit='t' WHERE id=?", (norm_id,))