feat(adopt): 决策273 单价行 Total 采纳逻辑迁回 API 侧并调整 x_side 读取
This commit is contained in:
@@ -28,7 +28,7 @@ def _mk():
|
||||
sc.row_factory = sqlite3.Row
|
||||
c = sc.cursor()
|
||||
c.execute("""CREATE TABLE s_bills(id INTEGER PRIMARY KEY, session_id INT, uw_id INT, x_tdel INTEGER DEFAULT 0)""")
|
||||
c.execute("""CREATE TABLE s_norms(id INTEGER PRIMARY KEY, bill_id INT, x_tdel INTEGER DEFAULT 0)""")
|
||||
c.execute("""CREATE TABLE s_norms(id INTEGER PRIMARY KEY, bill_id INT, x_tdel INTEGER DEFAULT 0, x_side TEXT)""")
|
||||
c.execute("""CREATE TABLE s_norm_res(id INTEGER PRIMARY KEY, norm_id INT, res_code TEXT, qty REAL)""")
|
||||
c.execute("""CREATE TABLE s_lme_res(id INTEGER PRIMARY KEY, session_id INT,
|
||||
p_code TEXT, res_code TEXT, qty REAL, seq INTEGER, name TEXT)""")
|
||||
@@ -44,7 +44,7 @@ def _mk():
|
||||
c.execute("""CREATE TABLE s_settings(scope TEXT NOT NULL, k TEXT NOT NULL, v TEXT,
|
||||
PRIMARY KEY(scope,k))""")
|
||||
c.executemany("INSERT INTO s_bills VALUES(?,?,?,0)", [(1, SID, 101), (2, SID, 102)])
|
||||
c.executemany("INSERT INTO s_norms VALUES(?,?,0)", [(10, 1), (11, 2)])
|
||||
c.executemany("INSERT INTO s_norms VALUES(?,?,0, NULL)", [(10, 1), (11, 2)])
|
||||
c.executemany("INSERT INTO s_norm_res VALUES(?,?,?,?)",
|
||||
[(100, 10, "DIESEL", 2.0), (101, 10, "TB", 0.5),
|
||||
(102, 11, "TEMP", 1.0)]) # 定额 11 挂临删清单(x_tdel=1)
|
||||
|
||||
Reference in New Issue
Block a user