This commit is contained in:
admin
2026-05-14 22:02:06 +09:00
parent 78022b3b15
commit b9f994b1e1
22 changed files with 1225 additions and 126 deletions

20
check_bonus_table.py Normal file
View File

@@ -0,0 +1,20 @@
import psycopg2
conn = psycopg2.connect(host='192.168.0.61', port=55432, dbname='njts_acct', user='njts_app', password='njts_app2025')
cur = conn.cursor()
# bonusテーブル名確認
cur.execute("SELECT table_name FROM information_schema.tables WHERE table_name LIKE '%bonus%' OR table_name LIKE '%employee%'")
print("tables:", cur.fetchall())
# 王珏の賞与データを確認
cur.execute("""
SELECT b.bonus_id, b.bonus_year, b.bonus_month, b.bonus_type, b.payment_date, b.child_support, b.total_bonus
FROM bonus_payments b
JOIN employees e ON b.employee_id = e.employee_id
WHERE e.employee_code = '20190001'
ORDER BY b.bonus_year DESC, b.bonus_month DESC LIMIT 5
""")
print("bonus data:", cur.fetchall())
cur.close()
conn.close()