Your ROOT_URL in app.ini is http://192.168.1.7:3000/ but you are visiting http://shqkxh.org:3000/guofu/dolphin-dev/src/branch/main/dolphindb/project/scripts/pit_at_date.dos You should set ROOT_URL correctly, otherwise the web may not work correctly.
dolphin-dev/dolphindb/project/scripts/pit_at_date.dos

18 lines
768 B

//dropFunctionView('pit_report_period_at_date')
def pit_at_date(table_name, date, report_period_list, code_partition_id) {
source_table = loadTable("dfs://pit_stock_ts", table_name);
m_nDate = take(date, size(report_period_list));
report_period = report_period_list;
query_table = table(report_period, m_nDate);
query_table_exp = select * from cj(query_table, select code from source_table where partition(code, code_partition_id) group by code map);
source_table_part = select source_table.* from ej(source_table, query_table_exp, `code`report_period) where partition(code, code_partition_id);
return select * from aj(query_table_exp, source_table_part, `code`report_period`m_nDate, `code`report_period`appear_at_date)
}
addFunctionView(pit_at_date)