init
This commit is contained in:
@@ -64,7 +64,7 @@ class HTS_DAILY (HTS):
|
|||||||
valid_company = set()
|
valid_company = set()
|
||||||
conn = sqlite3.connect(os.path.join(self.RESOURCE_PATH, "stock.db"))
|
conn = sqlite3.connect(os.path.join(self.RESOURCE_PATH, "stock.db"))
|
||||||
cursor = conn.cursor()
|
cursor = conn.cursor()
|
||||||
cursor.execute('select CODE, NAME, max(ymd) as ymd from (select * from fnguide where type != "E" and total_assets >= 0 order by total_assets DESC) group by 1 order by total_assets desc')
|
cursor.execute('select CODE, NAME, max(ymd) as ymd from fnguide where type != "E" group by 1 order by total_assets desc')
|
||||||
items = cursor.fetchall()
|
items = cursor.fetchall()
|
||||||
cursor.close()
|
cursor.close()
|
||||||
conn.close()
|
conn.close()
|
||||||
|
|||||||
@@ -431,6 +431,7 @@ class AnalyzerSqlite:
|
|||||||
self.makeDirectory(outPath)
|
self.makeDirectory(outPath)
|
||||||
|
|
||||||
stockTableName = 'stock'
|
stockTableName = 'stock'
|
||||||
|
fnguideTableName = 'fnguide'
|
||||||
stockAnalysisTableName = 'stock_analysis'
|
stockAnalysisTableName = 'stock_analysis'
|
||||||
stockAnalysisWeeklyTableName = 'stock_analysis_weekly'
|
stockAnalysisWeeklyTableName = 'stock_analysis_weekly'
|
||||||
stockAnalysisMonthlyTableName = 'stock_analysis_monthly'
|
stockAnalysisMonthlyTableName = 'stock_analysis_monthly'
|
||||||
@@ -438,7 +439,8 @@ class AnalyzerSqlite:
|
|||||||
conn = sqlite3.connect(self.stockFileName)
|
conn = sqlite3.connect(self.stockFileName)
|
||||||
cursor = conn.cursor()
|
cursor = conn.cursor()
|
||||||
|
|
||||||
cursor.execute('SELECT distinct code, name FROM ' + stockTableName + ' order by code')
|
#cursor.execute('SELECT distinct code, name FROM ' + stockTableName + ' order by code')
|
||||||
|
cursor.execute('select CODE, NAME, max(ymd) as ymd from ' + fnguideTableName + ' where type != "E" group by 1 order by total_assets desc')
|
||||||
items = cursor.fetchall()
|
items = cursor.fetchall()
|
||||||
|
|
||||||
cursor.close()
|
cursor.close()
|
||||||
|
|||||||
Reference in New Issue
Block a user