24 lines
1.1 KiB
Python
24 lines
1.1 KiB
Python
# -*- coding: utf-8 -*-
|
|
import io, sys, pymysql
|
|
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
|
|
conn = pymysql.connect(host='192.168.1.161', user='devgps', password='dev@2021GPS',
|
|
database='zentao_dev_2026', charset='utf8mb4')
|
|
cur = conn.cursor()
|
|
def q(sql):
|
|
cur.execute(sql); return cur.fetchall()
|
|
|
|
# 她 6 月测试需求清单
|
|
ids = q("""SELECT DISTINCT s.id FROM zt_story s LEFT JOIN zt_story_expand e ON e.story_id=s.id
|
|
WHERE s.releaseddate>='2026-06-01' AND s.releaseddate<'2026-07-01' AND s.deleted='0'
|
|
AND (s.assignedTo='sunying' OR e.test_person LIKE '%孙颖%')""")
|
|
scope = {r[0] for r in ids}
|
|
print("她6月测试需求:", sorted(scope))
|
|
|
|
# 4 条 Bug 的 story 是否在范围内
|
|
for r in q("SELECT id, story, tostory, LEFT(title,30) FROM zt_bug WHERE id IN (2566,2567,2568,2569)"):
|
|
print(f"bug {r[0]}: story={r[1]} tostory={r[2]} 在范围内={r[1] in scope} {r[3]}")
|
|
|
|
# 8750 是否当月上线
|
|
for r in q("SELECT id, releaseddate, assignedTo FROM zt_story WHERE id IN (8277, 8750)"):
|
|
print("story:", r)
|